/* APEXLANE — institutional landing
   Palette (official): navy #151F32 · anthracite #242937 · orange #E46830 · white #FFFFFF
   Tonal variations below are darker/lighter steps of the official navy only. */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-800-italic.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --navy: #151F32;
  --anthracite: #242937;
  --orange: #E46830;
  --white: #FFFFFF;

  --navy-deep: #0E1524;       /* darker step of navy */
  --navy-lift: #1C2840;       /* lighter step of navy */
  --text: var(--white);
  --text-2: rgba(255, 255, 255, 0.74);
  --text-3: rgba(255, 255, 255, 0.6);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);

  --f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-label: "Chakra Petch", "Barlow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.18, 1);
  --dur-reveal: 1000ms;

  --gutter: clamp(20px, 5vw, 64px);
  --section-pad: clamp(104px, 16vh, 200px);

  --z-canvas: 0;
  --z-content: 1;
  --z-rail: 40;
  --z-topbar: 50;
  --z-skip: 100;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--navy-deep); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
[id] { scroll-margin-top: 80px; }
#top { scroll-margin-top: 0; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: var(--z-skip);
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 12px 18px; background: var(--white); color: var(--navy);
  font: 600 0.875rem/1 var(--f-label); letter-spacing: 0.08em; text-transform: uppercase;
  transform: translateY(-160%); transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

/* Small section index marker (decorative) */
.index {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.3em; color: var(--orange);
  margin-bottom: clamp(28px, 5vh, 48px);
}
.index::before { content: ""; width: 32px; height: 1px; background: var(--orange); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font: 600 0.8125rem/1 var(--f-label); letter-spacing: 0.32em; color: var(--text-2);
}

.lede {
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem);
  line-height: 1.65;
  color: var(--text-2);
  max-width: 36em;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity var(--dur-reveal) var(--ease-out) var(--d, 0ms),
    transform calc(var(--dur-reveal) + 200ms) var(--ease-out) var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Light field canvas (hero + closing) ---------- */
.lightfield {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: var(--z-canvas); pointer-events: none;
}

/* ---------- Logo shine (light sweep clipped to the logo artwork) ---------- */
.logo-shine { position: relative; display: block; }
.logo-shine img { width: 100%; height: auto; }
.logo-shine::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%;
  background-position: 130% 0;
  -webkit-mask: url("../img/apexlane-logo-800.webp") center / 100% 100% no-repeat;
          mask: url("../img/apexlane-logo-800.webp") center / 100% 100% no-repeat;
  opacity: 0;
}
@keyframes shine {
  0%   { background-position: 130% 0; opacity: 0.9; }
  100% { background-position: -30% 0; opacity: 0.9; }
}

/* ---------- Top bar (after hero) ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-topbar);
  display: flex; align-items: center;
  height: 64px; padding-inline: var(--gutter);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: linear-gradient(to bottom, rgba(14, 21, 36, 0.92), rgba(14, 21, 36, 0.72));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-101%);
  visibility: hidden;
  transition: transform 450ms var(--ease-out), visibility 0s linear 450ms;
}
.topbar.is-visible { transform: none; visibility: visible; transition: transform 450ms var(--ease-out), visibility 0s; }
.topbar__home { display: flex; align-items: center; min-height: 44px; }
.topbar__home img { width: auto; height: 30px; }

/* ---------- Section rail (desktop) ---------- */
.rail { display: none; }
@media (min-width: 1100px) and (min-height: 560px) {
  .rail {
    display: block; position: fixed; right: 28px; top: 50%; z-index: var(--z-rail);
    transform: translateY(-50%);
    opacity: 0; visibility: hidden;
    transition: opacity 400ms var(--ease-out), visibility 0s linear 400ms;
  }
  .rail.is-visible { opacity: 1; visibility: visible; transition: opacity 400ms var(--ease-out), visibility 0s; }
  .rail ol { display: grid; gap: 4px; }
  .rail a {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    min-width: 44px; min-height: 32px;
    font: 600 0.6875rem/1 var(--f-label); letter-spacing: 0.18em; color: var(--text-3);
    transition: color 250ms ease;
  }
  .rail a::after {
    content: ""; width: 14px; height: 1px; background: currentColor;
    transition: width 300ms var(--ease-out), background-color 250ms ease;
  }
  .rail a:hover { color: var(--white); }
  .rail a[aria-current="true"] { color: var(--orange); }
  .rail a[aria-current="true"]::after { width: 34px; }
}

