/* ==========================================================================
   Formula Student EV Team site: shared styles
   Tokens come from color-palette-guide.md, motion from the animations spec.
   Dark theme is locked at page level. All corners sharp, no drop shadows.
   ========================================================================== */

@font-face {
  font-family: "Avant Garde";
  src: url("../vendor/fonts/Adventor-Regular.woff2") format("woff2");
  font-weight: 100 599;
  font-display: swap;
}
@font-face {
  font-family: "Avant Garde";
  src: url("../vendor/fonts/Adventor-Bold.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../vendor/fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* Backgrounds */
  --onyx: #0F0B15;
  --surface: #1A1424;
  --line: #2E2540;
  /* Brand */
  --indigo: #6902A9;
  --mauve: #CAA8F5;
  /* Text */
  --ghost: #F4F1F7;
  --alabaster: #E0E0E2;
  --dim: #A98FD0;
  /* Highlight, use sparingly */
  --volt: #C8F031;
  --error: #FF5C7A;

  /* Semantic roles */
  --bg: var(--onyx);
  --bg-alt: var(--surface);
  --text: var(--alabaster);
  --muted: #CDBBEA;
  --text-heading: var(--ghost);
  --text-subheading: var(--mauve);
  --border: var(--line);
  --focus: var(--mauve);

  /* Motion tokens */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);

  /* Layout */
  --nav-h: 68px;
  --gutter: clamp(24px, 4vw, 40px);
  --font-sans: "Avant Garde", "ITC Avant Garde Gothic", "Century Gothic", "URW Gothic", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--mauve); text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--indigo); color: var(--ghost); }

.ph { font-size: 1.1em; line-height: 1; flex: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 300;
  background: var(--ghost); color: var(--onyx); padding: 10px 16px; font-weight: 500;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- Type ---------- */
h1, .h1 {
  color: var(--ghost);
  font-size: clamp(2.25rem, 1.2rem + 3.2vw, 3.75rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.04;
}
h2, .h2 {
  color: var(--mauve);
  font-size: clamp(1.875rem, 1.1rem + 2.6vw, 3rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.06;
}
h3, .h3 {
  color: var(--alabaster);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 700; line-height: 1.2; letter-spacing: -0.01em;
}
.lead { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); line-height: 1.65; max-width: 65ch; }
.muted { color: var(--muted); }
.accent { color: var(--mauve); }
.num-label {
  font-family: var(--font-mono); font-size: 0.875rem; color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; font-size: 0.9375rem; font-weight: 500;
  white-space: nowrap; border: 1px solid transparent;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out),
              border-color 0.2s var(--ease-out), transform 0.15s var(--ease-out);
}
.btn .ph { transition: transform 0.2s var(--ease-out); }
.btn:hover .ph-arrow-right, .btn:hover .ph-arrow-up-right { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--indigo); color: var(--ghost); }
.btn--primary:hover { background: var(--mauve); color: var(--onyx); }
.btn--ghost { border-color: var(--mauve); color: var(--mauve); }
.btn--ghost:hover { background: rgb(202 168 245 / 0.15); }
.btn--volt { background: var(--volt); color: var(--onyx); }
.btn--volt:hover { background: #d6ff3a; }
.btn--block { width: 100%; }

/* Underline that grows from the left */
.ulink { position: relative; display: inline-block; }
.ulink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.ulink:hover::after, .ulink[aria-current="page"]::after, .ulink.is-active::after { transform: scaleX(1); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90; height: var(--nav-h);
  transition: transform 0.3s var(--ease-out);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgb(15 11 21 / 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  opacity: 0; transition: opacity 0.3s var(--ease-out);
}
.nav.is-solid::before, .nav.menu-open::before { opacity: 1; }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ghost); margin-right: auto; }
.brand img { height: 30px; width: auto; }
.brand span { font-weight: 600; letter-spacing: -0.02em; font-size: 1.0625rem; }
.nav__links { display: flex; gap: 32px; }
.nav__links a { color: var(--alabaster); font-size: 0.9375rem; transition: color 0.2s var(--ease-out); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--mauve); }
.nav__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ghost); font-size: 1.5rem; margin-right: -10px; }
.nav__toggle .ph-x { display: none; }
.nav.menu-open .nav__toggle .ph-x { display: block; }
.nav.menu-open .nav__toggle .ph-list { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 80; background: var(--onyx);
  padding: calc(var(--nav-h) + 32px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 0.5s var(--ease-io), visibility 0s linear 0.5s;
}
.menu.is-open { clip-path: inset(0); visibility: visible; transition: clip-path 0.5s var(--ease-io), visibility 0s; }
.menu ul { display: grid; gap: 8px; }
.menu li a {
  display: block; font-size: 2.25rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ghost); padding: 6px 0;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.menu.is-open li a { opacity: 1; transform: none; transition-delay: calc(0.2s + var(--i) * 60ms); }

/* ---------- Page transitions and reveals ---------- */
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
main { animation: page-in 0.35s var(--ease-out) backwards; }

.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease-out) var(--d, 0s), transform 0.6s var(--ease-out) var(--d, 0s);
}
.js [data-hero] { opacity: 0; transform: translateY(16px); }
.js .is-ready [data-hero] {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease-out) var(--d, 0.4s), transform 0.6s var(--ease-out) var(--d, 0.4s);
}
.reveal-lines > .line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.reveal-lines > .line > span { display: block; }
.js .reveal-lines > .line > span { transform: translateY(110%); }
.js .is-ready .reveal-lines--load > .line > span,
.js .reveal-lines.in > .line > span {
  transform: none;
  transition: transform 0.9s var(--ease-out) calc(var(--d, 0.1s) + var(--i, 0) * 80ms);
}

