/* =====================================================
   DARK HORSE LEAGUE
   Color: #00fff6 cyan emission on near-black field
   ===================================================== */

@font-face {
  font-family: 'HayghinDaedric';
  src: url('../assets/fonts/HayghinDaedric.ttf') format('truetype');
  font-display: swap;
}

:root {
  --cyan: #00fff6;
  --cyan-soft: rgba(0, 255, 246, 0.55);
  --cyan-faint: rgba(0, 255, 246, 0.18);
  --cyan-ghost: rgba(0, 255, 246, 0.06);
  --bg-0: #04060a;
  --bg-1: #07090f;
  --bg-2: #0a0d14;
  --ink: #e6f9ff;
  --ink-dim: #8aa0aa;
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  /* Cursor uses an SVG vector so edges stay crisp at any DPR/zoom level (the
     previous PNG was rasterized at one size and aliased badly when the OS
     rescaled it). The path inside cursor-oht.svg is the actual "Oht" glyph
     extracted from HayghinDaedric.ttf - same source as the matrix rain font.
     PNG kept in /assets/cursors/ as a fallback reference but no longer wired in. */
  --cursor-horseshoe: url('../assets/cursors/cursor-oht.svg') 24 24, auto;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: var(--cursor-horseshoe);
}

/* smooth anchor scrolling */
html {
  scroll-behavior: smooth;
}

/* ---------- THEMED SCROLLBAR ----------
   Opaque cyan-tinted track + bright cyan thumb. The track has its own
   purposeful dark-cyan color (not transparent showing body bg through), so
   the gutter reads as part of the design rather than empty default space. */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) #061417;
}

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
  background: #061417;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece {
  background: linear-gradient(180deg, #051116 0%, #07181c 100%);
  box-shadow: inset 1px 0 0 var(--cyan-ghost); /* faint cyan accent on inner edge */
}

/* Kill the default up/down arrow buttons - they have their own background
   and create a dark patch above/below the thumb that breaks the floating look. */
::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-thumb {
  background-color: var(--cyan);
  background-clip: padding-box;
  border: 3px solid transparent;
  border-radius: 7px;
  box-shadow:
    0 0 10px rgba(0, 255, 246, 0.75),
    inset 0 0 5px rgba(255, 255, 255, 0.30);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #ffffff;
  box-shadow:
    0 0 18px rgba(0, 255, 246, 1),
    inset 0 0 8px rgba(255, 255, 255, 0.55);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 255, 246, 1);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Hide the scrollbar entirely while the welcome/intro screen is visible.
   The intro element starts with aria-hidden="false" and flips to "true" when
   enterSite() runs (or immediately on mobile via the disable block). When
   hidden, scrolling is also disabled - which is correct since the intro is
   a pre-content state with nothing to scroll. */
html:has(.intro[aria-hidden="false"]) {
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; }

/* keep custom cursor on every interactive element (override browser defaults) */
a, button, [role="button"], label, summary, select, [type="submit"], [type="button"] {
  cursor: var(--cursor-horseshoe);
}

/* show native cursor on text fields */
input, textarea { cursor: text; }

/* =====================================================
   INTRO SCREEN
   ===================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at center, #050609 0%, #000 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem; /* small breathing room between horse and text */
  cursor: var(--cursor-horseshoe);
  transition: opacity 1.2s ease, visibility 1.2s ease;
  animation: introFadeIn 7s ease-out;
}

/* fades the welcome screen up from black on first page load */
@keyframes introFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.intro.is-leaving {
  animation: none; /* cancel any in-progress fade-in so the transition can fade us out cleanly */
  opacity: 0;
  visibility: hidden;
}

.intro-stage {
  position: relative;
  width: min(960px, 92vw);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* photo muzzle - everything fades to black except the nostril windows */
.muzzle {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 3;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;

  /* ===========================================================================
     TESTING / TEMPORARILY DISABLED  ::  uncomment to restore each effect
     =========================================================================== */

  /* --- (1) CYAN COLORIZATION --------------------------------------------------
     Converts the grayscale muzzle photo into the site's cyan palette.
     Without this, the photo shows in its natural black-and-white tones.
     To restore: uncomment the `filter` block below.
  */
  /* filter:
    brightness(0.88)
    contrast(1.08)
    sepia(1)
    saturate(4.5)
    hue-rotate(155deg); */

  /* --- (2) ELLIPTICAL MASK ----------------------------------------------------
     Clips the muzzle photo to a soft elliptical window covering the upper
     bridge of nose, both nostrils, and the lower jaw/lips. Without this the
     full rectangular photo is visible.
     Center: 50% 50%   Size: 34% × 56%   Solid until 45%, fades to 100%.
     To restore: uncomment the `mask-image` block below.
  */
  /* -webkit-mask-image:
    radial-gradient(ellipse 34% 56% at 50% 50%, #000 45%, transparent 100%);
          mask-image:
    radial-gradient(ellipse 34% 56% at 50% 50%, #000 45%, transparent 100%); */

  /* mask compositing/repeat rules - kept active so the mask works the moment it's restored */
  -webkit-mask-composite: source-over;
          mask-composite: add;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}

/* MOBILE ONLY: re-enable the elliptical mask so the muzzle looks focused on smaller screens.
   Desktop remains the full unmasked rectangle. */
@media (max-width: 720px) {
  .muzzle {
    -webkit-mask-image:
      radial-gradient(ellipse 34% 56% at 50% 50%, #000 45%, transparent 100%);
            mask-image:
      radial-gradient(ellipse 34% 56% at 50% 50%, #000 45%, transparent 100%);
  }
}

/* volumetric smoke canvas - covers full intro screen */
.intro-smoke {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* glow pool behind nostrils (atmospheric backlight) */
.intro-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 65%,
    rgba(0, 255, 246, 0.18) 0%,
    rgba(0, 255, 246, 0.06) 28%,
    transparent 60%);
  filter: blur(50px);
  z-index: 1;
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.08); }
}