/* =========================================================
   06.1 HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid; place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 70% at 50% 55%, var(--navy-lift) 0%, var(--navy) 42%, var(--navy-deep) 100%);
}
.hero__atmos {
  position: absolute; inset: 0; z-index: var(--z-content); pointer-events: none;
  background:
    radial-gradient(60% 34% at 50% 108%, rgba(228, 104, 48, 0.22), transparent 70%),
    radial-gradient(140% 90% at 50% 50%, transparent 55%, rgba(8, 12, 22, 0.75) 100%);
}
.hero__center { position: relative; z-index: 2; display: grid; justify-items: center; }
.hero__brand {
  position: relative; z-index: 2;
  width: min(90vw, 880px);
  margin: 0;
  font-size: 0; /* the logo image carries the heading text via alt */
}
/* Lane of light under the logo */
.hero__brand::after {
  content: ""; position: absolute; left: 0; right: 0;
  bottom: calc(-1 * clamp(28px, 4vw, 52px)); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35) 30%, var(--orange) 50%, rgba(255, 255, 255, 0.35) 70%, transparent);
  transform-origin: 50% 50%;
}
.hero__cue {
  position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 72px; margin-left: -22px;
}
.hero__cue span {
  position: relative; display: block; width: 1px; height: 48px; overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}
.hero__cue span::after {
  content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 16px;
  background: var(--orange);
  animation: cue 2.2s var(--ease-inout) infinite;
}
@keyframes cue { 0% { transform: translateY(-16px); } 100% { transform: translateY(48px); } }

/* Intro choreography (JS only, motion allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .lightfield { animation: fade-in 1600ms ease-out both; }
  .js .hero__logo { animation: logo-in 1150ms var(--ease-inout) 350ms both; }
  .js .hero__brand::after { animation: lane-in 1300ms var(--ease-out) 200ms both; }
  .js .hero .logo-shine::after { animation: shine 1300ms var(--ease-out) 1450ms both; }
  .js .hero__cue { animation: fade-in 800ms ease-out 1900ms both; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes logo-in {
  0%   { clip-path: inset(0 100% 0 0); opacity: 0; transform: translateX(-2%); filter: blur(6px); }
  35%  { opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; transform: none; filter: blur(0); }
}
@keyframes lane-in { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* =========================================================
   06.2 CONCEPT
   ========================================================= */
