/* ==========================================================================
   LEONIDA UI — shared design system for the GTA 6 fan network.
   One type pairing, one accent, glass surfaces, one motion language.

   Sources measured in the browser (computed styles), Nov 2026:
   - rockstargames.com/VI  → navy base, rose pill CTA, cream condensed caps,
     peach secondary pill, 32px section cards, 1s ease-out reveals,
     sections that slide over a dimming sticky scene.
   - map.stateofleonida.net → single family, white-alpha glass (6%/8% border,
     1px inset highlight, blur 28px), 8/10/12 radii, 0.2s ease UI.
   - gta6intel.com → condensed caps headings over a humanist body, 12px cards
     with 1px white/8% borders, pill tags.
   No third-party artwork, logos or font files are used.
   ========================================================================== */

:root {
  /* Colour: base */
  --bg: #0c0d1b;
  --bg-raise: #111222;
  --bg-panel: #18182d;
  --bg-high: #1f1f38;

  /* Colour: text (white at fixed alphas, as on stateofleonida) */
  --text: rgba(255, 255, 255, 0.95);
  --text-2: rgba(255, 255, 255, 0.68);
  --text-3: rgba(255, 255, 255, 0.46);

  /* Colour: brand */
  --rose: #ffb2c6;       /* the one accent: primary CTA, active states */
  --rose-strong: #ff8fb0;
  --peach: #ffd4a8;      /* secondary CTA */
  --cream: #fff9cb;      /* display headings */
  --lavender: #ccc2f5;   /* eyebrows, links */
  --on-accent: #0c0d1b;

  /* Glass */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-hi: rgba(255, 255, 255, 0.1);
  --glass-dark: rgba(8, 9, 20, 0.55);
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 255, 255, 0.16);
  --blur: blur(28px) saturate(1.1);

  /* Scene: the dusk sky used behind heroes and feature panels */
  --sky: linear-gradient(180deg, #1c1b3f 0%, #3a2a66 24%, #7a3a86 48%, #c9507f 70%, #ef7a72 88%, #f7a570 100%);
  --sky-panel: linear-gradient(180deg, #2a2456 0%, #5d2f7a 38%, #b04a82 72%, #e87274 100%);

  /* Type */
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Jost', 'Heebo', system-ui, sans-serif;
  --fs-display: clamp(3rem, 1.6rem + 6.4vw, 4.5625rem);   /* 48 → 73px */
  --fs-h2: clamp(2.125rem, 1.5rem + 2.8vw, 3.4375rem);     /* 34 → 55px */
  --fs-h3: 1.3125rem;
  --fs-body: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);    /* 17 → 19px */
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-2xs: 0.6875rem;

  /* Space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 32px; --r-pill: 1000px;

  /* Elevation */
  --shadow-1: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 0 0 1px var(--line);
  --shadow-2: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--line-hi);
  --glow-rose: 0 2px 58px rgba(255, 179, 199, 0.28);

  /* Motion */
  --t-ui: 0.2s ease;
  --t-hover: 0.15s ease-out;
  --t-reveal: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs-body)/1.4 var(--font-body); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--rose); color: var(--on-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.display {
  font: 600 var(--fs-display)/0.9 var(--font-display); text-transform: uppercase;
  color: var(--cream); letter-spacing: 0; text-wrap: balance;
}
.h2 { font: 600 var(--fs-h2)/0.9 var(--font-display); text-transform: uppercase; color: var(--cream); letter-spacing: 0; text-wrap: balance; }
.h3 { font: 500 var(--fs-h3)/1.25 var(--font-body); letter-spacing: -0.015em; }
.eyebrow {
  font: 600 clamp(1rem, 0.9rem + 0.45vw, 1.3125rem)/1.1 var(--font-display); text-transform: uppercase;
  letter-spacing: 0.018em; color: var(--lavender);
}
.wide { font: 500 var(--fs-xs)/1 var(--font-body); text-transform: uppercase; letter-spacing: 0.42em; color: var(--text-2); }
.lede { font: 500 clamp(1.1875rem, 1rem + 0.9vw, 1.625rem)/1.2 var(--font-body); letter-spacing: -0.012em; color: var(--text); max-width: 30ch; text-wrap: pretty; }
.muted { color: var(--text-2); }
.meta { font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: var(--r-pill);
  font: 500 1.0625rem/1 var(--font-body); letter-spacing: -0.015em; white-space: nowrap;
  transition: transform var(--t-hover), box-shadow var(--t-ui), background var(--t-ui);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--rose { background: var(--rose); color: var(--on-accent); box-shadow: var(--glow-rose); }
.btn--rose:hover { box-shadow: 0 2px 70px rgba(255, 179, 199, 0.45); }
.btn--peach { background: var(--peach); color: var(--on-accent); }
.btn--glass { background: var(--glass); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hi); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.btn--glass:hover { background: var(--glass-hi); }
.btn--sm { height: 40px; padding: 0 18px; font-size: var(--fs-sm); }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t-ui);
}
.icon-btn:hover { background: var(--glass-hi); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Surfaces ---------- */
.glass {
  background: var(--glass); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); background: var(--glass-dark); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 600 var(--fs-2xs)/1 var(--font-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text);
}

