/* Flow Breakdown — landing v2
   Tokens are the app's own Glass kit values. Keep them in sync with
   macos/Sources/FlowBreakdown/Model/CanvasTypes.swift and the Figma kit. */

:root{
  --canvas:#F2F2F5;
  --surface:#FFFFFF;
  --ink:#1C1C1E;
  --ink-2:rgba(28,28,30,.62);
  --ink-3:rgba(28,28,30,.40);
  --line:rgba(28,28,30,.12);
  --dot:rgba(28,28,30,.16);          /* canvas/dot */
  --accent:#007AFF;                  /* accent/default */
  --lane:#8E8E93;                    /* Feelings.laneLineColor */
  --delighted:#34C759;
  --confused:#A8820A;                /* Feelings.meta ink, darkened for 20pt legibility */
  --meh:#7C7C80;
  --warn:#FF9500;
  --card-shadow:0 8px 22px rgba(0,0,0,.12);   /* SwiftUI radius:11 is a sigma; CSS blur ≈ 2× */
  --sans:-apple-system,"SF Pro Text","SF Pro Display","Helvetica Neue",Helvetica,Arial,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,monospace;
  --round:ui-rounded,"SF Pro Rounded","SF Compact Rounded",var(--sans);

  --header-height:65px;
  --story-header-gap:clamp(24px,4svh,40px);
  --story-min-top:calc(var(--header-height) + var(--story-header-gap) + 24px);
  --story-footer-height:200px;
  --card-max:200px;          /* Figma: 200 × 433 */
  --card-ratio:2.165;        /* 433/200 — the ratio every card asset is cut to */
  /* Keep the canvas's 24px overhang clear of the menu, then fit the assets.
     114px covers labels/notes; the footer includes the complete copy follow-up. */
  --card-w:clamp(104px,calc((100svh - var(--story-min-top) - 114px - var(--story-footer-height) - 18px) / var(--card-ratio)),var(--card-max));
  --card-h:calc(var(--card-w) * var(--card-ratio));
  --gap:40px;
  --pad:clamp(20px,5vw,120px);
  --milk:rgba(255,255,255,.5);       /* the frost sheet's own body */
}

@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --canvas:#161618; --surface:#212124; --ink:#F2F2F5;
    --ink-2:rgba(242,242,245,.62); --ink-3:rgba(242,242,245,.38);
    --line:rgba(242,242,245,.14); --dot:rgba(242,242,245,.14);
    --accent:#0A84FF; --lane:#98989E; --confused:#E0B341; --meh:#9B9BA0;
    --card-shadow:0 10px 26px rgba(0,0,0,.5);
    --milk:rgba(20,20,23,.55);
  }
}
:root[data-theme="dark"]{
  --canvas:#161618; --surface:#212124; --ink:#F2F2F5;
  --ink-2:rgba(242,242,245,.62); --ink-3:rgba(242,242,245,.38);
  --line:rgba(242,242,245,.14); --dot:rgba(242,242,245,.14);
  --accent:#0A84FF; --lane:#98989E; --confused:#E0B341; --meh:#9B9BA0;
  --card-shadow:0 10px 26px rgba(0,0,0,.5);
  --milk:rgba(20,20,23,.55);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
html,body{overflow-x:clip}   /* the screen strip runs past the viewport */

/* Soft colour and a milk tint form a static background. A viewport-sized live
   backdrop blur forced the browser to recompose it alongside every scroll frame.
   Keep real backdrop blur local to the menu and small credit card. */
body{
  isolation:isolate;
  background:var(--canvas);
  color:var(--ink);
  font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
}
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    linear-gradient(var(--milk),var(--milk)),
    radial-gradient(52% 42% at 14% 6%,  rgba(0,122,255,.32), transparent 68%),
    radial-gradient(44% 38% at 86% 12%, rgba(255,149,0,.26), transparent 66%),
    radial-gradient(50% 42% at 70% 92%, rgba(52,199,89,.22), transparent 66%),
    radial-gradient(40% 36% at 22% 88%, rgba(255,45,85,.14), transparent 66%);
}
img{max-width:100%;display:block}
a{color:inherit}
button,a{touch-action:manipulation}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
[id]{scroll-margin-top:76px}   /* anchors clear the sticky menu bar */