/* intro text */
.intro-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  position: relative;
  z-index: 5;
  /* nudge the text upward regardless of how tall the horse is */
  transform: translateY(-12vh);
}

.intro-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: 0.18em;
  color: var(--ink);
  opacity: 0.92;
  text-shadow: 0 0 30px rgba(0, 255, 246, 0.25);
}

/* "Dark Horse League" line: cyan, with each letter dripping its Daedric counterpart */
.intro-tagline-glow {
  display: inline-block;
  color: var(--cyan);
  text-shadow:
    0 0 8px var(--cyan-soft),
    0 0 24px rgba(0, 255, 246, 0.3);
}

.dhl-char {
  position: relative;
  display: inline-block;
}

/* canvas overlay that renders matrix-style Daedric trails from each letter (handled in main.js) */
.dhl-trail-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.intro-skip {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--cyan);
  opacity: 0;
  /* phase 1: flicker on like a sign powering up. phase 2: continuous appear/disappear pulse. */
  animation:
    skipFlickerIn 4s ease 5s forwards,
    skipPulse 2.6s ease-in-out 9s infinite;
}

/* flicker on like a sign powering up - ends at full opacity to hand off seamlessly to skipPulse */
@keyframes skipFlickerIn {
  0%, 5%  { opacity: 0; }
  10%     { opacity: 0.7; }
  13%     { opacity: 0.05; }
  20%     { opacity: 0.75; }
  25%     { opacity: 0.15; }
  35%     { opacity: 0.85; }
  40%     { opacity: 0.25; }
  55%     { opacity: 0.8; }
  62%     { opacity: 0.4; }
  85%     { opacity: 0.85; }
  100%    { opacity: 0.9; }
}

/* steady appear-disappear pulse - starts visible (matches flicker-in's end state) then fades fully out and back in */
@keyframes skipPulse {
  0%, 100% {
    opacity: 0.9;
    filter: brightness(1.35);
    text-shadow:
      0 0 14px var(--cyan-soft),
      0 0 30px rgba(0, 255, 246, 0.4);
  }
  50% {
    opacity: 0;
    filter: brightness(0.7);
    text-shadow: 0 0 4px var(--cyan-faint);
  }
}

/* =====================================================
   MAIN SITE
   ===================================================== */

.site {
  position: relative;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1.4s ease 0.2s;
  /* compensate for the fixed nav so content starts below it (matches the previous in-flow nav layout) */
  padding-top: 90px;
}

.site.is-revealed {
  opacity: 1;
}

/* particles canvas */
.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* daedric rain - matrix-style falling glyphs, behind everything */
.daedric-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* hex grid background overlay */
.hex-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'><path d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z' fill='%2300fff6' fill-opacity='0.05'/></svg>");
  background-size: 56px 98px;
  opacity: 0.7;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* aura orbs - the heart of the brief */
.aura {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.aura-1 {
  width: 720px; height: 720px;
  top: -180px; left: -120px;
  background: radial-gradient(circle,
    rgba(0, 255, 246, 0.42) 0%,
    rgba(0, 180, 255, 0.18) 35%,
    transparent 70%);
  animation: drift1 22s ease-in-out infinite;
}

.aura-2 {
  width: 880px; height: 880px;
  top: 30vh; right: -260px;
  background: radial-gradient(circle,
    rgba(0, 255, 246, 0.35) 0%,
    rgba(20, 100, 255, 0.15) 40%,
    transparent 72%);
  animation: drift2 28s ease-in-out infinite;
}

.aura-3 {
  width: 620px; height: 620px;
  bottom: -160px; left: 30%;
  background: radial-gradient(circle,
    rgba(0, 255, 246, 0.32) 0%,
    rgba(0, 200, 255, 0.12) 40%,
    transparent 72%);
  animation: drift3 26s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(80px, 60px) scale(1.1); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-100px, 40px) scale(0.92); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(60px, -80px) scale(1.05); }
}

/* dark vignette to keep edges deep */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 90%),
    linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.7) 100%);
}

