/* ============================================================================
   AXIOM RACING - styles.css
   ----------------------------------------------------------------------------
   QUICK EDITS: change brand colors and fonts in :root below.
   Layout uses CSS Grid/Flexbox; everything is responsive and accessible.
   ============================================================================ */

:root {
  /* ---- Brand palette (edit these to re-skin the whole site) ---- */
  --indigo: #384a97;
  --indigo-dark: #283566;
  --indigo-deep: #1b2447;
  --cyan: #17cbcf;
  --cyan-bright: #2fe3e7;
  --paper: #f1f1f3;     /* near-white background */
  --white: #ffffff;
  --ink: #14182b;       /* primary text */
  --ink-soft: #4a5168;  /* secondary text */

  /* ---- Derived / utility ---- */
  --line: rgba(56, 74, 151, 0.14);
  --shadow-sm: 0 4px 16px rgba(27, 36, 71, 0.08);
  --shadow-md: 0 18px 48px rgba(27, 36, 71, 0.14);
  --radius: 18px;
  --radius-sm: 12px;

  /* ---- Type ---- */
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1160px;
  --nav-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.08; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--indigo); text-decoration: none; }
img { max-width: 100%; display: block; }

.accent { color: var(--cyan); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--indigo); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--indigo);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.btn--cyan { background: var(--cyan); color: var(--indigo-deep); box-shadow: 0 8px 22px rgba(23, 203, 207, .35); }
.btn--cyan:hover { background: var(--cyan-bright); box-shadow: 0 12px 28px rgba(23, 203, 207, .45); }

.btn--ghost { background: transparent; color: var(--indigo); border-color: var(--indigo); }
.btn--ghost:hover { background: var(--indigo); color: #fff; }

.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ============================================================================
   NAV
   ============================================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: clamp(20px, 5vw, 48px);
  background: rgba(241, 241, 243, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid transparent; border-bottom-color: transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease,
              top .35s cubic-bezier(.22,.61,.36,1), height .35s ease,
              max-width .35s cubic-bezier(.22,.61,.36,1), border-radius .35s ease,
              padding .35s ease;
}
.nav.is-scrolled { background: rgba(255, 255, 255, 0.9); border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

/* On scroll, the bar morphs into a floating dark "pill" (desktop). */
@media (min-width: 861px) {
  .nav.is-scrolled {
    top: 12px; left: 50%; right: auto; transform: translateX(-50%);
    width: max-content; max-width: calc(100% - 32px); height: 58px;
    padding: 0 10px 0 20px; gap: 1.8rem;
    border-radius: 999px;
    background: rgba(13, 16, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  }
  .nav.is-scrolled .nav__brand { color: #fff; }
  .nav.is-scrolled .nav__brandtext { display: none; }      /* icon only, like the mockup */
  .nav.is-scrolled .nav__links > a:not(.btn) { color: rgba(241, 241, 243, 0.9); }
  .nav.is-scrolled .nav__links > a:not(.btn):hover { color: #fff; }
}

.nav__brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 800; letter-spacing: .04em; color: var(--indigo); font-size: 1.15rem; }
.nav__logo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.nav__logo.is-missing { display: none; }
.nav__brandtext { line-height: 1; }

.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links > a:not(.btn) {
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--ink);
  position: relative; padding: .25rem 0;
}
.nav__links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--cyan); transition: width .22s ease;
}
.nav__links > a:not(.btn):hover::after { width: 100%; }
.nav__cta { padding: .55rem 1.1rem; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 26px; height: 3px; background: var(--indigo); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================================
   HERO
   ============================================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: var(--nav-h) 20px 60px; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(23, 203, 207, .14), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(56, 74, 151, .16), transparent 55%),
    var(--paper);
  /* Make .hero its own stacking context so the negative-z-index canvas/layers
     render above the hero background (not hidden behind it), while the title
     logo's multiply blend still reaches them. */
  isolation: isolate;
}
/* Negative z-index keeps these behind the content while letting the title
   logo's blend mode reach the hero background (they share one context). */
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }

/* Parallax decorative layers */
.hero__layers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; }
.blob--1 { width: 420px; height: 420px; top: -80px; right: -60px;
  background: radial-gradient(circle at 30% 30%, rgba(23,203,207,.55), transparent 70%); }
.blob--2 { width: 520px; height: 520px; bottom: -160px; left: -120px;
  background: radial-gradient(circle at 60% 40%, rgba(56,74,151,.5), transparent 70%); }
