/* ProveFox landing r3 — loads AFTER landing.css. Spec: specs/landing-motion/02-spec.md v3.0.
   Colours are landing.css tokens; motion tokens are specs/provefox/04-motion.md §2.
   Animated properties: transform and opacity only (AC-62). */

:root {
  --dur-instant: 90ms; --dur-fast: 160ms; --dur-base: 240ms; --dur-slow: 380ms;
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-inout: cubic-bezier(.65,0,.35,1);
  /* zeta=.72 omega=12.0 — overshoot 3.8% (04-motion.md §2) */
  --ease-spring-soft: linear(0.0000 0%, 0.0978 4%, 0.3028 8%, 0.5243 12%, 0.7152 17%,
    0.8578 21%, 0.9521 25%, 1.0063 29%, 1.0316 33%, 1.0384 38%, 1.0350 42%, 1.0272 46%,
    1.0187 50%, 1.0113 54%, 1.0057 58%, 1.0020 62%, 0.9998 67%, 0.9988 71%, 0.9985 75%,
    0.9986 79%, 0.9989 83%, 0.9993 88%, 0.9996 92%, 0.9998 96%, 0.9999 100%);
  --stagger-tight: 40ms; --stagger-wide: 70ms; --rise-sm: 6px;
  --teal-text: #0F766E;   /* 5.23:1 on --cloud, 5.74:1 on --white */
}
/* reduced motion: 1ms, not 0s, so transitionend still fires (AC-85) */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-instant: 1ms; --dur-fast: 1ms; --dur-base: 1ms; --dur-slow: 1ms; --rise-sm: 0px; --stagger-tight: 0ms; --stagger-wide: 0ms; }
}
html.rm { --dur-instant: 1ms; --dur-fast: 1ms; --dur-base: 1ms; --dur-slow: 1ms; --rise-sm: 0px; --stagger-tight: 0ms; --stagger-wide: 0ms; }