.concept {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: var(--section-pad);
  background: linear-gradient(to bottom, var(--navy-deep) 0%, var(--navy) 38%);
}
.concept__line {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
}
.concept__line path {
  fill: none; stroke: var(--orange); stroke-width: 1.5; opacity: 0.4;
}
.concept__titles { display: grid; gap: clamp(12px, 2vw, 24px); }
.concept__kicker {
  display: flex; align-items: center; gap: 18px;
  font: 700 italic clamp(1.375rem, 0.9rem + 2.2vw, 2.75rem)/1.05 var(--f-display);
  letter-spacing: 0.01em; color: var(--text-2);
}
.concept__kicker::before { content: ""; flex: none; width: clamp(28px, 4vw, 56px); height: 3px; background: var(--orange); transform: skewX(-20deg); }
.concept__headline {
  display: block;
  font: 800 italic clamp(3.5rem, 1rem + 11vw, 11rem)/0.86 var(--f-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.concept__headline em { font-style: inherit; color: var(--orange); }
.concept__body {
  display: grid; gap: clamp(28px, 4vw, 40px);
  margin-top: clamp(48px, 8vw, 104px);
}
.concept__lines { display: grid; gap: 2px; }
.concept__lines span {
  display: block;
  font: 600 clamp(1.625rem, 1.1rem + 2vw, 2.625rem)/1.12 var(--f-display);
  letter-spacing: 0.005em;
  color: var(--text-3);
}
.concept__lines span:first-child { color: var(--white); }
.concept__lines span:last-child { color: var(--white); }
@media (min-width: 900px) {
  .concept__body { grid-template-columns: 1fr 1fr; align-items: end; column-gap: clamp(40px, 6vw, 96px); }
}

/* =========================================================
   06.3 ECOSYSTEM
   ========================================================= */
.ecosystem {
  position: relative;
  padding-block: var(--section-pad);
  background: linear-gradient(to bottom, var(--navy) 0%, var(--navy-deep) 100%);
  border-top: 1px solid var(--line);
}
.ecosystem__title {
  font: 800 italic clamp(2.75rem, 0.8rem + 7.5vw, 7.25rem)/0.9 var(--f-display);
  letter-spacing: -0.01em;
  color: var(--text-3);
  text-wrap: balance;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.ecosystem__title span { color: var(--white); }

.worlds { display: grid; gap: 0; }
.worlds__apex {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding-block: 22px;
}
.worlds__apex::before, .worlds__apex::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.worlds__apex img { width: 52px; height: auto; flex: none; }

.world {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  background: var(--anthracite);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}
.world__visual { position: relative; height: clamp(150px, 22vw, 220px); overflow: hidden; border-bottom: 1px solid var(--line); }
.world__content { display: grid; gap: 14px; padding: clamp(28px, 4vw, 48px); padding-top: clamp(28px, 3.5vw, 40px); }
.world__name { display: flex; align-items: center; min-height: 52px; margin-bottom: 6px; }
.world__name img { height: clamp(40px, 4vw, 52px); width: auto; }
.world__name--type {
  font: 800 italic clamp(2.5rem, 1.6rem + 2.4vw, 3.5rem)/0.9 var(--f-display);
  letter-spacing: 0.04em;
}
.world__category {
  font: 600 0.75rem/1.2 var(--f-label); letter-spacing: 0.28em; color: var(--orange);
}
.world__headline {
  font: 700 italic clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem)/1 var(--f-display);
  letter-spacing: 0.005em;
}
.world__text { color: var(--text-2); font-size: 1.0625rem; line-height: 1.65; max-width: 32em; }

.status {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 10px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.22em; color: var(--white);
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--orange); }

/* SIMRACE ARENA visual: digital grid + abstract timing bars (no data) */
.world--arena .world__visual {
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 28px 100%,
    radial-gradient(80% 120% at 0% 0%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--navy);
}
.timing {
  position: absolute; inset: 22% 10% 18% 10%;
  display: grid; align-content: space-between;
}
.timing span {
  display: block; height: 6px; width: var(--w);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12));
  transform-origin: 0 50%;
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.timing span:first-child { background: linear-gradient(90deg, var(--orange), rgba(228, 104, 48, 0.25)); }
.world--arena .world__visual::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

/* APEXTOUR visual: routes converging on the apex (members-only tour) */
.world--tour .world__visual {
  background:
    radial-gradient(55% 75% at 50% 18%, rgba(228, 104, 48, 0.32), transparent 70%),
    linear-gradient(to bottom, var(--navy-deep), var(--navy));
}
.summit { position: absolute; inset: 0; width: 100%; height: 100%; }
.summit path { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.2; }
.summit .summit__main { stroke: var(--orange); stroke-width: 2; }
.summit__ring { fill: none; stroke: rgba(228, 104, 48, 0.45); stroke-width: 1.2; }
.summit__point { fill: var(--orange); filter: drop-shadow(0 0 8px rgba(228, 104, 48, 0.95)); }

/* Card reveal extras */
@media (prefers-reduced-motion: no-preference) {
  .js .world .timing span { transform: scaleX(0); transition: transform 1200ms var(--ease-out); }
  .js .world.is-in .timing span { transform: scaleX(1); }
  .js .world.is-in .timing span:nth-child(2) { transition-delay: 80ms; }
  .js .world.is-in .timing span:nth-child(3) { transition-delay: 160ms; }
  .js .world.is-in .timing span:nth-child(4) { transition-delay: 240ms; }
  .js .world.is-in .timing span:nth-child(5) { transition-delay: 320ms; }
  .js .world.is-in .timing span:nth-child(6) { transition-delay: 400ms; }
  .world--arena.is-in .world__visual::after { animation: scan 5.5s linear 1.2s infinite; }
  .js .world--tour .summit path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms var(--ease-out) 200ms; }
  .js .world--tour.is-in .summit path { stroke-dashoffset: 0; }
  .js .world--tour .summit circle { opacity: 0; transition: opacity 700ms ease 1200ms; }
  .js .world--tour.is-in .summit circle { opacity: 1; }
  .world--tour.is-in .summit__ring { transform-origin: 200px 46px; animation: apex-pulse 3.2s ease-out 1.9s infinite; }
}
@keyframes scan { to { transform: translateX(440%); } }
@keyframes apex-pulse { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }

