/* lampwise.com: the game's lantern paper-cut world (colours from game/scripts/ui.gd and the
   game's own screens). Motion is transform/opacity only and settles to a still page under
   prefers-reduced-motion. Fonts are Latin subsets made with fonttools (see site/README.md). */
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces.woff2?v=a1e67002") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/Fraunces-Italic.woff2?v=e9227b5f") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito.woff2?v=5f1feed0") format("woff2"); font-weight: 500 900; font-style: normal; font-display: swap; }

:root {
  --night: #18214a;
  --night-mid: #26306a;
  --horizon: #4a5c98;
  --lavender: #455792;
  --teal: #3d6a81;
  --green: #4a846e;
  --ink: #23305a;
  --ink-soft: #4a4f73;
  --paper: #fbf1dc;
  --paper-hi: #fffaf0;
  --line: #e3d2b0;
  --on-night: #f6ebd3;
  --on-night-soft: #dcd7ec;
  --gold: #f6c453;
  --gold-text: #ffe3a3;
  --accent: #e3a234;
  --terracotta: #9a3b24;
  --button: #b44a30;
  --button-hi: #a3402a;
  --shadow: rgba(10, 15, 46, 0.38);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-weight: 600; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta); text-underline-offset: .18em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.paper :focus-visible, .wheel :focus-visible, .field :focus-visible, .puzzle-after :focus-visible { outline-color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; font-variation-settings: "opsz" 48, "SOFT" 50; line-height: 1.15; margin: 0 0 .45em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 5vw, 2.6rem); }
