/* ──────────────────────────────────────────────────────────────
   TRIAD Motors. A dusk showroom: near black ground, warm amber from
   the video lighting, one accent white. The hero is the stage; every
   section below borrows its stills.
   ────────────────────────────────────────────────────────────── */

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

:root {
  --bg: #07080b;
  --panel: #0e1015;
  --ink: #f2f1ee;
  --muted: #9a9ba3;
  --faint: #5d5f68;
  --line: rgba(255, 255, 255, .09);
  --amber: #f0a35a;
  --pad: clamp(20px, 4.5vw, 72px);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--amber);
}
h1, h2, h3 { font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
h2 { font-size: clamp(28px, 3.6vw, 48px); margin-top: 12px; }
.lead { margin-top: 14px; max-width: 56ch; font-size: clamp(14px, 1.1vw, 16.5px); line-height: 1.7; color: var(--muted); }
.link { font-size: 13.5px; color: var(--muted); transition: color .25s; }
.link:hover { color: var(--ink); }

/* ══════════════ nav ══════════════ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--pad);
  transition: background .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck { background: rgba(7, 8, 11, .82); backdrop-filter: blur(12px); border-color: var(--line); }
.nav__logo { font-weight: 800; font-size: 16px; letter-spacing: .34em; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); font-size: 12.5px; color: var(--muted); }
.nav__links a { transition: color .25s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 100px; padding: 9px 18px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.nav__cta:hover { background: var(--ink); color: var(--bg); }

/* ══════════════ hero ══════════════ */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }

.stage { position: absolute; inset: 0; background: #0a0d14; }
.clip {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; pointer-events: none;
}
.clip.is-front { opacity: 1; }

.stage__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(7, 8, 11, .92) 0%, rgba(7, 8, 11, .35) 34%, rgba(7, 8, 11, 0) 60%),
    linear-gradient(to bottom, rgba(7, 8, 11, .55), rgba(7, 8, 11, 0) 28%);
}

/* three columns over the car, labels lit on hover */
.zones {
  /* only the band the cars occupy, so the headline and nav never trigger a morph */
  position: absolute; left: 0; right: 0; top: 16%; bottom: 30%;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  opacity: 0; transition: opacity .5s ease; pointer-events: none;
}
.stage[data-state="split"] .zones,
.stage[data-state="moving"] .zones,
.stage[data-state="tesla"] .zones,
.stage[data-state="lexus"] .zones,
.stage[data-state="bmw"] .zones { opacity: 1; pointer-events: auto; }

/* labels sit in the sky above each car, clear of the headline */
.zone { position: relative; display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; }
.zone__label {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; color: rgba(242, 241, 238, .55);
  transition: color .3s, transform .3s;
}
.zone__label small { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); transition: color .3s; }
.zone__label::after {
  content: ""; margin-top: 8px; width: 28px; height: 1px; background: rgba(255, 255, 255, .25); transition: width .35s, background .35s;
}
.zone:hover .zone__label, .zone.is-active .zone__label { color: var(--ink); transform: translateY(-4px); }
.zone:hover .zone__label small, .zone.is-active .zone__label small { color: var(--amber); }
.zone:hover .zone__label::after, .zone.is-active .zone__label::after { width: 56px; background: var(--amber); }

.hero__copy {
  position: absolute; left: 50%; bottom: clamp(30px, 6svh, 60px); z-index: 5; transform: translateX(-50%);
  width: min(900px, 90vw); text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 1.1s ease .2s, transform 1.1s cubic-bezier(.16, 1, .3, 1) .2s;
}
/* they fade in only once the car has opened into three */
.stage:not([data-state="intro"]) ~ .hero__copy { opacity: 1; }
.stage[data-state="intro"] ~ .hero__copy { transform: translate(-50%, 14px); }
.hero__copy h1 { font-size: clamp(32px, 4.8vw, 66px); font-weight: 800; }
.hero__lead {
  margin: 12px auto 0; font-size: clamp(13.5px, 1.1vw, 16px); line-height: 1.6; color: var(--muted); max-width: 52ch;
  transition: opacity .22s ease, transform .22s ease;
}
.hero__lead.is-swapping { opacity: 0; transform: translateY(4px); }

/* phones: the bar */
.picker {
  position: absolute; left: 50%; bottom: clamp(18px, 3svh, 28px); transform: translateX(-50%); z-index: 6;
  display: none; gap: 6px; padding: 6px; border-radius: 100px;
  background: rgba(14, 16, 21, .78); border: 1px solid var(--line); backdrop-filter: blur(12px);
}
.picker button {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 18px; border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background .3s, color .3s;
}
.picker button small { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.picker button.is-active { background: var(--ink); color: var(--bg); }
.picker button.is-active small { color: rgba(7, 8, 11, .6); }

.replay {
  position: absolute; right: var(--pad); top: clamp(76px, 10svh, 100px); z-index: 6;
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--line); background: rgba(14, 16, 21, .6); backdrop-filter: blur(8px);
  font-size: 11.5px; letter-spacing: .06em; color: var(--muted); transition: color .3s, border-color .3s;
}
.replay:hover { color: var(--ink); border-color: rgba(255, 255, 255, .3); }
.replay svg { width: 14px; height: 14px; }
.stage[data-state="intro"] ~ .replay { opacity: 0; pointer-events: none; }