/* ── menu bar ───────────────────────────────── */
.menubar{
  position:sticky;top:0;z-index:60;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  min-height:var(--header-height);padding:10px 16px;
  background:color-mix(in srgb,var(--surface) 78%,transparent);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--line);
  font-size:13px;
}
.menus{display:flex;align-items:center;gap:18px;min-width:0}
.menus .mark{width:36px;height:36px;max-width:none;object-fit:contain;flex:none;margin-right:-10px}
.menus .app{font-weight:600;white-space:nowrap}
.menus a{color:var(--ink-2);text-decoration:none}
.status{display:flex;align-items:center;gap:14px;white-space:nowrap}
.status .req{color:var(--ink-3)}
.store-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:5px 12px 5px 8px;flex:none;white-space:nowrap;
  border:1px solid var(--line);border-radius:12px;text-decoration:none;
  background:color-mix(in srgb,var(--ink) 10%,var(--surface));color:var(--ink);
  font:inherit;font-size:14px;font-weight:500;line-height:1.25;cursor:pointer;
  box-shadow:0 1px 1px rgba(0,0,0,.04)}
.store-button .store-icon{width:32px;height:32px;max-width:none;flex:none}
.store-button:active{background:color-mix(in srgb,var(--ink) 18%,var(--surface));transform:scale(.98)}
@media (hover:hover) and (pointer:fine){
  .store-button:hover{background:color-mix(in srgb,var(--ink) 15%,var(--surface));border-color:color-mix(in srgb,var(--ink) 22%,transparent)}
}
@media (prefers-reduced-motion:no-preference){
  .store-button{transition:background-color .16s ease,border-color .16s ease,transform .16s ease}
}
@media (max-width:900px){.status .req{display:none}}
@media (max-width:640px){
  .menus{gap:10px}
  .menus .mark{width:32px;height:32px;margin-right:0}
  .menus a{display:none}
}
@media (max-width:380px){
  .menubar{padding-inline:10px;gap:8px}
  .menus{gap:6px}
  .menus .app{font-size:12px}
  .menubar .store-button{font-size:12px}
  .menubar .store-icon{width:28px;height:28px}
}

/* ── shared ───────────────────────────────── */
.btn{
  display:inline-block;border:0;cursor:pointer;
  font:inherit;font-size:16px;font-weight:500;
  color:#fff;background:var(--accent);
  min-height:44px;padding:13px 24px;border-radius:10px;text-decoration:none;
}
.btn:active{transform:scale(.97)}
.download-cta{min-height:48px;padding:6px 18px 6px 12px;font-size:16px}
.download-cta .store-icon{width:34px;height:34px}
.store-download{display:flex;flex-direction:column;align-items:center;gap:6px}
.store-note{font-size:13px;color:var(--ink-2);line-height:20px}
/* Continuations read as the next sentence, with a comfortable invisible target. */
.narrative-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:10px 12px;border:0;background:none;color:var(--ink-2);
  font:inherit;font-size:14px;font-weight:400;cursor:pointer;text-decoration:none}
.narrative-link[hidden]{display:none}
.narrative-arrow{--arrow-radius:2.6em;position:relative;display:block;flex:none;width:1em;height:1.4em;
  color:var(--ink-2);text-decoration:none;overflow:hidden;perspective:400px}
.narrative-arrow-wheel{position:absolute;inset:0;transform-style:preserve-3d;
  transform:translateZ(calc(-1 * var(--arrow-radius))) rotateX(0deg)}
.narrative-arrow-face{position:absolute;inset:0;display:grid;place-items:center;
  line-height:1;backface-visibility:hidden;-webkit-backface-visibility:hidden;
  transform:rotateX(calc(var(--arrow-face) * 30deg)) translateZ(var(--arrow-radius))}
