/* ========================================================================== 
   1. ROOT VARIABLES & GLOBAL SETUP
   ========================================================================== */
:root {
  color-scheme: dark;

  --bg-main: #040b1a;
  --bg-card: rgba(20, 20, 25, 0.7);
  --border-neutral: rgba(255, 255, 255, 0.05);

  --text-primary: #ffffff;
  --text-secondary: #b3b9c9;

  /* CATZ brand and utility colours */
  --catz-green: #00ff66;
  --danger-red: #ff3344;
  --discord-blurple: #5865f2;

  --content-width: 850px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 120px 24px 60px;
  position: relative;
  overflow-x: hidden;
  color: var(--text-primary);
  background-color: var(--bg-main);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(5, 12, 28, 0.25), rgba(5, 12, 28, 0.25)),
    radial-gradient(rgba(255, 255, 255, 0.1) 1.2px, transparent 0),
    linear-gradient(
      180deg,
      rgba(6, 17, 38, 0.88) 0%,
      rgba(4, 11, 26, 0.98) 100%
    );
  background-size:
    cover,
    32px 32px,
    cover;
  background-position: center top;
}


/* ========================================================================== 
   2. LAYOUT CONTAINERS & SYSTEM RHYTHM
   ========================================================================== */
.wrapper {
  width: 100%;
  max-width: var(--content-width);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 115px;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wrapper > section,
.wrapper > header {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.content-section {
  scroll-margin-top: 130px;
}

#about {
  padding: 40px 40px 48px;
  background: rgba(16, 39, 90, 0.27);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

#about:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

.wrapper > section > *:last-child,
.wrapper > header > *:last-child {
  margin-bottom: 0 !important;
}

.content-section::before {
  content: "";
  position: absolute;
  top: -70px;
  left: 50%;
  width: 100%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
}

/* ========================================================================== 
   3. TYPOGRAPHY HIERARCHY
   ========================================================================== */
h1 {
  margin-bottom: 12px;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

h2 {
  margin-bottom: 24px;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #ffffff 40%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ========================================================================== 
   4. HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10vh;
  padding-bottom: 20px;
  text-align: center;
}

.crew-logo {
  width: 160px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 12px rgba(0, 255, 102, 0.5));
  animation: eyeGlow 4s ease-in-out infinite;
  transition: filter 0.3s ease;
}

.crew-logo:hover {
  filter: drop-shadow(0 0 25px rgba(0, 255, 102, 0.9));
}

.hero-tagline {
  max-width: 680px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
}

.section-subtitle {
  margin-top: -8px;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.6);
}

#crew > h2 {
  text-align: center;
}

#crew > .section-subtitle {
  width: 100%;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

/* Cinematic hero showcase */
.hero-image-container {
  width: 100%;
  position: relative;
  margin-top: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.hero-image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(12, 13, 16, 0.3) 0%,
    transparent 15%,
    transparent 85%,
    rgba(12, 13, 16, 0.4) 100%
  );
}

.hero-showcase-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.8) contrast(1.02);
}

/* ========================================================================== 
   5. RULES COMPONENT
   ========================================================================== */
.rules-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.rule-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-neutral);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.rule-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rule-number {
  padding: 2px 8px;
  color: var(--catz-green);
  background: rgba(0, 255, 102, 0.1);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rule-card h3 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.rule-card ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.rule-card li {
  position: relative;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.rule-card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.3);
}

.ban-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  color: var(--danger-red);
  background: rgba(255, 51, 68, 0.1);
  border: 1px solid rgba(255, 51, 68, 0.2);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ========================================================================== 
   6. OFFICIAL CREW CARD
   ========================================================================== */
.crew-card-layout {
  width: 100%;
  display: flex;
  justify-content: center;
}