.grid-lines {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(56,74,151,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56,74,151,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 75%);
}

/* No z-index/transform here, so the title logo blends against the hero bg. */
.hero__content { position: relative; max-width: 900px; }
.hero__eyebrow {
  font-family: var(--font-head); font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  font-size: .8rem; color: var(--indigo); margin: 0 0 1.1rem;
}
.hero__title { display: flex; justify-content: center; align-items: center; margin: 0; }
/* Logo PNG now has a transparent background, so it blends on any backdrop. */
.hero__titlelogo { width: min(620px, 86vw); height: auto; }
.hero__tagline { margin: 1.2rem 0 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.05rem, 3vw, 1.6rem); color: var(--ink-soft); }
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.2rem; }

.hero__scrollcue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--ink-soft); font-family: var(--font-head); font-size: .72rem; letter-spacing: .25em; text-transform: uppercase;
}
.hero__mouse { width: 24px; height: 38px; border: 2px solid var(--indigo); border-radius: 14px; display: flex; justify-content: center; padding-top: 6px; }
.hero__mouse span { width: 4px; height: 8px; background: var(--cyan); border-radius: 2px; animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

/* ============================================================================
   SECTIONS (shared)
   ============================================================================ */
.section { position: relative; padding: clamp(72px, 11vw, 140px) 0; }
.section--tint { background: linear-gradient(180deg, #fff, var(--paper)); }
/* Team sits on white with a hairline divider, giving a clear boundary with the
   preceding Car section (both otherwise resolve to the --paper background). */
#team { background: var(--white); border-top: 1px solid var(--line); }
/* Achievements drops back to the paper tone + a hairline, separating it clearly
   from the white Team section above it. */
#achievements { background: var(--paper); border-top: 1px solid var(--line); }
.section--dark {
  background:
    radial-gradient(800px 400px at 85% -10%, rgba(23,203,207,.18), transparent 60%),
    linear-gradient(160deg, var(--indigo-deep), var(--indigo-dark));
  color: var(--paper);
}
.section--dark .section__title,
.section--dark .pitch__title { color: #fff; }
.section--dark .section__kicker { color: var(--cyan); }

.section__kicker {
  font-family: var(--font-head); font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  font-size: .78rem; color: var(--cyan); margin: 0 0 .8rem;
}
.section__kicker--center { text-align: center; margin-top: 3.5rem; }
.section__kicker::before { content: ""; display: inline-block; width: 26px; height: 2px; background: var(--cyan); vertical-align: middle; margin-right: 10px; transform: translateY(-3px); }
.section__title { font-weight: 800; font-size: clamp(1.9rem, 5vw, 3.1rem); color: var(--indigo); max-width: 18ch; margin-bottom: 2.6rem; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about__lead p { font-size: 1.12rem; color: var(--ink-soft); }
.about__lead strong { color: var(--ink); }
.about__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about__stats li {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.2rem; box-shadow: var(--shadow-sm);
}
.stat__num { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: var(--indigo); line-height: 1; }
.stat__label { display: block; margin-top: .4rem; font-size: .9rem; color: var(--ink-soft); }

/* ---------- The Car: reveal teaser (silhouette + cursor spotlight) ---------- */
.car-reveal { margin: 0; padding: 0; cursor: crosshair; }
.car-reveal:focus-visible { outline: none; }
.car-reveal:focus-visible .car-reveal__stage { box-shadow: 0 0 0 3px var(--cyan), var(--shadow-md); }

.car-reveal__stage {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(700px 300px at 50% 120%, rgba(56,74,151,.12), transparent 70%),
    linear-gradient(135deg, #fff, #e9eaf2);
  box-shadow: var(--shadow-md);
  padding: clamp(1rem, 4vw, 2.5rem);
  transition: box-shadow .4s ease;
  /* Cursor position (px), updated by script.js; defaults to the centre. */
  --mx: 50%;
  --my: 50%;
}

/* Car silhouette image. multiply drops the image's white background into the
   light stage, leaving just the black car. */
.car-reveal__img {
  display: block; width: 100%; height: auto;
  mix-blend-mode: multiply;
  transition: transform .4s ease;
}
.car-reveal__stage.is-hovering .car-reveal__img,
.car-reveal.is-lit .car-reveal__img { transform: scale(1.02); }

/* Soft cyan glow that tracks the cursor. */
.car-reveal__spotlight {
  position: absolute; left: var(--mx); top: var(--my);
  width: 360px; height: 360px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(23,203,207,.45) 0%, rgba(56,74,151,.18) 35%, transparent 68%);
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  opacity: 0; transition: opacity .3s ease;
}

/* Badge */
.car-reveal__badge {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px);
  font-family: var(--font-head); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--indigo-deep); background: var(--cyan);
  padding: .45rem .9rem; border-radius: 999px;
  opacity: 0; transition: opacity .35s ease, transform .35s ease;
  box-shadow: 0 8px 20px rgba(23,203,207,.4); pointer-events: none;
}

.car-reveal__caption {
  margin-top: 1rem; text-align: center;
  font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: .04em;
  color: var(--ink-soft);
}

/* ---- Active states: cursor hovering (set by JS) OR keyboard/touch "lit" ---- */
.car-reveal__stage.is-hovering { box-shadow: 0 24px 60px rgba(23,203,207,.28), var(--shadow-md); }
.car-reveal__stage.is-hovering .car-reveal__spotlight { opacity: 1; }
.car-reveal__stage.is-hovering .car-reveal__badge { opacity: 1; transform: translate(-50%, 0); }

/* Full reveal for keyboard focus / touch tap / reduced-motion (no cursor tracking) */
.car-reveal.is-lit .car-reveal__spotlight { opacity: .8; }
.car-reveal.is-lit .car-reveal__badge { opacity: 1; transform: translate(-50%, 0); }
.car-reveal.is-lit .car-reveal__stage { box-shadow: 0 24px 60px rgba(23,203,207,.28), var(--shadow-md); }

/* Touch / no-hover devices: hint that it's tappable */
@media (hover: none) {
  .car-reveal { cursor: pointer; }
}

/* ---------- Team ---------- */
/* All five members in a single row on desktop. */
.team__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4rem; }
/* Larger, gently portrait member cards. */
.member {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 290px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.4rem 1.4rem; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.member__photo { width: 116px; height: 116px; border-radius: 50%; margin: 0 auto 1.2rem; object-fit: cover; }
.member__photo--ph {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 2.1rem;
}
.member__photo--ph::after { content: attr(data-initials); }
.member__name { font-size: 1.22rem; color: var(--indigo); margin-bottom: .35rem; line-height: 1.2; }
.member__role { font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--cyan); text-transform: uppercase; letter-spacing: .05em; margin: 0; }

/* ---------- Sponsors ---------- */
.sponsors__pitch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.pitch { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 1.8rem; backdrop-filter: blur(4px); }
.pitch__title { font-size: 1.3rem; margin-bottom: .6rem; color: #fff; }
.pitch__title::before { content: ""; display: block; width: 34px; height: 3px; background: var(--cyan); border-radius: 2px; margin-bottom: .8rem; }
.pitch p { color: rgba(241,241,243,.82); margin: 0; }

/* Centered row of uniform logo chips. */
.sponsors__wall { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 1.2rem; margin-top: 1.4rem; }
.sponsor-slot {
  display: grid; place-items: center; aspect-ratio: 5 / 2;
  border: 1.5px dashed rgba(255,255,255,.28); border-radius: var(--radius-sm);
  color: rgba(241,241,243,.6); font-family: var(--font-head); font-weight: 600; font-size: .85rem;
  background: rgba(255,255,255,.03); transition: border-color .2s ease, color .2s ease;
}
.sponsor-slot:hover { border-color: var(--cyan); color: var(--cyan); }

/* Slots holding a real logo: light chip so any logo colour reads on the dark section.
   Fixed width + shared aspect ratio keeps all logos the same size and aligned. */
.sponsor-slot--logo {
  width: 220px; aspect-ratio: 5 / 2; padding: 1rem 1.4rem;
  background: var(--white); border: 1px solid rgba(255,255,255,.5);
  transition: transform .2s ease, box-shadow .2s ease;
}
.sponsor-slot--logo:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.25); border-color: var(--white); }
.sponsor-slot--logo img { max-height: 44px; width: auto; max-width: 100%; object-fit: contain; }
/* Inside the scrolling marquee, chips must keep their width (no flex shrink). */
.marquee .sponsor-slot--logo { flex: 0 0 auto; }
/* Amaron: edge-to-edge green background, no white padding around it. */
.sponsor-slot--fill { padding: 0; overflow: hidden; }
.sponsor-slot--fill img { max-height: none; width: 100%; height: 100%; object-fit: cover; }
/* Logos that sit inside large transparent margins (blinkit, speedlabs, volkswagen):
   absolutely centered in the chip, scaled up by a per-logo --zoom, with the slack cropped.
   Absolute + translate(-50%,-50%) guarantees centering on both axes regardless of the
   logo's own aspect ratio. Tune each logo with style="--zoom: N" on its chip. */
.sponsor-slot--zoom { padding: 0; overflow: hidden; position: relative; }
.sponsor-slot--zoom img {
  position: absolute; top: 50%; left: 50%;
  height: 100%; width: auto; max-height: none; max-width: none;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(var(--zoom, 1.6));
  transform-origin: center center;
}
.sponsors__cta { text-align: center; margin-top: 3rem; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__lead { font-size: 1.1rem; color: var(--ink-soft); }
.contact__list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 1rem; }
.contact__list li { display: flex; flex-direction: column; }
.contact__label { font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--cyan); }
.contact__list a { font-size: 1.1rem; font-weight: 600; }

