/* =========================================================
   Road Composition Drone
   Street: asphalt, road paint, work-zone yellow, hazard tape, stencil type.
   Tech: drone-camera HUD, scan grids, laser projection.
   Colour is taken from the product: black body, yellow lid, red laser.
   ========================================================= */

:root {
  --asphalt: #2b2c2e;
  --asphalt-deep: #1d1e20;
  --asphalt-line: #45474b;
  --paint: #f3f3ef;
  --ink: #17181a;
  --ink-soft: #3a3b3e;
  --thermo: #f4b400;
  --laser: #ff3b2f;
  --survey: #8ec5e0;

  --gutter: clamp(20px, 4vw, 56px);
  --wrap: min(1240px, calc(100% - var(--gutter) * 2));

  --f-stencil: "Big Shoulders Stencil Display", "Barlow Condensed", "Noto Sans TC", sans-serif;
  --f-cond: "Barlow Condensed", "Noto Sans TC", sans-serif;
  --f-body: "Barlow", "Noto Sans TC", system-ui, sans-serif;
  --f-cjk: "Noto Sans TC", "Barlow", system-ui, sans-serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  --hazard: repeating-linear-gradient(-45deg, var(--ink) 0 16px, var(--thermo) 16px 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--asphalt) var(--grain);
  color: var(--paint);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h2 {
  font-family: var(--f-cjk);
  font-weight: 900;
  font-size: clamp(1.9rem, 1.1rem + 2.8vw, 3.6rem);
  line-height: 1.2;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--thermo); outline-offset: 3px; }
.wrap { width: var(--wrap); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--thermo); color: var(--ink);
  padding: 8px 14px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------------- NAV ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  transition: background-color .3s;
}
.nav.is-solid { background: rgb(23 24 26 / .95); }
.nav__mark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--thermo);
  font-family: var(--f-stencil); font-weight: 900; font-size: 1.35rem; letter-spacing: .06em;
}
.nav__mark svg { width: 30px; height: 30px; }
.nav nav { display: flex; gap: clamp(12px, 2.2vw, 30px); }
.nav nav a {
  font-family: var(--f-cjk); font-size: .9rem; font-weight: 500;
  text-decoration: none; color: rgb(243 243 239 / .72);
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav nav a:hover { color: var(--paint); }
.nav nav a.is-current { color: var(--paint); border-color: var(--thermo); }

/* ---------------- shared HUD bits ---------------- */
.hud__corner {
  position: absolute; width: 26px; height: 26px;
  border: 0 solid var(--paint);
  pointer-events: none;
}
.hud__corner--tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.hud__corner--tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.hud__corner--bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.hud__corner--br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }
.hud__dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--laser);
  animation: blink 1.2s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: .15; } }

/* chevron used in tapes */
.chev {
  display: inline-block; flex: none;
  width: 16px; height: 20px;
  background: currentColor;
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
}