@media (min-width: 900px) {
  .worlds { grid-template-columns: 1fr 88px 1fr; align-items: stretch; }
  .worlds__apex { flex-direction: column; padding-block: 0; }
  .worlds__apex::before, .worlds__apex::after { width: 1px; height: auto; }
  .world { min-height: 100%; }
}

/* =========================================================
   06.4 VISION
   ========================================================= */
.vision {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: calc(var(--section-pad) * 1.15);
  background:
    radial-gradient(80% 60% at 75% 40%, rgba(36, 41, 55, 0.9), transparent 70%),
    var(--navy-deep);
}
.vision__corner {
  position: absolute; z-index: -1;
  right: -30%; bottom: 0; width: 130%; height: 46%;
  transform: scaleX(-1);
  overflow: visible;
  pointer-events: none;
  opacity: 0.55;
}
@media (min-width: 900px) {
  .vision__corner { right: 0; top: 0; bottom: 0; width: 56%; height: 100%; opacity: 1; }
}
.vision__edge { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 2; }
.vision__racing { fill: none; stroke: var(--orange); stroke-width: 3; opacity: 0.65; }
.vision__apex { fill: var(--orange); filter: drop-shadow(0 0 10px rgba(228, 104, 48, 0.9)); }
.js .vision__apex { opacity: 0; transition: opacity 600ms ease; }
.js .vision__apex.is-lit { opacity: 1; }

.vision__inner { position: relative; }
.vision .eyebrow { margin-bottom: clamp(20px, 3vw, 28px); }
.vision .eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--orange); }
.vision__title {
  font: 800 italic clamp(3.25rem, 0.8rem + 9.5vw, 9.5rem)/0.86 var(--f-display);
  letter-spacing: -0.012em;
  max-width: 14ch;
  text-wrap: balance;
}
.verdict {
  display: grid; gap: clamp(6px, 1vw, 12px);
  margin-block: clamp(48px, 8vw, 104px) clamp(36px, 5vw, 56px);
}
.verdict__not, .verdict__yes { display: block; font-family: var(--f-display); font-style: italic; text-wrap: balance; }
.verdict__not {
  position: relative; justify-self: start;
  font-weight: 700; font-size: clamp(1.5rem, 0.9rem + 2.6vw, 3.25rem); line-height: 1.05;
  color: var(--text-3);
}
.verdict__not::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: 2px;
  background: var(--orange);
  transform-origin: 0 50%;
}
.verdict__yes {
  position: relative; justify-self: start;
  font-weight: 800; font-size: clamp(2.375rem, 1rem + 5.6vw, 6.25rem); line-height: 0.95;
  color: var(--white);
  padding-bottom: 0.18em;
}
.verdict__yes::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 4px;
  background: var(--orange); transform: skewX(-20deg);
  transform-origin: 0 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .js .verdict__not { opacity: 0; transform: translateX(-24px); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); }
  .js .verdict__not::after { transform: scaleX(0); transition: transform 700ms var(--ease-inout) 650ms; }
  .js .verdict__yes { opacity: 0; transform: translateY(32px); transition: opacity 900ms var(--ease-out) 1150ms, transform 1100ms var(--ease-out) 1150ms; }
  .js .verdict__yes::after { transform: skewX(-20deg) scaleX(0); transition: transform 900ms var(--ease-out) 1700ms; }
  .js .verdict.is-in .verdict__not { opacity: 1; transform: none; }
  .js .verdict.is-in .verdict__not::after { transform: scaleX(1); }
  .js .verdict.is-in .verdict__yes { opacity: 1; transform: none; }
  .js .verdict.is-in .verdict__yes::after { transform: skewX(-20deg) scaleX(1); }
}
.vision__text { max-width: 40em; }

/* Scroll-drawn lines (concept + vision) */
.js [data-draw] { stroke-dasharray: 1; stroke-dashoffset: var(--draw, 1); }

/* =========================================================
   06.5 CLOSING
   ========================================================= */