p { text-wrap: pretty; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 12px; }
.kicker { margin: 0 0 8px; color: var(--terracotta); font-weight: 900; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.kicker.gold { color: var(--gold); }
.soft-btn { min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 2px solid rgba(246, 235, 211, .45); background: rgba(246, 235, 211, .06); color: var(--on-night); font-weight: 800; font-size: .95rem; cursor: pointer; transition: border-color .2s, background .2s; }
.soft-btn:hover { border-color: var(--gold); background: rgba(246, 235, 211, .12); }

/* ---------- Night sky ---------- */
.sky { position: relative; color: var(--on-night); background: linear-gradient(180deg, var(--night) 0%, var(--night-mid) 55%, var(--horizon) 100%); isolation: isolate; }
.stars { position: absolute; inset: 0 0 30% 0; z-index: -2; pointer-events: none; animation: twinkle 3.7s ease-in-out 7 alternate both; }
.stars.s1 { background: radial-gradient(1.6px 1.6px at 8% 14%, #fffc 50%, transparent 52%), radial-gradient(2px 2px at 36% 22%, #fffc 50%, transparent 52%), radial-gradient(1.8px 1.8px at 67% 12%, #fffb 50%, transparent 52%), radial-gradient(1.6px 1.6px at 93% 30%, #fffa 50%, transparent 52%); }
.stars.s2 { animation-duration: 5.3s; animation-iteration-count: 7; background: radial-gradient(1.4px 1.4px at 22% 6%, #fff9 50%, transparent 52%), radial-gradient(1.4px 1.4px at 52% 9%, #fff8 50%, transparent 52%), radial-gradient(1.4px 1.4px at 81% 7%, #fff9 50%, transparent 52%), radial-gradient(1.4px 1.4px at 14% 42%, #fff7 50%, transparent 52%), radial-gradient(1.2px 1.2px at 46% 36%, #fff6 50%, transparent 52%); }
.stars.s3 { animation-duration: 7.9s; animation-direction: alternate-reverse; animation-iteration-count: 8; background: radial-gradient(1.4px 1.4px at 29% 30%, #fff9 50%, transparent 52%), radial-gradient(1.6px 1.6px at 59% 26%, #fffa 50%, transparent 52%), radial-gradient(1.2px 1.2px at 74% 40%, #fff8 50%, transparent 52%), radial-gradient(1.4px 1.4px at 4% 26%, #fff8 50%, transparent 52%), radial-gradient(1.2px 1.2px at 88% 50%, #fff7 50%, transparent 52%); }
.paused .stars { animation-play-state: paused; }
@keyframes twinkle { from { opacity: .4; } to { opacity: 1; } }
.hills { position: relative; z-index: 1; display: block; width: 100%; height: clamp(56px, 8vw, 110px); overflow: visible; margin-bottom: -3px; }
.hills.flip { transform: scaleY(-1); margin: -3px 0 0; }
.hills path:not([fill="#fbf1dc"]) { filter: drop-shadow(0 -4px 6px rgba(10, 15, 46, .3)); }

/* ---------- Nav ---------- */
.nav { position: absolute; inset: 0 0 auto; z-index: 10; padding-top: env(safe-area-inset-top); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo img { width: 168px; }
@media (min-width: 900px) { .nav-logo img { width: 210px; } .nav-row { height: 84px; } }
.nav-cta { color: var(--on-night); text-decoration: none; font-weight: 800; padding: 10px 18px; border-radius: 999px; border: 2px solid rgba(246, 235, 211, .4); transition: background .2s, border-color .2s; }
.nav-cta:hover { background: rgba(246, 235, 211, .1); border-color: var(--gold); }

/* ---------- Hero scene ---------- */
.hero { --scene-h: clamp(150px, 21vw, 300px); padding: 84px 0 calc(var(--scene-h) - 30px); overflow: hidden; }
@media (min-width: 900px) { .hero { min-height: max(100svh, 760px); display: flex; flex-direction: column; justify-content: center; padding: 96px 0 calc(var(--scene-h) * .42); } }
.moon { position: absolute; z-index: -2; top: 116px; right: 2.5%; width: clamp(54px, 5vw, 76px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #fffaf0, #f3e4c4 62%, #e3d2b0); box-shadow: 0 0 0 10px rgba(246, 235, 211, .05), 0 0 60px 14px rgba(246, 235, 211, .14); }
.moon::after { content: ""; position: absolute; width: 22%; height: 22%; left: 54%; top: 52%; border-radius: 50%; background: rgba(205, 184, 143, .45); box-shadow: -2.2em -1.4em 0 -.15em rgba(205, 184, 143, .35); font-size: clamp(6px, .8vw, 11px); }
@media (max-width: 899px) { .moon { top: auto; bottom: calc(var(--scene-h) + 40%); right: 14px; width: 44px; } }
@media (max-width: 599px) { .moon { display: none; } }
@media (max-width: 559px) { .eb-long { display: none; } .eyebrow { font-size: .72rem; letter-spacing: .04em; padding: 6px 12px; } }
.dawn { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; mix-blend-mode: screen; transition: opacity 2.2s var(--ease-out);
  background: radial-gradient(90% 45% at 50% 100%, rgba(255, 170, 110, .5), rgba(240, 140, 120, .2) 45%, transparent 75%); }
.hero.lit .dawn { opacity: 1; }
.scene { position: absolute; left: 0; right: 0; bottom: -1px; height: var(--scene-h); z-index: 0; pointer-events: none; }
.scene .layer { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; will-change: transform; }
.scene .layer path { filter: drop-shadow(0 -5px 9px rgba(10, 15, 46, .32)); }
.scene .l4 path { filter: drop-shadow(0 -4px 8px rgba(10, 15, 46, .28)); }
.scene .l1 { animation: hill-in 1.4s var(--ease-out) both .05s; }
.scene .l2 { animation: hill-in 1.4s var(--ease-out) both .15s; }
.scene .l3 { animation: hill-in 1.4s var(--ease-out) both .25s; }
@keyframes hill-in { from { translate: 0 30px; } }
.hero-post { --pane: #3a4682; }
.hero-post .post-glow { opacity: 0; transition: opacity 1.2s ease 1s; }
.hero.lit .hero-post { --pane: var(--gold); }
.hero.lit .hero-post .post-glow { opacity: 1; }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center; }
.hero-copy { text-align: center; }
.eyebrow { display: inline-block; white-space: nowrap; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; background: #2b3670; border: 1.5px solid rgba(246, 196, 83, .45); color: var(--gold); font-weight: 900; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2rem, 7.2vw, 3.6rem); text-shadow: 0 2px 14px rgba(5, 8, 30, .55); margin: 0 auto .35em; max-width: 16ch; }
.lede { margin: 0 auto 22px; max-width: 36ch; color: var(--on-night-soft); font-size: 1.05rem; }
.promises { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin: 18px 0 0; padding: 0; font-size: .92rem; color: var(--on-night-soft); }
.promises li { padding: 4px 12px 4px 10px; border-radius: 999px; background: rgba(24, 33, 74, .78); }
.promises li::before { content: "✓"; color: var(--gold); font-weight: 900; margin-right: 7px; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; }
  .hero-copy { text-align: left; }
  .hero h1, .lede { margin-left: 0; }
  .hero h1 { font-size: clamp(2.6rem, 3.9vw, 3.4rem); max-width: 17ch; }
  .promises { justify-content: flex-start; max-width: 520px; }
}
@media (max-width: 899px) {
  /* phones: headline and what it is, the puzzle, then the signup */
  .hero-copy { display: contents; }
  .eyebrow { order: 1; justify-self: center; margin-bottom: -6px; }
  .hero h1 { order: 2; margin-bottom: 0; }
  .lede { order: 3; margin-bottom: 0; }
  .puzzle-wrap { order: 4; }
  .hero-copy .signup { order: 5; width: 100%; }
  .promises { order: 6; margin-top: 0; }
}

/* entrance: one soft rise, staggered */
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 110ms + 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Signup form ---------- */
.signup { max-width: 480px; margin: 0 auto; }
@media (min-width: 900px) { .hero-copy .signup { margin: 0; } }
.field { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--paper); box-shadow: 0 4px 0 #d8c39a, 0 12px 28px var(--shadow); transition: box-shadow .2s; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 6px 0 16px; font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink); }
.field input::placeholder { color: #5f6386; }
.field input:focus { outline: none; }
.field:focus-within { box-shadow: 0 4px 0 #d8c39a, 0 0 0 3px var(--gold), 0 12px 28px var(--shadow); }
.field button { position: relative; overflow: hidden; flex: none; border: 0; cursor: pointer; padding: 14px 20px; border-radius: 999px; background: var(--button); color: #fff7ea; font-weight: 900; font-size: 1rem; box-shadow: 0 3px 0 #7d2f1c; transition: transform .15s var(--ease-out), background .2s; }
.field button:hover { background: var(--button-hi); }
.field button:active { transform: translateY(2px); box-shadow: 0 1px 0 #7d2f1c; }
.field button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 240, 200, .38) 50%, transparent 70%); transform: translateX(-120%); }
.signup.sheen .field button::after { animation: sheen 1.4s var(--ease-out); }
@keyframes sheen { to { transform: translateX(120%); } }
@media (max-width: 559px) {
  .field { flex-direction: column; border-radius: 24px; padding: 8px; }
  .field input { padding: 14px 12px; text-align: center; }
  .field button { width: 100%; padding: 15px 18px; }
}
.signup.busy button span { opacity: .6; }
.fine { margin: 10px 4px 0; font-size: .88rem; color: var(--on-night-soft); }
.fine a { color: var(--on-night); }
.status { min-height: 1.6em; margin: 6px 4px 0; font-weight: 800; }
.status.ok { color: var(--gold); }
.status.err { color: #ffc2b4; }
.status .suggest { margin-left: 6px; padding: 2px 10px; border-radius: 999px; border: 1.5px solid currentColor; background: none; color: inherit; font-weight: 800; cursor: pointer; }
.signup.done .field { animation: pop .5s var(--ease-spring); }
.signup.done .field input { color: var(--ink-soft); }
.after-signup { margin-top: 8px; }
@keyframes pop { 50% { transform: scale(1.03); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- The LIGHT puzzle ---------- */
.puzzle-wrap { position: relative; width: min(100%, 440px); margin: 0 auto; }
.bloom { position: absolute; left: 50%; top: 58%; width: 150%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; z-index: 0; pointer-events: none; opacity: 0; transform: scale(.6);
  background: radial-gradient(circle, rgba(255, 229, 154, .5), rgba(246, 196, 83, .18) 40%, transparent 68%); }
.puzzle { position: relative; z-index: 1; padding: 18px 16px 16px; border-radius: 30px; text-align: center;
  background: linear-gradient(180deg, rgba(43, 54, 112, .94), rgba(38, 48, 106, .9)); border: 1px solid rgba(246, 235, 211, .16); box-shadow: 0 24px 60px rgba(5, 8, 30, .4); }
.puzzle-tip { min-height: 3.1em; margin: 0 0 10px; font-weight: 800; color: var(--on-night); line-height: 1.45; }
.puzzle-tip b { color: var(--gold); letter-spacing: .06em; white-space: nowrap; }
.tiles { display: flex; justify-content: center; gap: 8px; perspective: 500px; }
.tile { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--paper); box-shadow: 0 4px 0 #cdb88f, 0 8px 16px rgba(5, 8, 30, .3); }
.tile i { font-style: normal; font-family: var(--serif); font-variation-settings: "opsz" 48, "SOFT" 50; font-weight: 800; font-size: 1.65rem; color: transparent; }
.tile.on { animation: flip .6s var(--ease-out) both; animation-delay: calc(var(--i) * 80ms); }
.tile.on i { animation: ink .6s step-end both; animation-delay: calc(var(--i) * 80ms); }
@keyframes flip {
  0% { transform: rotateX(0); background: var(--paper); box-shadow: 0 4px 0 #cdb88f, 0 8px 16px rgba(5, 8, 30, .3); }
  49.9% { transform: rotateX(90deg); background: var(--paper); }
  50% { transform: rotateX(-90deg); background: var(--gold); box-shadow: 0 4px 0 #b88a1d, 0 0 26px rgba(246, 196, 83, .55); }
  100% { transform: rotateX(0); background: var(--gold); box-shadow: 0 4px 0 #b88a1d, 0 0 26px rgba(246, 196, 83, .55); }
}
@keyframes ink { 0% { color: transparent; } 50% { color: var(--night); } 100% { color: var(--night); } }
.word-preview { height: 38px; margin: 10px 0 6px; display: flex; justify-content: center; align-items: center; gap: 2px; font-family: var(--serif); font-variation-settings: "opsz" 48, "SOFT" 50; font-weight: 800; font-size: 1.35rem; letter-spacing: .1em; color: var(--night); transition: opacity .3s; }
.word-preview span { display: inline-block; padding: 0 4px; background: var(--paper); border-radius: 6px; }
.word-preview span.new { animation: pop-in .18s var(--ease-spring); }
.word-preview.bad { animation: shake .4s; }
.word-preview.bonus span { background: var(--gold); }
@keyframes pop-in { from { transform: scale(.5); } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.wheel { position: relative; width: min(64vw, 256px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: var(--paper); border: 9px solid var(--button); box-shadow: 0 6px 0 #7d2f1c, 0 22px 44px rgba(5, 8, 30, .45); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
@media (min-width: 900px) { .wheel { width: 330px; } .tile { width: 56px; height: 56px; } .tile i { font-size: 1.8rem; } }
.wheel-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wheel-line polyline { fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.wheel-line .hint-line { stroke: #b9b2d8; opacity: .7; stroke-dasharray: 1 16; stroke-width: 8; }
.letter { position: absolute; left: var(--x); top: var(--y); width: 27%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; touch-action: none; color: var(--ink); font-family: var(--serif); font-variation-settings: "opsz" 48, "SOFT" 50; font-weight: 800; font-size: clamp(1.9rem, 9vw, 2.7rem); transition: background .15s, color .15s, transform .25s var(--ease-spring); -webkit-tap-highlight-color: transparent; }
.letter.sel { background: var(--accent); color: var(--night); transform: translate(-50%, -50%) scale(1.08); }
.letter.hint { background: #e9e3f6; }
.wheel-lamp { position: absolute; left: 50%; top: 50%; width: 40%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 50% 45%, #2b3670, var(--night)); border: 4px solid var(--accent); box-shadow: inset 0 0 18px rgba(0, 0, 0, .45); overflow: hidden; pointer-events: none; }
.wheel-lamp svg, .finale-lamp svg { position: absolute; left: 50%; top: 50%; }
.lamp-body { width: 96%; transform: translate(-50%, -40%); }
.lamp-flame { width: 96%; transform: translate(-50%, -40%) scale(0); transform-origin: 87% 54%; opacity: 0; }
.lamp-glow { width: 160%; transform: translate(-36%, -64%) scale(.2); opacity: 0; transition: transform 1.2s var(--ease-out), opacity 1s; }
.lit .lamp-flame, .finale-lamp.on .lamp-flame { opacity: 1; animation: catch .9s var(--ease-out) both, flicker 2.6s ease-in-out .9s 4; }
.lit .lamp-glow, .finale-lamp.on .lamp-glow { transform: translate(-36%, -64%) scale(1); opacity: 1; }
@keyframes catch { 0% { transform: translate(-50%, -40%) scale(0); } 55% { transform: translate(-50%, -40%) scale(1.15); } 100% { transform: translate(-50%, -40%) scale(1); } }
@keyframes flicker { 0%, 100% { transform: translate(-50%, -40%) scale(1); } 35% { transform: translate(-50%, -40%) scale(1.04, .97); } 70% { transform: translate(-50%, -40%) scale(.97, 1.03); } }
.puzzle.lit .wheel-lamp { animation: ring 1.1s var(--ease-out); }
@keyframes ring { from { box-shadow: inset 0 0 18px rgba(0, 0, 0, .45), 0 0 0 0 rgba(246, 196, 83, .85); } to { box-shadow: inset 0 0 18px rgba(0, 0, 0, .45), 0 0 0 46px rgba(246, 196, 83, 0); } }
.puzzle-wrap.bloomed .bloom { animation: bloom 2.4s var(--ease-out) forwards; }
@keyframes bloom { 0% { opacity: 0; transform: scale(.6); } 35% { opacity: 1; transform: scale(1.4); } 100% { opacity: .55; transform: scale(1.1); } }
.ghost { position: absolute; left: 0; top: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 7px rgba(255, 255, 255, .28), 0 4px 10px rgba(5, 8, 30, .35); opacity: 0; pointer-events: none; transition: opacity .3s, transform .42s cubic-bezier(.45, 0, .25, 1); }
.ghost.show { opacity: .92; }
.ghost.press { scale: .82; transition: opacity .3s, transform .42s cubic-bezier(.45, 0, .25, 1), scale .15s; }
.puzzle-bottom { display: grid; margin-top: 12px; }
.puzzle-bottom > * { grid-area: 1 / 1; }
.puzzle-foot { align-self: center; transition: opacity .4s; }
.puzzle-foot.gone { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.puzzle-after { opacity: 0; visibility: hidden; transition: opacity .5s; }
.puzzle-after.shown { opacity: 1; visibility: visible; }
.puzzle-result { min-height: 1.6em; margin: 6px 0 0; font-weight: 800; color: var(--gold-text); }
.card-verse { margin: 0 auto; max-width: 30ch; }
.card-verse p { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.18rem; line-height: 1.5; color: var(--on-night); text-wrap: balance; }
.card-verse p .w { display: inline-block; opacity: 0; transform: translateY(6px); }
.puzzle-after.shown .card-verse p .w { animation: word .6s var(--ease-out) forwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes word { to { opacity: 1; transform: none; } }
.card-verse cite { display: block; margin-top: 6px; font-style: normal; font-weight: 800; font-size: .9rem; color: var(--gold-text); opacity: 0; }
.puzzle-after.shown .card-verse cite { animation: word .6s var(--ease-out) forwards .8s; }
.motes { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.motes i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #ffe59a; box-shadow: 0 0 10px #f6c453; opacity: 0; animation: mote 3.2s var(--ease-out) forwards; animation-delay: var(--t); }
@keyframes mote { 0% { opacity: 0; transform: translate(0, 0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -320px); } }

/* ---------- Scroll reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Inside: phones ---------- */
.paper { background: var(--paper); }
.inside { padding: clamp(10px, 3vw, 40px) 0 clamp(40px, 7vw, 80px); text-align: center; }
.inside h2 { color: var(--ink); }
.phones { display: flex; gap: 22px; margin: 26px -20px 0; padding: 10px 20px 26px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.phones::-webkit-scrollbar { display: none; }
.phone { flex: 0 0 min(66vw, 280px); margin: 0; scroll-snap-align: center; }
.phone-frame { border-radius: 30px; border: 7px solid var(--night); overflow: hidden; background: var(--night); box-shadow: 0 4px 0 #0f1636, 0 22px 40px rgba(24, 33, 74, .3); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease-out); }
.phone figcaption { margin: 14px auto 0; max-width: 26ch; color: var(--ink-soft); font-size: 1rem; }
.phone figcaption b { display: block; font-family: var(--serif); font-variation-settings: "opsz" 32, "SOFT" 30; font-size: 1.22rem; color: var(--ink); }
.swipe-hint { margin: 0; color: var(--ink-soft); font-weight: 800; font-size: .9rem; }
@media (min-width: 900px) {
  .phones { justify-content: center; gap: 44px; overflow: visible; margin: 36px 0 0; padding: 0; }
  .phone { flex-basis: 300px; }
  .phone.mid { translate: 0 -26px; }
  .swipe-hint { display: none; }
}
@media (hover: hover) and (pointer: fine) { .phone-frame { will-change: transform; } }

/* ---------- Journey: the path lights as you scroll ---------- */
.journey { text-align: center; }
.journey .wrap { padding-top: clamp(14px, 3vw, 36px); }
.journey-lede { margin: 0 auto; max-width: 40ch; color: var(--on-night-soft); }
.trail { position: relative; height: clamp(560px, 140vw, 640px); max-width: 1000px; margin: 22px auto 10px; }
@media (min-width: 900px) { .trail { height: 820px; margin-top: 34px; } }
.trail-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trail-svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trail-road { stroke: #8f8fc4; stroke-opacity: .42; stroke-width: 30; }
.trail-stones { stroke: #d9d5ef; stroke-opacity: .55; stroke-width: 5; stroke-dasharray: 1 22; }
.trail-glow { stroke: var(--gold); stroke-opacity: .22; stroke-width: 26; }
.trail-lit { stroke: var(--gold); stroke-width: 9; }
.trail-tip { fill: #fff3cf; filter: drop-shadow(0 0 8px #f6c453); opacity: 0; transition: opacity .3s; }
.trail.drawing .trail-tip { opacity: 1; }
.stops { list-style: none; margin: 0; padding: 0; }
@property --pane { syntax: '<color>'; inherits: true; initial-value: #3a4682; }
.stop { --pane: #3a4682; position: absolute; left: var(--sx); top: var(--sy); width: 0; height: 0; transition: --pane .5s; }
.stop .post { position: absolute; z-index: 1; width: 34px; height: 102px; top: -96px; }
.stop.left .post { left: -54px; }
.stop.right .post { left: 20px; }
.stop .glowdot { position: absolute; top: -128px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 229, 154, .85), rgba(246, 196, 83, 0) 65%); opacity: 0; transform: scale(.3); transition: opacity .6s, transform .6s var(--ease-spring); pointer-events: none; }
.stop.left .glowdot { left: -92px; }
.stop.right .glowdot { left: -18px; }
.stop div { position: absolute; top: -52px; width: max-content; max-width: min(230px, 64vw); padding: 10px 14px; border-radius: 14px; text-align: left; background: #2b3670; border: 1px solid rgba(246, 235, 211, .22); color: var(--on-night-soft); z-index: 2; translate: 0 -50%; transform: translateX(-8px); transition: opacity .5s, transform .5s var(--ease-out), background .5s, color .5s; }
.stop.left div { left: 32px; }
.stop.right div { right: 32px; text-align: right; transform: translateX(8px); }
.stop b { display: block; font-family: var(--serif); font-variation-settings: "opsz" 32, "SOFT" 30; font-size: 1.2rem; line-height: 1.25; }
.stop div span { font-size: .9rem; color: var(--on-night-soft); }
@media (min-width: 900px) { .stop div { min-width: 240px; max-width: 320px; padding: 14px 18px; } .stop b { font-size: 1.45rem; } }
.stop.lit { --pane: var(--gold); }
.stop.lit .glowdot { opacity: 1; transform: scale(1); }
.stop.lit div { opacity: 1; transform: none; background: var(--paper); color: var(--ink); }
.stop.lit div span { color: var(--terracotta); }
.stop.soon.lit { --pane: #8b7fa3; }
.stop.soon.lit div { background: #34407c; color: var(--on-night); }
.stop.soon.lit div span { color: var(--on-night-soft); }
.stop.soon .glowdot { display: none; }

/* ---------- Comfort cards ---------- */
.comfort { padding: clamp(14px, 3vw, 36px) 0 clamp(40px, 7vw, 72px); text-align: center; }
.comfort h2 { color: var(--ink); }
.cards { display: grid; gap: 16px; max-width: 980px; margin: 26px auto 0; padding: 0; list-style: none; text-align: left; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; align-items: start; align-content: start; padding: 20px 22px; border-radius: 20px; background: var(--paper-hi); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line), 0 10px 24px rgba(24, 33, 74, .08); }
.card b { font-family: var(--serif); font-variation-settings: "opsz" 32, "SOFT" 30; font-weight: 700; font-size: 1.2rem; color: var(--ink); grid-column: 2; }
.card > span:last-child { grid-column: 2; color: var(--ink-soft); }
.ico { grid-row: span 2; width: 56px; height: 56px; border-radius: 16px; background: var(--night); color: var(--gold); display: grid; place-items: center; position: relative; overflow: hidden; }
.ico-aa { font-family: var(--serif); font-weight: 800; font-size: 1.5rem; }
.card.in .ico-aa { animation: grow 1.4s var(--ease-spring) .3s; }
@keyframes grow { 40% { transform: scale(1.18); } }
.ico-calm i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--gold); position: relative; }
.ico-calm i::after { content: ""; position: absolute; left: 50%; top: 4px; width: 3px; height: 7px; margin-left: -1.5px; background: var(--gold); border-radius: 2px; transform-origin: 50% 100%; transform: rotate(-60deg); transition: transform 1.8s var(--ease-out) .4s; }
.card.in .ico-calm i::after { transform: rotate(0deg); }
.ico-quiet i { width: 30px; height: 22px; border-radius: 5px; border: 3px solid var(--gold); position: relative; }
.ico-quiet i::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 3px; margin-top: -1.5px; background: #ffb4a3; border-radius: 2px; transform: rotate(-28deg) scaleX(0); transition: transform .6s var(--ease-out) .5s; }
.card.in .ico-quiet i::after { transform: rotate(-28deg) scaleX(1); }
.ico-sun i { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(246, 196, 83, .25), 0 0 0 10px rgba(246, 196, 83, .1); transform: translateY(18px); transition: transform 1.2s var(--ease-out) .3s; }
.card.in .ico-sun i { transform: translateY(2px); }

/* ---------- Finale signup ---------- */
.finale { text-align: center; contain: paint; }
.finale-inner { padding-top: clamp(40px, 6vw, 64px); padding-bottom: 10px; }
.finale p { margin: 0 auto 22px; max-width: 40ch; color: var(--on-night-soft); }
.finale .fine { margin: 10px auto 0; }
.finale-lamp { position: relative; display: block; width: 160px; height: 120px; margin: 0 auto 8px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 20px; }
.finale-lamp .lamp-body, .finale-lamp .lamp-flame { width: 100%; }
.finale-lamp .lamp-glow { width: 160%; }
.finale .makers { margin: 30px auto 0; max-width: 44ch; font-size: .95rem; color: var(--on-night-soft); }
.hills.end { margin-top: 30px; }

/* ---------- Sticky "Email me at launch" on phones ---------- */
.sticky-cta { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 15px 20px; border: 0; border-radius: 999px; background: var(--button); color: #fff7ea; font-weight: 900; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 0 #7d2f1c, 0 14px 30px rgba(5, 8, 30, .4); transform: translateY(170%); visibility: hidden; transition: transform .45s var(--ease-out), visibility 0s .45s; }
.sticky-cta.show { transform: none; visibility: visible; transition: transform .45s var(--ease-out), visibility 0s; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* ---------- Footer ---------- */
footer { background: var(--night); color: var(--on-night-soft); font-size: .92rem; padding: 18px 0 calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { footer { padding-bottom: 34px; } }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; align-items: baseline; }
footer a { color: var(--on-night); }
footer a:hover { color: var(--gold); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer .kjv { flex-basis: 100%; color: #c4bfdb; font-size: .85rem; }

/* ---------- Text pages (privacy, 404) ---------- */
.topbar { background: var(--night); padding: 14px 0; }
.topbar a { display: inline-block; }
.topbar img { width: 200px; }
.doc { max-width: 44rem; margin: 0 auto; padding: clamp(28px, 6vw, 56px) 20px clamp(40px, 7vw, 72px); font-weight: 500; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.6rem); margin-bottom: .2em; }
.doc .updated { color: var(--ink-soft); margin: 0 0 28px; }
.doc h2 { font-size: 1.4rem; margin: 2em 0 .5em; padding-top: .6em; border-top: 2px solid var(--line); }
.doc ul { padding-left: 1.3em; }
.doc li { margin: .35em 0; }
.doc strong { font-weight: 800; }
.doc :focus-visible { outline-color: var(--ink); }
.summary { background: var(--paper-hi); border: 2px solid var(--line); border-radius: 18px; padding: 6px 22px 10px; box-shadow: 0 3px 0 var(--line); }
.summary h2 { border-top: 0; margin-top: .6em; padding-top: 0; }
.text-page footer { padding-bottom: 34px; }

/* ---------- Reduced motion: a still, complete page ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .rise, .js .reveal { opacity: 1; transform: none; }
  .phone-frame { transform: none !important; }
  .scene .layer { transform: none !important; }
  .ghost { display: none; }
}
