/* ============================================================
   ABOUT — page styles
   ------------------------------------------------------------
   Loaded after dealers.css is NOT loaded, so this file cannot
   rely on it. The About page reuses .dealers-page purely for the
   four surface/ink variables and the reveal rules, both of which
   are re-declared here so the page stands on its own.

   Everything is composed from the existing tokens: one accent
   (--ct-red), the graphite surface, the 45-degree chamfer, the
   three typefaces.
   ============================================================ */

.about-page {
  --surf:    var(--ct-graphite);
  --surf-2:  #191c20;
  --ink:     var(--ct-white);
  --ink-dim: rgba(255, 255, 255, 0.66);
  --edge:    var(--line);

  /* Width of the timeline's marker column. The spine sits in the
     middle of it, so every other measurement derives from this. */
  --tl-col: 96px;
  --tl-node: 34px;
}

/* ---------- shared bits also used by dealers.css ---------- */
.scroll-progress {
  position: fixed; top: 62px; left: 0; right: 0; height: 2px;
  background: var(--ct-red); transform: scaleX(0); transform-origin: 0 50%;
  z-index: 60; pointer-events: none; will-change: transform;
}
@media (max-width: 900px) { .scroll-progress { top: 56px; } }

.reveal-ready .about-page [data-reveal],
.reveal-ready .about-page [data-reveal-group] > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1);
}
.reveal-ready .about-page [data-reveal].revealed,
.reveal-ready .about-page [data-reveal-group] > *.revealed { opacity: 1; transform: none; }

/* ============================================================
   HERO
   ============================================================ */
.dhero {
  position: relative; min-height: 90vh; display: flex; align-items: flex-end;
  padding: 0 var(--gutter) 8vh; overflow: hidden; isolation: isolate;
}
.dhero-shot { position: absolute; inset: 0; z-index: 0; }
.dhero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.dhero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.7) 36%, rgba(0,0,0,.2) 66%, rgba(0,0,0,.06) 100%),
    linear-gradient(to top, rgba(17,17,17,.96) 0%, rgba(17,17,17,0) 46%);
}
.dhero-inner { position: relative; z-index: 2; max-width: min(880px, 92%); }
.dhero-kicker { color: var(--ct-red); }
.about-page .dhero-h1 { margin: 22px 0 0; font-size: clamp(28px, 4.6vw, 68px); line-height: 1.05; }
.dhero-rule {
  height: 2px; background: var(--ct-red); margin: 30px 0 26px; max-width: 340px;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .7s cubic-bezier(.16,1,.3,1) .2s;
}
.dhero.is-in .dhero-rule { transform: scaleX(1); }
.dhero-sub { max-width: 520px; font-size: 16px; line-height: 1.65; color: var(--ink-dim); }
.dhero-cue {
  position: absolute; left: var(--gutter); bottom: 22px; z-index: 3;
  font-size: 10px; letter-spacing: .3em; color: var(--ink-dim);
  display: flex; align-items: center; gap: 10px; transition: opacity .4s;
}
.dhero-cue::after {
  content: ''; width: 1px; height: 26px; background: var(--ct-red);
  animation: dcue 1.9s ease-in-out infinite;
}
.dhero-cue.is-gone { opacity: 0; }
@keyframes dcue { 0%,100% { transform: scaleY(.35); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }
@media (max-width: 900px) {
  .dhero { min-height: 84vh; padding-inline: max(4vw, 18px); padding-bottom: 12vh; }
  .dhero-cue { left: max(4vw, 18px); }
  .dhero-shot img { filter: brightness(.7); }
}

/* ============================================================
   TIMELINE
   ============================================================ */
.tl { padding: 10vh var(--gutter); position: relative; }
.tl-track { position: relative; }

/* The spine. Two layers so the fill can be a pure scaleY — a
   height animation would relayout every row on every frame. */
.tl-spine {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--tl-col) / 2); width: 2px; margin-left: -1px;
  background: var(--edge);
}
.tl-spine-fill {
  position: absolute; inset: 0; background: var(--ct-red);
  transform: scaleY(0); transform-origin: 50% 0;
  will-change: transform;
}

.tl-rows { list-style: none; margin: 0; padding: 0; }

.tl-row {
  display: grid; grid-template-columns: var(--tl-col) 1fr;
  align-items: start; padding-bottom: 7vh; position: relative;
}
.tl-marker { display: flex; justify-content: center; padding-top: 2px; }