/* ---------- Placeholder slots ---------- */
.slot {
  position: relative; width: 100%; aspect-ratio: var(--ar, 16 / 9);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgb(46 37 64 / 0.55) 14px 15px),
    var(--surface);
  border: 1px solid var(--line); overflow: hidden;
}
.slot__label {
  position: absolute; left: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100dvh; padding-top: 96px; display: grid; align-items: center; overflow: clip; }
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 72% 50%, rgb(105 2 169 / 0.45), transparent 70%);
}
.js .hero__glow { opacity: 0; }
.js .is-ready .hero__glow { opacity: 1; transition: opacity 1.2s var(--ease-out); }
.hero__grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; padding-block: 48px 72px; }
.hero__copy { grid-column: 1 / 7; grid-row: 1; position: relative; z-index: 2; display: grid; gap: 24px; justify-items: start; }
.hero__copy p { max-width: 38ch; font-size: 1.125rem; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero__media { grid-column: 6 / 13; grid-row: 1; margin-right: calc(var(--gutter) * -1 - 24px); }
.js .hero__media { opacity: 0; transform: translateX(60px); }
.js .is-ready .hero__media { opacity: 1; transform: none; transition: opacity 1.1s var(--ease-out) 0.2s, transform 1.1s var(--ease-out) 0.2s; }

/* 3D model slot */
.model-slot {
  position: relative; width: 100%; aspect-ratio: 16 / 11;
  border: 1px dashed rgb(202 168 245 / 0.5);
  display: grid; place-items: center; overflow: hidden;
}
.model-slot__logo { width: 58%; opacity: 0.2; }
.model-slot__caption {
  position: absolute; left: 20px; right: 20px; bottom: 18px;
  display: grid; gap: 4px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
}
.model-slot__caption strong { color: var(--ghost); font-weight: 500; font-size: 0.8125rem; display: inline-flex; gap: 8px; align-items: center; }
.model-slot model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; --poster-color: transparent; background: transparent; }

/* ---------- Stats strip ---------- */
.stats { border-block: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 40px 32px; display: grid; gap: 12px; align-content: end; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat__label { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); }
.stat__value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ghost);
  font-size: clamp(2.25rem, 1.2rem + 3vw, 3.75rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
}
.stat__value small { font-size: 0.35em; letter-spacing: 0; margin-left: 6px; color: var(--muted); font-weight: 400; }
.stat--hero .stat__value { color: var(--volt); font-size: clamp(3.5rem, 1.5rem + 5.5vw, 6rem); }
.stat--hero .stat__value small { color: var(--volt); }

/* ---------- Partners marquee ---------- */
.partners { padding-block: 40px; border-bottom: 1px solid var(--line); }
.partners__head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.partners__head p { max-width: 60ch; }
.pause { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); color: var(--alabaster); font-size: 0.875rem; transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out); }
.pause:hover { border-color: var(--mauve); color: var(--mauve); }
.pause .ph-play { display: none; }
.pause[aria-pressed="true"] .ph-play { display: block; }
.pause[aria-pressed="true"] .ph-pause { display: none; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee__group { display: flex; gap: 56px; padding-right: 56px; align-items: center; }
.marquee:hover .marquee__track, .marquee[data-paused="true"] .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.logo-slot {
  display: grid; place-items: center; width: 150px; height: 36px; flex: none;
  border: 1px solid var(--line); color: var(--ghost); opacity: 0.6;
  font-family: var(--font-mono); font-size: 0.75rem; transition: opacity 0.2s var(--ease-out);
}
.logo-slot:hover { opacity: 1; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--alt { background: var(--surface); }
.section__head { display: grid; gap: 20px; margin-bottom: 56px; }

/* Bento (home subsystems, 4 cells) */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 16px; }
.cell {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; padding: 24px; overflow: hidden;
  border: 1px solid transparent; color: var(--ghost);
  transition: border-color 0.3s var(--ease-out), transform 0.15s var(--ease-out);
}
.cell:active { transform: scale(0.99); }
.cell__top { display: flex; justify-content: space-between; align-items: start; position: relative; z-index: 1; }
.cell__top .ph { font-size: 1.5rem; transition: transform 0.3s var(--ease-out); }
.cell:hover .cell__top .ph { transform: translate(4px, -4px); }
.cell__body { position: relative; z-index: 1; grid-row: 3; display: grid; gap: 8px; }
.cell__body h3 { color: inherit; }
.cell__body p { max-width: 36ch; font-size: 0.9375rem; opacity: 0.85; }
.cell--a { grid-column: span 7; grid-row: span 2; background: var(--surface); border-color: var(--line); }
.cell--a .cell__media { position: absolute; inset: 0; transition: transform 0.6s var(--ease-out); }
.cell--a:hover .cell__media { transform: scale(1.04); }
.cell--a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgb(15 11 21 / 0.85)); }
.cell--a h3 { font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); }
.cell--b { grid-column: span 5; background: var(--indigo); }
.cell--c { grid-column: span 5; background: var(--surface); border-color: var(--line); }
.cell--d { grid-column: 1 / -1; grid-row: 3; background: var(--mauve); color: var(--onyx); }
.cell--d .cell__body { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 32px; }
.cell--d h3 { color: var(--onyx); }
.cell--d .num { color: rgb(15 11 21 / 0.7); }
.cell:not(.cell--d):hover { border-color: var(--mauve); }
.cell .num { font-family: var(--font-mono); font-size: 0.875rem; opacity: 0.8; }