.closing {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding-block: var(--section-pad);
  background:
    radial-gradient(70% 45% at 50% 100%, rgba(228, 104, 48, 0.16), transparent 70%),
    radial-gradient(120% 70% at 50% 50%, var(--navy-lift) 0%, var(--navy) 45%, var(--navy-deep) 100%);
}
.closing::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: var(--z-content); pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--navy-deep));
}
.closing__inner {
  position: relative; z-index: 2;
  display: grid; justify-items: center; gap: clamp(40px, 6vw, 72px);
  padding-inline: var(--gutter);
  text-align: center;
}
.closing__logo { width: min(78vw, 560px); }
.closing__logo::after {
  -webkit-mask-image: url("../img/simrace-arena-logo-640.webp");
          mask-image: url("../img/simrace-arena-logo-640.webp");
}
@media (prefers-reduced-motion: no-preference) {
  .js .closing__logo.is-in::after { animation: shine 1300ms var(--ease-out) 700ms both; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--navy-deep);
  padding-block: clamp(56px, 8vw, 88px) clamp(28px, 4vw, 40px);
  padding-bottom: max(clamp(28px, 4vw, 40px), env(safe-area-inset-bottom));
}
.footer__grid { display: grid; gap: 36px; padding-bottom: clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line); }
.footer__brand { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; }
.footer__brand img { width: auto; height: 40px; }
.footer__label { font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.28em; color: var(--text-3); margin-bottom: 10px; }
.footer__col ul { display: grid; }
.footer__col a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font: 500 1rem/1.2 var(--f-body); letter-spacing: 0.04em;
  transition: color 200ms ease;
}
.footer__col a:hover { color: var(--orange); }
.ext { font-size: 0.85em; color: var(--text-3); transition: color 200ms ease, transform 200ms var(--ease-out); }
.footer__col a:hover .ext { color: var(--orange); transform: translate(2px, -2px); }
.footer__legal {
  display: grid; gap: 6px; padding-top: 24px;
  font-size: 0.8125rem; line-height: 1.6; color: var(--text-3);
}
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; align-items: start; }
  .footer__legal { grid-template-columns: auto 1fr; column-gap: 32px; }
  .footer__legal p:last-child { text-align: right; }
}

/* =========================================================
   Reduced motion: everything readable in its final state
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js [data-draw] { stroke-dashoffset: 0; }
  .js .vision__apex { opacity: 1; }
  .hero__cue span::after { animation: none; }
}

/* ---------- Language switcher (always visible, top right) ---------- */
.lang {
  position: fixed; top: env(safe-area-inset-top); right: var(--gutter); z-index: calc(var(--z-topbar) + 1);
  display: flex; align-items: center; height: 64px;
}
.lang ul { display: flex; align-items: center; }
.lang li + li::before { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--line-strong); vertical-align: middle; }
.lang a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding-inline: 4px;
  font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.2em; color: var(--text-3);
  transition: color 200ms ease;
}
.lang a:hover { color: var(--white); }
.lang a[aria-current="page"] { color: var(--white); }
.lang a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .js .lang { animation: fade-in 800ms ease-out 1700ms both; }
}

/* =========================================================
   SIMRACE ARENA page (/simrace-arena/)
   ========================================================= */
.page-arena .topbar { transition: none; }

.ahero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-top: calc(64px + env(safe-area-inset-top) + clamp(48px, 9vh, 104px));
  padding-bottom: clamp(64px, 10vw, 128px);
  background:
    radial-gradient(70% 50% at 50% 100%, rgba(228, 104, 48, 0.14), transparent 70%),
    radial-gradient(120% 70% at 50% 30%, var(--navy-lift) 0%, var(--navy) 45%, var(--navy-deep) 100%);
}
.ahero .lightfield { height: 70%; }
.ahero__inner { position: relative; z-index: 2; display: grid; justify-items: start; gap: 18px; }
.back {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: clamp(12px, 3vw, 32px);
  font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.24em; color: var(--text-3);
  transition: color 200ms ease;
}
.back:hover { color: var(--white); }
.ahero__logo { width: min(80vw, 520px); margin: 6px 0 10px; font-size: 0; }
.ahero__logo img { width: 100%; height: auto; }
.ahero__headline {
  font: 800 italic clamp(2.5rem, 1rem + 5.5vw, 5.75rem)/0.9 var(--f-display);
  letter-spacing: -0.01em; text-wrap: balance;
}
.ahero .lede { margin-top: 8px; }