.tl-node {
  width: var(--tl-node); height: var(--tl-node);
  display: grid; place-items: center; position: relative;
  background: var(--ct-black); border-radius: 50%;
  color: var(--edge);
  transform: scale(.8);
  transition: transform .55s cubic-bezier(.16,1,.3,1), color .55s ease;
}
.tl-node svg { width: 100%; height: 100%; display: block; }
/* The halo pulses once on arrival, then never again. */
.tl-node::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid var(--ct-red); opacity: 0; transform: scale(.7);
}
.tl-row.is-lit .tl-node { color: var(--ct-red); transform: scale(1); }
.tl-row.is-lit .tl-node::after { animation: tlhalo .9s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes tlhalo {
  0%   { opacity: .9; transform: scale(.7); }
  100% { opacity: 0;  transform: scale(1.5); }
}
/* Same event, two mechanical characters: the gear turns a little,
   the wheel spins further and overshoots. */
.tl-row.is-lit .tl-node[data-node-shape="gear"] svg  { transform: rotate(18deg); transition: transform .7s cubic-bezier(.16,1,.3,1); }
.tl-row.is-lit .tl-node[data-node-shape="wheel"] svg { transform: rotate(40deg); transition: transform .8s cubic-bezier(.34,1.4,.5,1); }
.tl-node svg { transition: transform .7s cubic-bezier(.16,1,.3,1); }

.tl-body { padding-left: 10px; max-width: 620px; }
.tl-year {
  font-size: clamp(26px, 3.2vw, 40px); font-weight: 600; letter-spacing: -.01em;
  color: var(--ct-red); line-height: 1; font-variant-numeric: tabular-nums;
}
.tl-text { margin-top: 14px; font-size: 15.5px; line-height: 1.65; color: var(--ink-dim); }

.tl-photo { margin-top: 22px; max-width: 460px; }
.tl-photo img {
  width: 100%; height: auto; display: block;
  /* the clipped top-right corner, from the Figma */
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
}
.tl-photo figcaption {
  margin-top: 10px; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: .22em; color: var(--ct-red);
}
/* Archival photos develop: they arrive desaturated and slightly
   large, and resolve. Modern EV-era shots skip this entirely —
   their age is the whole point of the distinction. */
.tl-photo.archival img {
  filter: saturate(.15) contrast(1.05); transform: scale(1.04);
  transition: filter .7s ease, transform .7s cubic-bezier(.16,1,.3,1);
}
.tl-row.is-lit .tl-photo.archival img { filter: none; transform: none; }

.tl-photo-todo {
  display: inline-block; margin-top: 20px; padding: 14px 16px;
  border: 1px dashed var(--ct-red); color: var(--ct-red);
  font-size: 11px; letter-spacing: .06em; line-height: 1.7; max-width: 460px;
}

/* Desktop: alternate sides. The marker column stays put; the body
   flips to the other side of it. */
@media (min-width: 981px) {
  .tl-track { max-width: 1180px; margin-inline: auto; }
  .tl-spine { left: 50%; }
  .tl-row { grid-template-columns: 1fr var(--tl-col) 1fr; }
  .tl-row .tl-marker { grid-column: 2; }
  .tl-row .tl-body { grid-column: 3; }
  .tl-row.alt .tl-body { grid-column: 1; grid-row: 1; text-align: right; padding-right: 10px; padding-left: 0; }
  .tl-row.alt .tl-photo { margin-left: auto; }
  .tl-row.alt .tl-photo img {
    clip-path: polygon(var(--chamfer) 0, 100% 0, 100% 100%, 0 100%, 0 var(--chamfer));
  }
}

/* ---------- sticky HUD year readout ---------- */
.tl-hud {
  position: sticky; top: 96px; z-index: 20; float: right;
  display: inline-flex; flex-direction: column; gap: 3px;
  padding: 10px 14px; background: var(--ct-black);
  border: 1px solid var(--edge); border-left: 2px solid var(--ct-red);
  pointer-events: none;
}
.tl-hud-era  { font-size: 8px; letter-spacing: .3em; color: var(--ink-dim); }
.tl-hud-year { font-size: 20px; font-weight: 600; color: var(--ct-red); font-variant-numeric: tabular-nums; line-height: 1; }
@media (max-width: 980px) { .tl-hud { top: 70px; padding: 8px 11px; } .tl-hud-year { font-size: 16px; } }

/* ============================================================
   GEAR -> WHEEL HANDOFF
   ============================================================ */
.handoff { height: 125vh; position: relative; }
.handoff-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  z-index: 2;
}
.handoff-shapes {
  position: relative; width: 132px; height: 132px; color: var(--ct-red);
  /* Sits on the page background so the spine passes behind it
     rather than through it. */
  background: var(--ct-black); border-radius: 50%; padding: 22px;
  box-sizing: content-box; margin: -22px;
}
.handoff-shapes svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transition: opacity .1s linear;
}
.handoff-gear  { opacity: 1; }
.handoff-wheel { opacity: 0; }
.handoff-label {
  font-size: 10px; letter-spacing: .4em; color: var(--ink-dim);
}
/* ONE continuous line through the whole handoff. This was two
   42vh stubs top and bottom, which left a gap across the middle —
   the spine visibly broke at exactly the moment the page is
   claiming the company did not. The unbroken line IS the argument. */