/* Ruled list (news) */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 140px 1fr 140px 32px; gap: 24px; align-items: center;
  padding: 24px 12px 24px 0; border-bottom: 1px solid var(--line);
  transition: background-color 0.2s var(--ease-out), padding 0.2s var(--ease-out);
}
.row:hover { background: var(--surface); }
.row__date { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); }
.row__title { color: var(--ghost); font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); font-weight: 500; letter-spacing: -0.01em; transition: color 0.2s var(--ease-out); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row:hover .row__title { color: var(--mauve); }
.row__tag { color: var(--mauve); font-size: 0.875rem; }
.row .ph { font-size: 1.25rem; color: var(--ghost); transition: transform 0.2s var(--ease-out); }
.row:hover .ph { transform: translateX(6px); }
.badge-volt { background: var(--volt); color: var(--onyx); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; padding: 3px 8px; }
.rows__more { margin-top: 28px; }

/* Sponsor section (sticky + numbered rows) */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.split__sticky { grid-column: 1 / 6; align-self: start; position: sticky; top: 96px; display: grid; gap: 24px; justify-items: start; }
.split__list { grid-column: 7 / 13; border-top: 1px solid var(--line); }
.numrow { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.numrow .n { font-family: var(--font-mono); font-size: 2.25rem; line-height: 1; color: var(--dim); letter-spacing: -0.04em; }
.numrow h3 { color: var(--ghost); margin-bottom: 8px; }
.stack { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

/* Join band */
.band { background: var(--indigo); color: var(--ghost); padding-block: clamp(72px, 9vw, 112px); }
.band__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: center; }
.band__copy { grid-column: 1 / 8; display: grid; gap: 20px; }
.band h2 { color: var(--ghost); }
.band p { max-width: 52ch; }
.band__action { grid-column: 9 / 13; display: grid; gap: 20px; justify-items: start; }
.countdown { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-mono); }
.countdown b { font-size: clamp(3rem, 2rem + 3vw, 4.5rem); font-weight: 500; color: var(--volt); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { color: var(--ghost); }

/* ---------- Footer ---------- */
.footer { background: var(--indigo); color: var(--ghost); }
.footer__main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; padding-block: 72px 64px; }
.footer__brand { display: grid; gap: 20px; align-content: start; }
.footer__brand img { height: 36px; width: auto; }
.footer__brand p { max-width: 32ch; }
.footer h2 { font-size: 1rem; font-weight: 600; color: var(--ghost); letter-spacing: 0; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer a { color: var(--mauve); font-size: 1rem; display: inline-flex; gap: 10px; align-items: center; transition: color 0.2s var(--ease-out); }
.footer a:hover { color: var(--ghost); }
.footer address { font-style: normal; display: grid; gap: 10px; }
.footer address span { display: flex; gap: 10px; align-items: flex-start; }
.footer__strip { background: var(--onyx); }
.footer__strip .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 20px; font-size: 0.875rem; color: var(--alabaster); }
.footer__strip a { color: var(--alabaster); font-size: 0.875rem; }
.footer__strip a:hover { color: var(--mauve); }

/* ---------- Inner page header ---------- */
.page-head { padding-top: calc(var(--nav-h) + 72px); padding-bottom: 72px; position: relative; }
.page-head__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; align-items: end; }
.page-head__copy { grid-column: 1 / 9; display: grid; gap: 28px; justify-items: start; }
.page-head h1 { font-size: clamp(2.75rem, 1.2rem + 6vw, 6rem); }
.page-head__index { grid-column: 10 / 13; display: grid; border-top: 1px solid var(--line); }
.page-head__index a { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--alabaster); transition: color 0.2s var(--ease-out), padding 0.2s var(--ease-out); }
.page-head__index a span { font-family: var(--font-mono); color: var(--dim); font-size: 0.875rem; padding-top: 2px; }
.page-head__index a:hover { color: var(--mauve); }