@media (hover:hover) and (pointer:fine){
  .narrative-link:hover{color:var(--ink)}
  .narrative-link:hover > .narrative-label{text-decoration:underline;text-underline-offset:4px}
}
@media (prefers-reduced-motion:no-preference){
  .narrative-link.arrow-visible .narrative-arrow-wheel{
    animation:narrative-arrow-roll 1.2s cubic-bezier(.65,0,.35,1) infinite}
  /* Twelve identical faces make each 30-degree reset visually seamless. */
  @keyframes narrative-arrow-roll{
    from{transform:translateZ(calc(-1 * var(--arrow-radius))) rotateX(0deg)}
    to{transform:translateZ(calc(-1 * var(--arrow-radius))) rotateX(-30deg)}
  }
}
.fine{font-size:13px;color:var(--ink-3)}
.lede{color:var(--ink-2);max-width:62ch}
h1,h2,h3{text-wrap:balance;letter-spacing:-.02em;font-weight:500}

/* ── hero ───────────────────────────────── */
.hero-opening{
  display:flex;flex-direction:column;
  min-height:calc(100svh - var(--header-height));
  padding-top:clamp(52px,calc(100svh - 680px),148px);
  padding-bottom:16px;
}
.promise{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:15px;text-align:center;width:100%;
  max-width:1200px;margin:0 auto;padding:0 var(--pad)}
h1{font-size:clamp(32px,4.4vw,52px);line-height:1.08;letter-spacing:-.032em;font-weight:500}
.hero-intro{max-width:48ch;color:var(--ink-2);font-size:clamp(16px,1.5vw,18px);
  line-height:1.45;text-wrap:balance}

/* The promise takes the remaining opening space, seating the phone and its
   invitation at the bottom of the viewport without absolute positioning. */
.zone{
  position:relative;flex:none;margin-top:clamp(24px,4svh,40px);
  display:flex;flex-direction:column;justify-content:center;
}
.pin{display:flex;justify-content:center}
@media (max-width:720px){
  .hero-opening{padding-top:clamp(44px,8svh,72px)}
  .zone{margin-top:36px}
}
@media (max-width:720px) and (max-height:700px){
  .hero-opening{padding-top:28px}
}
@media (max-width:360px) and (max-height:700px){
  .hero-intro{font-size:15px}
}
@media (max-height:700px){
  /* The copy needs clear space above the card when there is little flex room. */
  .zone{margin-top:70px}
}

/* ── the story: a sticky stage inside a tall zone.
   During the flight the stage is still in flow (deltas to the phone hold);
   it pins at --stagetop and the remaining slack drives beats 2–5. ── */
.storyzone{position:relative}
.armed .storyzone::after{content:"";display:block;height:2400px}
.stage{
  /* Reserve the follow-up before copying, so success never moves the canvas.
     The top clearance is a floor: fitting the footer must never override it. */
  --stage-height:calc(var(--card-h) + 114px + var(--story-footer-height));
  --stagetop:max(var(--story-min-top), calc((100svh - var(--stage-height)) / 2 + 48px));
  position:sticky;top:var(--stagetop);
  max-width:1200px;margin:0 auto;padding:0 var(--pad);
}
.storyfoot{position:relative;height:var(--story-footer-height);margin-top:14px}
.scap{
  position:absolute;left:50%;top:46px;translate:-50% 0;width:min(52ch,100%);white-space:normal;
  opacity:0;margin:0;
}
.scap[data-beat="0"]{opacity:1}                 /* no-JS: the plain caption */
.copy-caption-mobile{display:none}
@media (hover:none) and (pointer:coarse){
  .copy-caption-desktop{display:none}
  .copy-caption-mobile{display:block}
  .storyfoot .ctafig{top:108px}
}
.story-next{position:absolute;left:50%;top:80px;translate:-50% 0;white-space:nowrap}
.ctafig{position:absolute;left:50%;top:80px;translate:-50% 0;
  opacity:0;visibility:hidden;pointer-events:none;font-size:15px;
  min-width:264px;max-width:100%;min-height:48px;padding:6px 18px 6px 12px}