.crew-card {
  width: 100%;
  max-width: 720px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 40px;
  background: linear-gradient(
    145deg,
    rgba(20, 20, 25, 0.82),
    rgba(14, 20, 18, 0.72)
  );
  border: 1px solid var(--border-neutral);
  border-bottom: 3px solid var(--catz-green);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.crew-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 102, 0.28);
  box-shadow: 0 14px 34px rgba(0, 255, 102, 0.1);
}

.crew-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--catz-green);
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.18);
  border-radius: 14px;
  font-size: 1.65rem;
  line-height: 1;
}

.crew-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  color: var(--catz-green);
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.24);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.7px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.crew-card h3 {
  margin-bottom: 14px;
}

.crew-intro {
  margin-bottom: 24px;
}

.platform-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  list-style: none;
}

.platform-list li {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 12px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.platform-list i {
  color: var(--catz-green);
  font-size: 1rem;
}

.crew-availability {
  margin-bottom: 0;
  padding: 14px 16px;
  background: rgba(0, 255, 102, 0.04);
  border-left: 2px solid rgba(0, 255, 102, 0.55);
  border-radius: 0 10px 10px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.crew-card .button-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

/* ========================================================================== 
   7. UI BUTTON COMPONENTS
   ========================================================================== */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  color: inherit;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.btn-primary {
  color: #000000;
  background: #ffffff;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.btn-discord {
  color: #ffffff;
  background: var(--discord-blurple);
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
}

.btn-outline {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

/* ========================================================================== 
   8. MISC & UTILITIES
   ========================================================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--bg-main);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.site-footer {
  margin-top: 40px;
  padding-bottom: 40px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer p {
  margin-bottom: 0;
  color: inherit;
  font-size: inherit;
}

/* ========================================================================== 
   9. FLOATING PILL NAVIGATION DOCK
   ========================================================================== */
.navbar {
  width: max-content;
  position: absolute;
  top: 32px;
  left: 50%;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 10px 12px 10px 28px;
  transform: translateX(-50%);
  background: rgba(16, 39, 90, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links .nav-cta {
  padding: 8px 18px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.nav-links .nav-cta:hover {
  color: var(--bg-main);
  background: var(--text-primary);
  border-color: var(--text-primary);
  transform: translateY(0);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

/* ========================================================================== 
   10. GLOBAL RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  body {
    padding-left: 40px;
    padding-right: 40px;
  }

  #about {
    padding: 36px 36px 40px;
  }

  .wrapper {
    gap: 110px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 100px 32px 40px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .rules-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .navbar {
    top: 16px;
    gap: 20px;
    padding: 8px 10px 8px 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .wrapper {
    gap: 90px;
  }

  .content-section::before {
    top: -45px;
  }
}

@media (max-width: 480px) {
  body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .wrapper {
    gap: 65px;
  }

  .navbar {
    gap: 14px;
    padding-left: 16px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.82rem;
  }

  .nav-links .nav-cta {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .crew-logo {
    width: 115px;
    margin-bottom: 16px;
  }

  h1 {
    font-size: 2.1rem;
  }

  h2 {
    margin-bottom: 20px;
    font-size: 1.55rem;
  }

  p {
    font-size: 1.08rem;
    line-height: 1.65;
  }

  .rule-card {
    padding: 22px 18px;
  }

  #about {
    padding: 24px 16px 28px;
    border-radius: 16px;
  }

  #about:hover {
    transform: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  }

  .crew-card {
    padding: 24px 20px;
  }

  .crew-status {
    font-size: 0.66rem;
  }

  .platform-list,
  .crew-card .button-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .nav-brand {
    display: none;
  }

  .navbar {
    padding-left: 12px;
  }
}

/* ========================================================================== 
   11. LINK SNAPPING TUNING
   ========================================================================== */
#about {
  scroll-margin-top: 22vh;
}

/* ========================================================================== 
   12. ENTRANCE ANIMATION ENGINE
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes eyeGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(0, 255, 102, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(0, 255, 102, 0.75));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