/* ---------- Car page: walkthrough ---------- */
.walk { background: var(--onyx); position: relative; }
.walk__intro { padding-block: 24px 40px; }
.walk__stage { position: relative; display: grid; gap: 80px; padding-block: 40px 0; }
.stage { display: grid; gap: 28px; }
.stage-text { display: grid; gap: 16px; align-content: start; }
.stage-text .n { font-family: var(--font-mono); color: var(--dim); font-size: 1.5rem; letter-spacing: -0.02em; }
.stage-text p { max-width: 45ch; }
.spec-lines { display: grid; gap: 6px; font-family: var(--font-mono); font-size: 0.875rem; margin-top: 8px; }
.spec-lines div { display: flex; gap: 16px; }
.spec-lines dt { color: var(--muted); min-width: 130px; }
.spec-lines dd { color: var(--ghost); }
.spec-lines .key dd { color: var(--volt); font-size: 1.125rem; }
.stage-img { position: relative; }
.stage-img .slot { --ar: 4 / 3; }
.anno { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; transform: translateY(-50%); font-family: var(--font-mono); font-size: 0.75rem; color: var(--ghost); z-index: 2; }
.anno i { width: 6px; height: 6px; background: var(--mauve); flex: none; }
.anno b { display: block; width: var(--len, 80px); height: 1px; background: var(--mauve); transform-origin: left; }
.anno em { font-style: normal; padding: 4px 8px; background: var(--onyx); border: 1px solid var(--line); white-space: nowrap; }
.anno--rev { flex-direction: row-reverse; }
.anno--rev b { transform-origin: right; }
.rail { display: none; }