/* mist trail canvas - sits above page content, below intro overlay */
.cursor-mist {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

/* mute toggle - persistent in bottom-right corner */
.mute-toggle {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 9100;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(4, 8, 14, 0.7);
  border: 1px solid var(--cyan-faint);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

/* only visible after the user enters the site */
.site.is-revealed ~ .mute-toggle,
body.audio-ready .mute-toggle {
  opacity: 1;
  pointer-events: auto;
}

.mute-toggle:hover {
  background: rgba(0, 255, 246, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 246, 0.3);
  border-color: var(--cyan);
}

.mute-toggle .icon-off { display: none; }
.mute-toggle.is-muted .icon-on { display: none; }
.mute-toggle.is-muted .icon-off { display: inline-block; }
.mute-toggle.is-muted { color: var(--ink-dim); border-color: rgba(138, 160, 170, 0.3); }

/* cursor glow */
.cursor-glow {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle,
    rgba(0, 255, 246, 0.18) 0%,
    rgba(0, 255, 246, 0.06) 30%,
    transparent 65%);
  filter: blur(8px);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  left: -1000px; top: -1000px;
}

/* =====================================================
   NAV
   ===================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Extra bottom padding gives the gradient room to fade naturally below the
     nav content. The visible nav row is the same height; only the soft fade
     extends further down. */
  padding: 1.6rem 3rem 2.6rem 3rem;
  /* Gradient fade-out so content scrolling underneath fully obscures at the
     top and fades to transparent at the bottom edge. Cheap GPU-composited
     paint - no backdrop-filter (avoids the rAF/matrix-rain perf hit we just
     fixed elsewhere). */
  background: linear-gradient(180deg,
    rgba(4, 6, 10, 0.95) 0%,
    rgba(4, 6, 10, 0.80) 55%,
    rgba(4, 6, 10, 0)    100%);
  /* No pointer-events on the transparent portion so clicks pass through to
     content below the nav (only the visible nav items intercept). */
  pointer-events: none;
}

/* Re-enable pointer events on the actual interactive children so they remain
   clickable inside the otherwise pass-through gradient zone. */
.nav > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark-wrap {
  position: relative;
  display: inline-block;
  height: 48px;
  line-height: 0;
}

.brand-mark {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0, 255, 246, 0.35));
  transition: filter 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 2;
}

.brand:hover .brand-mark {
  filter: drop-shadow(0 0 20px rgba(0, 255, 246, 0.6));
  transform: scale(1.05);
}

/* mist fire emanating from the logo - soft wisps rise + spread outward */
.brand-mist {
  position: absolute;
  inset: -16px -20px -4px -20px; /* extend beyond logo so mist can drift past edges */
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.brand-mist i {
  position: absolute;
  /* default morphing wave-shaped border-radius */
  border-radius: 60% 40% 55% 70% / 70% 55% 65% 50%;
  background: radial-gradient(ellipse,
    rgba(255, 255, 255, 1) 0%,
    rgba(150, 250, 255, 0.95) 18%,
    rgba(0, 245, 255, 0.75) 40%,
    rgba(0, 200, 240, 0.4) 65%,
    transparent 100%);
  filter: blur(5px);
  animation:
    mistFireBloom var(--dur, 3.4s) ease-out infinite,
    mistFireMorph var(--morph, 2.2s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s), var(--morph-delay, 0s);
  opacity: 0;
  mix-blend-mode: screen;
}

/* 12 wave-blobs - wider than tall, distributed across the logo */
.brand-mist i:nth-child(1)  { left: 0%;  bottom: 2%;  width: 30px; height: 18px; --dur: 3.2s; --delay: 0s;   --dx: -14px; --morph: 1.8s; }
.brand-mist i:nth-child(2)  { left: 16%; bottom: 12%; width: 32px; height: 20px; --dur: 3.6s; --delay: 0.4s; --dx: -6px;  --morph: 2.4s; --morph-delay: 0.3s; }
.brand-mist i:nth-child(3)  { left: 36%; bottom: 4%;  width: 36px; height: 22px; --dur: 3.8s; --delay: 0.8s; --dx: -2px;  --morph: 2.0s; --morph-delay: 0.6s; }
.brand-mist i:nth-child(4)  { left: 56%; bottom: 14%; width: 34px; height: 22px; --dur: 4.0s; --delay: 1.2s; --dx: 4px;   --morph: 2.6s; --morph-delay: 0.2s; }
.brand-mist i:nth-child(5)  { left: 76%; bottom: 6%;  width: 30px; height: 19px; --dur: 3.4s; --delay: 1.6s; --dx: 10px;  --morph: 1.9s; --morph-delay: 0.5s; }
.brand-mist i:nth-child(6)  { left: 92%; bottom: 0%;  width: 26px; height: 16px; --dur: 3.0s; --delay: 2.0s; --dx: 16px;  --morph: 2.2s; }
.brand-mist i:nth-child(7)  { left: 8%;  bottom: 32%; width: 28px; height: 18px; --dur: 3.5s; --delay: 2.4s; --dx: -10px; --morph: 2.3s; --morph-delay: 0.4s; }
.brand-mist i:nth-child(8)  { left: 32%; bottom: 38%; width: 32px; height: 20px; --dur: 3.7s; --delay: 0.6s; --dx: -3px;  --morph: 2.0s; --morph-delay: 0.8s; }
.brand-mist i:nth-child(9)  { left: 56%; bottom: 36%; width: 30px; height: 19px; --dur: 3.4s; --delay: 1.0s; --dx: 5px;   --morph: 2.5s; --morph-delay: 0.1s; }
.brand-mist i:nth-child(10) { left: 80%; bottom: 30%; width: 26px; height: 17px; --dur: 3.6s; --delay: 1.4s; --dx: 8px;   --morph: 1.8s; --morph-delay: 0.7s; }
.brand-mist i:nth-child(11) { left: 24%; bottom: 56%; width: 24px; height: 16px; --dur: 3.2s; --delay: 1.8s; --dx: -7px;  --morph: 2.1s; --morph-delay: 0.3s; }
.brand-mist i:nth-child(12) { left: 64%; bottom: 58%; width: 26px; height: 17px; --dur: 3.0s; --delay: 2.2s; --dx: 8px;   --morph: 2.4s; --morph-delay: 0.5s; }

/* rise + spread + fade - brighter peak, holds longer */
@keyframes mistFireBloom {
  0%   { transform: translate(0, 0) scale(0.6);            opacity: 0; }
  10%  { opacity: 1; }
  70%  { opacity: 0.95; }
  100% { transform: translate(var(--dx), -65px) scale(1.6); opacity: 0; }
}

/* irregular morphing shape - looks like flowing flame waves */
@keyframes mistFireMorph {
  0%   { border-radius: 60% 40% 55% 70% / 70% 55% 65% 50%; }
  100% { border-radius: 40% 70% 65% 45% / 55% 70% 50% 65%; }
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.35em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 2.4rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-soft);
}