/* ---------------- tapes / marquees ---------------- */
.tape { overflow: hidden; white-space: nowrap; }
.tape__track {
  display: inline-flex; align-items: center; gap: 22px;
  padding-right: 22px;
  animation: marquee 28s linear infinite;
  animation-play-state: paused;
}
.is-on .tape__track, .tape.is-on .tape__track { animation-play-state: running; }
.tape__track span {
  font-family: var(--f-stencil); font-weight: 800;
  font-size: 1.45rem; letter-spacing: .04em; text-transform: uppercase;
  line-height: 1;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  height: 100svh; min-height: 640px;
  overflow: hidden;
  background: var(--asphalt) var(--grain);
  isolation: isolate;
}
.rig { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.ln-edge, .ln-dash { stroke: #e7e7e1; stroke-width: 7; }
.ln-yellow { stroke: var(--thermo); stroke-width: 6; }
.ln-dash { stroke-dasharray: 70 80; animation: roadflow 1.1s linear infinite; animation-play-state: paused; }
.p-scan .ln-dash { animation-play-state: running; }
@keyframes roadflow { to { stroke-dashoffset: -150; } }

.zone__grid, .zone__scan { opacity: 0; transition: opacity .4s; }
.p-scan .zone__grid { opacity: .7; }
.p-scan .zone__scan { opacity: 1; animation: zscan 1.3s var(--ease-io) infinite alternate; }
@keyframes zscan { to { transform: translateY(536px); } }

.beam { fill: rgb(255 59 47 / .13); opacity: 0; transition: opacity .5s; }
.p-proj .beam { opacity: 1; }
.zone__red {
  fill: rgb(255 59 47 / .12); stroke: var(--laser); stroke-width: 2; stroke-dasharray: 10 8;
  opacity: 0; transition: opacity .5s;
}
.p-proj .zone__red, .p-land .zone__red, .p-print .zone__red, .p-done .zone__red { opacity: 1; }
.zone__brackets { fill: none; stroke: var(--survey); stroke-width: 4; transition: stroke .4s, opacity .4s; }
.p-proj .zone__brackets, .p-land .zone__brackets, .p-print .zone__brackets, .p-done .zone__brackets { stroke: var(--laser); }
.p-fade .zone__brackets { opacity: 0; }

.legend text {
  font-family: var(--f-cond); font-weight: 700; font-size: 96px; letter-spacing: 2px;
}
.legend__outline {
  fill: none; stroke: var(--laser); stroke-width: 2.6;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
}
.p-proj .legend__outline { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease-io); }
.p-land .legend__outline, .p-print .legend__outline, .p-done .legend__outline { stroke-dashoffset: 0; }
.legend__paint { fill: var(--paint); }
.paint-wipe { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.p-print .paint-wipe { transform: scaleY(1); transition: transform 3.2s linear; }
.p-done .paint-wipe { transform: scaleY(1); }
.legend { transition: opacity .6s; }
.p-fade .legend, .p-fade .zone__red { opacity: 0; }

/* drone: hover position is high (large on camera), landed is small */
.drone { transform: translate(1230px, 250px) scale(1); }
.p-land .drone { transform: translate(938px, 790px) scale(.56); transition: transform 1.8s var(--ease-io); }
.p-print .drone, .p-done .drone { transform: translate(938px, 330px) scale(.56); }
.p-print .drone { transition: transform 3.2s linear; }
.p-fade .drone { transform: translate(1230px, 250px) scale(1); transition: transform 1.6s var(--ease-io); }
.drone__shadow { transform: translate(90px, 110px) scale(1.05); opacity: .55; transition: transform 1.8s var(--ease-io), opacity 1.8s; }
.p-land .drone__shadow, .p-print .drone__shadow, .p-done .drone__shadow { transform: translate(10px, 14px) scale(1.15); opacity: .9; }
.drone__body { animation: bob 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bob { 50% { transform: scale(1.018) translate(3px, -2px); } }
.p-print .drone__body, .p-done .drone__body { animation: none; }
.blades { transform-box: fill-box; transform-origin: center; animation: spin .22s linear infinite; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.drone__led { fill: var(--laser); animation: blink 1s steps(2, jump-none) infinite; }

/* HUD */
.hud { position: absolute; inset: 84px calc(var(--gutter) * .6) 82px; pointer-events: none; }
.hud__mode {
  position: absolute; top: 18px; left: 22px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-cjk); font-weight: 700; font-size: .95rem;
  background: rgb(23 24 26 / .82); padding: 6px 12px;
}
.hud__alt {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  display: grid; justify-items: center; gap: 8px;
  font-family: var(--f-cond); font-weight: 600; font-size: .9rem; letter-spacing: .1em;
}
.hud__alt b {
  position: relative; width: 4px; height: 180px;
  background: repeating-linear-gradient(to bottom, rgb(243 243 239 / .6) 0 2px, transparent 2px 18px);
}
.hud__alt i {
  position: absolute; left: 50%; top: 0;
  width: 22px; height: 4px; margin-left: -11px;
  background: var(--thermo);
  transition: top 1.8s var(--ease-io);
}
.hero[data-phase="land"] .hud__alt i,
.hero[data-phase="print"] .hud__alt i,
.hero[data-phase="done"] .hud__alt i { top: calc(100% - 4px); }
.hud__phase {
  position: absolute; right: 22px; bottom: 18px;
  display: flex; gap: 4px;
  font-family: var(--f-cond); font-weight: 600; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
}
.hud__phase span { padding: 3px 9px; background: rgb(23 24 26 / .8); color: rgb(243 243 239 / .5); transition: background-color .3s, color .3s; }
.hud__phase span.is-on { background: var(--thermo); color: var(--ink); }

.reticle {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  pointer-events: none; opacity: 0;
  transition: opacity .25s;
  border: 1.5px solid var(--paint); border-radius: 50%;
}
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--paint); }
.reticle::before { left: 50%; top: -10px; bottom: -10px; width: 1.5px; margin-left: -.75px; }
.reticle::after { top: 50%; left: -10px; right: -10px; height: 1.5px; margin-top: -.75px; }
.reticle.is-on { opacity: .9; }
.reticle__xy {
  position: absolute; left: 34px; top: 34px; white-space: nowrap;
  font-family: var(--f-cond); font-weight: 600; font-size: .78rem; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

.hero__body {
  position: absolute; left: 0; right: 0; bottom: 96px;
  width: var(--wrap); margin-inline: auto;
  pointer-events: none;
}
.hero__title {
  font-family: var(--f-stencil); font-weight: 900;
  font-size: clamp(3rem, .4rem + 6.8vw, 7.8rem);
  line-height: .86; letter-spacing: .01em; text-transform: uppercase;
  color: var(--paint);
  margin-bottom: clamp(18px, 3vh, 30px);
  text-shadow: 0 2px 30px rgb(0 0 0 / .45);
}
.hero__title .paint {
  display: block; width: fit-content;
  clip-path: inset(-10% 100% -10% 0);
}
.is-loaded .hero__title .paint {
  clip-path: inset(-10% -2% -10% 0);
  transition: clip-path .9s var(--ease-io) calc(.2s + var(--i) * .18s);
}
.hero__lede {
  font-family: var(--f-cjk); font-weight: 700;
  font-size: clamp(1rem, .9rem + .45vw, 1.3rem); line-height: 1.65;
  display: inline-block; background: var(--paint); color: var(--ink);
  padding: 8px 14px;
  opacity: 0; transform: translateY(8px);
}
.is-loaded .hero__lede { opacity: 1; transform: none; transition: opacity .6s ease 1s, transform .6s var(--ease-out) 1s; }

.tape--hero {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: var(--thermo); color: var(--ink);
  border-top: 3px solid var(--ink);
  padding: 13px 0 11px;
}

/* ---------------- PROBLEM ---------------- */
.problem { background: var(--asphalt-deep) var(--grain); padding: clamp(90px, 12vw, 160px) 0 clamp(70px, 9vw, 120px); }
.problem__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 6vw, 96px); align-items: end;
}
.problem__text p { color: rgb(243 243 239 / .8); max-width: 30em; font-family: var(--f-cjk); }
.problem__text p + p { margin-top: 1em; }