/* ---------- S1 hero: navy, the 00-hero scene as a plate (AC-09, AC-144) ---------- */
.hero { position: relative; overflow: hidden; }
.hero-plate { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; object-position: 78% 50%; }
.hero .wrap { display: block; position: relative; }
.hero-copy { max-width: 560px; }
.hero-who { font-size: 15px !important; color: #CBD5E1; margin: 24px 0 0 !important; max-width: 52ch; }
.hero-who strong { color: var(--cloud); }
/* overlay only from 1100 px: below that a cover crop slides the lit lamp under the words
   (measured 1.63:1 at 861 px, AC-144), so 861-1099 keeps the stacked band */
@media (min-width: 600px) and (max-width: 1099px) { .hero-plate { aspect-ratio: 2 / 1; } }
@media (min-width: 1100px) {
  .hero { min-height: 600px; display: grid; align-items: center; }
  .hero-plate { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; object-position: 100% 50%; }
  /* scrim: the words sit on navy, not on the art (measured, AC-144) */
  .hero::before { content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, var(--navy) 0%, var(--navy) 38%, rgba(15,23,42,.85) 48%, rgba(15,23,42,0) 64%); }
  /* the column never reaches the lit lamp: measured 1.63:1 at 861 px before this cap (AC-144) */
  .hero-copy { max-width: min(560px, 42vw); }
  .hero .wrap { z-index: 2; width: 100%; padding-block: 56px 64px; }
}
/* the tutor's line: words fade in once (AC-12) */
.hero-say { margin: 0 0 20px; font-size: 18px; font-weight: 700; color: var(--teal); max-width: 34ch; }
.hero-say .w { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
.is-on .hero-say .w, html.rm .hero-say .w, html:not(.js) .hero-say .w { opacity: 1; }
.is-on .hero-say .w:nth-child(2) { transition-delay: calc(var(--stagger-tight) * 1); }
.is-on .hero-say .w:nth-child(3) { transition-delay: calc(var(--stagger-tight) * 2); }
.is-on .hero-say .w:nth-child(4) { transition-delay: calc(var(--stagger-tight) * 3); }
.is-on .hero-say .w:nth-child(n+5) { transition-delay: calc(var(--stagger-tight) * 4); }

/* ---------- shared ---------- */
.band h2 { margin-bottom: 8px; }
.lede { max-width: 58ch; margin: 0 auto 28px; text-align: center; font-size: 18px; }
.pull, .step__pull { font-size: 19px; font-weight: 700; }
.screen { width: 100%; max-width: 390px; border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; font-size: 17px; line-height: 1.35; }
.screen.kid { background: var(--navy); color: #E2E8F0; }
.screen.par { background: var(--cloud); color: var(--slate); border: 1px solid var(--hair); }
.screen__cap { font-size: 15px; color: var(--muted); text-align: center; margin: 0; max-width: 44ch; }
.screen__note { font-size: 15px; color: #94A3B8; padding: 0 14px 16px; margin: 0; }
.show { display: grid; gap: 12px; justify-items: center; }

.bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0B1220; border-bottom: 1px solid #334155; }
.bar .tile { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); flex: none; display: grid; place-items: center; }
.bar .tile img { width: 32px; height: 32px; object-fit: contain; }
.bar b { display: block; font-size: 17px; color: #F8FAFC; }
.bar span { display: block; font-size: 14px; color: var(--teal); }

.thread { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.b { max-width: 84%; padding: 9px 13px; border-radius: 16px; margin: 0; }
.b.t { align-self: flex-start; background: var(--slate); border: 1.5px solid var(--teal); color: #F1F5F9; }
.b.c { align-self: flex-end; background: var(--amber); color: var(--navy); }
.b strong { font-weight: 800; }
.b.t strong { color: var(--teal); }
.paper { background: #FFF3E0; color: var(--navy); border-radius: 12px; padding: 8px 12px;
  background-image: repeating-linear-gradient(transparent 0 25px, #E9CFA8 25px 26px);
  font: 700 16px/26px ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace; }
.paper .ln { display: block; }
.b.photo { align-self: flex-end; width: 62%; background: var(--amber); padding: 5px; }

/* ---------- S2 the session ---------- */
.sess-band { background: var(--white); }
.sess { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; grid-template-areas: "art" "chat" "text" "ctl"; max-width: 1080px; margin-inline: auto; }
.sess__art { grid-area: art; position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--navy); }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-inout); }
.scene.is-cur { opacity: 1; animation: cut var(--dur-slow) var(--ease-inout) 1; }
@keyframes cut { from { transform: scale(1.02); } to { transform: scale(1); } }
.sess.no-anim .scene, .sess.no-anim .scene.is-cur { transition: none; animation: none; }

.sess__steps { grid-area: text; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step > :last-child { margin-bottom: 0; }
.step__n { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--teal-text); letter-spacing: .02em; }
.step h3 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.step p { margin: 0 0 10px; max-width: 48ch; }
/* playing: one step at a time. Reduced motion and no-JS: all five listed (AC-169, AC-170).
   story.js measures the tallest step once (.is-measuring) and holds that height, so a step swap moves nothing (AC-124). */
html.js:not(.rm) .sess:not(.is-rm) .step:not(.is-cur) { display: none; }
.sess.is-measuring .step { display: block !important; grid-area: 1 / 1; visibility: hidden; }
.sess.is-rm .step, html:not(.js) .step { padding-left: 14px; border-left: 4px solid var(--hair); }
.sess.is-rm .step.is-cur { border-left-color: var(--teal-text); }

.sess__chat { grid-area: chat; justify-self: center; }
.sess__chat .thread { height: min(340px, 42svh); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
html:not(.js) .sess__chat .thread { height: auto; max-height: none; }
.sess__chat .thread:focus-visible { outline: 3px solid var(--cloud); outline-offset: -3px; }
.b.is-later { display: none; }
.b.is-new { animation: arrive var(--dur-base) var(--ease-out) 1 both; }
@keyframes arrive { from { opacity: 0; transform: translate3d(0, var(--rise-sm), 0); } to { opacity: 1; transform: none; } }
.typing { display: flex; gap: 5px; padding: 13px 14px; }
.typing[hidden] { display: none; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: dot 1.2s var(--ease-inout) infinite; }
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
@keyframes dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.sess.is-paused .typing i { animation-play-state: paused; }

/* controls (AC-160..AC-168). Below 861 px the bar is sticky to the viewport bottom (AC-167). */
/* flex:none + wrap: shrinking buttons under 44 px would hide a target-size failure from an
   overflow probe. Below ~360 px the play/replay pair wraps to a second row (measured at 320). */
.sess__ctl { grid-area: ctl; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  padding: 8px; background: var(--white); border-top: 1px solid var(--hair); }
.sess__ctl[hidden] { display: none; }
.ctl__steps, .ctl__media { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; flex: none; max-width: 100%; }
.sess__ctl button { flex: none; }
.sess__ctl button { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font: 700 17px/1 var(--font); cursor: pointer; }
.ctl__n { background: var(--white); color: var(--navy); border: 2px solid var(--edge); }        /* edge 4.76:1 on white */
.ctl__n[aria-current="step"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ctl__ic { background: var(--white); color: var(--navy); border: 2px solid var(--navy); }
.ctl__ic svg { width: 16px; height: 16px; display: block; }
.ctl__play .i-play { display: none; }
.ctl__play[aria-pressed="true"] .i-pause { display: none; }
.ctl__play[aria-pressed="true"] .i-play { display: block; }
.sess.is-rm .ctl__ic { display: none; }
.sess__ctl button:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

@media (max-width: 860px) {
  .sess__ctl { position: sticky; bottom: 0; z-index: 3; margin-inline: -16px; box-shadow: 0 -6px 12px rgba(15,23,42,.08); }
  .sess__art { aspect-ratio: 16 / 10; }
}
@media (min-width: 861px) {
  .sess { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "art chat" "text chat" "ctl chat";
    grid-template-rows: auto 1fr auto; column-gap: 48px; align-items: start; }
  .sess__ctl { justify-content: flex-start; border-top: 0; padding: 0; }
  .sess__chat { max-width: 400px; align-self: start; }
  .sess__chat .thread { height: 520px; }
}

/* ---------- S3 earned ---------- */
.pair { display: grid; gap: 24px; align-items: center; }
.pair__say h2 { text-align: left; }
.pair__say p { max-width: 46ch; }
.pair__art, .pair__fig img { width: 100%; border-radius: 16px; }
.pair__fig { margin: 0; }
.pair__fig figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
.pair__h { font-size: 20px; margin: 0; text-align: center; }
/* S3 "Change look", ported from the intro video's shot 13 (#434): the teal cap drops onto Leo.
   Video springs swapped for the page tokens (04-motion.md: no pop, burst or rotate on a badge). */
.look { position: relative; overflow: hidden; display: grid; justify-items: center; padding: 6px 14px 0; }
.look::before { content: ""; position: absolute; left: 50%; top: 170px; width: 190px; height: 50px; margin-left: -95px;
  border-radius: 50%; background: radial-gradient(closest-side, #1d3b4a, transparent); }
.look__fig { position: relative; width: 160px; aspect-ratio: 160 / 216; }
.look__fig img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.look__drop { opacity: 0; transform: translate3d(0, -45%, 0);
  transition: transform var(--dur-slow) var(--ease-spring-soft) var(--look-1), opacity var(--dur-fast) var(--ease-out) var(--look-1); }
.look__done { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out) var(--look-2); }
.look__base { transition: opacity var(--dur-fast) var(--ease-out) var(--look-2); }
.look__earn { margin: 10px 0 0; padding: 7px 14px; border-radius: 99px; background: #13203a; border: 1.5px solid var(--teal);
  font-size: 14px; font-weight: 600; color: #E2E8F0; text-align: center;
  opacity: 0; transform: translate3d(0, var(--rise-sm), 0);
  transition: opacity var(--dur-base) var(--ease-out) var(--look-3), transform var(--dur-base) var(--ease-out) var(--look-3); }
.look__earn b { color: #fff; }
.look__pick { padding: 12px 14px 4px; }
.look__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.look__chips span { padding: 5px 10px; border-radius: 99px; background: var(--slate); color: #CBD5E1; }
.look__chips .on { background: var(--amber); color: var(--navy); }
@media (max-width: 360px) { .look__chips { gap: 4px; } .look__chips span { padding: 5px 8px; } }
.look__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.look__tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 112px; padding: 6px; border-radius: 14px; background: var(--slate); border: 2px solid #334155; text-align: center; }
.look__tile img { width: 56px; height: auto; }
.look__tile b { font-size: 13px; color: #fff; }
.look__tile span { font-size: 11px; line-height: 1.2; color: #94A3B8; }
.look__tile.on { border-color: var(--amber); }
.look__tile.on::after { content: ""; position: absolute; inset: -2px; border-radius: 14px; box-shadow: 0 0 22px rgba(245,158,11,.5);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out) var(--look-3); }
:root { --look-1: 320ms; --look-2: 700ms; --look-3: 760ms; }
.is-on .look__drop { opacity: 1; transform: none; }
.is-on .look__done, .is-on .look__earn, .is-on .look__tile.on::after { opacity: 1; }
.is-on .look__earn { transform: none; }
.is-on .look__base { opacity: 0; }
/* reduced motion and no-JS: the end state at first paint */
html.rm .look__done, html:not(.js) .look__done, html.rm .look__earn, html:not(.js) .look__earn,
html.rm .look__tile.on::after, html:not(.js) .look__tile.on::after { opacity: 1; transform: none; }
html.rm .look__base, html:not(.js) .look__base, html.rm .look__drop, html:not(.js) .look__drop { opacity: 0; }
html.rm { --look-1: 0ms; --look-2: 0ms; --look-3: 0ms; }
@media (prefers-reduced-motion: reduce) { :root { --look-1: 0ms; --look-2: 0ms; --look-3: 0ms; } }
.badge { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  background: var(--slate); border: 1px solid #334155; border-radius: 16px; padding: 12px 14px; margin: 10px 14px 14px; }
.badge .rosette { width: 56px; height: 70px; }
.badge b { display: block; font-size: 16px; color: #F8FAFC; }
.badge span { display: block; font-size: 15px; color: var(--teal); }

/* ---------- S4 the honest week ---------- */
.par-band { background: var(--white); }
.pair--in { margin-top: 32px; }
.pcard { background: var(--white); border: 1px solid var(--hair); border-radius: 16px; padding: 16px; margin: 14px; color: var(--slate); }
.pcard h3 { margin: 0 0 10px; font-size: 17px; color: var(--navy); }
.pcard p { margin: 10px 0 0; font-size: 16px; }
.legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { opacity: 1 !important; width: 12px; height: 12px; }
.week .dot { opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.is-on .week .dot, html.rm .week .dot, html:not(.js) .week .dot { opacity: 1; }
.is-on .week div:nth-child(2) .dot { transition-delay: calc(var(--stagger-wide) * 1); }
.is-on .week div:nth-child(3) .dot { transition-delay: calc(var(--stagger-wide) * 2); }
.is-on .week div:nth-child(4) .dot { transition-delay: calc(var(--stagger-wide) * 3); }
.is-on .week div:nth-child(n+5) .dot { transition-delay: calc(var(--stagger-wide) * 4); }
.thread--short { padding: 14px; }
.cheer { background: #FFF3E0; color: var(--navy); border-radius: 16px; border-left: 5px solid var(--amber); padding: 12px 14px; }
.cheer small { display: block; font-size: 14px; font-weight: 700; color: var(--teal-text); margin-bottom: 4px; }
.cheer p { margin: 0; font-size: 17px; }
.privline { max-width: 62ch; margin: 40px auto 0; text-align: center; font-size: 17px; }
.privline a { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal-text); font-weight: 700; }

/* one-shot entrances for S3/S4 (fx-rise; settle once, never pop) */
.fx-rise { opacity: 0; transform: translate3d(0, var(--rise-sm), 0);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.is-on .fx-rise, html.rm .fx-rise, html:not(.js) .fx-rise { opacity: 1; transform: none; }
.is-on .cheer.fx-rise { transition-delay: 320ms; }
.is-on .fx-settle { animation: settle var(--dur-base) var(--ease-spring-soft) 1; }
@keyframes settle { from { transform: scale(.96); } to { transform: scale(1); } }
html.rm .fx-settle { animation: none; }

@media (min-width: 861px) {
  .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 56px; }
  .pair--flip { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
  .pair--flip > .pair__fig { order: 2; }
}

/* ---------- S5 tour (round 1, unchanged) ---------- */
.tour { max-width: 760px; margin-inline: auto; }
[hidden] { display: none !important; }   /* the hidden attribute always wins over layout rules (#431 tour, nav link) */
.tour__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--navy); display: grid; place-items: center; }
.tour__frame img, .tour__frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour__play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(15,23,42,.55);
  color: var(--cloud); font: 700 18px/1.2 var(--font); display: grid; place-items: center; gap: 8px; cursor: pointer; align-content: center; }
.tour__play .disc { width: 64px; height: 64px; border-radius: 50%; background: var(--amber); color: var(--navy); display: grid; place-items: center; }
.tour__note { font-size: 15px; color: var(--muted); margin: 10px 0 0; }
.chapters { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.chapters .ch { display: flex; align-items: center; min-height: 44px; gap: 10px; width: 100%; padding: 0; border: 0;
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.chapters .t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--teal-text); min-width: 4.5ch; }

/* ---------- S6 pricing + pilot ---------- */
.sub-h { font-size: 22px; text-align: center; margin: 28px 0 14px; }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin-inline: auto; }
.card h4 { font-size: 20px; margin: 0 0 8px; }
@media (max-width: 860px) {
  .cards--2 { grid-template-columns: 1fr; }
  .lede { font-size: 16px; }
}