/* ---------- Form controls ---------- */
.field {
  width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: var(--r-md);
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); color: var(--text);
  transition: box-shadow var(--t-ui), background var(--t-ui);
}
.field::placeholder { color: var(--text-3); }
.field:hover { background: var(--glass-hi); }
.field:focus { outline: 0; box-shadow: inset 0 0 0 1.5px var(--rose); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; flex: none;
  border-radius: var(--r-pill); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  font: 500 var(--fs-sm)/1 var(--font-body); color: var(--text-2);
  transition: background var(--t-ui), color var(--t-ui), box-shadow var(--t-ui);
}
.chip:hover { background: var(--glass-hi); color: var(--text); }
.chip[aria-pressed='true'] { background: var(--text); color: var(--on-accent); box-shadow: none; }
.chip .n { font-size: var(--fs-xs); opacity: 0.55; font-variant-numeric: tabular-nums; }

.segmented { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.segmented button { height: 36px; padding: 0 16px; border-radius: var(--r-pill); font: 500 var(--fs-sm)/1 var(--font-body); color: var(--text-2); transition: background var(--t-ui), color var(--t-ui); }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed='true'] { background: var(--rose); color: var(--on-accent); }

/* ---------- Scene: dusk sky + palm fronds (parallax layers) ---------- */
.scene { position: absolute; inset: 0; overflow: hidden; background: var(--sky); }
.scene::after { /* vignette, as on stateofleonida */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(8, 9, 20, 0.55) 100%);
}
.frond {
  position: absolute; width: var(--w, 46vmax); aspect-ratio: 1; background: #17153a;
  -webkit-mask: url('assets/frond.svg') center / contain no-repeat; mask: url('assets/frond.svg') center / contain no-repeat;
  opacity: var(--o, 0.5); will-change: transform; transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg)) scale(var(--sx, 1), 1);
}
.frond--tl { top: -14vmax; left: -10vmax; --rot: 118deg; }
.frond--tr { top: -16vmax; right: -8vmax; --rot: 150deg; --sx: -1; --w: 52vmax; --o: 0.42; }
.frond--bl { bottom: -20vmax; left: -14vmax; --rot: 8deg; --w: 54vmax; --o: 0.34; }
.frond--br { bottom: -18vmax; right: -12vmax; --rot: -6deg; --sx: -1; --w: 44vmax; --o: 0.3; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--t-reveal), transform var(--t-reveal); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .frond { transform: rotate(var(--rot, 0deg)) scale(var(--sx, 1), 1); }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* White "Play" pill, as used on the official site's feature cards */
.btn--white { background: #fff; color: var(--on-accent); }
.btn--white:hover { box-shadow: 0 2px 40px rgba(255, 255, 255, 0.25); }