/* kinetic headline: a yellow marker bar sweeps in, the line appears, the bar sweeps out */
.kinetic { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.6rem); line-height: 1.16; }
.kl { position: relative; display: block; width: fit-content; color: transparent; }
.kl::after {
  content: ""; position: absolute; inset: .08em -.06em;
  background: var(--thermo); transform: scaleX(0); transform-origin: 0 50%;
}
.is-in .kl { animation: klText 1s calc(var(--i) * .16s) both; }
.is-in .kl::after { animation: klBar 1s var(--ease-io) calc(var(--i) * .16s) both; }
@keyframes klText { 0%, 49% { color: transparent; } 50%, 100% { color: inherit; } }
@keyframes klBar {
  0% { transform: scaleX(0); transform-origin: 0 50%; }
  50% { transform: scaleX(1); transform-origin: 0 50%; }
  50.01% { transform: scaleX(1); transform-origin: 100% 50%; }
  100% { transform: scaleX(0); transform-origin: 100% 50%; }
}
.is-in .kl { color: var(--paint); }

.signs {
  list-style: none; padding: 0; margin-top: clamp(64px, 8vw, 110px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
}
.sign { display: grid; gap: 10px; align-content: start; }
.sign__plate {
  width: 92px; height: 92px; margin: 10px 0 18px 10px;
  display: grid; place-items: center;
  background: var(--thermo);
  border-radius: 6px;
  outline: 3px solid var(--ink); outline-offset: -9px;
  transform: rotate(45deg);
  transition: transform .4s var(--ease-out);
}
.sign__plate svg {
  width: 46px; height: 46px; transform: rotate(-45deg);
  fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round;
}
.sign:hover .sign__plate { transform: rotate(45deg) scale(1.06); }
.sign h3 { font-family: var(--f-cjk); font-weight: 700; font-size: 1.15rem; line-height: 1.4; }
.sign p { font-family: var(--f-cjk); font-size: .95rem; line-height: 1.7; color: rgb(243 243 239 / .72); }
.signs .sign { opacity: 0; }
.signs.is-in .sign { animation: signUp .8s var(--ease-out) calc(.1s + var(--i) * .1s) both; }
@keyframes signUp {
  from { opacity: 0; transform: perspective(700px) rotateX(-75deg) translateY(30px); transform-origin: 50% 100%; }
  to { opacity: 1; transform: none; }
}

/* crossing work-zone tapes */
.tapes { position: relative; height: 170px; overflow: hidden; background: var(--asphalt-deep); }
.tapes .tape { position: absolute; left: -10%; right: -10%; padding: 12px 0 10px; }
.tape--a { top: 34px; transform: rotate(-3deg); background: var(--thermo); color: var(--ink); }
.tape--b { top: 92px; transform: rotate(2.4deg); background: var(--ink); color: var(--thermo); border-block: 2px solid var(--thermo); }
.tape--b .tape__track { animation-direction: reverse; animation-duration: 34s; }

/* ---------------- SCENARIO ---------------- */
.scenario { position: relative; background: var(--asphalt-deep); }
.scenario__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.scenario__track { margin-top: -100svh; pointer-events: none; }
.track-step { height: 100svh; }
.track-step:last-child { height: 120svh; }

.scenario__stage { position: absolute; inset: 0; left: max(0px, calc((100% - var(--wrap)) / 2 + 24rem)); overflow: hidden; }
.shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; transform: scale(1.05);
  transition: opacity .8s ease, transform 2.4s var(--ease-out);
}
.shot.is-active { opacity: 1; transform: none; }
.scenario__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--asphalt-deep) 0, rgb(29 30 32 / .6) 90px, rgb(29 30 32 / 0) 220px);
}
.sweep {
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--sweep, var(--survey));
  box-shadow: 0 0 18px 4px var(--sweep, var(--survey));
  opacity: 0;
}
.sweep.is-run { animation: sweep 1.1s var(--ease-io); }
@keyframes sweep { 0% { opacity: 1; transform: translateY(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(100svh); } }
.frame { position: absolute; inset: 86px 26px 26px 26px; pointer-events: none; }
.frame__tag {
  position: absolute; top: 14px; left: 18px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-cond); font-weight: 600; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
  background: rgb(23 24 26 / .82); padding: 4px 10px;
}