.nav-cta {
  color: var(--cyan) !important;
  border: 1px solid var(--cyan-faint);
  padding: 0.6rem 1.4rem;
  clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
  background: rgba(0, 255, 246, 0.04);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
  background: rgba(0, 255, 246, 0.12);
  box-shadow: 0 0 24px rgba(0, 255, 246, 0.35);
}

/* hamburger toggle - hidden on desktop, visible on mobile */
.nav-toggle {
  display: none;
  background: rgba(0, 255, 246, 0.04);
  border: 1px solid var(--cyan-faint);
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-toggle:hover { background: rgba(0, 255, 246, 0.12); box-shadow: 0 0 14px rgba(0, 255, 246, 0.3); }

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-soft);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* hamburger -> X when nav is open */
.nav.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =====================================================
   HERO
   ===================================================== */

.hero {
  position: relative;
  z-index: 4;
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  color: var(--cyan);
  opacity: 0.75;
  margin-bottom: 2rem;
  text-shadow: 0 0 14px var(--cyan-soft);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 10vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow:
    0 0 1px rgba(0,255,246,0.4),
    0 0 20px rgba(0,255,246,0.35),
    0 0 60px rgba(0,255,246,0.18);
}

.hero-title .line-2 {
  display: block;
  color: var(--cyan);
  animation: titlePulse 2.5s ease-in-out infinite;
  /* Promote to its own compositor layer so the matrix-rain canvas (rAF on main
     thread) doesn't get re-rasterized when the title pulses. */
  will-change: text-shadow;
}

/* Pulse uses ONLY text-shadow (no filter: brightness, which forces an offscreen
   buffer every frame) and caps blur radius at 60px (removed the 120/220px outer
   halos that did the most work per pixel). The matrix rain animation runs on
   the same main thread, so cheaper pulse = smoother rain. */
@keyframes titlePulse {
  0%, 100% {
    text-shadow:
      0 0 6px var(--cyan),
      0 0 24px var(--cyan-soft),
      0 0 60px rgba(0,255,246,0.4);
  }
  50% {
    text-shadow:
      0 0 14px var(--cyan),
      0 0 44px var(--cyan-soft),
      0 0 60px rgba(0,255,246,0.7);
  }
}