/* Key facts strip (links to the sections) */
.specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  width: 100%; max-width: 760px; margin-top: 12px;
  background: var(--line); border: 1px solid var(--line);
}
@media (min-width: 700px) { .specs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.specs a {
  display: grid; gap: 8px; min-height: 44px; height: 100%;
  padding: 16px 18px;
  background: rgba(21, 31, 50, 0.85);
  transition: background-color 200ms ease;
}
.specs strong { font: 800 italic clamp(2rem, 1.4rem + 1.8vw, 2.75rem)/0.9 var(--f-display); color: var(--white); }
.specs span { font: 600 0.6875rem/1.3 var(--f-label); letter-spacing: 0.2em; color: var(--text-2); }
.specs a:hover { background: var(--anthracite); }
.specs a:hover strong { color: var(--orange); }

/* Screenshot frame */
.shot { margin: clamp(48px, 7vw, 88px) auto 0; width: min(100% , 1180px); }
.shot--hero { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), 1180px); }
.shot__frame {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--navy-deep);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 6px rgba(255, 255, 255, 0.025);
}
.shot__frame img { width: 100%; height: auto; }
.shot--hero .shot__frame::after {
  content: ""; position: absolute; inset: 55% 0 0 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--navy-deep));
}
@media (min-width: 900px) {
  .shot--hero .shot__frame { transform: perspective(1800px) rotateX(10deg); transform-origin: 50% 0; }
}
.shot figcaption {
  margin-top: 14px; font: 600 0.6875rem/1.5 var(--f-label); letter-spacing: 0.16em; color: var(--text-3);
}

