/* Home (/) only. Shared components live in /styles.css, the motion kit in /motion.css (see web/MOTION.md).
   Every start state here sits behind html.js and prefers-reduced-motion: no-preference, so with JS off or motion
   reduced each section is simply there, finished. Motion is transform / opacity / clip-path only. */

/* ---------- hero: the headline is the wall ----------
   No phone, no two columns. The headline runs edge to edge as the scanned surface, and two scans of it lie on top
   of each other: the h1 (move-in) and .spec-after (move-out, same markup, three dings in the type). --w (0 to 100,
   from home.js) is the wipe line: the h1 is clipped to its left, the copy to its right, and the line and its knob
   ride it in cqi of .spec. A third copy, .spec-pins (type unseen, not clipped), carries the pins. A ding's pin
   (.pin: ring, leader, tag) shows once the line has passed it (.is-found on its letter group in both copies), and
   the damage itself arrives with it: the chip pops out, the scratches draw, the dent presses in.
   Sizes are in em of the headline, so everything scales with it; tags are fixed, small, mono.
   The field (canvas[data-field], drawn by home.js) runs up behind the header and fades out at the bottom. */
.hero{ position:relative; isolation:isolate; overflow-x:clip; display:flex; flex-direction:column; justify-content:center;
  min-height:calc(100svh - 76px); padding-block:clamp(20px, 3svh, 48px) clamp(40px, 6svh, 88px); }
.field{ position:absolute; z-index:-1; left:0; top:-76px; width:100%; height:calc(100% + 76px); pointer-events:none;
  -webkit-mask:linear-gradient(#000 0 72%, transparent); mask:linear-gradient(#000 0 72%, transparent); }

@property --lead{ syntax:"<length>"; inherits:true; initial-value:0px; }
@property --ring{ syntax:"<length>"; inherits:true; initial-value:9px; }
.spec, .hero-foot{ margin-inline:clamp(16px, 2.6vw, 44px); }
/* Without JS the line stays at 0: the whole move-out scan, all three dings and their pins. */
.spec{ --w:0; position:relative; container-type:inline-size; }
/* The plate is a control (hover, press and drag all move the line), so its type is not selectable. */
.spec-plate{ position:relative; padding-block:60px 58px; touch-action:pan-y; cursor:ew-resize; -webkit-user-select:none; user-select:none; }
/* One line, sized to fill the plate in the system font this stack lands on for Apple devices (6.96em wide);
   home.js sets --fs smaller if another font runs wider than the plate. */
.spec-type{ font-size:var(--fs, min(14.1cqi, 36svh)); line-height:.9; white-space:nowrap; margin:0; }
.spec-type .ln, .spec-type .k, .spec-type .k-g{ position:relative; display:inline-block; }
/* % of the element's own box, and both boxes are the plate's content box, so the two cuts meet on the line. */
h1.spec-type{ clip-path:inset(-60px calc((100 - var(--w)) * 1%) -60px -40px); }
.spec-after, .spec-pins{ position:absolute; left:0; right:0; top:60px; pointer-events:none; }
.spec-after{ clip-path:inset(-60px -40px -60px calc(var(--w) * 1%)); }
.spec-pins{ z-index:2; color:transparent; -webkit-user-select:none; user-select:none; } /* tags lie over the wipe line */

/* The dings. Shapes in the page's own colour over the white type; each has a start state it leaves when found. */
.dmg{ position:absolute; pointer-events:none; }
.dmg-chip{ left:.04em; top:.27em; width:.15em; height:.16em; background:var(--bg); transform-origin:0 0;
  clip-path:polygon(0 0,100% 0,62% 24%,74% 50%,40% 62%,26% 100%,0 100%); }
.dmg-scr{ left:.02em; top:.33em; width:1.3em; height:.34em; transform:rotate(-8deg); }
.dmg-scr i{ position:absolute; left:0; height:max(2px, .02em); border-radius:1px; background:var(--bg); transform-origin:0 50%; }
.dmg-scr i:nth-child(1){ top:8%; left:6%; width:88%; }
.dmg-scr i:nth-child(2){ top:44%; left:0; width:70%; height:max(1.5px, .013em); }
.dmg-scr i:nth-child(3){ top:80%; left:22%; width:74%; height:max(1.5px, .011em); }
.dmg-dent{ right:-.045em; top:.37em; width:.15em; height:.25em; border-radius:50%; background:var(--bg); transform-origin:100% 50%; }

/* --lead and --ring are registered lengths, so their em is the headline's here and the tag (12px type) inherits px. */
.pin{ --lead:.3em; --ring:max(.085em, 9px); position:absolute; width:0; height:0; pointer-events:none; }
.k-chip .pin{ left:.105em; top:.34em; --lead:.17em; }
.k-scr .pin{ left:.66em; top:.5em; --lead:.44em; }
.k-dent .pin{ right:.02em; top:.495em; --lead:.3em; }
.pin-ring{ position:absolute; left:-.085em; top:-.085em; width:.17em; height:.17em; min-width:18px; min-height:18px; translate:min(0px, .085em - 9px) min(0px, .085em - 9px); border-radius:50%;
  box-shadow:inset 0 0 0 max(1.5px, .011em) var(--new), 0 0 0 3px rgba(14,16,19,.35); }
.pin-lead{ position:absolute; left:-.5px; width:1px; height:var(--lead); background:var(--new); }
.pin-up .pin-lead{ bottom:var(--ring); transform-origin:50% 100%; }
.pin-down .pin-lead{ top:var(--ring); transform-origin:50% 0; }
.pin-tag{ position:absolute; left:-12px; display:flex; align-items:center; gap:7px; padding:7px 11px; border-radius:999px; background:var(--card); box-shadow:inset 0 0 0 1px var(--line-2);
  font:500 12px/1 var(--font); letter-spacing:0; word-spacing:0; color:var(--ink); white-space:nowrap; }
.pin-tag::before{ content:""; flex:none; width:6px; height:6px; border-radius:50%; background:var(--new); }
.pin-tag .measure{ color:var(--ink-2); }
.pin-up .pin-tag{ bottom:calc(var(--ring) + var(--lead) + 5px); }
.pin-down .pin-tag{ top:calc(var(--ring) + var(--lead) + 5px); }
.pin-left .pin-tag{ left:auto; right:-12px; }

.js .k:not(.is-found) > .pin{ visibility:hidden; }
.js .k:not(.is-found) > .dmg-chip{ transform:scale(0); }
.js .k:not(.is-found) > .dmg-scr i{ transform:scaleX(0); }
.js .k:not(.is-found) > .dmg-dent{ transform:scale(0); }
@media (prefers-reduced-motion: no-preference){
  .js .spec{ --w:100; }
  .js .pin-ring{ opacity:0; transform:scale(2.2); }
  .js .pin-lead{ transform:scaleY(0); }
  .js .pin-tag{ opacity:0; transform:translateY(4px); }
  .js .pin-up .pin-tag{ transform:translateY(-4px); }
  .js .is-found > .pin .pin-ring{ opacity:1; transform:none; transition:opacity .18s ease-out, transform .42s var(--ease-out); }
  .js .is-found > .pin .pin-lead{ transform:none; transition:transform .32s var(--ease-out) .16s; }
  .js .is-found > .pin .pin-tag{ opacity:1; transform:none; transition:opacity .24s ease-out .34s, transform .36s var(--ease-out) .34s; }
  .js .dmg-chip{ transition:transform .3s var(--ease-spring) .05s; }
  .js .dmg-scr i{ transition:transform .42s var(--ease-out); }
  .js .dmg-scr i:nth-child(2){ transition-delay:.07s; }
  .js .dmg-scr i:nth-child(3){ transition-delay:.13s; }
  .js .dmg-dent{ transition:transform .34s var(--ease-spring) .05s; }
  /* Arrival: the two halves of the headline rise, the rule draws from the left, then home.js sweeps the line in. */
  .js h1.spec-type .ln{ transition:transform 1s var(--ease-out), opacity .5s ease-out; }
  .js h1.spec-type .ln + .ln{ transition-delay:.09s; }
  .js h1.spec-type:not(.is-in) .ln{ opacity:0; transform:translateY(.22em); }
  .js .spec-rule::before{ animation:rule-draw 1.1s var(--ease-out) .25s backwards; }
  .js .spec-scan{ animation:fade-in .6s ease-out .7s backwards; }
  .js .spec-wipe{ animation:fade-in .35s ease-out .75s backwards; }
}
@keyframes rule-draw{ from{ transform:scaleX(0); } }
@keyframes fade-in{ from{ opacity:0; } }

/* The rule under the headline is the slider's track: ticks every 10px, a taller one every 50, the two scans named
   at its ends. The real input lies over it, invisible; the line and its knob are drawn by .spec-wipe. */
.spec-rule{ position:relative; height:44px; }
.spec-rule::before{ content:""; position:absolute; inset:0 0 auto; height:9px; border-top:1px solid var(--line-2); transform-origin:0 50%;
  background:repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 50px) 0 0 / 100% 9px no-repeat, repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10px) 0 0 / 100% 4px no-repeat; }
