/* The landing (owner, 12.10.2026): one story told by scrolling — the launch folds into Kit,
   the scroll becomes a craving that rises and passes, the count climbs. Pinned scenes are
   tall sections with a sticky viewport; landing.js maps scroll to a 0…1 progress per scene.
   Motion is transform, opacity and SVG attributes only. */

body.landing { padding: 0; overflow-x: hidden; }

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  transition: background .4s, color .4s;
}
.bar .mark { font-size: 22px; }
.bar.on-panel .mark span { color: var(--on-brand); }
.bar.solid { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bar-cta {
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--surface);
  background: var(--ink); padding: 9px 16px; border-radius: 999px;
}

.kicker { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }

.scene { position: relative; height: var(--len); }
.pin { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }

/* --- 1. Open --- */
.panel {
  position: absolute; left: 0; top: 0; width: 100vw; height: 100vh;
  background: var(--brand); transform-origin: 0 0; will-change: transform, border-radius;
  display: flex; align-items: center; justify-content: center;
}
.panel-face { width: min(62vmin, 520px); height: auto; overflow: visible; transform-origin: 50% 50%; will-change: transform; }
.panel-face .pf-eye { transform-box: fill-box; transform-origin: center; transition: transform 70ms ease-in; }
.panel.blink .pf-eye { transform: scaleY(.08); }
.open-title {
  position: absolute; left: max(24px, calc((100vw - 1180px) / 2)); bottom: 9vh; margin: 0;
  font-family: Fraunces, Georgia, serif; font-weight: 600; color: var(--on-brand);
  font-size: clamp(64px, 11vw, 168px); line-height: .9; letter-spacing: -0.03em;
}
.open-hint {
  position: absolute; right: max(24px, calc((100vw - 1180px) / 2)); bottom: 10vh; margin: 0;
  color: var(--on-brand); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .8;
  animation: nudge 2.2s ease-in-out infinite;
}
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.open-kit { position: absolute; inset: 0; pointer-events: none; }
.open-kit svg { position: absolute; width: min(46vh, 380px); height: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); overflow: visible; }
.open-copy {
  position: absolute; left: max(24px, calc((100vw - 1180px) / 2)); bottom: 12vh; max-width: 30rem;
  opacity: 0; transform: translateY(24px);
}
.open-copy h2, .count-copy h2, .end h2, .wave-title {
  font-family: Fraunces, Georgia, serif; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 14px;
}
.open-copy h2 { font-size: clamp(44px, 6vw, 84px); line-height: .95; }
.open-copy p, .count-copy p { font-size: 19px; color: var(--ink-muted); margin: 0; }
.count-copy .kicker, .wave-head .kicker { font-size: 12px; color: var(--accent); margin: 0 0 14px; }

/* --- 2. Wave --- */
.wave-head { position: absolute; top: 10svh; left: 0; right: 0; text-align: center; padding: 0 24px; z-index: 2; }
.wave-title { font-size: clamp(44px, 6.4vw, 92px); line-height: 1; transition: opacity .3s; }
.wave-line { color: var(--ink-muted); font-size: 19px; font-style: italic; margin: 0; transition: opacity .3s; }
/* In the heading's flow, not pinned at its own height: a sub-line that wraps on a small
   phone pushes the clock down instead of running into it. */