.hero-tagline {
  margin-top: 1.6rem;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.hero-cta {
  /* equal-width columns guarantee both buttons match no matter what text labels they hold */
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  max-width: 520px;
}

@media (max-width: 520px) {
  .hero-cta { grid-template-columns: 1fr; max-width: 280px; }
}

.btn {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 1rem 2.4rem;
  min-width: 240px;
  text-align: center;
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  cursor: var(--cursor-horseshoe);
  position: relative;
  transition: all 0.3s ease;
}

.btn-primary {
  color: var(--bg-0);
  background: var(--cyan);
  box-shadow: 0 0 30px rgba(0, 255, 246, 0.45), 0 0 80px rgba(0, 255, 246, 0.2);
  font-weight: 600;
}

.btn-primary:hover {
  box-shadow: 0 0 50px rgba(0, 255, 246, 0.7), 0 0 120px rgba(0, 255, 246, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--cyan);
  background: rgba(0, 255, 246, 0.04);
  border: 1px solid var(--cyan-faint);
}

.btn-ghost:hover {
  background: rgba(0, 255, 246, 0.12);
  box-shadow: 0 0 24px rgba(0, 255, 246, 0.3);
}

.btn-large {
  font-size: 0.9rem;
  padding: 1.3rem 3rem;
  letter-spacing: 0.4em;
}

/* scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.6;
  pointer-events: none;
}
.scroll-indicator span {
  width: 2px;
  height: 36px;
  background: linear-gradient(to bottom, transparent 0%, var(--cyan) 50%, var(--cyan) 100%);
  box-shadow: 0 0 8px rgba(0, 255, 246, 0.7), 0 0 14px rgba(0, 255, 246, 0.35);
  border-radius: 1px;
  animation: scrollLine 2.4s ease-in-out infinite;
}
.scroll-indicator small {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--ink-dim);
  text-transform: uppercase;
  /* compensate for trailing letter-spacing ghost space */
  padding-left: 0.4em;
}
@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* =====================================================
   SECTIONS
   ===================================================== */

.section {
  position: relative;
  z-index: 4;
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 4rem;
}

.section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  color: var(--cyan);
  opacity: 0.7;
  margin-bottom: 1rem;
  text-shadow: 0 0 12px var(--cyan-soft);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(0,255,246,0.2);
}

.section-sub {
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  max-width: 50ch;
  margin: 0 auto;
}

.section-quiet {
  text-align: center;
}

/* HALL OF FAME */
.section-hall { text-align: center; }

.hall-tag-line { margin-top: 0.8rem; }

.hall-preview-tag {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--cyan-faint);
}

/* FEATURED reigning champion card */
.hall-featured {
  max-width: 540px;
  margin: 3rem auto 4rem;
  padding: 2.4rem 2rem 2rem;
  border: 1px solid var(--cyan-faint);
  background: linear-gradient(180deg, rgba(0, 255, 246, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
  position: relative;
  text-align: center;
  box-shadow: 0 0 60px rgba(0, 255, 246, 0.06);
}

.hall-featured-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan-soft);
  margin-bottom: 1.5rem;
}

.hall-featured-trophy {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--cyan);
  filter: drop-shadow(0 0 18px rgba(0, 255, 246, 0.55));
  animation: trophyPulse 4s ease-in-out infinite;
}

.hall-featured-trophy svg {
  width: 80px;
  height: 120px;
}

@keyframes trophyPulse {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(0, 255, 246, 0.5)); }
  50%      { filter: drop-shadow(0 0 28px rgba(0, 255, 246, 0.8)); }
}

.hall-featured-team {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-shadow: 0 0 22px rgba(0, 255, 246, 0.35);
  margin-bottom: 0.4rem;
}

.hall-featured-owner {
  font-size: 0.95rem;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hall-featured-league {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.85;
  margin-bottom: 1.3rem;
}

.hall-featured-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.hall-featured-stats strong {
  color: var(--cyan);
  font-weight: 600;
  text-shadow: 0 0 10px var(--cyan-soft);
}

.hall-featured-stats .stat-divider { opacity: 0.4; }

/* GRID: year cards, each containing a list of winners for that year */
.hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
}

.hall-card {
  padding: 1.6rem 1.6rem 1.4rem;
  border: 1px solid var(--cyan-ghost);
  background: rgba(0, 255, 246, 0.02);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.hall-card:hover {
  border-color: var(--cyan-faint);
  background: rgba(0, 255, 246, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 0 26px rgba(0, 255, 246, 0.1);
}

/* card head: year + trophy inline at top */
.hall-card-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--cyan-ghost);
}

.hall-year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-shadow: 0 0 14px var(--cyan-soft);
  line-height: 1;
}

.hall-trophy {
  display: inline-flex;
  align-items: center;
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(0, 255, 246, 0.45));
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hall-trophy svg {
  width: 36px;
  height: 36px;
}

.hall-card:hover .hall-trophy {
  opacity: 1;
  transform: scale(1.08);
}

/* winners list inside each year card */
.hall-winners-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.hall-winner {
  text-align: center;
}

.hall-winner + .hall-winner {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(0, 255, 246, 0.08);
}

.hall-winner-team {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.hall-winner-meta {
  font-size: 0.65rem;
  color: var(--ink-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
}

.hall-footnote {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 2rem;
  opacity: 0.75;
}

/* STANDINGS table */
.section-standings { text-align: center; }

/* carousel layout - controls bar on top, table below */
.standings-carousel {
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
}

.standings-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}

.standings-controls .standings-meta {
  margin-bottom: 0; /* meta now lives inside controls bar, not above the table */
  flex: 1;
  justify-content: center;
}

/* Carousel arrow uses a two-layer trick: ::after is the full bright cyan hex
   underneath, ::before is a slightly-inset dark hex on top. The cyan only
   shows where the inset doesn't cover - giving a uniform border that follows
   the clip-path perfectly (a plain border on a clip-pathed element gets
   eaten at the diagonals). */
.carousel-arrow {
  flex-shrink: 0;
  position: relative;
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.3s ease;
  text-shadow: 0 0 10px var(--cyan-soft);
  filter: drop-shadow(0 0 6px rgba(0, 255, 246, 0.4));
}

/* full-size bright cyan hex (becomes the visible "border" at the edges) */
.carousel-arrow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  clip-path: polygon(15% 0, 85% 0, 100% 50%, 85% 100%, 15% 100%, 0 50%);
  z-index: -2;
}