.contact__form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow-md); display: grid; gap: 1rem; }
.contact__form label { display: grid; gap: .35rem; font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--ink); }
.contact__form small { color: var(--ink-soft); font-weight: 400; }
.contact__form input, .contact__form textarea {
  font-family: var(--font-body); font-size: 1rem; padding: .75rem .9rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.contact__form input:focus, .contact__form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(23,203,207,.2); }
.contact__form .btn { margin-top: .4rem; }
.contact__formnote { font-size: .8rem; color: var(--ink-soft); margin: 0; }

/* ============================================================================
   FOOTER
   ============================================================================ */
.footer { background: var(--indigo-deep); color: var(--paper); padding: 2.6rem 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--font-head); font-weight: 800; letter-spacing: .04em; }
.footer__logo { border-radius: 7px; }
.footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer__links a { color: rgba(241,241,243,.8); font-size: .92rem; }
.footer__links a:hover { color: var(--cyan); }
.footer__copy { color: rgba(241,241,243,.6); font-size: .85rem; margin: 0; width: 100%; text-align: center; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); }

/* ============================================================================
   SCROLL-REVEAL (progressive enhancement)
   Elements with .reveal start hidden ONLY when JS marks the page ready.
   Without JS (or with reduced motion), everything is fully visible.
   ============================================================================ */