/* pinned (desktop, set by JS) */
.walk.is-pinned { height: 100dvh; overflow: hidden; display: grid; align-items: center; }
.walk.is-pinned .walk__intro { display: none; }
.walk.is-pinned .walk__stage {
  grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; gap: 0 24px; width: 100%; padding-block: 0; align-items: center; height: 100dvh; padding-top: var(--nav-h);
}
.walk.is-pinned .stage { display: contents; }
.walk.is-pinned .stage-text { grid-column: 2 / 6; grid-row: 1; }
.walk.is-pinned .stage-img { grid-column: 6 / 13; grid-row: 1; }
.walk.is-pinned .rail { display: block; position: absolute; left: max(var(--gutter), calc((100vw - 1400px) / 2 + var(--gutter))); top: calc(var(--nav-h) + 12vh); bottom: 12vh; width: 12px; }
.rail__track { position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.rail__fill { position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: var(--mauve); transform: scaleY(0); transform-origin: top; }
.rail__tick { position: absolute; left: 0; width: 11px; height: 1px; background: var(--dim); }
.rail__tick.is-active { background: var(--mauve); height: 2px; }

/* ---------- Car page: datasheet panel ---------- */
.panel-mauve { background: var(--mauve); color: var(--onyx); padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
.panel-mauve h2 { color: var(--onyx); grid-column: 1 / 5; }
.panel-mauve__lead { grid-column: 1 / 5; color: rgb(15 11 21 / 0.8); max-width: 40ch; }
.panel-mauve__groups { grid-column: 6 / 13; display: grid; gap: 40px; }
.panel-mauve__intro { grid-column: 1 / 5; display: grid; gap: 24px; align-content: start; }
.group h3 { color: var(--onyx); margin-bottom: 12px; font-weight: 600; }
.group dl > div { display: flex; justify-content: space-between; gap: 24px; padding: 10px 0; border-top: 1px solid rgb(15 11 21 / 0.2); }
.group dt { color: rgb(15 11 21 / 0.75); }
.group dd { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.btn--onyx { background: var(--onyx); color: var(--ghost); justify-self: start; }
.btn--onyx:hover { background: var(--indigo); }

/* ---------- Car page: seasons ---------- */
.seasons { position: relative; background: var(--onyx); padding-block: clamp(72px, 10vw, 112px); }
.seasons__head { margin-bottom: 48px; }
.seasons__track { display: flex; gap: 40px; padding-inline: max(var(--gutter), calc((100vw - 1400px) / 2 + var(--gutter))); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.seasons__track::-webkit-scrollbar { display: none; }
.panel { flex: none; width: 85vw; max-width: 900px; scroll-snap-align: center; display: grid; gap: 20px; }
.panel .slot { --ar: 4 / 3; }
.panel__top { display: flex; align-items: baseline; gap: 20px; }
.panel__season { font-family: var(--font-mono); font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem); color: var(--ghost); letter-spacing: -0.04em; line-height: 1; }
.panel--current .panel__season { color: var(--volt); }
.panel__facts { display: flex; gap: 32px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); }
.panel__facts b { color: var(--ghost); font-weight: 500; }
.timeline-bar { display: none; height: 2px; background: var(--line); margin-top: 32px; position: relative; }
.timeline-progress { position: absolute; inset: 0; background: var(--mauve); transform: scaleX(0); transform-origin: left; }
.seasons.is-pinned { height: 100dvh; padding-block: calc(var(--nav-h) + 24px) 48px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.seasons.is-pinned .seasons__track { overflow: visible; scroll-snap-type: none; width: max-content; }
.seasons.is-pinned .panel { width: min(70vw, 900px); }
.seasons.is-pinned .panel .slot { --ar: 16 / 8.5; }
.seasons.is-pinned .seasons__head { margin-bottom: 28px; }
.seasons.is-pinned .timeline-bar { display: block; margin-inline: var(--gutter); }

/* ---------- Team page ---------- */
.photo-band { padding-bottom: 0; }
.statement { padding-block: clamp(72px, 10vw, 128px); }
.statement p { font-size: clamp(1.5rem, 1rem + 2.4vw, 3rem); line-height: 1.2; letter-spacing: -0.03em; font-weight: 500; color: var(--ghost); max-width: 28ch; }
.statement mark { background: var(--volt); color: var(--onyx); padding: 0 0.15em; }
.statement .lead { margin-top: 32px; }
.sub-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.sub-index { grid-column: 1 / 4; position: sticky; top: 96px; align-self: start; display: grid; gap: 24px; }
.sub-index ul { border-top: 1px solid var(--line); }
.sub-index a { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--alabaster); transition: color 0.2s var(--ease-out); }
.sub-index a span { font-family: var(--font-mono); color: var(--dim); font-size: 0.875rem; padding-top: 2px; }
.sub-index a:hover, .sub-index a[aria-current="true"] { color: var(--mauve); }
.sub-blocks { grid-column: 5 / 13; display: grid; gap: 96px; }
.sub-block { display: grid; gap: 24px; }
.sub-block h2 { margin-bottom: 4px; }
.sub-block .slot { --ar: 16 / 9; }
.sub-block__meta { display: flex; gap: 40px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.sub-block__meta b { color: var(--ghost); font-weight: 500; }
.members { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
.member { display: grid; gap: 14px; }
.member .slot { --ar: 4 / 5; }
.member h3 { color: var(--ghost); font-size: 1.125rem; }
.member p { font-size: 0.9375rem; color: var(--muted); }
.member--lead { grid-column: span 2; }
.member--lead .slot { --ar: 16 / 10; }
.member--lead h3 { font-size: 1.5rem; }
.member:hover .slot { border-color: var(--mauve); }
.member .slot { transition: border-color 0.3s var(--ease-out); }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 56px; }
.contact-info { grid-column: 1 / 6; display: grid; gap: 0; align-content: start; border-top: 1px solid var(--line); }
.info-row { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.info-row .ph { font-size: 1.375rem; color: var(--mauve); margin-top: 2px; }
.info-row h2 { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 6px; }
.info-row a, .info-row address { font-style: normal; color: var(--ghost); font-size: 1.125rem; overflow-wrap: anywhere; }
.info-row a:hover { color: var(--mauve); }
.form { grid-column: 7 / 13; display: grid; gap: 24px; align-content: start; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9375rem; color: var(--ghost); font-weight: 500; }
.field .hint { font-size: 0.875rem; color: var(--muted); }
.input {
  width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--ghost);
  padding: 14px 16px; min-height: 52px; appearance: none; -webkit-appearance: none;
  transition: border-color 0.2s var(--ease-out);
}
.input::placeholder { color: var(--dim); }
.input:hover { border-color: var(--mauve); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--mauve); }
textarea.input { min-height: 160px; resize: vertical; }
.select { position: relative; }
.select .ph { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--mauve); }
.field.has-error .input { border-color: var(--error); }
.error { display: none; align-items: center; gap: 8px; color: var(--error); font-size: 0.875rem; }
.field.has-error .error { display: flex; }
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__success { display: none; grid-column: 7 / 13; align-content: start; gap: 16px; padding: 32px; border: 1px solid var(--mauve); background: var(--surface); }
.form__success .ph { font-size: 2rem; color: var(--mauve); }
.contact-grid.is-sent .form { display: none; }
.contact-grid.is-sent .form__success { display: grid; }
.map-band { padding-top: 0; }
.map-band .slot { --ar: 21 / 8; }
.map-band .slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.enquiries { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.enq { display: grid; gap: 12px; padding: 32px 32px 32px 0; border-bottom: 1px solid var(--line); }
.enq + .enq { padding-left: 32px; border-left: 1px solid var(--line); }
.enq a.ulink { color: var(--mauve); display: inline-flex; gap: 8px; align-items: center; width: fit-content; }

/* ---------- Intro counter ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100; background: var(--onyx); display: none;
  transition: transform 0.7s var(--ease-io);
}
.js .intro { display: block; }
.js.intro-skip .intro { display: none; }
.intro.is-exit { transform: translateY(-100%); }
.intro__logo { position: absolute; top: 24px; left: var(--gutter); height: 34px; width: auto; }
.intro__num { position: absolute; bottom: 24px; left: var(--gutter); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(4.5rem, 2rem + 12vw, 8rem); color: var(--volt); line-height: 1; letter-spacing: -0.04em; }
.intro__name { position: absolute; right: var(--gutter); bottom: 32px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav__links { gap: 22px; }
  .footer__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) {
  .nav__links, .nav .btn { display: none; }
  .nav__toggle { display: inline-flex; }
  .hero { padding-top: calc(var(--nav-h) + 16px); }
  .hero__grid { grid-template-columns: 1fr; row-gap: 40px; padding-block: 24px 56px; }
  .hero__copy, .hero__media { grid-column: 1; grid-row: auto; }
  .hero__media { margin-right: 0; }
  .js .hero__media { transform: translateY(24px); }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 28px 20px; }
  .stat:first-child { padding-left: 20px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat--hero { grid-column: 1 / -1; }
  .stat--hero + .stat { border-left: 0; }
  .partners__head { flex-direction: column; align-items: flex-start; }
  .marquee__track { animation-duration: 30s; }
  .logo-slot { width: 120px; height: 30px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .cell, .cell--a, .cell--b, .cell--c, .cell--d { grid-column: 1; grid-row: auto; min-height: 220px; }
  .cell--a { order: -1; min-height: 320px; }
  .cell--d .cell__body { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr 24px; gap: 8px 16px; padding-right: 0; }
  .row__date, .row__tag { grid-column: 1; }
  .row__title { grid-column: 1; grid-row: 2; }
  .row .ph { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .split, .band__grid, .page-head__grid, .contact-grid, .sub-layout { display: grid; grid-template-columns: 1fr; row-gap: 40px; }
  .split__sticky, .split__list, .band__copy, .band__action, .page-head__copy, .page-head__index,
  .contact-info, .form, .form__success, .sub-index, .sub-blocks { grid-column: 1; position: static; }
  .page-head { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 48px; }
  .panel-mauve { grid-template-columns: 1fr; }
  .panel-mauve > * { grid-column: 1 !important; }
  .sub-index { display: none; }
  .sub-blocks { gap: 64px; }
  .members { grid-template-columns: 1fr 1fr; }
  .member--lead { grid-column: 1 / -1; }
  .enquiries { grid-template-columns: 1fr; }
  .enq + .enq { padding-left: 0; border-left: 0; }
  .map-band .slot { --ar: 4 / 3; }
  .band__action .btn { width: 100%; }
  .footer__main { grid-template-columns: 1fr 1fr; padding-block: 56px 48px; }
  .footer__brand { grid-column: 1 / -1; }
  .form__foot .btn { width: 100%; }
}
@media (max-width: 520px) {
  .footer__main { grid-template-columns: 1fr; }
  .members { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main { animation: none; }
  .intro { display: none !important; }
  .js [data-reveal], .js [data-hero], .js .hero__media, .js .hero__glow, .js .reveal-lines > .line > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee__group[aria-hidden="true"] { display: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee__group { flex-wrap: wrap; justify-content: center; }
  .pause { display: none; }
  .btn, .btn .ph, .cell, .cell--a .cell__media { transition: none; }
}

/* ---------- Patches ---------- */
.nav .btn { height: 40px; padding: 0 18px; }
.cell--a .slot__label { left: auto; right: 16px; }
.stage-img { order: -1; }
.walk.is-pinned .stage-img .slot { --ar: 16 / 10; max-height: calc(100dvh - var(--nav-h) - 96px); }
@media (max-width: 899px) {
  .stage-img { overflow: hidden; }
  .anno b { width: calc(var(--len, 80px) * 0.5); }
  .anno em { font-size: 0.6875rem; padding: 3px 6px; }
}
.footer__brand img { filter: brightness(0) invert(1); opacity: 0.95; }
.seasons.is-pinned .seasons__head { width: 100%; }
.anno--rev { left: auto; right: calc(100% - var(--x)); }
.statement p.lead { max-width: 65ch; color: var(--muted); font-size: 1.125rem; font-weight: 400; letter-spacing: 0; line-height: 1.65; }

/* ---------- Revision 2 ---------- */
/* H2 on Surface backgrounds: Ghost White (mauve reads pink on this tone) */
.section--alt h2 { color: var(--ghost); }

/* Management cell: photo cell instead of the full-width mauve block */
.cell--d { grid-column: 1 / -1; grid-row: 3; background: var(--surface); border-color: var(--line); color: var(--ghost); }
.cell--d .cell__media { position: absolute; inset: 0; transition: transform 0.6s var(--ease-out); }
.cell--d:hover .cell__media { transform: scale(1.04); }
.cell--d::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgb(15 11 21 / 0.85)); }
.cell--d h3 { color: inherit; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); }
.cell--d .num { color: inherit; }
.cell--d .slot__label { left: auto; right: 16px; }
.cell--d .cell__body { grid-template-columns: 1fr; align-items: start; }
.cell--d:hover { border-color: var(--mauve); }