/* Sections */
.asec { position: relative; padding-block: var(--section-pad); background: var(--navy); border-top: 1px solid var(--line); }
.asec--alt { background: var(--navy-deep); }
.asec__title {
  font: 800 italic clamp(2.5rem, 0.9rem + 6vw, 6rem)/0.9 var(--f-display);
  letter-spacing: -0.01em; text-wrap: balance;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.asec__title span { color: var(--text-3); }

.modules { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.module { display: grid; align-content: start; gap: 10px; padding: clamp(22px, 2.6vw, 32px); background: var(--anthracite); }
.module__num { font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.24em; color: var(--orange); }
.module__name { font: 700 italic 1.625rem/1 var(--f-display); letter-spacing: 0.01em; }
.module p { color: var(--text-2); font-size: 1rem; line-height: 1.6; }
@media (min-width: 640px) { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .modules { grid-template-columns: repeat(4, 1fr); } }

.asplit { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
.asplit .shot { margin: 0; width: 100%; }
@media (min-width: 1000px) { .asplit { grid-template-columns: 1fr 1.05fr; } }
.checks { display: grid; gap: 10px; margin-top: 28px; }
.checks li {
  display: flex; align-items: center; gap: 14px;
  font: 600 1.25rem/1.2 var(--f-display); letter-spacing: 0.01em;
}
.checks li::before { content: ""; flex: none; width: 18px; height: 2px; background: var(--orange); transform: skewX(-20deg); }

/* Formula */
.formula { display: grid; gap: 1px; margin-top: clamp(36px, 5vw, 56px); background: var(--line); border: 1px solid var(--line); }
@media (min-width: 900px) { .formula { grid-template-columns: 1.1fr 1fr; } }
.formula__block { padding: clamp(24px, 3.5vw, 44px); background: var(--anthracite); }
.formula__title { font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.28em; color: var(--orange); margin-bottom: 18px; }
.formula__title--sub { margin-top: 36px; }
.formula__list { margin: 0; display: grid; }
.formula__list div {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.formula__list dt { color: var(--text-2); white-space: nowrap; }
.formula__list dd {
  margin: 0 0 0 auto; text-align: right;
  font: 600 1rem/1.2 var(--f-label); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; color: var(--white);
}
.formula__note { margin-top: 16px; font-size: 0.875rem; color: var(--text-3); }

.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; height: 190px; }
.tiers li { display: grid; grid-template-rows: 1fr auto auto; gap: 6px; height: 100%; text-align: center; }
.tiers__bar { align-self: end; height: var(--h); background: linear-gradient(to top, rgba(228, 104, 48, 0.85), rgba(228, 104, 48, 0.25)); clip-path: polygon(0 6px, 100% 0, 100% 100%, 0 100%); }
.tiers strong { font: 600 0.625rem/1 var(--f-label); letter-spacing: 0.12em; }
.tiers li > span:last-child { font: 600 0.75rem/1 var(--f-label); color: var(--text-3); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .js .formula .tiers__bar { transform: scaleY(0); transform-origin: 50% 100%; transition: transform 900ms var(--ease-out) 300ms; }
  .js .formula.is-in .tiers__bar { transform: none; }
}
.points { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.points span {
  display: grid; place-items: center; height: 40px;
  border: 1px solid var(--line-strong);
  font: 600 0.875rem/1 var(--f-label); font-variant-numeric: tabular-nums;
}
.points span:first-child { border-color: var(--orange); color: var(--orange); }

/* Titles */
.games {
  display: grid; gap: 0; border-top: 1px solid var(--line);
}
.games li {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font: 600 clamp(1.25rem, 1rem + 0.8vw, 1.625rem)/1.15 var(--f-display); letter-spacing: 0.01em;
}
@media (min-width: 700px) { .games { grid-template-columns: repeat(2, 1fr); column-gap: 40px; } }
@media (min-width: 1100px) { .games { grid-template-columns: repeat(4, 1fr); } }
.compat { display: grid; gap: 32px; margin-top: clamp(40px, 6vw, 64px); }
@media (min-width: 900px) { .compat { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 10px 14px; border: 1px solid var(--line-strong); font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.14em; }
.compat__text { color: var(--text-2); max-width: 34em; }
.legal-note { margin-top: 40px; font-size: 0.8125rem; color: var(--text-3); }

/* Back to APEXLANE */
.aend { background: var(--navy-deep); border-top: 1px solid var(--line); }
.aend__link {
  display: grid; justify-items: center; gap: 28px;
  padding: clamp(72px, 12vw, 140px) var(--gutter);
  text-align: center;
}
.aend__label { font: 600 0.8125rem/1 var(--f-label); letter-spacing: 0.3em; color: var(--text-2); transition: color 200ms ease; }
.aend__link img { width: min(70vw, 420px); height: auto; opacity: 0.9; transition: opacity 200ms ease; }
.aend__link:hover .aend__label { color: var(--orange); }
.aend__link:hover img { opacity: 1; }

/* Landing: "Discover the Arena" call to action (card, concept, vision, closing) */
.cta-wrap { margin-top: clamp(24px, 3vw, 36px); }
.cta-arena {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  font: 600 0.75rem/1 var(--f-label); letter-spacing: 0.22em; color: var(--white);
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}
.cta-arena span { transition: transform 200ms var(--ease-out); }
.cta-arena:hover { border-color: var(--orange); color: var(--orange); }
.cta-arena:hover span { transform: translateX(4px); }
.world__content .cta-arena { justify-self: start; margin-top: 10px; }
.concept__more { display: grid; }
.closing__logo { transition: transform 300ms var(--ease-out), filter 300ms ease; }
.closing__logo:hover { transform: scale(1.03); filter: drop-shadow(0 0 24px rgba(228, 104, 48, 0.35)); }
@media (prefers-reduced-motion: no-preference) {
  .js .closing__logo.is-in:hover::after { animation: shine 900ms var(--ease-out) both; }
}

/* Waitlist call to action (→ app.simracearena.com/welcome#waitlist) */
.cta-waitlist {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px;
  padding: 12px 20px;
  background: var(--orange); color: var(--navy);
  font: 600 0.8125rem/1 var(--f-label); letter-spacing: 0.2em;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background-color 200ms ease, color 200ms ease;
}
.cta-waitlist span { transition: transform 200ms var(--ease-out); }
.cta-waitlist:hover { background: var(--white); color: var(--navy); }
.cta-waitlist:hover span[aria-hidden] { transform: translate(2px, -2px); }
.asec .shot + .cta-wrap { margin-top: clamp(32px, 4vw, 48px); }
.aend__cta { display: flex; justify-content: center; padding-top: clamp(72px, 12vw, 140px); }
.aend__cta + .aend__link { padding-top: clamp(40px, 6vw, 64px); }

/* Narrow phones: keep top bar logo and language switcher side by side */
@media (max-width: 420px) {
  .topbar__home img { height: 20px; }
  .lang { right: 12px; }
  .lang a { min-width: 38px; padding-inline: 2px; letter-spacing: 0.14em; }
}

/* 404 page */
.notfound {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  padding: 48px var(--gutter); text-align: center;
  background: radial-gradient(120% 70% at 50% 50%, var(--navy-lift) 0%, var(--navy) 45%, var(--navy-deep) 100%);
}
.notfound__logo img { width: min(70vw, 320px); height: auto; }
.notfound__code { font: 800 italic clamp(5rem, 3rem + 10vw, 9rem)/0.8 var(--f-display); color: var(--orange); }
.notfound__text { display: grid; gap: 6px; font: 600 0.8125rem/1.4 var(--f-label); letter-spacing: 0.24em; color: var(--text-2); }
.notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