.scenario__ui {
  position: relative; height: 100%;
  width: var(--wrap); margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 27rem) 1fr auto;
  grid-template-rows: auto 1fr auto;
  padding-block: 96px clamp(28px, 5vh, 56px);
  column-gap: 32px;
}
.scenario__title { grid-column: 1; grid-row: 1; margin-bottom: 28px; }
.steps { grid-column: 1; grid-row: 2; list-style: none; padding: 0; align-self: center; display: grid; gap: 4px; }
.step { border-left: 4px solid rgb(243 243 239 / .2); padding: 10px 0 10px 20px; transition: border-color .4s; }
.step h3 {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px;
  font-family: var(--f-cjk); font-weight: 700; font-size: 1.25rem; line-height: 1.4;
  color: rgb(243 243 239 / .45); transition: color .4s;
}
.step h3 em { font-style: normal; font-family: var(--f-cond); font-weight: 600; font-size: .95rem; letter-spacing: .03em; color: rgb(243 243 239 / .45); }
.step__n { font-family: var(--f-stencil); font-weight: 900; font-size: 1.7rem; min-width: .7em; }
.step p {
  max-width: 24em; font-family: var(--f-cjk); font-size: 1rem; line-height: 1.75;
  color: rgb(243 243 239 / .86);
  overflow: hidden; opacity: 0; max-height: 0;
  transition: max-height .6s var(--ease-out), opacity .4s, margin .6s var(--ease-out);
}
.step.is-active { border-color: var(--thermo); }
.step.is-active h3, .step.is-active h3 em { color: var(--paint); }
.step.is-active p { opacity: 1; max-height: 9em; margin-top: 8px; }
.step[data-step="0"].is-active { border-color: var(--survey); }
.step[data-step="1"].is-active { border-color: var(--laser); }
.step[data-step="3"].is-active { border-color: var(--paint); }