/* slightly-inset dark hex covers most of the cyan, leaving a 1.5px rim */
.carousel-arrow::before {
  content: '';
  position: absolute;
  inset: 1.5px;
  background: rgba(4, 6, 10, 0.94);
  clip-path: polygon(15% 0, 85% 0, 100% 50%, 85% 100%, 15% 100%, 0 50%);
  z-index: -1;
  transition: background 0.25s ease;
}

.carousel-arrow:hover::before {
  background: rgba(0, 36, 42, 0.92); /* slight cyan-tinted dark on hover */
}
.carousel-arrow:hover {
  filter: drop-shadow(0 0 14px rgba(0, 255, 246, 0.7));
  text-shadow: 0 0 14px var(--cyan), 0 0 28px var(--cyan-soft);
}

.carousel-arrow:active { transform: scale(0.94); }

.carousel-stage {
  flex: 1;
  min-width: 0;
  transition: opacity 0.18s ease;
}

.carousel-stage.is-changing {
  opacity: 0.2;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(0, 255, 246, 0.15);
  border: 1px solid var(--cyan-faint);
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.carousel-dot:hover { background: rgba(0, 255, 246, 0.35); }

.carousel-dot.is-active {
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 255, 246, 0.7);
  transform: scale(1.25);
}

.league-name {
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-shadow: 0 0 14px var(--cyan-soft);
  text-transform: uppercase;
}

.standings-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.standings-submeta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  flex-wrap: wrap;
  justify-content: center;
}

.league-position {
  color: var(--cyan);
  opacity: 0.8;
  text-shadow: 0 0 8px var(--cyan-faint);
}
.standings-week { color: var(--cyan); text-shadow: 0 0 12px var(--cyan-soft); }
.standings-source { font-size: 0.65rem; opacity: 0.7; }
.standings-divider { opacity: 0.4; }
.standings-tag {
  font-size: 0.6rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--cyan-faint);
  color: var(--cyan);
  letter-spacing: 0.25em;
}

.standings-wrap {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
  overflow-x: auto;
  border: 1px solid var(--cyan-ghost);
  background: linear-gradient(180deg, rgba(0,255,246,0.02), rgba(0,0,0,0));
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.standings-table thead {
  background: rgba(0, 255, 246, 0.05);
}

.standings-table th {
  padding: 1rem 0.9rem;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--cyan-faint);
  text-shadow: 0 0 10px var(--cyan-soft);
}

.standings-table th.num,
.standings-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Narrow the rank column to roughly hex-badge width + a little breathing room,
   and center the contents (header label and badge) so the rank reads as a tight,
   centered indicator instead of left-padding next to a wide empty space. */
.standings-table th.col-rank {
  width: 72px;
  text-align: center;
}
.standings-table tbody td:first-child {
  text-align: center;
}

.standings-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(0, 255, 246, 0.04);
  color: var(--ink);
}

/* hex-clipped rank badge */
/* Rank badge uses the same two-layer trick as .carousel-arrow so the cyan
   border follows the clip-path perfectly without diagonal gaps. */
.rank-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--cyan);
  background: transparent;
  border: none;
}

/* full-size bright cyan hex underneath */
.rank-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  z-index: -2;
}

/* slightly-inset dark hex covers most of the cyan, leaving a 1px rim */
.rank-badge::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: rgba(4, 6, 10, 0.94);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  z-index: -1;
}

.team-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.team-owner {
  font-size: 0.78rem;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}

/* row hover */
.rank-row {
  transition: background 0.25s ease;
}
.rank-row:hover {
  background: rgba(0, 255, 246, 0.04);
}

/* playoff line: top 4 rows have cyan left edge accent */
.rank-row.playoff td:first-child {
  border-left: 2px solid var(--cyan);
  box-shadow: -1px 0 16px rgba(0, 255, 246, 0.18);
}

/* leader: extra glow on rank 1 */
/* Leader (rank 1): keep the bright cyan border but tint the dark interior with
   cyan for the "lit-up" look, and use filter: drop-shadow for the outer glow
   (box-shadow would render rectangular outside the hex clip). */
.rank-row.rank-leader .rank-badge {
  color: var(--cyan);
  filter: drop-shadow(0 0 14px rgba(0, 255, 246, 0.55));
}
.rank-row.rank-leader .rank-badge::before {
  background: rgba(0, 38, 44, 0.85); /* dark with cyan tint, denser-feeling fill */
}

/* Cyan crown floats above the leader's rank badge. Inline SVG data URI keeps
   it asset-free; filter: drop-shadow gives it the same cyan glow language as
   the badge itself. position:relative on the cell so the absolute crown anchors
   to the rank cell rather than the row. */