.clock {
  margin-top: 2svh;
  font-family: Sansation, Geologica, sans-serif; font-weight: 700; font-size: clamp(64px, 11vw, 150px);
  line-height: 1; color: var(--ink);
}
/* Numbers are Sansation (the brand's rule), one fixed cell per digit — see `steady()`. */
.digit { display: inline-block; width: .6em; text-align: center; }
.colon { display: inline-block; width: .3em; text-align: center; }
.sea { position: absolute; left: 0; bottom: 0; width: 100%; height: calc(100lvh - 48svh); }
.sea-1 { fill: var(--brand); opacity: .32; }
.sea-2 { fill: var(--brand); opacity: .2; }
.sea-3 { fill: var(--brand); opacity: .12; }
.flood { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.flood path { fill: var(--brand); }
.wave-head .kicker, .wave-title, .wave-line, .clock { transition: color .4s, opacity .3s; }
.flooded .wave-head .kicker, .flooded .wave-title, .flooded .clock { color: var(--on-brand); }
.flooded .wave-line { color: color-mix(in srgb, var(--on-brand) 78%, transparent); }
.rider { position: absolute; left: 50%; top: 0; width: 1px; height: 1px; z-index: 3; }
.rider svg { position: absolute; width: min(24svh, 220px); height: auto; left: 0; bottom: 0; transform: translateX(-50%); overflow: visible; }

/* --- 3. Count --- */
#count {
  --w: calc(var(--wet, 0) * 100%);
  background: color-mix(in srgb, var(--brand) var(--w), var(--surface));
  /* On the flood's terracotta the words are the app's held-screen cream; they turn back into the
     page's ink as the water drains. */
  --c-ink: color-mix(in srgb, var(--on-brand) var(--w), var(--ink));
  --c-muted: color-mix(in srgb, color-mix(in srgb, var(--on-brand) 80%, transparent) var(--w), var(--ink-muted));
  --c-accent: color-mix(in srgb, var(--on-brand) var(--w), var(--accent));
  --tick-off: color-mix(in srgb, color-mix(in srgb, var(--on-brand) 30%, transparent) var(--w), var(--line));
  color: var(--c-ink);
}
#count .count-copy p, #count .arch-num .u { color: var(--c-muted); }
#count .kicker { color: var(--c-accent); }
#count .pin { display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: 1180px; margin: 0 auto; padding: 0 24px; gap: 40px; }
.arch-wrap { position: relative; grid-column: 2; grid-row: 1; }
.arch { width: 100%; height: auto; overflow: visible; }
.arch line { stroke-width: 5; stroke-linecap: round; transition: stroke .25s; }
.arch-num { position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; }
.arch-num .n { display: block; font-family: Sansation, Geologica, sans-serif; font-weight: 700; font-size: clamp(80px, 11vw, 160px); line-height: .9; }
.arch-num .u { color: var(--ink-muted); font-size: 16px; }
.count-copy { grid-column: 1; grid-row: 1; max-width: 30rem; }
.count-copy h2 { font-size: clamp(40px, 5vw, 70px); line-height: 1; }
.count-kit { position: absolute; right: max(24px, calc((100vw - 1180px) / 2)); bottom: 7vh; width: 1px; height: 1px; }
.count-kit svg { position: absolute; width: min(24vh, 220px); height: auto; right: 0; bottom: 0; overflow: visible; }

/* --- 4. End --- */
.end { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.end-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; text-align: center; padding: 96px 24px 56px; }
.end-kit { position: relative; }
.end-kit svg { width: min(26vh, 260px); height: auto; overflow: visible; }
.end h2 { font-size: clamp(48px, 7vw, 104px); line-height: 1; margin-top: 24px; text-wrap: balance; }
.cta {
  display: inline-block; margin-top: 18px; padding: 20px 32px; border-radius: 999px;
  background: var(--ink); color: var(--surface); font-weight: 600; font-size: 18px; text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.cta:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--kit-ink) 45%, transparent); }
.cta-note { color: var(--ink-faint); font-size: 14px; margin-top: 16px; }
html[data-preorder="soon"] .preorder { opacity: .6; pointer-events: none; }

.foot {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-faint); font-size: 14px;
}
.foot a { color: var(--ink-muted); text-decoration: none; }