.schematic {
  grid-column: 2; grid-row: 2 / 4; justify-self: end; align-self: end;
  width: min(340px, 100%);
  background: rgb(23 24 26 / .92);
  border: 1px solid rgb(243 243 239 / .16);
  padding: 12px 14px 10px;
}
.schematic svg { width: 100%; height: auto; display: block; color: rgb(243 243 239 / .35); }
.schematic figcaption { font-family: var(--f-cjk); font-size: .8rem; color: rgb(243 243 239 / .7); padding-top: 6px; }
.sch-ground { stroke: rgb(243 243 239 / .7); stroke-width: 1.5; }
.sch-beam { opacity: 0; transition: opacity .6s; }
.sch-beam--scan { fill: rgb(142 197 224 / .28); stroke: var(--survey); stroke-width: 1; stroke-dasharray: 3 4; }
.sch-beam--proj { fill: rgb(255 59 47 / .26); stroke: var(--laser); stroke-width: 1; }
.sch-mark { stroke-width: 4; }
.sch-mark--ghost { stroke: var(--laser); stroke-dasharray: 6 5; opacity: 0; transition: opacity .5s; stroke-width: 2; }
.sch-mark--paint { stroke: var(--paint); stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.sch-drone { transform: translate(180px, 50px); transition: transform 1.2s var(--ease-io); }
.sch-arm, .sch-hub { fill: #0f1012; stroke: rgb(243 243 239 / .85); stroke-width: 1.2; }
.sch-lid, .sch-hazard { fill: var(--thermo); }
.sch-lens { fill: var(--laser); opacity: 0; transition: opacity .4s; }
.s0 .sch-beam--scan { opacity: 1; animation: schScan 1.8s ease-in-out infinite; }
.s0 .sch-drone__body, .s1 .sch-drone__body { animation: schHover 2.6s ease-in-out infinite; }
.s1 .sch-beam--proj, .s1 .sch-mark--ghost, .s1 .sch-lens { opacity: 1; }
.s2 .sch-mark--ghost, .s3 .sch-mark--ghost { opacity: .9; }
.s2 .sch-drone, .s3 .sch-drone { transform: translate(180px, 154px); }
.s3 .sch-drone { animation: schDrive 3.2s var(--ease-io) .3s both; }
.s3 .sch-mark--paint { animation: schPaint 3.2s var(--ease-io) .3s both; }
@keyframes schHover { 50% { transform: translateY(-4px); } }
@keyframes schScan { 50% { opacity: .45; } }
@keyframes schDrive { 0% { transform: translate(180px, 154px); } 22% { transform: translate(70px, 154px); } 100% { transform: translate(290px, 154px); } }
@keyframes schPaint { 0%, 22% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

.rail { grid-column: 3; grid-row: 1 / 3; align-self: center; display: grid; gap: 10px; }
.rail button { width: 22px; height: 46px; border: 0; padding: 0; background: transparent; position: relative; }
.rail button::before {
  content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 6px;
  background: rgb(243 243 239 / .3); transition: background-color .3s, transform .3s var(--ease-out);
}
.rail button:hover::before { background: rgb(243 243 239 / .6); }
.rail button[aria-current="step"]::before { background: var(--thermo); transform: scaleX(1.35); }

/* ---------------- TIME (work-zone yellow) ---------------- */
.time { position: relative; background: var(--thermo); color: var(--ink); }
.hazard-edge { height: 22px; background: var(--hazard); background-size: 45.25px 45.25px; }
.time.is-on .hazard-edge { animation: march 1.4s linear infinite; }
@keyframes march { to { background-position: 45.25px 0; } }
.time__grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
  padding-block: clamp(80px, 10vw, 140px);
}
.time__text h2 { margin-bottom: 32px; }

.toggle { display: inline-flex; border: 3px solid var(--ink); padding: 3px; gap: 3px; margin-bottom: 32px; max-width: 100%; }
.toggle button {
  border: 0; background: transparent; padding: 9px 16px;
  font-family: var(--f-cjk); font-weight: 700; font-size: .95rem; line-height: 1.3;
  transition: background-color .25s, color .25s;
}
.toggle button:hover { background: rgb(23 24 26 / .1); }
.toggle button[aria-checked="true"], .toggle button[aria-selected="true"] { background: var(--ink); color: var(--thermo); }
.toggle--dark { border-color: var(--paint); margin-top: clamp(48px, 6vw, 80px); }
.toggle--dark button:hover { background: rgb(243 243 239 / .1); }
.toggle--dark button[aria-selected="true"] { background: var(--thermo); color: var(--ink); }

.clock-row { display: flex; align-items: center; gap: 22px; }
.clock { width: clamp(110px, 12vw, 150px); flex: none; }
.clock__face { fill: var(--paint); stroke: var(--ink); stroke-width: 4; }
.clock__ticks line { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.clock__arc {
  fill: none; stroke: var(--ink); stroke-width: 52;
  stroke-dasharray: 3.5 12;
  transform: rotate(-90deg); transform-origin: 60px 60px;
  transition: stroke-dasharray .9s var(--ease-io), stroke .4s;
}
.clock__hand { stroke: var(--laser); stroke-width: 4; stroke-linecap: round; transform-origin: 60px 60px; transform: rotate(105deg); transition: transform .9s var(--ease-io); }
.clock__pin { fill: var(--laser); }
.time.is-after .clock__arc { stroke-dasharray: 1.5 12; }
.time.is-after .clock__hand { transform: rotate(45deg); }
.clock-read { display: flex; align-items: center; gap: 14px; }
.clock-read strong {
  font-family: var(--f-stencil); font-weight: 900;
  font-size: clamp(4rem, 2rem + 5vw, 6.6rem); line-height: .9;
  white-space: nowrap; min-width: 3.1ch; padding-right: .1em;
}
.clock-read > span { font-family: var(--f-cjk); font-weight: 900; font-size: 1.15rem; line-height: 1.5; }
.clock-read > span span { font-weight: 500; font-size: .92rem; color: var(--ink-soft); }

.compare { position: relative; overflow: hidden; background: #000; border: 4px solid var(--ink); box-shadow: 12px 12px 0 var(--ink); }
.compare img { width: 100%; }
.compare__dim { position: absolute; inset: 0; background: rgb(23 24 26 / .76); transition: opacity .6s ease; pointer-events: none; }
.compare__dim--left  { clip-path: polygon(0 0, 58.7% 0, 41.3% 100%, 0 100%); opacity: 0; }
.compare__dim--right { clip-path: polygon(58.7% 0, 100% 0, 100% 100%, 41.3% 100%); opacity: 1; }
.compare[data-mode="after"] .compare__dim--left { opacity: 1; }
.compare[data-mode="after"] .compare__dim--right { opacity: 0; }

/* ---------------- ANATOMY ---------------- */
.anatomy { padding: clamp(90px, 12vw, 160px) 0 clamp(60px, 8vw, 110px); }
.anatomy__lede { max-width: 36em; color: rgb(243 243 239 / .78); margin: 22px 0 clamp(40px, 5vw, 64px); font-family: var(--f-cjk); }

.product { position: relative; }
.product img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.product .hud__corner { border-color: var(--thermo); width: 34px; height: 34px; margin: -12px; }
.product .hud__corner--tr, .product .hud__corner--br { margin: -12px -12px -12px 0; }
.product .hud__corner--tl { margin: -12px 0 0 -12px; }
.product .hud__corner--tr { margin: -12px -12px 0 0; }
.product .hud__corner--bl { margin: 0 0 -12px -12px; }
.product .hud__corner--br { margin: 0 -12px -12px 0; }
.callout {
  position: absolute; left: var(--x); top: var(--y);
  display: flex; align-items: center;
  pointer-events: none;
}
.callout i {
  position: relative; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--thermo); box-shadow: 0 0 0 4px rgb(244 180 0 / .3);
  transform: scale(0);
}
.callout i::after {
  content: ""; position: absolute; left: 14px; top: 6px; height: 2px; width: 56px;
  background: var(--thermo); transform: scaleX(0); transform-origin: 0 50%;
}
.callout b {
  margin: -7px 0 0 70px;
  font-family: var(--f-cjk); font-weight: 700; font-size: .95rem; white-space: nowrap;
  background: var(--ink); color: var(--paint); padding: 5px 11px;
  border-left: 4px solid var(--thermo);
  clip-path: inset(0 100% 0 0);
}
.product.is-in .callout i { animation: popIn .4s var(--ease-out) calc(.5s + var(--i) * .25s) both, pulse 2.2s ease-out calc(1.2s + var(--i) * .25s) infinite; }
.product.is-in .callout i::after { animation: growX .35s var(--ease-out) calc(.75s + var(--i) * .25s) both; }
.product.is-in .callout b { animation: wipeIn .45s var(--ease-io) calc(.95s + var(--i) * .25s) both; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wipeIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(244 180 0 / .6); } 100% { box-shadow: 0 0 0 16px rgb(244 180 0 / 0); } }

.anatomy__grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px); align-items: start; margin-top: 28px;
}
.plate { position: relative; max-width: 600px; overflow: hidden; }
.plate--bottom { max-width: 520px; }
.plate img { width: 100%; }
.view[hidden] { display: none; }
.view.is-scanning .plate img { animation: scanReveal 1s var(--ease-io) both; }
.plate__laser {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--laser); box-shadow: 0 0 14px 3px rgb(255 59 47 / .8);
  opacity: 0; pointer-events: none;
}
.view.is-scanning .plate__laser { animation: laserDown 1s var(--ease-io) both; }
.view.is-scanning .pin { animation: pinIn .45s var(--ease-out) calc(.8s + var(--i) * .07s) both; }
@keyframes scanReveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes laserDown { 0% { opacity: 1; top: 0; } 95% { opacity: 1; } 100% { opacity: 0; top: 100%; } }
@keyframes pinIn { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }

.pin {
  position: absolute; left: var(--x); top: var(--y);
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%; border: 2px solid var(--thermo);
  background: rgb(23 24 26 / .9); color: var(--thermo);
  display: grid; place-items: center;
  font-family: var(--f-stencil); font-weight: 900; font-size: 1.05rem;
  padding: 0;
  transition: background-color .2s, color .2s;
}
.pin span { padding-top: 1px; }
.pin::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid var(--thermo); opacity: 0; transform: scale(.8);
  transition: opacity .2s, transform .3s var(--ease-out);
}
.pin:hover, .pin.is-active { background: var(--thermo); color: var(--ink); }
.pin.is-active::after { opacity: .7; transform: none; }
.pin--l, .pin--r { --off: 64px; }
.pin--l { transform: translateX(calc(var(--off) * -1)); }
.pin--r { transform: translateX(var(--off)); }
.pin--l::before, .pin--r::before {
  content: ""; position: absolute; top: 50%;
  width: calc(var(--off) - 13px); height: 0; border-top: 1.5px solid var(--thermo);
}
.pin--l::before { left: 100%; }
.pin--r::before { right: 100%; }
.pin--l > span::after, .pin--r > span::after {
  content: ""; position: absolute; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--thermo);
}
.pin--l > span::after { left: calc(var(--off) + 13px - 3.5px); }
.pin--r > span::after { right: calc(var(--off) + 13px - 3.5px); }