/* Car page: reveal section */
.reveal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: center; }
.reveal__copy { grid-column: 1 / 6; display: grid; gap: 28px; justify-items: start; }
.reveal__media { grid-column: 7 / 13; }
@media (max-width: 899px) {
  .reveal { grid-template-columns: 1fr; }
  .reveal__copy, .reveal__media { grid-column: 1; }
  .cell--d .cell__body { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .stat:nth-child(3) { border-left: 1px solid var(--line); }
  .stat:nth-child(n+2) { border-top: 1px solid var(--line); }
  .stat:nth-child(4) { grid-column: 1 / -1; border-left: 0; }
}

/* ---------- Revision 3 ---------- */
/* Stats strip: labels share one top line, values share one bottom line */
.stat { min-height: 208px; align-content: space-between; gap: 24px; }
.stat__value { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; }
.stat__value small { margin-left: 0; white-space: nowrap; }
@media (max-width: 899px) { .stat { min-height: 0; gap: 20px; } }

/* Subsystems section: brand mark watermark and one soft indigo glow behind the grid */
.section--bento { position: relative; overflow: clip; isolation: isolate; }
.section--bento::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(55% 60% at 12% 8%, rgb(105 2 169 / 0.32), transparent 70%);
}
.section--bento::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: -5%; top: 40px; width: min(900px, 68vw); aspect-ratio: 1165 / 531;
  background: url("../img/logo.png") center / contain no-repeat; opacity: 0.16;
}
@media (max-width: 899px) { .section--bento::after { right: -45%; top: 24px; width: 95vw; opacity: 0.12; } }