.js-ready .reveal { opacity: 0; transform: translateY(28px); }
.js-ready .reveal.is-visible { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }

@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal { opacity: 1 !important; transform: none !important; }
  .hero__mouse span { animation: none; }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 980px) {
  /* Below a comfortable width, let the team wrap instead of cramming 5 across. */
  .team__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .sponsors__pitch { grid-template-columns: 1fr; }
  .car-reveal__svg--lit { filter: drop-shadow(0 4px 10px rgba(23,203,207,.5)); }

  /* Mobile nav: links collapse into a dropdown panel */
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: .5rem 0; max-height: 0; overflow: hidden;
    transform-origin: top; transition: max-height .3s ease;
  }
  .nav__links.is-open { max-height: 420px; }
  .nav__links > a { padding: .95rem clamp(20px,5vw,48px); }
  .nav__links > a::after { display: none; }
  .nav__cta { margin: .6rem clamp(20px,5vw,48px); text-align: center; }
}

@media (max-width: 560px) {
  .team__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .about__stats { grid-template-columns: 1fr 1fr; }
  .hero__actions .btn { width: 100%; }
}

/* ============================================================================
   SCROLL FLOURISHES: starting lights, speed streaks, car progress track
   (all decorative; disabled under prefers-reduced-motion at the bottom)
   ============================================================================ */