.parts { list-style: none; padding: 0; border-top: 1px solid var(--asphalt-line); }
.parts li { border-bottom: 1px solid var(--asphalt-line); }
.parts li.is-other { display: none; }
.parts button {
  width: 100%; text-align: left; border: 0; background: transparent;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 14px 0;
  font-family: var(--f-cjk); font-weight: 700; font-size: 1.05rem;
  color: rgb(243 243 239 / .8); transition: color .2s;
}
.parts button b { font-family: var(--f-stencil); font-weight: 900; font-size: 1.2rem; color: var(--thermo); min-width: 1ch; }
.parts button i { font-style: normal; font-family: var(--f-cond); font-weight: 600; font-size: .9rem; color: rgb(243 243 239 / .5); }
.parts button:hover { color: var(--paint); }
.parts p {
  font-family: var(--f-cjk); font-size: .95rem; line-height: 1.7; color: rgb(243 243 239 / .72);
  max-height: 0; overflow: hidden; opacity: 0;
  padding-left: calc(1ch + 14px + .2em);
  transition: max-height .45s var(--ease-out), opacity .3s, padding .45s var(--ease-out);
}
.parts li.is-active button { color: var(--paint); }
.parts li.is-active p { max-height: 6em; opacity: 1; padding-bottom: 16px; }

.elevation { margin-top: clamp(56px, 7vw, 100px); }
.elevation img { width: 100%; margin-bottom: 28px; }
.elevation.is-in img { animation: scanReveal 1.1s var(--ease-io) both; }
.elevation figcaption {
  font-family: var(--f-cjk); font-size: .92rem; color: rgb(243 243 239 / .65);
  max-width: 34em; padding-top: 14px; border-top: 2px dashed rgb(243 243 239 / .3);
}