.ctafig .store-icon{width:34px;height:34px}
.ctafig[aria-busy="true"]{cursor:progress}
.copy-feedback{position:absolute;top:46px;left:50%;translate:-50% 0;width:min(52ch,100%)}
.post-copy{position:absolute;top:46px;left:50%;translate:-50% 0;width:min(440px,100%);
  display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.post-copy[hidden],.copy-feedback[hidden]{display:none}
.copy-confirmation{font-size:13.5px;line-height:20px;color:var(--ink-2);text-wrap:balance}
.post-copy h2{font-size:22px;line-height:1.2}
.your-recording{font-size:14px;line-height:20px;color:var(--ink-2)}
.post-copy .download-cta{font-size:15px;padding:6px 16px 6px 10px;min-height:44px}
.post-copy .store-icon{width:30px;height:30px}
.post-copy:not([hidden]) ~ .mates{display:none}
@media (max-width:720px){
  .story-next,.ctafig{top:100px}
  .storyfoot .mates{display:none}
}
@media (prefers-reduced-motion:no-preference){
  .post-copy:not([hidden]){animation:post-copy-appear 180ms ease-out}
  @keyframes post-copy-appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
}

/* teammates' cursors — they are waiting for the paste */
.mates{position:absolute;inset:0;pointer-events:none}
.mate{position:absolute;opacity:0;transition:opacity .28s ease,transform .38s cubic-bezier(.2,.75,.25,1)}
.mate .p{display:inline-flex;align-items:flex-start;gap:2px;animation:idle 3.6s ease-in-out infinite alternate}
.mate svg{width:14px;height:16px}
.mate i{font-style:normal;font-size:11px;font-weight:500;color:#fff;
  padding:2px 7px;border-radius:4px 10px 10px 10px;margin-top:10px;line-height:1.4}
.mate.m1{left:calc(50% - 194px);top:80px;transform:translate(-18px,-12px)}
.mate.m2{left:calc(50% + 146px);top:76px;transform:translate(20px,-10px)}
.mate.m3{left:calc(50% + 96px);top:138px;transform:translate(16px,14px)}
.mate.m1 svg{fill:#7B61FF}.mate.m1 i{background:#7B61FF}
.mate.m2 svg{fill:#0FA958}.mate.m2 i{background:#0FA958}
.mate.m3 svg{fill:#FF8577}.mate.m3 i{background:#FF8577}
.mate.m2 .p{animation-delay:-1.2s}
.mate.m3 .p{animation-delay:-2.3s}
@keyframes idle{
  from{transform:translate(0,0)}
  33%{transform:translate(2.5px,-2px)}
  66%{transform:translate(-2px,1.5px)}
  to{transform:translate(1.5px,2.5px)}
}
@media (hover:hover) and (pointer:fine){
  .ctafig:hover ~ .mates .mate,.ctafig:focus-visible ~ .mates .mate{opacity:1;transform:translate(0,0)}
}

/* the CANVAS container, arriving at beat 4 — the app's own surface:
   cream with the dot grid, lifted off the glass page by an ambient shadow. */
.glass{
  position:absolute;left:50%;top:-24px;translate:-50% 0;
  width:min(820px,96%);height:calc(100% - var(--story-footer-height) + 34px);
  border-radius:30px;
  background-color:var(--canvas);
  background-image:radial-gradient(var(--dot) 1px,transparent 1px);
  background-size:20px 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 0 0 1px rgba(0,0,0,.07),
    0 24px 60px -12px rgba(0,0,0,.18);
  opacity:0;pointer-events:none;
}
:root:not([data-theme="light"]) .glass,:root[data-theme="dark"] .glass{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 0 1px rgba(0,0,0,.35),
    0 24px 60px -12px rgba(0,0,0,.5);
}

/* beat 2 · the audio focus card */
.focus{
  position:absolute;left:50%;top:190px;translate:-50% 0;z-index:6;
  width:min(480px,92%);padding:16px 20px 18px;border-radius:14px;
  background:var(--surface);border:1px solid var(--line);
  box-shadow:0 10px 28px rgba(0,0,0,.14);
  opacity:0;pointer-events:none;
}
.focus b{display:block;font-size:10px;font-weight:600;color:var(--warn);letter-spacing:.04em}
.focus q{quotes:"“" "”";display:block;font-size:20px;line-height:1.3;margin-top:4px}
.focus .wave{display:block;width:216px;height:32px;margin-top:12px}

/* beat 4 · annotations */
.ring{
  position:absolute;left:calc(50% + var(--card-w) * .475 + var(--gap) + 28px);
  top:calc(var(--card-h) * .92 + 74px);z-index:7;
  width:calc(var(--card-w) * .8);height:calc(var(--card-w) * .23);
  border:3px solid var(--warn);border-radius:50%;
  rotate:-2deg;opacity:0;pointer-events:none;
}
.arrow{position:absolute;left:calc(50% + var(--card-w) + var(--gap) + 28px);top:94px;z-index:7;
  width:120px;height:calc(var(--card-h) * .762);overflow:visible;opacity:0;pointer-events:none}
.arrow path{stroke:var(--warn);stroke-width:3;vector-effect:non-scaling-stroke}
.scribble{
  position:absolute;left:calc(50% + var(--card-w) + var(--gap));top:56px;z-index:7;
  font-family:var(--round);font-size:16px;color:var(--warn);rotate:-3deg;
  white-space:nowrap;opacity:0;pointer-events:none;
}

/* beat 5 · everything selected */
.marquee{
  position:absolute;left:50%;top:-12px;translate:-50% 0;z-index:8;
  width:min(860px,98%);height:calc(100% - var(--story-footer-height) + 26px);
  border:2px solid #0D99FF;opacity:0;pointer-events:none;
}
.marquee i{position:absolute;width:8px;height:8px;background:#fff;border:1px solid #0D99FF}
.marquee i:nth-child(1){left:-5px;top:-5px}
.marquee i:nth-child(2){right:-5px;top:-5px}
.marquee i:nth-child(3){left:-5px;bottom:-5px}
.marquee i:nth-child(4){right:-5px;bottom:-5px}

/* while the canvas beat is live, the layers are really grabbable */
.canvasmode .card{cursor:grab;touch-action:none}
.canvasmode .card:active{cursor:grabbing}
.extract{
  position:relative;
  display:flex;flex-direction:column;align-items:center;gap:clamp(12px,1.6vh,18px);
  width:100%;max-width:1200px;margin:0 auto;padding:0 var(--pad);
}
.cap{font-size:13.5px;color:var(--ink-3);text-align:center;max-width:52ch}
/* Read the narrative before the quieter invitation underneath it. */
.cap.scap{font-size:16px;line-height:1.5;color:var(--ink);text-wrap:balance}

/* A small story annotation sits across the phone's upper-right rim.
   Outside the bevel, its text and the phone's notch stay clear. */
.whose{
  position:absolute;z-index:2;top:-56px;
  right:max(20px,calc(50% - clamp(140px,13.5vw,190px) - 24px));
  rotate:4deg;
  font-family:var(--round);border-radius:14px;
  background:linear-gradient(155deg,
    color-mix(in srgb,var(--surface) 38%,transparent),
    color-mix(in srgb,var(--surface) 20%,transparent));
  backdrop-filter:blur(24px) saturate(150%);
  -webkit-backdrop-filter:blur(24px) saturate(150%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),
    0 0 0 1px color-mix(in srgb,var(--ink) 3%,transparent),
    0 4px 16px -10px rgba(0,0,0,.14);
}
/* Fine, static grain gives the small glass surface a frosted texture. */
.whose::before{content:"";position:absolute;inset:0;border-radius:inherit;
  pointer-events:none;opacity:.05;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E")}
#breakdown{margin-top:-42px;position:relative;z-index:3}
.whose-body{position:relative;display:flex;align-items:center;gap:10px;
  min-height:54px;padding:10px 12px;border-radius:inherit;
  font-size:11.5px;font-weight:500;line-height:1.38;
  color:var(--ink-2);white-space:nowrap}
.whose img{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:none}
.whose-copy{display:flex;flex-direction:column}
.whose b{font-size:13px;font-weight:400;color:var(--ink-2)}
@media (hover:hover) and (pointer:fine){
  .menus a:hover{color:var(--ink)}
  .btn:hover{filter:brightness(1.06)}
}

/* The app's onboarding bevel — EmptyStateView.bevel.
   A white wash, a white inner line, a lit top rim and a faint dark outer line.
   Oversized and cropped, exactly as the app crops it against the window. */
.bevel{
  --bw:clamp(280px,27vw,380px);
  position:relative;z-index:1;
  width:var(--bw);
  height:calc(var(--bw) * 0.94);                 /* selectable row + a decorative row in the fade */
  border-radius:calc(var(--bw) * 0.157) calc(var(--bw) * 0.157) 0 0;  /* 107/680; the bottom dissolves, so no corners there */
  background:linear-gradient(to bottom,
    color-mix(in srgb,var(--surface) 92%,transparent),
    color-mix(in srgb,var(--surface) 62%,transparent));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.55),
    inset 0 1.5px 0 rgba(255,255,255,.9),
    0 0 0 1px rgba(0,0,0,.05);
  -webkit-mask-image:linear-gradient(to bottom,#000 0,#000 60%,transparent 100%);
  mask-image:linear-gradient(to bottom,#000 0,#000 60%,transparent 100%);
}
:root:not([data-theme="light"]) .bevel,
:root[data-theme="dark"] .bevel{
  background:linear-gradient(to bottom,
    color-mix(in srgb,var(--surface) 88%,transparent),
    color-mix(in srgb,var(--surface) 55%,transparent));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    inset 0 1.5px 0 rgba(255,255,255,.18),
    0 0 0 1px rgba(0,0,0,.2);
}
.island{
  position:absolute;left:50%;translate:-50% 0;
  top:calc(var(--bw) * 0.029);
  width:17.6%;height:calc(var(--bw) * 0.05);
  border-radius:999px;background:color-mix(in srgb,var(--ink) 8%,transparent);
}

/* the recordings, on the bevel's own surface */
.library{position:absolute;left:7.5%;right:7.5%;top:calc(var(--bw) * 0.115);}
.libhdr{margin-bottom:9px}
.libhdr b{display:block;font-size:clamp(13px,1.35vw,16px);font-weight:600;letter-spacing:-.015em}
.libhdr span{display:block;font-size:clamp(9px,1vw,11px);color:var(--ink-3);margin-top:1px}
.roll{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;
  border-radius:10px 10px 0 0;overflow:hidden}
.cell{position:relative;margin:0;padding:0;border:0;background:none;display:block}
.cell.pick{cursor:pointer}
.cell.pick:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:2px}
/* the selection control: a ring when unpicked, a filled check when picked */
.cell .mark{
  position:absolute;right:5px;bottom:5px;
  width:19px;height:19px;border-radius:50%;
  background:rgba(0,0,0,.18);border:1.5px solid #fff;
  display:grid;place-items:center;
  transition:background .15s linear;
}
.cell .mark::after{
  content:"";width:9px;height:9px;
  background:#fff;opacity:0;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 6.4l3 3 6-6.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 6.4l3 3 6-6.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:opacity .15s linear;
}
.cell.pick[aria-pressed="true"] .mark{background:var(--accent)}
.cell.pick[aria-pressed="true"] .mark::after{opacity:1}
.cell img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;display:block}
.cell .app-name{position:absolute;top:0;left:0;right:0;padding:6px 6px 14px;
  color:#fff;font-size:10px;line-height:13px;font-weight:500;text-align:left;
  background:linear-gradient(rgba(0,0,0,.5),transparent);
  text-shadow:0 1px 3px rgba(0,0,0,.65);pointer-events:none}
.cell b{position:absolute;left:6px;bottom:4px;color:#fff;font-size:9.5px;font-weight:600;
  text-shadow:0 1px 2px rgba(0,0,0,.55)}

/* the board — this is the END state, rendered in HTML */
.board{position:relative;width:100%;display:flex;justify-content:center;z-index:2}
.lane{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:4}
.lane path{fill:none;stroke:var(--lane);stroke-width:1.5;stroke-dasharray:4 4}
.flow{list-style:none;display:flex;gap:var(--gap);justify-content:center;padding:30px 0 0}
.slot{position:relative;width:var(--card-w);display:flex;flex-direction:column}
.chip{
  position:absolute;left:50%;translate:-50% 0;top:calc(-40px + var(--offset) * 1px);
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  background:var(--surface);border:1px solid var(--line);border-radius:999px;
  height:24px;padding:0 12px 0 2px;font-size:13px;font-weight:500;line-height:1;
  box-shadow:0 1px 2px rgba(0,0,0,.08);z-index:5;
}
.chip.sug{border-style:dashed;box-shadow:none}
.chip .face{width:20px;height:20px;flex:none}

.label{font-size:12px;color:var(--ink-3);margin-bottom:5px}
/* the row continues — with the flow's REAL screens. JS builds them from the
   recording's extras; opacity falls with distance from the chosen three, which
   is the left/right gradient. Without JS they simply don't exist. */
.xtra{
  position:absolute;top:53px;width:var(--card-w);height:var(--card-h);
  border-radius:19px;overflow:hidden;opacity:0;pointer-events:none;z-index:1;
  border:1px solid rgba(0,0,0,.08);
}
.xtra img{width:100%;height:100%;object-fit:cover}
/* Names the empty board. On a plate, so it reads as a note about the whole
   canvas and not as a caption belonging to the middle slot it sits over. */
.waiting{position:absolute;left:50%;top:50%;translate:-50% -50%;z-index:3;
  margin:0;padding:7px 16px;border-radius:999px;
  background:var(--surface);border:1px solid var(--line);
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  font-size:13.5px;color:var(--ink-3);text-align:center;
  white-space:nowrap;pointer-events:none;opacity:0}
.armed .waiting{opacity:1}
.cardbox{position:relative;width:var(--card-w);height:var(--card-h)}
.ghost{position:absolute;inset:0;border-radius:19px;
  border:1px dashed color-mix(in srgb, var(--ink) 14%, transparent);
  background:color-mix(in srgb, var(--surface) 46%, transparent);
  opacity:0;transition:none}
.armed .ghost{opacity:1}
.armed .card{
  position:absolute;inset:0;width:var(--card-w);height:var(--card-h);
  border-radius:19px;overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:var(--card-shadow);
  transform-origin:50% 50%;
}
.card img{width:100%;height:100%;object-fit:cover;aspect-ratio:400 / 866;display:block}
.note{                                   /* Figma / app Voice Note: 236 × 35 */
  width:calc(var(--card-w) + 36px);margin:10px 0 0 -18px;
  background:var(--surface);
  border:1px solid var(--line);border-radius:9px;padding:4px 9px;
  box-shadow:0 1px 3px rgba(0,0,0,.09);
}
.note b{display:block;font-size:8px;font-weight:600;color:var(--warn);letter-spacing:.04em;line-height:1.3}
.note span{display:block;font-size:11px;line-height:1.3;margin-top:1px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}

/* Small screens: the canvas is wider than the phone, so let it bleed. */
@media (max-width:720px){
  :root{--card-max:150px;--story-footer-height:220px;--gap:16px}
  .note{margin-left:0}
  .chip{height:22px;font-size:11px;gap:4px;padding:0 7px 0 3px}
  .chip .face{width:14px;height:14px}
  .board{overflow:visible}
  .flow{justify-content:center;width:max-content;margin:0 auto}
  .note{width:100%}   /* full cell width at 150px cards */
}

/* ── bands ───────────────────────────────── */
.band{padding:clamp(80px,12vh,128px) var(--pad) 0;max-width:1200px;margin:0 auto}
.band h2{font-size:clamp(24px,3.4vw,34px);letter-spacing:-.022em}
.band > .lede{margin-top:10px;font-size:17px}

.steps{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:clamp(24px,4vw,40px);margin-top:56px}
.steps li{border-top:1px solid var(--line);padding-top:16px;display:flex;flex-direction:column;gap:12px}
.steps .n{font-family:var(--mono);font-size:12px;color:var(--ink-3)}
.steps h3{font-size:20px}
.steps p{color:var(--ink-2);font-size:16px}

.voice{background:transparent}
.voicecopy{display:flex;flex-direction:column;gap:16px;max-width:620px}
.voice h2{font-size:clamp(24px,3.4vw,34px)}
.voice .quiet{color:var(--ink-3);font-size:15px;max-width:58ch}

.details{margin-top:48px;border-top:1px solid var(--line)}
.details > div{display:grid;grid-template-columns:minmax(150px,210px) 1fr;gap:clamp(16px,4vw,40px);
  padding:22px 0;border-bottom:1px solid var(--line)}
.details dt{font-weight:500;font-size:17px}
.details dd{color:var(--ink-2);font-size:17px}
@media (max-width:640px){ .details > div{grid-template-columns:1fr;gap:6px} }

.close{display:flex;flex-direction:column;align-items:center;gap:64px;text-align:center}
.cta{background:color-mix(in srgb,var(--surface) 62%,transparent);
  border:1px solid var(--line);border-radius:24px;
  padding:clamp(34px,6vw,62px) clamp(24px,5vw,64px);
  display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;max-width:960px}
.cta > img{border-radius:12px}
.testimonials{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;width:100%;max-width:760px}
.makernote{display:flex;flex-direction:column;gap:8px;min-width:0}
.makernote blockquote{font-style:italic;color:var(--ink-2);font-size:17px;line-height:1.5}
.makernote figcaption{margin-top:auto;min-height:44px;display:flex;align-items:center;justify-content:center;gap:8px;
  font-size:14px;color:var(--ink-3)}
.quote-avatar{width:28px;height:28px;flex:none;border-radius:50%;object-fit:cover;border:1px solid var(--line)}
.quote-source{display:inline-flex;align-items:center;gap:4px;min-height:44px;
  color:inherit;text-decoration:none;white-space:nowrap}
.quote-source span:first-child{text-decoration:underline;text-underline-offset:3px}
@media (max-width:900px){.testimonials{grid-template-columns:1fr;max-width:620px}}

footer{max-width:1200px;margin:0 auto;padding:64px var(--pad) 72px;
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  border-top:1px solid var(--line);margin-top:clamp(80px,12vh,128px);
  font-size:13px;color:var(--ink-3)}
footer nav{display:flex;gap:20px}
footer a{text-decoration:none}

/* Download handoff — native dialog supplies focus containment and Escape. */
.download-dialog-open{overflow:hidden}
.download-dialog{margin:auto;width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 32px);
  overflow:auto;padding:0;border:1px solid var(--line);border-radius:24px;
  background:var(--surface);color:var(--ink);box-shadow:0 24px 80px #0003}
.download-dialog::backdrop{background:rgba(20,20,25,.28);backdrop-filter:blur(8px)}
.download-bar{display:flex;align-items:center;justify-content:space-between;padding:6px 8px 6px 24px;
  border-bottom:1px solid var(--line);font-size:13px;color:var(--ink-2)}
.download-close{width:44px;height:44px;border:0;background:none;color:var(--ink-2);font-size:26px;cursor:pointer}
.download-body{padding:28px;display:flex;flex-direction:column;gap:16px}
.download-body img{border-radius:12px}
.download-body h2{font-size:26px;line-height:1.15;letter-spacing:-.6px;text-wrap:balance}
.download-body p{font-size:15px;color:var(--ink-2)}
.download-body form{display:flex;flex-direction:column;gap:12px;margin-top:8px}
.download-body form[hidden]{display:none}
.download-body label{font-size:14px;font-weight:500}
.download-body input{width:100%;min-height:48px;padding:12px 14px;border:1px solid var(--line);
  border-radius:12px;background:var(--canvas);color:var(--ink);font:inherit;font-size:16px}
.download-body .btn{width:100%;min-height:48px;justify-content:center;cursor:pointer}
.download-body .btn:disabled{opacity:.65;cursor:wait}
.download-body .download-help{font-size:13px}
.download-feedback:empty{display:none}
@media (hover:hover) and (pointer:fine){
  .download-close:hover{color:var(--ink)}
}
@media (prefers-reduced-motion:no-preference){
  .download-dialog[open]{animation:download-appear 180ms ease-out}
  @keyframes download-appear{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
}

/* ── motion ───────────────────────────────── */
/* JS adds .armed once it has measured and can safely rewind to progress 0.
   Without JS, or before measurement, the board simply shows its end state. */
.armed .card,
.armed .ghost,
.armed .chip,
.armed .note,
.armed .label{will-change:transform,opacity}
.armed .lane path{opacity:0}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .mark,.mark::after{transition:none}
  .caret path{animation:none}
  .narrative-arrow-wheel{animation:none;transform:translateZ(calc(-1 * var(--arrow-radius))) rotateX(0deg)}
  .mate .p{animation:none}
  .zone{height:auto}
  .storyzone{padding-bottom:0}
  .stage{position:static}
  .focus,.ring,.arrow,.scribble,.marquee,.glass,.ctafig{display:none}
  .scap{opacity:0}
  .scap[data-beat="0"]{opacity:1}
  .armed .card,.armed .chip,.armed .note,.armed .label{transform:none !important;opacity:1 !important;clip-path:none !important}
  .armed .ghost,.armed .waiting{opacity:0 !important}
  .armed .lane path{opacity:1}
}