/* ---- F1 starting-lights intro overlay ---- */
.lights {
  position: fixed; inset: 0; z-index: 2000;
  display: none; /* hidden by default; JS adds .is-active to play it (so no-JS shows no overlay) */
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  background:
    radial-gradient(900px 500px at 50% 30%, rgba(56,74,151,.18), transparent 60%),
    var(--indigo-deep);
  opacity: 1; transition: opacity .6s ease;
}
.lights.is-active { display: flex; }
.lights.is-done { opacity: 0; pointer-events: none; }
.lights__gantry { display: flex; gap: clamp(.8rem, 3vw, 1.8rem); padding: 1.2rem clamp(1rem, 4vw, 2rem);
  background: #0d1330; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.06); }
.lights__pole { display: flex; flex-direction: column; gap: .7rem; }
.lights__pole span {
  width: clamp(28px, 7vw, 46px); height: clamp(28px, 7vw, 46px); border-radius: 50%;
  background: #2a0b0b; box-shadow: inset 0 0 0 3px rgba(0,0,0,.5);
  transition: background .12s ease, box-shadow .12s ease;
}
/* JS adds .is-on to each pole in sequence */
.lights__pole.is-on span {
  background: radial-gradient(circle at 40% 35%, #ff6b6b, #d11);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.3), 0 0 18px 4px rgba(229,17,17,.7);
}
.lights__caption {
  font-family: var(--font-head); font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  font-size: clamp(.8rem, 2.4vw, 1rem); color: var(--cyan); margin: 0; opacity: 0; transition: opacity .3s ease;
}
.lights.is-go .lights__caption { opacity: 1; }

/* ---- Scroll-velocity speed streaks ---- */
.speedfx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1500; pointer-events: none; opacity: 0; /* opacity driven by JS via inline style */
}

/* ---- Decorative F1 car scroll-progress track (desktop only) ---- */
.track { position: fixed; top: 0; right: 26px; bottom: 0; width: 40px; z-index: 80; pointer-events: none; display: none; }
.track__rail {
  position: absolute; top: 14vh; bottom: 14vh; left: 50%; transform: translateX(-50%); width: 4px;
  background: linear-gradient(180deg, var(--indigo), var(--cyan));
  border-radius: 4px; opacity: .35;
}
/* start dot + checkered finish marker */
.track__flag { position: absolute; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; }
.track__flag--start { top: -7px; background: var(--cyan); box-shadow: 0 0 0 4px rgba(23,203,207,.25); }
.track__flag--finish {
  bottom: -8px; width: 16px; height: 16px; border-radius: 3px;
  background:
    conic-gradient(#1b2447 90deg, #fff 90deg 180deg, #1b2447 180deg 270deg, #fff 270deg);
  background-size: 8px 8px;
}
.track__car {
  position: absolute; left: 50%; top: 0; width: 26px; height: auto;
  transform: translate(-50%, -50%); /* JS updates top via --p */
  filter: drop-shadow(0 4px 8px rgba(23,203,207,.45));
}
.track__body { fill: var(--indigo); }
.track__cockpit { fill: var(--cyan); }
.track__wheels rect { fill: #1b2447; }
.track.is-moving .track__wheels { animation: wheelSpin .25s linear infinite; transform-origin: center; }
@keyframes wheelSpin { 0% { opacity: 1; } 50% { opacity: .55; } 100% { opacity: 1; } }

@media (min-width: 1180px) { .track { display: block; } }

/* ---- Respect reduced motion: no intro, no streaks, no driving car ---- */
@media (prefers-reduced-motion: reduce) {
  .lights { display: none; }
  .speedfx { display: none; }
  .track { display: none; }
}

/* ============================================================================
   ACHIEVEMENTS: scrolling placard marquee (out the left, in from the right)
   ============================================================================ */
.marquee {
  margin-top: 2.6rem; padding: .6rem 0 1rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { display: flex; gap: 1.4rem; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.placard {
  flex: 0 0 auto; width: 312px; min-height: 208px; padding: 2.2rem 1.9rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.placard:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.placard__icon { display: block; font-size: 2.7rem; line-height: 1; margin-bottom: .85rem; }
.placard__title { font-size: 1.32rem; color: var(--indigo); margin-bottom: .45rem; line-height: 1.2; }
.placard__meta { font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; }
}

/* ============================================================================
   CUSTOM CURSOR (a cyan dot + lagging indigo ring; fine pointers only, via JS)
   ============================================================================ */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99999; border-radius: 50%; }
.cursor-dot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--cyan); box-shadow: 0 0 10px rgba(23,203,207,.8); }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 2px solid rgba(56,74,151,.65);
  transition: width .2s ease, height .2s ease, margin .2s ease, border-color .2s ease, background .2s ease;
}
.cursor-ring.is-active {
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-color: var(--cyan); background: rgba(23,203,207,.12);
}
/* When the custom cursor is active, hide the OS cursor everywhere. */
body.has-cursor, body.has-cursor * { cursor: none !important; }