/* ---------------- SCENES (horizontal pan) ---------------- */
.scenes { position: relative; background: var(--asphalt-deep) var(--grain); }
.scenes__sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 70px;
}
.scenes__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: clamp(20px, 3vh, 36px); }
.scenes__count { font-family: var(--f-stencil); font-weight: 900; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.scenes__count b { font-size: clamp(3rem, 2rem + 3vw, 5rem); color: var(--thermo); min-width: .6em; text-align: right; }
.scenes__count span { font-size: 1.6rem; color: rgb(243 243 239 / .5); }
.reel { overflow: hidden; }
.reel__track {
  display: flex; gap: clamp(16px, 2vw, 32px);
  padding-inline: calc((100vw - var(--wrap)) / 2);
  width: max-content;
  will-change: transform;
}
.reel__item { width: min(76vw, calc(60svh * 1.5)); flex: none; }
.reel__item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.reel__item figcaption {
  font-family: var(--f-cjk); font-size: .95rem; color: rgb(243 243 239 / .75);
  padding-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline;
}
.reel__item figcaption b { background: var(--thermo); color: var(--ink); font-weight: 900; padding: 1px 9px; }

/* fallback: plain horizontal scroll */
.scenes.is-native { height: auto !important; }
.scenes.is-native .scenes__sticky { position: static; height: auto; padding-block: 100px; }
.scenes.is-native .reel { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; }
.scenes.is-native .reel__track { transform: none !important; }
.scenes.is-native .reel__item { scroll-snap-align: center; }

/* ---------------- FOOTER ---------------- */
.foot { background: var(--ink); border-top: 8px solid transparent; border-image: var(--hazard) 8; }
.foot__marquee { overflow: hidden; padding: clamp(30px, 5vw, 60px) 0 clamp(20px, 3vw, 40px); white-space: nowrap; }
.foot__track { display: inline-flex; animation: marquee 30s linear infinite; animation-play-state: paused; }
.foot.is-on .foot__track { animation-play-state: running; }
.foot__track span {
  font-family: var(--f-stencil); font-weight: 900; text-transform: uppercase;
  font-size: clamp(4rem, 2rem + 9vw, 11rem); line-height: .9;
  color: transparent; -webkit-text-stroke: 2px var(--thermo);
  padding-right: .4em;
}
.foot__grid {
  display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 36px; align-items: start;
  padding-bottom: 64px;
}
.foot__zh { font-family: var(--f-cjk); font-size: .95rem; color: rgb(243 243 239 / .8); }
.foot__en { font-size: .95rem; color: rgb(243 243 239 / .6); }
.foot__top {
  font-family: var(--f-cjk); font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 2px solid var(--paint); padding: 8px 16px; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.foot__top:hover { background: var(--paint); color: var(--ink); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 960px) {
  .problem__grid, .time__grid, .anatomy__grid { grid-template-columns: 1fr; }
  .signs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .foot__grid { grid-template-columns: 1fr; }
  .hud__alt { display: none; }

  .scenario__stage { left: 0; top: 60px; bottom: auto; height: 46%; }
  .shot { object-position: 50% 78%; }
  .scenario__scrim { background: linear-gradient(to top, var(--asphalt-deep) 0, rgb(29 30 32 / 0) 34%); }
  .frame { inset: 14px; }
  .scenario__ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto auto auto; padding-block: 72px 18px; }
  .scenario__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rail { grid-column: 1; grid-row: 2; align-self: end; justify-self: start; grid-auto-flow: column; gap: 8px; margin-bottom: 14px; }
  .rail button { width: 40px; height: 22px; }
  .rail button::before { left: 0; right: 0; top: 8px; bottom: auto; height: 6px; width: auto; }
  .steps { grid-column: 1; grid-row: 3; align-self: end; min-height: 9.5rem; align-content: end; }
  .step:not(.is-active) { display: none; }
  .schematic { grid-column: 1; grid-row: 4; justify-self: stretch; width: 100%; margin-top: 14px; }
  .schematic svg { max-height: 104px; }
}

@media (max-width: 600px) {
  .nav nav { display: none; }
  .hud { inset: 76px 12px 70px; }
  .hud__phase { left: 22px; right: auto; }
  .hud__phase span { padding: 2px 6px; font-size: .8rem; }
  .hero__body { bottom: 120px; }
  .tape__track span { font-size: 1.15rem; }
  .signs { grid-template-columns: 1fr; }
  .sign { grid-template-columns: 96px 1fr; column-gap: 18px; }
  .sign__plate { grid-row: span 2; width: 68px; height: 68px; margin: 12px 0 0 12px; }
  .sign__plate svg { width: 36px; height: 36px; }
  .clock-row { gap: 14px; }
  .toggle button { padding: 8px 11px; font-size: .88rem; }
  .callout { flex-direction: row-reverse; transform: translateX(-100%); }
  .callout i { margin: -7px -7px 0 0; }
  .callout i::after { width: 26px; left: auto; right: 14px; transform-origin: 100% 50%; }
  .callout b { font-size: .78rem; margin: -7px 40px 0 0; padding: 3px 7px; border-left: 0; border-right: 3px solid var(--thermo); }
  .hero__title { text-shadow: 0 0 24px rgb(23 24 26 / .9), 0 0 4px rgb(23 24 26 / .9); }
  .pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: .9rem; }
  .pin--l, .pin--r { --off: 48px; }
  .pin--l::before, .pin--r::before { width: calc(var(--off) - 11px); }
  .pin--l > span::after { left: calc(var(--off) + 11px - 3.5px); }
  .pin--r > span::after { right: calc(var(--off) + 11px - 3.5px); }
  .compare { box-shadow: 7px 7px 0 var(--ink); }
}

@media (hover: none) { .reticle { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .hero__title .paint { clip-path: none; }
  .hero__lede { opacity: 1; transform: none; }
  .kl { color: var(--paint); }
  .kl::after { display: none; }
  .signs .sign { opacity: 1; }
  .callout i { transform: none; }
  .callout i::after { transform: none; }
  .callout b { clip-path: none; }
}