/* ==========================================================================
   Revision 4: real content + live 3D model
   ========================================================================== */

/* 3D model: the dashed placeholder becomes a live viewer */
.model-slot { border: 0; border-block: 1px solid var(--line); border-left: 1px solid var(--line); background: none; }
.model-slot__logo { transition: opacity 0.7s var(--ease-out); }
.model-slot__viewer { opacity: 0; transition: opacity 0.9s var(--ease-out); cursor: grab; outline-offset: -3px; }
.model-slot__viewer:active { cursor: grabbing; }
.model-slot__viewer:focus-visible { outline: 2px solid var(--mauve); }
.model-slot[data-state="ready"] .model-slot__viewer { opacity: 1; }
.model-slot[data-state="ready"] .model-slot__logo { opacity: 0; }
.model-slot__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); transition: opacity 0.5s var(--ease-out) 0.2s; }
.model-slot__bar i { display: block; height: 100%; background: var(--mauve); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform 0.35s var(--ease-out); }
.model-slot[data-state="ready"] .model-slot__bar, .model-slot[data-state="error"] .model-slot__bar { opacity: 0; }
.model-slot__caption { display: flex; justify-content: space-between; align-items: center; gap: 16px; pointer-events: none; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6875rem; }
.model-slot__caption strong { font-size: 0.6875rem; letter-spacing: 0.08em; font-weight: 500; }
.model-slot__dot { width: 8px; height: 8px; background: var(--mauve); flex: none; }
.model-slot[data-state="loading"] .model-slot__dot { animation: dot-pulse 1s var(--ease-io) infinite alternate; }
@keyframes dot-pulse { from { opacity: 0.25; } to { opacity: 1; } }
.model-slot__hint { transition: opacity 0.5s var(--ease-out); }
.model-slot[data-state="loading"] .model-slot__hint, .model-slot[data-state="idle"] .model-slot__hint, .model-slot.is-touched .model-slot__hint { opacity: 0; }
.model-slot__nojs { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.875rem; }