/* ══════════════ sections ══════════════ */
section { padding: clamp(72px, 9vw, 130px) var(--pad); }
.section-head { max-width: 760px; }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* powertrains */
.power { border-top: 1px solid var(--line); }
.power__grid { margin-top: clamp(34px, 4vw, 56px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.power__card {
  position: relative; overflow: hidden; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), border-color .4s;
}
.power__card:hover, .power__card.is-active { transform: translateY(-5px); border-color: rgba(240, 163, 90, .45); }
.power__card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 35%; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.power__card:hover img { transform: scale(1.04); }
.power__body { padding: 22px 22px 24px; }
.power__body h3 { margin-top: 8px; font-size: 21px; }
.power__body p:not(.eyebrow) { margin-top: 10px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.power__body dl { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.power__body dt { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.power__body dd { margin-top: 4px; font-size: 13px; font-weight: 600; }

/* models */
.models__grid { margin-top: clamp(28px, 3.5vw, 48px); display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 12px; }
.model { position: relative; overflow: hidden; border-radius: 14px; background: var(--panel); }
.model--wide { grid-column: span 2; grid-row: span 2; }
.model img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.model:hover img { transform: scale(1.05); }
.model figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(7, 8, 11, .85), transparent);
}
.model figcaption strong { display: block; font-size: 14px; }
.model figcaption span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }

/* the showroom */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 16px; border-radius: 100px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); transition: background .3s, color .3s, border-color .3s; }
.chips button small { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.chips button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips button.is-active small { color: rgba(7, 8, 11, .6); }
.shop__grid { margin-top: clamp(28px, 3.5vw, 48px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.car { border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); opacity: 0; transform: translateY(14px); animation: carIn .6s cubic-bezier(.16, 1, .3, 1) forwards; transition: border-color .3s; }
.car:hover { border-color: rgba(240, 163, 90, .45); }
@keyframes carIn { to { opacity: 1; transform: translateY(0); } }
.car__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0d14; }
.car__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.car:hover .car__img img { transform: scale(1.04); }
.car__note { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 100px; background: rgba(7, 8, 11, .7); backdrop-filter: blur(6px); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.car__body { padding: 18px 20px 20px; }
.car__body h3 { margin-top: 8px; font-size: 19px; }
.car__body h3 span { font-weight: 500; color: var(--muted); font-size: 14px; letter-spacing: 0; }
.car__specs { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.car__specs li { padding: 5px 9px; border-radius: 6px; background: rgba(255, 255, 255, .05); font-size: 11.5px; color: var(--muted); }
.car__row { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.car__row strong { font-size: 18px; letter-spacing: -.02em; }
.car__row a { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); transition: color .25s; }
.car__row a:hover { color: var(--ink); }
.shop__note { margin-top: 18px; font-size: 12.5px; color: var(--faint); }

/* ownership */
.own { border-top: 1px solid var(--line); background: var(--panel); }
.steps { margin-top: clamp(34px, 4vw, 56px); list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps span { font-size: 12px; letter-spacing: .2em; color: var(--amber); }
.steps h3 { margin-top: 12px; font-size: 18px; }
.steps p { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }

/* test drive */
.drive { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; border-top: 1px solid var(--line); }
.drive__form { display: grid; gap: 14px; }
.drive__form label { display: grid; gap: 7px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.drive__form input, .drive__form select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; outline: none; transition: border-color .3s;
}
.drive__form input:focus, .drive__form select:focus { border-color: rgba(255, 255, 255, .35); }
.drive__form select { appearance: none; }
.btn {
  margin-top: 6px; padding: 14px 24px; border-radius: 100px; background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; transition: opacity .3s;
}
.btn:hover { opacity: .88; }
.form-note { font-size: 12px; color: var(--faint); }
.form-note.is-ok { color: #8fd3a3; }

/* footer */
.foot { padding: 40px var(--pad) 30px; border-top: 1px solid var(--line); }
.foot__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot__top nav { display: flex; gap: 22px; font-size: 12.5px; color: var(--muted); }
.foot__bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); }
.foot__bottom a { color: var(--muted); }

/* ══════════════ smaller screens ══════════════ */
@media (max-width: 980px) {
  .power__grid, .steps { grid-template-columns: 1fr; }
  .shop__grid { grid-template-columns: 1fr 1fr; }
  .models__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .drive { grid-template-columns: 1fr; }
}
@media (max-width: 720px), (hover: none) {
  .nav__links { display: none; }
  .picker { display: flex; }
  .zone__label { display: none; }           /* the bar names them instead */
  .hero__copy { bottom: 108px; width: 92vw; }
  .hero__copy h1 { font-size: 30px; }
  .shop__grid { grid-template-columns: 1fr; }
  .hero__lead { font-size: 13px; }
  .replay { top: 70px; right: 16px; }
  .models__grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .model--wide { grid-column: auto; grid-row: auto; }
}