.spec-scan{ position:absolute; inset:18px 0 auto; display:flex; justify-content:space-between; gap:16px; margin:0; font:500 11px/1 var(--mono); letter-spacing:.06em; text-transform:uppercase; color:var(--ink-3); }
.spec-scan b{ font-weight:500; color:var(--ink-2); margin-right:.6em; }
.spec-rule input{ position:absolute; inset:-14px -14px 0; width:calc(100% + 28px); height:calc(100% + 14px); margin:0; opacity:0; cursor:ew-resize; touch-action:pan-y; }
.spec-wipe{ position:absolute; z-index:1; left:0; top:14px; bottom:44px; width:0; pointer-events:none; transform:translateX(calc(var(--w) * 1cqi)); }
.spec-wipe::before{ content:""; position:absolute; left:-.5px; top:0; bottom:0; width:1px; background:linear-gradient(transparent, rgba(242,243,245,.7) 44px, rgba(242,243,245,.7)); }
.spec-knob{ position:absolute; left:-17px; bottom:-17px; width:34px; height:34px; border-radius:50%; background:var(--amber); box-shadow:0 0 0 4px rgba(14,16,19,.6), 0 6px 18px rgba(0,0,0,.45); transition:transform var(--dur-ui) var(--ease-spring); }
.spec-knob::before, .spec-knob::after{ content:""; position:absolute; top:50%; width:6px; height:6px; border:solid var(--amber-ink); border-width:0 0 2px 2px; }
.spec-knob::before{ left:9px; transform:translateY(-50%) rotate(45deg); }
.spec-knob::after{ right:9px; transform:translateY(-50%) rotate(-135deg); }
.spec:has(input:focus-visible) .spec-knob{ outline:2px solid var(--ink); outline-offset:3px; }
.spec:has(input:active) .spec-knob, .spec.is-drag .spec-knob{ transform:scale(.9); }
@media (hover: hover) and (pointer: fine){
  .spec:has(.spec-plate:hover) .spec-knob, .spec:has(input:hover) .spec-knob{ transform:scale(1.1); }
}

.hero-foot{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,340px); align-items:end; gap:40px 64px; margin-top:clamp(28px, 5svh, 64px); }
.hero-copy .lede{ max-width:40ch; }
.hero-copy .actions{ margin-top:28px; }
.hero-copy .note{ margin-top:16px; }
/* What the line has uncovered so far: a row lights when its ding is first found and stays lit. */
.found-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; padding-bottom:12px; border-bottom:1px solid var(--line-2); }
.found-head .measure{ font-size:13px; color:var(--ink-2); }
.found-list{ list-style:none; }
.found-list li{ display:grid; grid-template-columns:8px minmax(0,1fr) auto 3.2em; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); font-size:var(--t-small); color:var(--ink); }
.found-list i{ width:8px; height:8px; border-radius:50%; background:var(--new); }
.found-list .measure{ font-size:13px; color:var(--ink-2); }
.found-new{ font-size:12px; font-weight:500; color:var(--new); text-align:right; }
.found .note{ margin-top:14px; }
.js .found-list li:not(.is-found){ color:var(--ink-3); }
.js .found-list li:not(.is-found) i{ background:none; box-shadow:inset 0 0 0 1.5px var(--ink-4); }
.js .found-list li:not(.is-found) .measure, .js .found-list li:not(.is-found) .found-new{ opacity:0; }
@media (prefers-reduced-motion: no-preference){
  .found-list li, .found-list .measure, .found-new{ transition:color .3s ease-out, opacity .3s ease-out .1s; }
  .found-list i{ transition:background-color .2s ease-out, transform .45s var(--ease-spring); }
  .js .found-list li:not(.is-found) i{ transform:scale(.75); }
}