/* Team page: subsystem lists, tags, people groups */
.sub-list { display: grid; margin: 0; border-top: 1px solid var(--line); }
.sub-list > div { display: grid; grid-template-columns: minmax(120px, 0.32fr) 1fr; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sub-list dt { color: var(--ghost); font-weight: 500; }
.sub-list dd { color: var(--muted); max-width: 60ch; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--alabaster); border: 1px solid var(--line); padding: 8px 14px; }
.people-group + .people-group { margin-top: 56px; }
.people-group__label { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mauve); padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.people-group__label b { font-weight: 400; color: var(--dim); }
.member__dept { display: inline-block; margin-top: 8px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.group dd { text-align: right; }
@media (max-width: 640px) { .sub-list > div { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .model-slot__viewer, .model-slot__logo, .model-slot__bar, .model-slot__bar i, .model-slot__hint { transition: none; }
  .model-slot[data-state="loading"] .model-slot__dot { animation: none; }
}
@media (min-width: 1000px) { .model-slot__caption { right: calc(var(--gutter) + 44px); } }

/* ==========================================================================
   Revision 5: page transition curtain + subsystems section
   ========================================================================== */
.curtain { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; overflow: hidden; }
.curtain-on .curtain, .curtain.is-active { visibility: visible; pointer-events: auto; }
.curtain__cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.curtain__cols i { display: block; background: var(--indigo); transform: scaleY(0); transform-origin: 50% 100%; will-change: transform; }
.curtain__cols i:nth-child(even) { background: color-mix(in srgb, var(--indigo) 80%, var(--onyx)); }
.curtain-on .curtain__cols i { transform: scaleY(1); transform-origin: 50% 0%; }
.curtain-on .curtain__num { position: absolute; left: var(--gutter); bottom: 24px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(4.5rem, 2rem + 12vw, 8rem); line-height: 1; letter-spacing: -0.04em; color: var(--volt); opacity: 0; }
.curtain__label { position: absolute; right: var(--gutter); bottom: 32px; font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ghost); opacity: 0; }
.curtain-on .curtain__num, .curtain-on .curtain__label { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .curtain { display: none !important; } }

/* Subsystems: deep indigo ground, onyx and surface cells, no photo backgrounds */
.section--bento {
  background: linear-gradient(165deg, color-mix(in srgb, var(--indigo) 92%, var(--onyx)) 0%, color-mix(in srgb, var(--indigo) 62%, var(--onyx)) 100%);
}
.section--bento::before { background: radial-gradient(50% 55% at 88% 0%, rgb(202 168 245 / 0.22), transparent 70%); }
.section--bento::after { filter: brightness(0) invert(1); opacity: 0.07; }
.section--bento .section__head .lead { color: rgb(244 241 247 / 0.82); }
.section--bento .cell { border-color: rgb(202 168 245 / 0.22); color: var(--ghost); }
.section--bento .cell::after { content: none; }
.section--bento .cell--a, .section--bento .cell--d { background: var(--onyx); }
.section--bento .cell--b, .section--bento .cell--c { background: var(--surface); }
.section--bento .cell:hover { border-color: var(--mauve); background: color-mix(in srgb, var(--indigo) 38%, var(--onyx)); }
.section--bento .cell::before {
  content: attr(data-n); position: absolute; right: 18px; bottom: -0.18em; z-index: 0; pointer-events: none;
  font-family: var(--font-mono); font-size: clamp(7rem, 5rem + 8vw, 13rem); line-height: 1; letter-spacing: -0.06em;
  color: var(--mauve); opacity: 0.08; transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out);
}
.section--bento .cell:hover::before { opacity: 0.16; transform: translateY(-6px); }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mauve); border: 1px solid rgb(202 168 245 / 0.35); padding: 5px 9px; }
.cell--d .cell__body { grid-template-columns: 1fr; }
@media (prefers-reduced-motion: reduce) { .section--bento .cell::before { transition: none; } }

/* Photos in slots show in their natural colours */
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sub-block .slot, .member .slot { position: relative; isolation: isolate; }

/* ==========================================================================
   Revision 6: E-16 iframe model, Avant Garde, readable greys
   ========================================================================== */
.model-slot__viewer { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: grab; }
.model-slot[data-state="loading"] .model-slot__bar i { width: 34%; transform: none; animation: bar-slide 1.1s var(--ease-io) infinite; }
@keyframes bar-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .model-slot[data-state="loading"] .model-slot__bar i { animation: none; width: 50%; } }
.model-slot[data-state="idle"] .model-slot__viewer, .model-slot[data-state="loading"] .model-slot__viewer { pointer-events: none; }
.team-photo { margin: 0; position: relative; }
.team-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; border: 1px solid var(--line); }
.team-photo figcaption { margin-top: 14px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .team-photo img { aspect-ratio: 4 / 3; } }
.model-slot::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; background: radial-gradient(ellipse 70% 75% at 55% 55%, #fff 25%, #7a6a99 100%); }
.model-slot__caption { z-index: 2; }

/* Page transition: if scripts stall, never leave the page covered */
.curtain-on .curtain { animation: curtain-failsafe 0.01s linear 6s forwards; }
@keyframes curtain-failsafe { to { visibility: hidden; pointer-events: none; } }

/* Avant Garde: two weights only (Regular, Bold). Nothing renders thin; labels and interface text are bold or at least medium-looking. */
body { font-weight: 400; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .h1, .h2, .h3 { font-weight: 700; }
.nav__links a, .nav__links .ulink, .menu a, .btn, .ulink, .pause, .brand span, .row__title, .sub-list dt, .footer h2, .info-row h2, .cell__body h3, .member h3, .field label, .badge-volt { font-weight: 700; }
.stat__label, .row__date, .row__tag, .sub-block__meta, .spec-lines dt, .people-group__label, .member__dept, .num-label, .cell .num, .chips li, .tags li,
.model-slot__caption, .panel__facts, .curtain__label, .stage-text .n, .page-head__index a span, .sub-index a span, .numrow .n, .group dt, .group dd { font-weight: 700; }
.lead, .muted, p { font-weight: 400; }
/* Avant Garde runs wide: keep the hero headline on two lines on small laptops */
@media (min-width: 900px) and (max-width: 1199px) { .hero h1 { font-size: clamp(2.25rem, 4.7vw, 3.4rem); } }

/* Three subsystem cells: vehicle dynamics and electrical share the top rows, management spans the bottom */
.section--bento .cell--c { grid-row: span 2; }
@media (max-width: 899px) { .section--bento .cell--c { grid-row: auto; } }
