/* trackk — one-page layout layer (sits on top of site-a.css) */

/* anchor targets clear the sticky nav */
section[id], header[id]{scroll-margin-top:78px}

/* ---- scrub stage ---- */
/* hero: NO sticky trap — the page scrolls normally the whole time,
   the film scrubs as the hero travels out of view */
.scrub{position:relative;height:calc(100svh - 68px);min-height:720px;background:var(--ink);overflow:hidden}
.scrub .stage{position:relative;height:100%;overflow:hidden}
.scrub canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.scrub .veil{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(7,8,9,.58) 0%,rgba(7,8,9,.42) 38%,rgba(7,8,9,.94) 100%)}
.scrub .copy{position:absolute;inset:0;z-index:3;display:flex;align-items:center;
  max-width:1200px;margin:0 auto;padding:0 4vw;pointer-events:none}
.scrub .copy .inner{max-width:640px;text-shadow:0 3px 24px rgba(0,0,0,.98)}
.scrub .lede{color:#f4f6f8;text-shadow:0 2px 14px rgba(0,0,0,1)}
.reveal-line{opacity:1;transform:none;will-change:auto}
.scrub .ctas{pointer-events:auto}

/* frame-count / loading */
.scrubLoad{position:absolute;left:4vw;bottom:26px;z-index:4;font:400 10px var(--mono);
  letter-spacing:.22em;text-transform:uppercase;color:var(--muted)}

/* scroll hint */
.scroll-hint{position:absolute;left:50%;transform:translateX(-50%);bottom:22px;z-index:4;
  font:400 10.5px var(--mono);letter-spacing:.24em;text-transform:uppercase;color:var(--muted);
  opacity:.9}

/* ---- section rhythm ---- */
.band{border-top:1px solid var(--line)}
.reveal{opacity:1;transform:none;transition:none}
.reveal.in{opacity:1;transform:none}

/* metric rows (ported from the metric library) */
.metric{max-width:1120px;margin:0 auto;padding:64px 4vw;display:grid;
  grid-template-columns:1.25fr 1fr;gap:34px;align-items:center}
.metric:nth-of-type(even){grid-template-columns:1fr 1.25fr}
.metric:nth-of-type(even) .pic{order:2}
.pic{position:relative;border-radius:16px;overflow:hidden;border:1px solid var(--line);
  box-shadow:0 24px 70px rgba(0,0,0,.5)}
.pic img,.pic video{display:block;width:100%;height:auto}
/* only the overlay layer itself stretches — a gauge nested inside it keeps its own size */
.pic>svg.vov{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.txt h3{font-size:clamp(23px,3.4vw,38px);font-weight:800;letter-spacing:-.02em;line-height:1.07}
.txt h3 b{color:var(--lime)}
.txt p{color:#d7ddd7;font-size:14.5px;line-height:1.65;margin-top:12px}
.inst{margin-top:20px;background:rgba(12,14,16,.96);border:1px solid var(--line2);
  border-radius:14px;padding:10px;box-shadow:0 14px 34px rgba(0,0,0,.24)}
.inst svg{display:block;width:100%;height:auto}
.inst .gauge-face{display:block;width:100%;height:auto;min-height:124px;object-fit:contain}
.gauge-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.gauge-pair .gauge-face{min-height:118px}
.sync-instrument{padding-bottom:8px}
.sync-note{font:700 9px var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--lime);text-align:right;margin:2px 4px 0}
/* the phone app's own gauge faces, framed the way its replay strip frames them */
.liveMount{display:block}
.lgRow{display:flex;gap:20px;align-items:flex-end;justify-content:center;flex-wrap:wrap}
.lg{display:flex;flex-direction:column;align-items:center;gap:3px;border-radius:12px;padding:6px 8px;
  transition:background .3s ease}
.lg-fig{display:block}
.lg-fig svg{display:block;width:100%;height:100%}
.lg-label{font:700 11px var(--mono);letter-spacing:.14em;color:#9ca3af;font-variant-numeric:tabular-nums}
.lg-readout{font:800 15px var(--sans);color:#e5e7eb;font-variant-numeric:tabular-nums;
  white-space:nowrap;line-height:1;text-align:center;margin-top:3px}
/* the app paints the whole tile when separation drops in a real corner */

/* the gauge sits ON the clip — no panel, so it never hides the riding.
   A drop shadow carries it over bright dust instead of a dark box. */
.pic .clipGauge{position:absolute;z-index:2;pointer-events:none;padding:0;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.95)) drop-shadow(0 0 14px rgba(0,0,0,.55))}
.pic .clipGauge .lgRow{gap:12px}
.pic .clipGauge .lg{padding:0}
.pic .clipGauge .lg-label{color:#fff;font-weight:800;font-size:12px;letter-spacing:.16em}
.pic .clipGauge .lg-readout{font-size:16px;color:#fff}
/* warning: the figure's strokes go near-black by design, so the orange plate has
   to come with it or it would be black on a black clip */

/* placement: beside whatever the gauge is reading */
.pic .clipGauge-top-left{left:3.5%;top:4%}
.pic .clipGauge-top-right{right:3.5%;top:4%}
.pic .clipGauge-bottom-left{left:3.5%;bottom:4%}
.pic .clipGauge-left{left:3.5%;top:50%;transform:translateY(-50%)}
.pic .clipGauge-right{right:3.5%;top:50%;transform:translateY(-50%)}
.pic .clipGauge-bottom-right{right:3.5%;bottom:4%}
.pic .clipGauge-center{left:50%;top:46%;transform:translate(-50%,-50%)}
.pic .clipGauge-top-center{left:50%;top:4%;transform:translateX(-50%)}

@media (max-width:860px){
  .pic .clipGauge .lgRow{gap:8px}
  .pic .clipGauge .lg-label{font-size:10px;letter-spacing:.12em}
  .pic .clipGauge .lg-readout{font-size:13px}
}

/* the metric a carousel tile points at gets a brief lime edge on arrival */
.metric{border-left:2px solid transparent;transition:border-color .5s ease}
.metric.landed{border-left-color:var(--lime)}
.groupRule{max-width:1120px;margin:54px auto -18px;padding:0 4vw;display:flex;align-items:center;gap:14px}
.groupRule span{font:400 12px var(--mono);letter-spacing:.28em;text-transform:uppercase;color:var(--lime)}
.groupRule::before,.groupRule::after{content:'';height:1px;background:var(--line);flex:1}

@media (max-width:860px){
  .metric,.metric:nth-of-type(even){grid-template-columns:1fr}
  .metric:nth-of-type(even) .pic{order:0}
  .scrub{height:calc(100svh - 68px)}
}

/* reduced motion: no smooth-scroll hijack, no auto animation, static hero frame */
@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1;transform:none;transition:none}
  .reveal-line{opacity:1!important;transform:none!important}
  .scrub{height:calc(88svh - 68px)}
}

/* basics: a column of readings down each edge of the clip */
.pic .clipGauge-col{top:50%;transform:translateY(-50%)}
.pic .clipGauge-col.clipGauge-left{left:2.5%;right:auto}
.pic .clipGauge-col.clipGauge-right{right:2.5%;left:auto}
.lgCol{flex-direction:column;align-items:flex-start;gap:14px}
.pic .clipGauge-right .lgCol{align-items:flex-end}
.pic .clipGauge-right .lg{align-items:flex-end}
.pic .clipGauge-left .lg{align-items:flex-start}
.pic .clipGauge-col .lg-readout{font-size:19px;margin-top:1px}
.pic .clipGauge-col .lg-label{font-size:10px;letter-spacing:.18em}
@media (max-width:860px){
  .lgCol{gap:9px}
  .pic .clipGauge-col .lg-readout{font-size:14px}
  .pic .clipGauge-col .lg-label{font-size:8.5px}
}

/* slope reads where it belongs: on the ground between the two wheels */
.pic .clipGauge-col.clipGauge-centre{left:50%;top:57%;right:auto;transform:translate(-50%,-50%)}
.pic .clipGauge-centre .lgCol{align-items:center}
.pic .clipGauge-centre .lg{align-items:center}
.pic .clipGauge-centre .lg-readout{font-size:17px}
@media (max-width:860px){.pic .clipGauge-centre .lg-readout{font-size:13px}}

/* slope sits UNDER the wheels, not across the bike */
.pic .clipGauge-col.clipGauge-centre{left:50%;top:auto;bottom:5%;transform:translateX(-50%)}
/* the GPS trace lives in the bottom-left corner */
.pic .clipGauge-col.clipGauge-corner{left:2.5%;right:auto;top:auto;bottom:4%;transform:none}
.pic .clipGauge-corner .lgCol{align-items:flex-start}
.pic .clipGauge-corner .lg{align-items:flex-start}
.pic .clipGauge-corner .lg-readout{font-size:11px;letter-spacing:.16em;color:#00FFCC}
/* the left stack moves up to leave the corner free */
.pic .clipGauge-col.clipGauge-left{top:34%;transform:translateY(-50%)}

/* the slope wedge speaks for itself — no label, just the wedge and its number */
.pic .clipGauge-centre .lg-label{display:none}
.pic .clipGauge-centre .lg-readout{font-size:22px;margin-top:4px}
@media (max-width:860px){.pic .clipGauge-centre .lg-readout{font-size:15px}}

/* both stacks share one centre line and one rhythm, so the frame reads balanced */
.pic .clipGauge-col.clipGauge-left,
.pic .clipGauge-col.clipGauge-right{top:47%;transform:translateY(-50%)}
.pic .clipGauge-col .lgCol{gap:17px}
/* the heart sits inline with its number, sized to the text */
.lg-readout .hrBeat{width:.92em;height:.92em;display:inline-block;vertical-align:-.09em;margin-right:.32em}
.pic .clipGauge-right .lg-readout{display:flex;align-items:center;justify-content:flex-end}
@media (max-width:860px){.pic .clipGauge-col .lgCol{gap:10px}}

/* a tile can carry its own second number — the run's best, the metres already
   dropped, where the reading comes from — without becoming a second tile */
.lg-readout .lg-sub{display:block;font-style:normal;font-weight:600;
  font-size:.46em;letter-spacing:.10em;opacity:.62;margin-top:.28em;white-space:nowrap}
.pic .clipGauge-right .lg-readout{flex-wrap:wrap}
.pic .clipGauge-right .lg-readout .lg-sub{width:100%;text-align:right}
.pic .clipGauge-left .lg-readout .lg-sub{text-align:left}

/* a strip of figures along the bottom of the clip — under the action, never across
   the rider, which is the thing the clip is there to show */
.pic .clipGauge-bottom-center{left:50%;bottom:3.5%;transform:translateX(-50%)}
.pic .clipGauge-bottom-center .lgRow{gap:26px;align-items:flex-end}
@media (max-width:860px){.pic .clipGauge-bottom-center .lgRow{gap:12px}}
/* the strip is one line — wrapping it back over the rider defeats the point */
.pic .clipGauge-bottom-center .lgRow{flex-wrap:nowrap}
/* the value must not push its tile wider — the tile width is fixed by the figure */
.lg-readout{overflow:hidden;text-overflow:ellipsis;max-width:100%}