/* ---------- the app band: the reel, centred under its heading ---------- */
.nw{ white-space:nowrap; }
.hero-stage{ position:relative; display:grid; justify-items:center; }
.app{ overflow-x:clip; }
.hero-glow{ position:absolute; z-index:-1; left:50%; top:44%; width:min(170%, 760px); aspect-ratio:1; translate:-50% -50%; border-radius:50%; pointer-events:none;
  background:radial-gradient(closest-side, rgba(242,243,245,.085), rgba(242,243,245,.028) 55%, transparent); }
@media (prefers-reduced-motion: no-preference){
  .js .hero-stage{ transition:transform 1.4s var(--ease-out-soft), opacity .6s ease-out; }
  .js .hero-stage:not(.is-in){ opacity:0; transform:perspective(1400px) translate3d(0,64px,0) rotateX(9deg) rotateY(-13deg) scale(.93); }
  .js .hero-glow{ animation:glow-breathe 9s ease-in-out 2s infinite alternate; }
  .js .app:not(.is-on) .hero-glow{ animation-play-state:paused; }
}
@keyframes glow-breathe{ to{ transform:scale(1.12); opacity:.72; } }

/* Phone plus steps fit a laptop viewport under the header: width tracks the viewport height, 248–300px. */
.reel{ --bz:9px; --out:116px; position:relative; width:min(100%, clamp(248px, (100svh - 190px) * .46, 300px)); }
.phone{ position:relative; padding:var(--bz); border-radius:52px; background:#07080A;
  box-shadow:inset 0 0 0 1.5px #474D57, inset 0 0 0 3px #101216; }
.screen{ position:relative; list-style:none; aspect-ratio:540 / 1174; border-radius:43px; overflow:hidden; background:#0E1013; }
/* A glare that follows the pointer across the glass (--gx/--gy from data-tilt). */
.phone::after{ content:""; position:absolute; inset:var(--bz); z-index:2; border-radius:43px; pointer-events:none; opacity:0; transition:opacity .45s ease-out;
  background:radial-gradient(circle at calc(var(--gx, .5) * 100%) calc(var(--gy, .5) * 100%), rgba(255,255,255,.13), transparent 58%); }
@media (hover: hover) and (pointer: fine){
  .motion .phone:hover::after{ opacity:1; transition-duration:.2s; }
}
.clip{ position:absolute; inset:0; opacity:0; visibility:hidden; transition:opacity .45s var(--ease-out), visibility 0s .45s; }
.clip.is-on{ opacity:1; visibility:visible; transition:opacity .45s var(--ease-out); }
.clip img, .clip video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* The video sits 4px short of the poster at the bottom (under the home indicator, inside the corner radius), so
   its first frame is never a larger LCP candidate than the eager poster. */
.clip video{ bottom:auto; height:calc(100% - 4px); object-position:top; opacity:0; transition:opacity .3s ease-out; }
.clip.is-playing video{ opacity:1; }
/* Clip change, and once on arrival: a scan line runs down the screen while the next clip fades up. */
.screen::after{ content:""; position:absolute; inset:0; z-index:2; pointer-events:none; opacity:0; transform:translateY(-100%);
  background:linear-gradient(to bottom, transparent 70%, rgba(242,243,245,.06) calc(100% - 2px), rgba(242,243,245,.55) calc(100% - 2px)); }
@media (prefers-reduced-motion: no-preference){
  .js .hero-stage.is-in .screen::after{ animation:screen-first 1s var(--ease-in-out) .6s backwards; }
  .reel.is-switch .screen::after{ animation:screen-sweep .7s var(--ease-in-out); }
}
@keyframes screen-sweep{ 0%{ opacity:1; transform:translateY(-100%); } 85%{ opacity:1; } 100%{ opacity:0; transform:translateY(0); } }
@keyframes screen-first{ 0%{ opacity:1; transform:translateY(-100%); } 85%{ opacity:1; } 100%{ opacity:0; transform:translateY(0); } }

/* Callout: a ring on the point it marks (--x/--y: fractions of the screen, from data-at), a leader out past the
   bezel, and the label under the leader's end. Hidden until cued (home.js sets the point and the cue), so without JS
   there are no callouts. It floats 36px proud of the glass, which shows once the phone leans. */
.co{ --x:.5; --y:.5; --tone:var(--new); position:absolute; z-index:3; margin:0; height:0; pointer-events:none; visibility:hidden; opacity:0; transform:translateZ(36px);
  left:calc(var(--bz) + (100% - 2 * var(--bz)) * var(--x)); right:calc(-1 * var(--out)); top:calc(var(--bz) + (100% - 2 * var(--bz)) * var(--y));
  transition:opacity .25s ease-out, visibility 0s .25s; }
.co-ok{ --tone:var(--sealed); }
.co.is-cue{ visibility:visible; opacity:1; transition:opacity .2s ease-out; }
.co::before{ content:""; position:absolute; left:-11px; top:-11px; width:22px; height:22px; border-radius:50%; box-shadow:inset 0 0 0 1.5px var(--tone), 0 0 0 3px rgba(14,16,19,.35); }
.co-lead{ position:absolute; left:11px; right:0; top:-.5px; height:1px; background:var(--tone); transform-origin:left center; }
.co-lead::after{ content:""; position:absolute; right:0; top:-4px; width:1px; height:9px; background:var(--tone); }
.co-tag{ position:absolute; right:0; top:12px; display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:var(--card); box-shadow:inset 0 0 0 1px var(--line-2); font-size:13px; line-height:1; color:var(--ink); white-space:nowrap; }
.co-tag .measure{ font-size:12px; color:var(--ink-2); }
.co-tag::before{ content:""; flex:none; width:7px; height:7px; border-radius:50%; background:var(--tone); }
@media (prefers-reduced-motion: no-preference){
  .js .co::before{ opacity:0; transform:scale(1.8); }
  .js .co-lead{ transform:scaleX(0); }
  .js .co-tag{ opacity:0; transform:translateY(-4px); }
  .js .co.is-cue::before{ opacity:1; transform:none; transition:opacity .2s ease-out, transform .4s var(--ease-out); }
  .js .co.is-cue .co-lead{ transform:none; transition:transform .5s var(--ease-out) .2s; }
  .js .co.is-cue .co-tag{ opacity:1; transform:none; transition:opacity .3s ease-out .6s, transform .4s var(--ease-out) .6s; }
}

/* Steps under the phone: one track per clip; the playing one fills over the clip's length (home.js sets --dur). */
/* min-height holds the bar's place before home.js adds the step buttons (no shift, also with the pause hidden). */
.reel-bar{ display:none; align-items:center; gap:8px; min-height:44px; margin-top:18px; }
.js .reel-bar{ display:flex; }
.reel-steps{ list-style:none; flex:1; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:8px; }
.reel-steps button{ display:grid; gap:9px; width:100%; min-height:44px; padding:10px 0 8px; border:0; background:none; color:var(--ink-3); font:500 13px/1 var(--font); text-align:left; cursor:pointer; transition:color .15s, transform var(--dur-micro) var(--ease-out); }
.reel-steps button[aria-pressed="true"]{ color:var(--ink); }
.reel-steps button:active{ transform:scale(.97); }
.reel-track{ display:block; height:2px; border-radius:1px; background:var(--line-2); overflow:hidden; }
.reel-track i{ display:block; height:100%; background:var(--ink); transform:scaleX(0); transform-origin:left center; }
[aria-pressed="true"] > .reel-track i{ transform:none; }
@media (prefers-reduced-motion: no-preference){
  .reel.is-timed [aria-pressed="true"] > .reel-track i{ animation:track-fill var(--dur, 5s) linear both; }
  .reel.is-paused [aria-pressed="true"] > .reel-track i{ animation-play-state:paused; }
}
@keyframes track-fill{ from{ transform:scaleX(0); } }
.reel-pause{ flex:none; position:relative; width:44px; height:44px; margin-right:-10px; border:0; border-radius:50%; background:none; color:var(--ink-3); cursor:pointer; transition:color .15s, transform var(--dur-micro) var(--ease-out); }
.reel-pause:active{ transform:scale(.9); }
.reel-pause span{ position:absolute; left:50%; top:50%; width:10px; height:11px; transform:translate(-50%,-50%); border-inline:3px solid currentColor; }
.reel-pause[aria-pressed="true"] span{ width:0; height:0; border-style:solid; border-width:6px 0 6px 10px; border-color:transparent transparent transparent currentColor; transform:translate(-40%,-50%); }
@media (prefers-reduced-motion: reduce){ .reel-pause{ display:none; } }
@media (hover: hover) and (pointer: fine){
  .reel-steps button:hover, .reel-pause:hover{ color:var(--ink); }
}

/* ---------- how two scans become a record ----------
   Three phones, each scanned in from the top behind a scan line when it scrolls into view (data-seen gives
   .is-in), one after the other (data-delay). Under them one hairline draws left to right through the three texts. */
.trio{ --gap:clamp(24px, 3vw, 56px); list-style:none; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:var(--gap); }
.trio-shot{ position:relative; max-width:300px; margin-bottom:40px; }
.trio-shot .device{ max-width:none; }
/* One light line that passes down the screen once the phone has landed: a band a fifth of the phone tall, inside
   the bezel, the line on its lower edge and a faint trail above it. */
.trio-shot::after{ content:""; position:absolute; inset:0 5.5% auto; height:22%; pointer-events:none; opacity:0;
  background:linear-gradient(to bottom, transparent, rgba(242,243,245,.06) calc(100% - 1.5px), rgba(242,243,245,.6) calc(100% - 1.5px)); }
.trio-text{ position:relative; padding-top:28px; }
.trio-text::before{ content:""; position:absolute; left:0; right:calc(-1 * var(--gap)); top:0; height:1px; background:var(--line-2); transform-origin:left center; }
.trio > li:last-child .trio-text::before{ right:0; }
.trio-text::after{ content:""; position:absolute; left:0; top:-3px; width:7px; height:7px; border-radius:50%; background:var(--ink-2); }
.trio-text p{ margin-top:12px; color:var(--ink-2); max-width:36ch; }
@media (prefers-reduced-motion: no-preference){
  /* The whole phone rises in at once, and only when its picture is decoded (home.js holds it with .is-held until
     then), so it never looks like an image still loading. translate and scale, because data-tilt owns transform. */
  .js .trio-shot{ transition:opacity .5s ease-out var(--delay, 0ms), translate .95s var(--ease-out) var(--delay, 0ms), scale .95s var(--ease-out) var(--delay, 0ms); }
  .js .trio-shot:not(.is-in), .js .trio-shot.is-held{ opacity:0; translate:0 44px; scale:.95; }
  .js .trio-shot.is-in:not(.is-held)::after{ animation:scan-line 1.1s var(--ease-in-out) calc(var(--delay, 0ms) + .55s) backwards; }
  .js .trio-text.is-in::before{ animation:line-draw 1s var(--ease-in-out) calc(var(--delay, 0ms) + 120ms) backwards; }
  .js .trio-text.is-in::after{ animation:dot-in .5s var(--ease-out) calc(var(--delay, 0ms) + 120ms) backwards; }
  /* If motion.js never arrives, nothing stays clipped. */
  .js:not(.motion) .trio-shot{ animation:home-failsafe 1ms linear 3s forwards; }
}
@keyframes scan-line{ 0%, 24%{ opacity:0; } 0%{ transform:translateY(-100%); } 34%, 84%{ opacity:1; } 100%{ opacity:0; transform:translateY(354%); } }
@keyframes line-draw{ from{ transform:scaleX(0); } }
@keyframes dot-in{ from{ opacity:0; transform:scale(0); } }
@keyframes home-failsafe{ to{ clip-path:none; opacity:1; translate:none; scale:none; } }

/* The rule the record lives by, set large. Each word (span.w, wrapped by home.js) lights as the line scrolls in:
   --p runs 0 to 1 (data-progress="enter"), --i is the word's index, --n the word count. No JS: --p falls back to 1. */
.statement{ margin-top:clamp(88px, 4rem + 6vw, 176px); max-width:21ch; font-size:var(--t-h2); font-weight:700; line-height:1.04; letter-spacing:-.045em; word-spacing:.05em; text-wrap:balance; }
.statement .w{ opacity:clamp(.2, calc(var(--p, 1) * (var(--n, 16) + 5) - var(--i, 0)), 1); transition:opacity .3s linear; }
.statement-more{ margin-top:36px; }

/* ---------- review: phone left; right, a deck to try the four swipes on, over the four statuses ---------- */
#review{ overflow-x:clip; } /* a card thrown sideways never widens the page */
.review{ display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:center; gap:clamp(40px, 6vw, 112px); }
.review-shot{ justify-self:center; width:100%; max-width:320px; }
.review-shot .device{ max-width:none; }
.review .head{ margin-bottom:40px; }

/* The deck: cards share one grid cell; --k is a card's place in the stack (0 on top). While dragged, home.js
   writes --dx/--dy/--rot and the card follows the finger with no transition; let go short of the threshold and it
   springs back through the transition; past it, home.js throws it out (Web Animations) and the next card steps up. */
.deck{ display:none; margin-bottom:36px; }
.js .deck{ display:block; }
.deck-cap{ margin-bottom:14px; }
.deck-stage{ position:relative; max-width:440px; padding-bottom:20px; border-radius:var(--radius); outline:none; }
.deck-cards{ list-style:none; display:grid; }
.deck-card{ --k:0; grid-area:1 / 1; position:relative; z-index:calc(10 - var(--k)); display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px 16px; padding:22px 24px; border-radius:var(--radius);
  background:var(--card-2); box-shadow:inset 0 0 0 1px var(--line-2), 0 20px 40px -28px rgba(0,0,0,.9);
  transform:translate3d(var(--dx, 0px), calc(var(--dy, 0px) + var(--k) * 10px), 0) rotate(var(--rot, 0deg)) scale(calc(1 - var(--k) * .045));
  opacity:clamp(0, calc(3 - var(--k)), 1); filter:brightness(calc(1 - var(--k) * .14));
  transition:transform .55s var(--ease-spring), opacity .3s ease-out, filter .3s ease-out;
  touch-action:pan-y; -webkit-user-select:none; user-select:none; pointer-events:none; }
.deck-card > *{ grid-column:1; }
/* Cards are solid, so the ones underneath show as edges only; their words wait until the card is on top. */
.deck-card > :not(.deck-verdict){ opacity:clamp(0, calc(1 - var(--k)), 1); transition:opacity .3s ease-out; }
.deck-card .measure{ color:var(--ink-2); font-size:var(--t-small); }
.deck-card.is-top{ pointer-events:auto; cursor:grab; }
.deck-card.is-drag{ transition:none; cursor:grabbing; }
.deck-card.is-out{ z-index:20; pointer-events:none; }
.deck-card.is-gone{ visibility:hidden; }
.deck-verdict{ grid-column:2; grid-row:1 / span 3; opacity:var(--v, 0); transform:scale(calc(.88 + var(--v, 0) * .12)); }
.deck-card:not(.is-drag) .deck-verdict{ transition:opacity .25s ease-out, transform .25s ease-out; }
.deck-stage:focus-visible .deck-card.is-top{ outline:2px solid var(--ink); outline-offset:3px; }
@media (hover: hover) and (pointer: fine){
  .deck-card.is-top:not(.is-drag):hover{ --dy:-3px; }
}
/* All four sorted: the stack's place holds the tally and a way to go again. */
.deck-done{ position:absolute; inset:0 0 20px; display:grid; align-content:center; justify-items:start; gap:10px; padding:0 2px; opacity:0; visibility:hidden; transform:translateY(8px); transition:opacity .2s ease-out, visibility 0s .2s, transform .2s ease-out; }
.deck.is-done .deck-done{ opacity:1; visibility:visible; transform:none; transition:opacity .45s var(--ease-out) .25s, transform .45s var(--ease-out) .25s; }
.deck-done p{ color:var(--ink); max-width:38ch; }
.deck-again{ padding:0; border:0; background:none; color:var(--ink); font:inherit; font-weight:500; cursor:pointer; }
.deck-again:focus-visible{ outline:2px solid var(--ink); outline-offset:4px; border-radius:6px; }

.statuses{ list-style:none; display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:0 40px; border-top:1px solid var(--line-2); }
.statuses li{ --tone:var(--ink-3); --wash:var(--wear-dim); position:relative; display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; align-items:center; gap:6px 12px; min-height:44px; padding:22px 0; border-bottom:1px solid var(--line); }
.statuses li[data-sort="new"]{ --tone:var(--new); --wash:var(--new-dim); }
.statuses li[data-sort="prior"]{ --tone:var(--prior); --wash:var(--prior-dim); }
.statuses li[data-sort="wear"]{ --tone:var(--wear); }
.statuses p{ grid-column:1 / -1; color:var(--ink-2); font-size:var(--t-small); }
.statuses .label, .sort-btn{ grid-column:4; }
/* A wash behind the row: faint while a dragged card is heading its way, a flash when one lands. */
.statuses li::before{ content:""; position:absolute; inset:6px -14px; z-index:-1; border-radius:14px; background:var(--wash); opacity:0; pointer-events:none; transition:opacity .2s ease-out; }
.statuses li.is-aim::before{ opacity:.7; }
.statuses li.is-hit::before{ animation:row-hit 1s ease-out; }
.statuses li.is-hit .dot{ animation:dot-pop .55s var(--ease-out); }
@keyframes row-hit{ 0%{ opacity:0; } 18%{ opacity:1; } 100%{ opacity:0; } }
@keyframes dot-pop{ 40%{ transform:scale(1.9); } }
.sort-n{ grid-column:3; font-size:13px; color:var(--tone); }
.sort-n:empty{ display:none; }
.sort-btn{ position:relative; display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:0 14px; border:0; border-radius:999px; background:rgba(255,255,255,.05); box-shadow:inset 0 0 0 1px var(--line-2); color:var(--ink-2); font:500 13px/1 var(--font); cursor:pointer;
  transition:background-color .15s, color .15s, opacity .2s, transform var(--dur-micro) var(--ease-out); }
.sort-btn::after{ content:""; position:absolute; inset:-5px -2px; } /* 46px tall hit area */
.sort-btn span{ display:inline-block; transition:transform .25s var(--ease-out); }
.sort-btn:active{ transform:scale(.95); }
.sort-btn:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }
.sort-btn:disabled{ opacity:.4; cursor:default; }
@media (hover: hover) and (pointer: fine){
  .sort-btn:not(:disabled):hover{ background:rgba(255,255,255,.1); color:var(--ink); }
  .sort-btn:not(:disabled):hover span{ transform:translate(calc(var(--ax, 0) * 3px), calc(var(--ay, 0) * 3px)); }
}

/* ---------- Fair Charge: the check is live ----------
   The meter is one track, $0 to $500. --f/--t are the typical range's ends and --a the charge, as fractions of the
   track (home.js writes them; the defaults are the sample: $75–125 against $400). The band runs --f to --t, a
   fainter band on to 10% over the high end (still "within"), a thin line from there to the marker when the charge
   is above. --tone is the verdict's colour: above, within, below. */
.fc{ display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:clamp(32px, 5vw, 96px); align-items:start; }
.fc-check{ --tone:var(--amber); container-type:inline-size; margin:0; padding:32px; border-radius:var(--radius-lg); background:var(--card); box-shadow:inset 0 0 0 1px var(--line); }
.fc-check[data-verdict="within"]{ --tone:var(--sealed); }
.fc-check[data-verdict="below"]{ --tone:var(--prior); }
.fc-what{ display:block; margin-top:6px; font-weight:600; letter-spacing:-.012em; color:var(--ink); }
.fc-figs{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:24px; margin:28px 0 24px; }
.fc-figs > div{ display:grid; gap:8px; }
.fc-figs .big-num{ font-size:clamp(1.5rem, 9.5cqi, 3.25rem); white-space:nowrap; } /* sized off the card so "$160–300" always fits its column */
.fc-charged{ color:var(--tone); transition:color .25s ease-out; }
.fc-typical{ color:var(--sealed); }
.meter{ --f:.15; --t:.25; --a:.8; position:relative; container-type:inline-size; height:44px; touch-action:pan-y; }
.meter.is-live{ cursor:ew-resize; }
.meter::before{ content:""; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--line-2); }
.meter > span{ position:absolute; left:0; width:100%; }
.meter-band, .meter-tol{ top:calc(50% - 4px); height:8px; background:var(--sealed); transition:clip-path .6s var(--ease-out); }
.meter-band{ clip-path:inset(0 calc((1 - var(--t)) * 100%) 0 calc(var(--f) * 100%) round 4px); }
.meter-tol{ opacity:.3; clip-path:inset(0 calc((1 - var(--t) * 1.1) * 100%) 0 calc(var(--f) * 100%) round 4px); }
.meter-over{ top:calc(50% - 1px); height:2px; background:var(--amber); opacity:.5; clip-path:inset(0 calc((1 - var(--a)) * 100%) 0 calc(var(--t) * 110%)); }
/* The marker has no width of its own (a full-width one, translated, would widen the page on a phone): it moves by the track's width. */
.meter > .meter-pin{ width:0; top:0; height:100%; pointer-events:none; transform:translateX(calc(var(--a) * 100cqi)); transition:transform .22s var(--ease-out); }
.meter.is-direct .meter-pin{ transition:none; }
.meter-pin i{ position:absolute; left:-1px; top:3px; bottom:3px; width:2px; border-radius:1px; background:var(--tone); transition:background-color .25s ease-out; }
/* The handle: shown once the meter is live, so the static sample is a plain marker. */
.meter.is-live .meter-pin i::before{ content:""; position:absolute; left:50%; top:50%; width:20px; height:20px; margin:-10px; border-radius:50%; background:var(--card); box-shadow:inset 0 0 0 2px var(--tone); transition:transform .25s var(--ease-spring), box-shadow .25s ease-out; }
.meter.is-drag .meter-pin i::before{ transform:scale(1.25); }
.meter-input:focus-visible + .meter .meter-pin i::before{ outline:2px solid var(--ink); outline-offset:3px; }
@media (hover: hover) and (pointer: fine){
  .meter.is-live:hover .meter-pin i::before{ transform:scale(1.15); }
  .meter.is-live.is-drag .meter-pin i::before{ transform:scale(1.25); }
}
.fc-verdict{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; min-height:3.4em; margin-top:24px; }
.fc-hint{ display:none; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.js .fc-hint{ display:block; }
/* Rows that set the range: home.js makes each repair's name a button. */
.fc .table-wrap{ margin-inline:-14px; }
.fc table.data :is(th, td):first-child{ padding-left:14px; }
.fc table.data :is(th, td):last-child{ padding-right:14px; }
.fc-pick{ position:relative; padding:0; border:0; background:none; color:inherit; font:inherit; letter-spacing:inherit; text-align:left; cursor:pointer; }
.fc-pick::after{ content:""; position:absolute; inset:-10px 0; } /* a taller target than the line of text */
.fc-pick:focus-visible{ outline:2px solid var(--ink); outline-offset:4px; border-radius:4px; }
.fc tr[data-low]{ transition:background-color .2s ease-out; }
.fc tr.is-pickable{ cursor:pointer; }
.fc tr.is-on{ background:rgba(255,255,255,.035); }
.fc tr .num{ transition:color .2s ease-out; }
.fc tr.is-on .num{ color:var(--sealed); }
@media (hover: hover) and (pointer: fine){
  .fc tr.is-pickable:not(.is-on):hover{ background:rgba(255,255,255,.02); }
}
.fc-note{ margin-top:40px; }

/* ---------- seal: the one raised band ----------
   The dial seals itself as it scrolls in (site.js, styles.css). Under it a switch plays out a failed check: the
   ring goes red and dim, the one tick that no longer matches steps out of line, the check gives way to a cross. */
.seal-band{ background:var(--bg-2); border-block:1px solid var(--line); }
.seal{ display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:center; gap:clamp(40px, 6vw, 112px); }
.seal-visual{ display:grid; justify-items:center; gap:28px; }
.seal-dial{ display:grid; place-items:center; width:100%; }
.seal-try{ display:none; }
.js .seal-try{ display:grid; justify-items:center; gap:14px; text-align:center; }
.seal-state{ display:flex; align-items:baseline; justify-content:center; gap:10px; min-height:3em; max-width:34ch; color:var(--ink); text-align:left; text-wrap:balance; }
.seal-state::before{ content:""; flex:none; width:9px; height:9px; border-radius:50%; background:var(--sealed); transition:background-color .3s ease-out; }
.is-broken .seal-state::before{ background:var(--new); }
.seal-visual .dial{ transition:color .45s var(--ease-out); }
.seal-visual .dial .core{ transition:fill .45s var(--ease-out); }
.seal-visual .dial .cross{ fill:none; stroke:currentColor; stroke-width:7; stroke-linecap:round; stroke-dasharray:1; stroke-dashoffset:1; opacity:0; }
.seal-visual .dial .tick{ transform-box:fill-box; }
.seal-visual.is-broken .dial{ color:var(--new); }
.seal-visual.is-broken .dial .core{ fill:rgba(255,107,94,.08); }
.seal-visual.is-broken .dial .tick{ opacity:.22; transition:opacity .3s var(--ease-out), transform .5s var(--ease-spring); transition-delay:calc(var(--q, 0) * 30ms); }
.seal-visual.is-broken .dial .tick.is-off{ opacity:1; stroke-width:3.5; transform:translate(calc(var(--bx, 0) * 1px), calc(var(--by, 0) * 1px)); transition-delay:.3s; }
.seal-visual.is-broken .dial .ring-text{ opacity:.22; }
.seal-visual.is-broken .dial .check{ visibility:hidden; opacity:0; transform:scale(1.6); transition:none; }
.seal-visual.is-broken .dial .cross{ opacity:1; stroke-dashoffset:0; transition:stroke-dashoffset .45s var(--ease-out) .2s, opacity .01s linear .2s; }
@media (prefers-reduced-motion: reduce){
  /* styles.css pins tick and check opacity for reduced motion; the failed state still has to read. */
  .seal-visual.is-broken .dial .tick:not(.is-off){ opacity:.22 !important; }
  .seal-visual.is-broken .dial .cross{ transition:none; }
}
.seal-copy .lede{ margin-top:24px; }
.seal-copy .kv{ margin-top:40px; }
.seal-next{ display:flex; align-items:baseline; gap:10px; margin-top:20px; font-size:var(--t-micro); line-height:1.5; color:var(--ink-3); max-width:60ch; }
.seal-next .dot{ transform:translateY(1px); }
.seal-link{ margin-top:32px; }

/* ---------- closing ---------- */
.closing-grid{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:56px; }
.closing .h1{ max-width:13ch; }
.closing .lede{ margin-top:28px; }
.closing .actions{ margin-top:40px; }
.closing-next{ margin-top:20px; max-width:56ch; }
.signup{ margin-top:32px; max-width:34rem; scroll-margin-top:96px; }
.signup-row{ display:flex; flex-wrap:wrap; gap:12px; margin-top:10px; }
.signup input{ flex:1 1 14rem; min-width:0; min-height:54px; padding:0 20px; border:0; border-radius:999px; background:var(--card); color:var(--ink); box-shadow:inset 0 0 0 1px var(--line-2); font:400 1.0625rem/1 var(--font); transition:box-shadow .2s ease-out, background-color .2s ease-out; }
.signup input::placeholder{ color:var(--ink-3); }
.signup input:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; background:var(--card-2); }
.signup button:disabled{ opacity:.6; cursor:progress; }
.signup-status{ min-height:1.5em; margin-top:10px; }
.signup-status[data-state="ok"]{ color:var(--sealed); }
.signup-status[data-state="error"]{ color:var(--new); }
@media (prefers-reduced-motion: no-preference){
  .signup-status[data-state]{ animation:status-in .4s var(--ease-out); }
}
@keyframes status-in{ from{ opacity:0; transform:translateY(-4px); } }
@media (hover: hover) and (pointer: fine){
  .signup input:hover{ box-shadow:inset 0 0 0 1px var(--ink-4); }
}
/* 240px source shown at 120 CSS px: crisp at 2x. It leans toward the pointer (data-tilt). */
.qr{ margin:0; display:grid; justify-items:center; gap:14px; }
.qr img{ width:120px; height:auto; padding:10px; border-radius:16px; background:#fff; box-sizing:content-box; }

/* Status, pricing and questions: one line each, linked to the page that owns the detail. */
.fine{ list-style:none; margin-top:clamp(64px, 3rem + 4vw, 112px); border-top:1px solid var(--line-2); }
.fine li{ display:grid; grid-template-columns:150px minmax(0,1fr) auto; align-items:baseline; gap:8px 32px; padding:18px 0; border-bottom:1px solid var(--line); }
.fine p{ color:var(--ink-2); font-size:var(--t-small); max-width:70ch; }
.fine .label{ display:flex; align-items:center; gap:9px; }
.fine .more{ font-size:var(--t-small); white-space:nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 1100px){
  .reel{ --out:36px; }
}
@media (max-width: 1020px){
  .statuses{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width: 860px){
  .hero-foot, .review, .fc, .seal, .closing-grid{ grid-template-columns:minmax(0,1fr); }
  .hero{ min-height:0; }
  /* Two lines on a phone, each as wide as the screen allows (the longer one is 3.7em). */
  .spec-type{ font-size:var(--fs, 25.4cqi); }
  .spec-type .ln{ display:block; width:max-content; }
  .k-scr .pin{ --lead:.4em; }
  .k-scr .pin-tag{ left:auto; right:-62px; }
  .k-dent .pin-tag{ left:-12px; right:auto; }
  .reel{ --out:22px; width:min(70vw, 280px); }
  /* Little room beside the phone: the label alone, smaller, so it covers less of the screen. */
  .co-tag{ gap:7px; padding:7px 10px; font-size:12px; }
  .co-tag .measure{ display:none; }
  /* One step per row, phone beside its text; each arrives on its own as it is reached, so no relay delays. */
  .trio{ grid-template-columns:minmax(0,1fr); gap:48px; }
  .trio > li{ display:grid; grid-template-columns:minmax(0,.42fr) minmax(0,.58fr); align-items:center; gap:24px; }
  .trio-shot{ margin-bottom:0; }
  .trio-text{ padding-top:22px; }
  .trio-text::before{ right:0; }
  .trio [data-delay]{ --delay:0ms !important; }
  .review-shot{ order:2; max-width:240px; }
  .seal-visual .dial{ max-width:300px; }
  /* Already on a phone: no QR. */
  .qr{ display:none; }
}
/* The narrowest phones: the chip tag moves left, clear of the scratch tag. */
@media (max-width: 350px){
  .k-chip .pin-tag{ left:-28px; }
}
@media (max-width: 560px){
  .fc-check{ padding:24px 20px; }
  .fc-figs{ gap:16px; }
  .fine li{ grid-template-columns:minmax(0,1fr); gap:6px; }
  .deck-card{ padding:18px 18px; }
}

/* Hero with the real app: centred copy, then a wide stage holding three phones (trip, review a finding, seal). */
.hero-app{ display:block; min-height:0; text-align:center; padding:clamp(56px, 10svh, 120px) clamp(16px, 4vw, 48px) clamp(48px, 8svh, 96px); }
.ha-copy{ max-width:52rem; margin-inline:auto; }
.ha-title{ font-size:clamp(3rem, 1.4rem + 5.6vw, 6.5rem); line-height:.95; letter-spacing:-.05em; margin:0; }
.ha-ding{ display:inline-block; line-height:1; --bite:radial-gradient(circle .065em at .03em .6em, transparent 98%, #000 100%); -webkit-mask:var(--bite); mask:var(--bite); }
.ha-copy .lede{ max-width:40ch; margin:clamp(18px, 2.6svh, 28px) auto 0; color:var(--ink-2); }
.ha-actions{ display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:12px; margin-top:32px; }
.store-btn{ display:inline-flex; align-items:center; gap:10px; height:52px; padding:0 22px 0 18px; border-radius:999px;
  background:#F2F3F5; color:#0E1013; text-decoration:none; text-align:left;
  box-shadow:0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px -10px rgba(0,0,0,.6);
  transition:transform var(--dur-micro) var(--ease-out), background-color .15s; }
.store-btn svg{ width:22px; height:24px; fill:currentColor; flex:none; margin-top:-2px; }
.store-btn span{ display:flex; flex-direction:column; font:600 17px/1.05 var(--font); letter-spacing:-.02em; }
.store-btn small{ font:500 11px/1.1 var(--font); letter-spacing:0; opacity:.7; }
.store-btn:hover{ background:#fff; }
.store-btn:active{ transform:scale(.97); }
.store-btn:focus-visible, .ghost-btn:focus-visible{ outline:2px solid var(--amber); outline-offset:3px; }
.ghost-btn{ display:inline-flex; align-items:center; gap:9px; height:52px; padding:0 22px 0 18px; border-radius:999px; text-decoration:none;
  color:var(--ink); background:rgba(255,255,255,.07); box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  font:600 16px/1 var(--font); letter-spacing:-.015em;
  transition:background-color .15s, box-shadow .15s, transform var(--dur-micro) var(--ease-out); }
.ghost-btn svg{ width:19px; height:19px; flex:none; color:var(--amber); }
.ghost-btn:hover{ background:rgba(255,255,255,.12); box-shadow:inset 0 0 0 1px rgba(255,255,255,.22); }
.ghost-btn:active{ transform:scale(.97); }
.ha-copy .note{ margin:18px auto 0; font-size:var(--t-micro); color:var(--ink-3); }
.ha-copy .note a{ color:var(--ink-2); text-underline-offset:3px; }

.ha-stage{ position:relative; max-width:1240px; margin:clamp(20px, 3svh, 36px) auto 0; border-radius:clamp(20px, 2.4vw, 32px); overflow:hidden;
  aspect-ratio:16/9; }
.ha-stage-in{ position:absolute; inset:2% 0 auto; display:flex; justify-content:center; align-items:flex-start; gap:0; }
.phone{ margin:0; padding:clamp(5px, .6vw, 9px); border-radius:clamp(26px, 3.6vw, 52px); background:#0B0C0E; flex:none;
  box-shadow:inset 0 0 0 1.5px #2C3038, 0 40px 80px -24px rgba(0,0,0,.75); }
.phone img{ display:block; width:100%; height:auto; border-radius:clamp(21px, 3vw, 43px); }
.ha-stage .phone{ padding:0; background:none; border-radius:0; box-shadow:none; filter:drop-shadow(0 30px 40px rgba(0,0,0,.55)); }
.ha-stage .phone img{ border-radius:0; }
.phone-main{ position:relative; z-index:1; width:27%; }
.phone-side{ width:22.5%; margin-top:6%; opacity:.92; }
.phone-l{ margin-right:-3%; transform:rotate(-4deg); }
.phone-r{ margin-left:-3%; transform:rotate(4deg); }
@media (max-width: 760px){
  .ha-stage{ aspect-ratio:4/5; }
  .ha-stage-in{ inset:2% 0 auto; }
  .phone-main{ width:52%; }
  .phone-side{ width:40%; }
  .phone-l{ margin-right:-22%; } .phone-r{ margin-left:-22%; }
}