.handoff::before {
  content: ''; position: absolute; z-index: 1;
  top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: var(--ct-red);
}
@media (max-width: 980px) { .handoff::before { left: calc(var(--tl-col) / 2); } }

/* ============================================================
   MISSION — alone on an empty screen
   ============================================================ */
.mission {
  min-height: 78vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 12vh var(--gutter); gap: 34px;
}
.mission .kicker { color: var(--ct-red); }
.mission-line {
  font-size: clamp(30px, 5.2vw, 74px); line-height: 1.12; max-width: 16ch;
  letter-spacing: .08em; opacity: 0;
  transition: opacity 1s ease, letter-spacing 1.1s cubic-bezier(.16,1,.3,1);
}
.mission-line.is-in { opacity: 1; letter-spacing: normal; }

/* ============================================================
   FILM
   ============================================================ */
.film-frame { position: relative; aspect-ratio: 16 / 9; max-width: 1100px; background: var(--surf-2); }
.film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   CAPABILITIES  (same component as the dealers page)
   ============================================================ */
.caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cap {
  position: relative; overflow: hidden; background: var(--surf-2);
  aspect-ratio: 16 / 11; display: flex; align-items: flex-end;
}
.cap img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1); transition: transform 1.6s cubic-bezier(.22,.61,.36,1); will-change: transform;
}
.cap.revealed img { transform: scale(1.06); }
.cap-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.08) 62%); }
.cap h3 {
  position: relative; z-index: 2; padding: 24px; font-family: var(--font-head);
  font-size: 18px; font-stretch: 112%; color: #fff; line-height: 1.3;
}
@media (max-width: 820px) {
  .caps {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .caps::-webkit-scrollbar { display: none; }
  .cap { flex: 0 0 78%; scroll-snap-align: center; aspect-ratio: 4 / 3; }
}

/* ============================================================
   FOUR PILLARS
   ============================================================ */
.pillars-grid { max-width: 1100px; }
.pillar { border-top: 1px solid var(--edge); }
.pillar:last-of-type { border-bottom: 1px solid var(--edge); }
.pillar-h { margin: 0; }
.pillar-btn {
  width: 100%; display: flex; align-items: center; gap: 18px;
  background: transparent; border: 0; color: var(--ink); cursor: pointer;
  text-align: left; padding: 24px 4px; font-family: var(--font-body); font-size: 18px;
  transition: color .2s;
}
.pillar-btn:hover { color: var(--ct-red); }
.pillar-btn:focus-visible { outline: 2px solid var(--ct-red); outline-offset: -2px; }
.pillar-num { flex: none; font-size: 10px; letter-spacing: .2em; color: var(--ct-red); }
.pillar-label { flex: 1; }
.pillar-chevron { flex: none; width: 14px; height: 14px; position: relative; }
.pillar-chevron::before, .pillar-chevron::after {
  content: ''; position: absolute; background: var(--ct-red); transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.pillar-chevron::before { top: 50%; left: 0; right: 0; height: 2px; margin-top: -1px; }
.pillar-chevron::after  { left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.pillar-btn.is-open .pillar-chevron::after { transform: scaleY(0); }
.pillar-panel { height: 0; overflow: hidden; transition: height .34s cubic-bezier(.16,1,.3,1); }
.pillar-panel-in { padding: 0 40px 26px 44px; font-size: 15.5px; line-height: 1.7; color: var(--ink-dim); }
.pillars-photo { margin-top: 34px; }
.pillars-photo img {
  width: 100%; height: auto; display: block; max-width: 620px;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
}

/* Desktop: a rail on the left, the open panel beside it. The
   buttons and panels are the same elements — only the grid
   placement changes, so the ARIA stays true in both layouts. */
@media (min-width: 981px) {
  .pillars-rail {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 5vw;
    align-items: start;
  }
  .pillar { grid-column: 1; }
  .pillars-photo { grid-column: 1; margin-top: 40px; }
  .pillar-panel {
    grid-column: 2; grid-row: 1 / span 5;
    height: auto; overflow: visible;
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
    align-self: start; position: sticky; top: 120px;
  }
  .pillar-panel.is-shown { opacity: 1; pointer-events: auto; }
  .pillar-panel-in {
    padding: 0; font-size: 19px; line-height: 1.65; color: var(--ink);
    border-left: 2px solid var(--ct-red); padding-left: 28px;
  }
  .pillar-btn.is-open { color: var(--ct-red); }
  .pillar-chevron { display: none; }
}

/* ============================================================
   STATS
   ============================================================ */
.statbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--edge); }
.statbar-cell { background: var(--surf-2); padding: 46px 30px; }
.statbar-num {
  display: block; font-size: clamp(38px, 5vw, 64px); font-weight: 600;
  letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums;
}
.statbar-cell.accent .statbar-num { color: var(--ct-red); }
.statbar-label { display: block; margin-top: 16px; font-size: 14px; color: var(--ink-dim); }
@media (max-width: 820px) { .statbar { grid-template-columns: 1fr; } .statbar-cell { padding: 30px 22px; } }

/* ============================================================
   PROMOTERS
   ============================================================ */
.promoters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.promoter {
  background: var(--surf); padding: 0 0 30px;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.promoter:hover, .promoter:focus-within { transform: translateY(-6px); }
.promoter-frame {
  aspect-ratio: 6 / 7; overflow: hidden; background: var(--surf-2);
  display: grid; place-items: center; margin-bottom: 24px;
}
.promoter-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1); transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.promoter:hover .promoter-frame img, .promoter:focus-within .promoter-frame img { transform: scale(1.03); }
.promoter-todo {
  padding: 20px; text-align: center; font-size: 11px; letter-spacing: .06em;
  line-height: 1.8; color: var(--ct-red); border: 1px dashed currentColor; margin: 20px;
}
.promoter-role { padding: 0 26px; font-size: 9px; letter-spacing: .26em; color: var(--ct-red); }
.promoter-name { padding: 0 26px; margin: 12px 0 12px; font-family: var(--font-head); font-size: 22px; font-stretch: 112%; }
.promoter-body { padding: 0 26px; font-size: 14.5px; line-height: 1.62; color: var(--ink-dim); }
@media (max-width: 980px) { .promoters { grid-template-columns: 1fr; max-width: 460px; } }

/* ============================================================
   LIGHT THEME
   ============================================================ */
html[data-theme="light"] .about-page {
  --surf: #ffffff; --surf-2: #e9e9e4; --ink: #17181b; --ink-dim: rgba(23,24,27,.68);
}
html[data-theme="light"] .about-page .tl-node { background: #f2f2ef; }
html[data-theme="light"] .about-page .tl-hud { background: #17181b; }
html[data-theme="light"] .about-page .tl-hud-era { color: rgba(255,255,255,.6); }
html[data-theme="light"] .about-page .statbar-cell { background: #ffffff; }
html[data-theme="light"] .about-page .promoter { background: #ffffff; }
html[data-theme="light"] .about-page .promoter-frame { background: #e9e9e4; }

/* ============================================================
   REDUCED MOTION
   ------------------------------------------------------------
   Degrade to instant, never to broken. Everything that animates
   in must end up visible and in its final position.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .about-page *, .about-page *::before, .about-page *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .dhero-rule { transform: scaleX(1); }
  .dhero-cue::after { animation: none; transform: scaleY(1); opacity: 1; }
  .tl-node { transform: scale(1); color: var(--ct-red); }
  .tl-node::after { animation: none !important; opacity: 0; }
  .tl-photo.archival img { filter: none; transform: none; }
  .tl-spine-fill { transform: scaleY(1); }
  .mission-line { opacity: 1; letter-spacing: normal; }
  .cap img, .cap.revealed img { transform: none; }
  .handoff { height: auto; }
  .handoff-sticky { position: static; height: auto; padding: 8vh 0; }
  .handoff-gear { opacity: 0; }
  .handoff-wheel { opacity: 1; }
  .reveal-ready .about-page [data-reveal],
  .reveal-ready .about-page [data-reveal-group] > * { opacity: 1; transform: none; }
}