/* --- Kit --- */
.kit { --kit-body: var(--brand); }
.kit.mood-calm { --kit-body: var(--kit-calm); }
.kit.mood-holding { --kit-body: var(--kit-holding); }
.kit.mood-glad { --kit-body: var(--kit-glad); }
.kit .shadow { fill: var(--kit-ink); opacity: .09; transform-box: fill-box; transform-origin: center; }
.kit .limbs path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: var(--undrawn, 0); }
/* "1 2", not "1": with a gap no longer than the path, the undrawn limb leaves a zero-length dash at its end, and a round cap paints it as a dot. */
.kit .body { fill: var(--kit-body); stroke: var(--ink); stroke-width: 2.2; stroke-opacity: var(--edge, 1); transition: fill .6s ease; }
.kit .white { fill: var(--kit-eye); stroke: var(--kit-ink); stroke-width: 2; }
.kit .pupil { fill: var(--kit-ink); }
.kit .eyes-glad path, .kit .brows path { fill: none; stroke: var(--kit-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.kit .mouth { fill: none; stroke: var(--kit-ink); stroke-width: 2.4; stroke-linecap: round; }
.kit .m-open { fill: var(--kit-ink); stroke: none; }
.kit .eyes-glad, .kit .brows, .kit .m-flat, .kit .m-open, .kit .m-talk { opacity: 0; }
/* Talking: one small open mouth that opens and closes while his bubble types. */
.kit .m-talk { fill: var(--kit-ink); transform-box: fill-box; transform-origin: center; }
.kit.talking .mouth { opacity: 0 !important; }
.kit.talking .m-talk { opacity: 1; animation: talk .2s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.kit .eyes-glad, .kit .brows, .kit .mouth, .kit .eyes-open { transition: opacity .3s; }
.kit.mood-glad .eyes-open, .kit.mood-glad .m-smile, .kit.mood-holding .m-smile { opacity: 0; }
.kit.mood-glad .eyes-glad, .kit.mood-glad .m-open, .kit.mood-holding .brows, .kit.mood-holding .m-flat { opacity: 1; }
.kit .arm-l, .kit .arm-r { transform-box: view-box; transition: transform .8s cubic-bezier(.34,1.4,.64,1); }
.kit .arm-l { transform-origin: 32px 80px; }
.kit .arm-r { transform-origin: 88px 80px; }
.kit.mood-holding .arm-l { transform: rotate(-22deg); }
.kit.mood-holding .arm-r { transform: rotate(22deg); }
.kit.mood-glad .arm-l { transform: rotate(125deg); }
.kit.mood-glad .arm-r { transform: rotate(-125deg); }
.kit.waving .arm-r { animation: wave 1.6s cubic-bezier(.45,0,.55,1); }
@keyframes wave { 0% { transform: rotate(0); } 25% { transform: rotate(-140deg); } 40% { transform: rotate(-118deg); } 55% { transform: rotate(-145deg); } 70% { transform: rotate(-120deg); } 100% { transform: rotate(0); } }
.kit .eye { transform-box: fill-box; transform-origin: center; transition: transform 70ms ease-in; }
.kit.blink .eye { transform: scaleY(.08); }
.kit .fig { transform-box: view-box; transform-origin: 60px 140px; }
.kit .breath { transform-box: view-box; transform-origin: 60px 132px; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 45% { transform: scale(1.015, 1.035); } }
.kit.mood-glad .fig { animation: hop 1.1s cubic-bezier(.45,0,.55,1) infinite; }
.kit.mood-glad .shadow { animation: shadow 1.1s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1.03, .97); } 15% { transform: translateY(0) scale(.97, 1.03); } 50% { transform: translateY(-12px); } 85% { transform: translateY(0) scale(1.03, .97); } }
@keyframes shadow { 0%, 100% { transform: scale(1); opacity: .09; } 50% { transform: scale(.72); opacity: .05; } }

/* --- Kit's words: a comic bubble with his ink edge, its tail pointing at his head --- */
.say {
  position: absolute; left: 0; top: 0; z-index: 15; width: max-content; max-width: min(260px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 18px; background: var(--surface-card); color: var(--ink);
  border: 2px solid var(--ink); font-size: 17px; font-weight: 600; line-height: 1.3;
  opacity: 0; transform: scale(.6); pointer-events: none; will-change: transform, opacity;
  transition: opacity .2s, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.say.on { opacity: 1; transform: scale(1); }
.say::after {
  content: ""; position: absolute; bottom: -9px; width: 14px; height: 14px; background: inherit;
  border: 2px solid var(--ink); border-top: 0; border-left: 0; transform: rotate(45deg); left: var(--tail, 22px);
  border-radius: 0 0 4px 0;
}
.say[data-side="left"]::after { bottom: auto; left: auto; top: calc(50% - 7px); right: -9px; transform: rotate(-45deg); }
.say[data-side="beside"]::after { bottom: auto; top: calc(50% - 7px); left: -9px; transform: rotate(135deg); }
.say .ghost { visibility: hidden; }

@media (max-width: 860px) {
  .say { font-size: 15px; padding: 10px 14px; }
  /* Room over his head for his last line, below the bar. */
  .end-body { padding-top: 150px; }
  .end-kit svg { width: min(20vh, 180px); }
  /* Kit stands under the copy here; the room he and his bubble need is kept free. */
  #count .pin { grid-template-columns: 1fr; align-content: center; gap: 12px; padding-bottom: 22vh; }
  .arch-wrap { grid-column: 1; grid-row: 1; max-width: 420px; justify-self: center; width: 100%; }
  .count-copy { grid-row: 2; }
  .count-kit { bottom: 4vh; }
  .count-kit svg { width: 21vh; }
  .open-copy { bottom: 8vh; right: 24px; }
  .open-kit svg { width: min(36vh, 300px); top: 40%; }
}

/* A phone on its side: the title would sit on the big face's mouth. */
@media (max-height: 500px) and (orientation: landscape) {
  .open-title { font-size: clamp(40px, 8vw, 72px); bottom: 6vh; }
  .panel-face { width: min(52vmin, 520px); }
}

@media (prefers-reduced-motion: reduce) {
  .kit.talking .m-talk { animation: none; }
  .kit .breath, .kit.mood-glad .fig, .kit.mood-glad .shadow, .kit.waving .arm-r, .open-hint { animation: none; }
  .say, .kit .arm-l, .kit .arm-r, .kit .body, .kit .eyes-open, .kit .eyes-glad, .kit .mouth { transition: none; }
}