.rank-row.rank-leader td:first-child {
  position: relative;
}
.rank-row.rank-leader td:first-child::before {
  content: '';
  position: absolute;
  left: 50%;
  /* Anchor to vertical-center of the cell (= vertical-center of the badge),
     then translate up by half the badge height plus half the crown height
     minus a few px so the crown's base overlaps the top diagonals of the
     hex - making it read as "crown sitting on the hex" instead of floating. */
  top: 50%;
  /* Crown base anchored at the 25% mark of the hex (where the upper diagonals
     meet the side edges). 36px badge / 4 = 9px below badge top, so the crown's
     bottom edge tucks into the V at the top of the hex - making it read as
     "crown integrated with the badge" instead of floating above with a gap. */
  transform: translate(-50%, calc(-50% - 18px));
  width: 28px;
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'><path d='M2 14 L6 5 L9 10 L12 2 L15 10 L18 5 L22 14 Z' fill='%2300fff6' stroke='%2300fff6' stroke-width='0.5' stroke-linejoin='round'/><rect x='2' y='13' width='20' height='2' fill='%2300fff6'/><circle cx='6' cy='5' r='1.2' fill='%2300fff6'/><circle cx='12' cy='2' r='1.5' fill='%2300fff6'/><circle cx='18' cy='5' r='1.2' fill='%2300fff6'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 6px rgba(0, 255, 246, 0.85));
  pointer-events: none;
  z-index: 2;
}
.rank-row.rank-leader .team-name {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-soft);
}

/* streak indicators */
.streak-w { color: var(--cyan); }
.streak-l { color: #d88; opacity: 0.75; }

/* playoff cutoff line indicator below row 4 */
.rank-row.playoff:last-of-type {
  border-bottom: 1px dashed var(--cyan-faint);
}

.standings-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-mark {
  display: inline-block;
  width: 20px;
  height: 2px;
}

.legend-mark.playoff-mark {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 255, 246, 0.6);
}

/* mobile: shrink padding, hide PA column on narrow screens */
@media (max-width: 720px) {
  .standings-table { font-size: 0.75rem; }
  .standings-table th,
  .standings-table td { padding: 0.6rem 0.5rem; }
  .rank-badge { width: 30px; height: 30px; font-size: 0.75rem; }
  .standings-table th.col-owner,
  .standings-table td.team-owner { display: none; }
  .standings-carousel { gap: 0.4rem; }
  .carousel-arrow { width: 38px; height: 38px; font-size: 1.3rem; }
  .standings-meta { gap: 0.4rem; font-size: 0.6rem; letter-spacing: 0.2em; }
  .standings-meta .standings-divider:nth-of-type(2),
  .standings-meta .standings-source { display: none; } /* condense meta on small screens */
}

/* SIGN UP form */
.section-signup { text-align: center; }

/* Pre-form notice: cyan-tinted dark callout with a bright cyan accent bar on
   the left edge. Same visual language as the playoff line indicator in the
   standings table - reads as "this is important" without being aggressive. */
.signup-notice {
  max-width: 540px;
  margin: 0 auto 2rem;
  padding: 1rem 1.2rem 1rem 1.4rem;
  background: rgba(0, 255, 246, 0.04);
  border-left: 2px solid var(--cyan);
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
}
.signup-notice strong {
  display: block;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  animation: inboxPulse 2.5s ease-in-out infinite;
}

/* Same rhythm as LEAGUE's titlePulse. Cranked-up contrast: text color shifts
   from a softer cyan at rest to full bright cyan at peak, AND the glow halo
   expands from a tight 4px ring out to a 45px three-layer aura. The eye
   tracks both the color change and the halo bloom, making the pulse impossible
   to miss. text-shadow only (no filter:brightness) to keep the main thread free. */
@keyframes inboxPulse {
  0%, 100% {
    color: rgba(0, 220, 215, 0.80);
    text-shadow: 0 0 4px rgba(0, 255, 246, 0.30);
  }
  50% {
    color: var(--cyan);
    text-shadow:
      0 0 12px var(--cyan),
      0 0 28px rgba(0, 255, 246, 0.60),
      0 0 45px rgba(0, 255, 246, 0.30);
  }
}
.signup-notice em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-soft);
}

.signup-form {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  text-align: left;
}

.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-row label,
.form-row-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.85;
  text-shadow: 0 0 10px rgba(0, 255, 246, 0.25);
}

.form-optional {
  color: var(--ink-dim);
  letter-spacing: 0.05em;
  text-transform: none;
  font-size: 0.78em;
}

.form-row input,
.form-row select,
.form-row textarea {
  background: rgba(0, 255, 246, 0.04);
  border: 1px solid var(--cyan-faint);
  color: var(--ink);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  outline: none;
  border-radius: 0;
  font-weight: 300;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 255, 246, 0.3), inset 0 0 12px rgba(0, 255, 246, 0.06);
  background: rgba(0, 255, 246, 0.08);
}

/* themed invalid state - applied by JS via .is-invalid (form has novalidate so native popups don't show) */
.form-row input.is-invalid,
.form-row select.is-invalid,
.form-row textarea.is-invalid {
  border-color: #ff7a7a;
  box-shadow: 0 0 18px rgba(255, 100, 100, 0.25), inset 0 0 8px rgba(255, 100, 100, 0.08);
  background: rgba(255, 100, 100, 0.04);
}

/* per-field error message bubble - matches the dark/cyan theme */
.form-error {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff8a8a;
  margin-top: 0;
  padding-left: 0.2rem;
  text-shadow: 0 0 8px rgba(255, 100, 100, 0.35);
  transition: max-height 0.25s ease, margin-top 0.25s ease;
}

.form-error.is-shown {
  max-height: 3em;
  margin-top: 0.45rem;
}

.form-row textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-body);
}

.form-row select {
  cursor: var(--cursor-horseshoe);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2300fff6' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.4rem;
  color-scheme: dark; /* tells browser to use dark UI for select widgets */
}

/* style the dropdown options - dark bg, light text (works in Chrome, Firefox, Edge) */
.form-row select option {
  background-color: #07090f;
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-weight: 300;
}

.form-row select option:checked,
.form-row select option:hover {
  background-color: rgba(0, 255, 246, 0.18);
  color: var(--cyan);
}

.form-row select option:disabled {
  color: var(--ink-dim);
  font-style: italic;
}

.radio-group {
  display: flex;
  gap: 1.6rem;
  margin-top: 0.4rem;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: var(--cursor-horseshoe);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.85;
}

.radio-option input[type="radio"] {
  accent-color: var(--cyan);
  width: 14px;
  height: 14px;
  cursor: var(--cursor-horseshoe);
}

.checkbox-group {
  display: flex;
  gap: 1.4rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: var(--cursor-horseshoe);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.85;
}

.checkbox-option input[type="checkbox"] {
  accent-color: var(--cyan);
  width: 14px;
  height: 14px;
  cursor: var(--cursor-horseshoe);
}

.form-status {
  min-height: 1.5em;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.form-status.is-pending { color: var(--ink-dim); }
.form-status.is-success {
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan-soft);
}
.form-status.is-error { color: #ff8a8a; }

.signup-form button[type="submit"] {
  align-self: center;
  margin-top: 0.6rem;
  border: none;
}

.signup-form button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* hex grid */
.hex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.hex-tile {
  aspect-ratio: 1 / 1.1547; /* hex ratio */
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, rgba(0,255,246,0.08), rgba(0,255,246,0.02));
  border: 1px solid var(--cyan-faint);
  position: relative;
  cursor: var(--cursor-horseshoe);
  transition: transform 0.4s ease, background 0.4s ease;
}

.hex-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%,
    rgba(0,255,246,0.18) 0%,
    transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hex-tile:hover {
  transform: translateY(-4px) scale(1.02);
  background: linear-gradient(160deg, rgba(0,255,246,0.18), rgba(0,255,246,0.04));
}

.hex-tile:hover::before {
  opacity: 1;
}

.hex-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1rem;
}

.hex-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--cyan);
  text-shadow: 0 0 16px var(--cyan-soft);
  letter-spacing: 0.05em;
}

.hex-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.85;
  line-height: 1.4;
}

.hex-meta {
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.7;
  text-shadow: 0 0 8px var(--cyan-faint);
}

/* leagues grid: 3 wider hexes (vs the 6 narrower placeholder ones) */
.hex-grid-leagues {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 880px;
}

/* footer */
.footer {
  position: relative;
  z-index: 4;
  border-top: 1px solid var(--cyan-ghost);
  padding: 2.4rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  color: var(--ink-dim);
}

.footer-mark {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-soft);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 720px) {
  .nav { padding: 0.6rem 1rem; }
  .nav-toggle { display: inline-flex; }
  .brand-name { display: none; }

  /* Buttons stack on mobile, taking more vertical space. Add bottom padding to the hero
     so the centered button group sits higher up, leaving breathing room above the scroll indicator. */
  .hero { padding-bottom: 6rem; }

  /* nav links collapse into a slide-down dropdown panel */
  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    flex-direction: column;
    gap: 0.2rem;
    background: rgba(4, 6, 10, 0.92);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid var(--cyan-faint);
    padding: 1rem 1.4rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 90;
  }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.55rem 0.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.25em;
  }
  .nav-cta {
    margin-top: 0.4rem;
    padding: 0.7rem 1rem;
    text-align: center;
  }

  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .footer { flex-direction: column; gap: 0.8rem; padding: 2rem 1.4rem; }
  html, body { cursor: auto; }
  .cursor-glow { display: none; }

  /* MOBILE ONLY DISABLE: hide mute toggle since the bgm audio is also disabled on mobile */
  .mute-toggle { display: none; }
  /* MOBILE ONLY DISABLE: hide daedric matrix rain canvas (also skipped in JS) */
  .daedric-rain { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aura, .mist, .intro-glow, .line-2, .scroll-indicator span {
    animation: none !important;
  }
}
