@import url('/tokens.css');

/* Website layer. Product colors come from tokens.css; the sky tones below are decorative and
   website-only. Motion uses transform/opacity, never pushes layout, and stops under reduced motion. */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ink: cubic-bezier(0.32, 0.72, 0, 1);
  --line: color-mix(in srgb, var(--neutral-950) 9%, transparent);
  --sky-dawn: #f6ece3;
  --sky-noon: #f7f6f2;
  --sky-dusk: #f1e0d5;
  --sky-night: #121317;
  --night-fg: #efeee9;
  --night-fg-2: #a6a59f;
  --hill-base: .05;
  --grain-opacity: .035;
}
@media (prefers-color-scheme: dark) {
  :root { --sky-dawn: #1e1c21; --sky-noon: #19191c; --sky-dusk: #221c1d; --sky-night: #0c0d10; --hill-base: .28; --grain-opacity: .06; }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--app-canvas); color: var(--neutral-950); font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif; line-height: 1.8; font-size: 16px; overflow-x: clip; }
body::after { content: ''; position: fixed; inset: 0; z-index: 50; pointer-events: none; background: url('/grain.svg'); background-size: 220px; opacity: var(--grain-opacity); }
@media (prefers-color-scheme: dark) { body::after { filter: invert(1); } }
::selection { background: color-mix(in srgb, var(--brand-seal) 22%, transparent); }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible, .button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
.skip { position: absolute; left: 1rem; top: -8rem; z-index: 60; background: var(--surface); padding: .5rem; }
.skip:focus { top: 1rem; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.seal { fill: var(--brand-seal); }
.kicker { margin: 0 0 14px; font-size: 13px; letter-spacing: .32em; color: var(--brand-seal); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 40; transition: background-color .3s ease, box-shadow .3s ease; }
.topbar.scrolled { background: var(--frosted-background); -webkit-backdrop-filter: var(--frosted-filter); backdrop-filter: var(--frosted-filter); box-shadow: 0 1px 0 var(--line); }
.topbar.night { color: var(--night-fg); }
.topbar.night.scrolled { background: color-mix(in srgb, var(--sky-night) 72%, transparent); box-shadow: 0 1px 0 rgb(255 255 255 / 6%); }
.topbar.night .brand-mark { color: var(--night-fg); }
.topbar.night nav a { color: var(--night-fg-2); }
.topbar.night nav a:hover { color: var(--night-fg); }
@media (prefers-reduced-transparency: reduce) { .topbar.night.scrolled { background: var(--sky-night); } }
@media (prefers-reduced-transparency: reduce) { .topbar.scrolled { background: var(--app-canvas); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 600; letter-spacing: .14em; }
.brand-mark { width: 36px; height: auto; color: var(--neutral-950); overflow: visible; }
nav { display: flex; gap: 28px; font-size: 14px; }
nav a { color: var(--neutral-600); text-decoration: none; transition: color .15s ease; }
nav a:hover { color: var(--neutral-950); }

.button { display: inline-flex; align-items: center; padding: 12px 26px; border-radius: 999px; background: var(--accent); color: var(--accent-contrast); text-decoration: none; font-size: 15px; position: relative; overflow: hidden; isolation: isolate; transition: transform .2s var(--ease-out), color .3s ease; }
.button::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--brand-seal); clip-path: circle(0% at var(--bx, 50%) var(--by, 50%)); transition: clip-path .5s var(--ease-ink); }
.button:hover { color: #fff; }
.button:hover::before { clip-path: circle(150% at var(--bx, 50%) var(--by, 50%)); }
.button:active { transform: scale(.98); }
.text-link { font-size: 15px; color: var(--neutral-600); text-decoration: none; }
.text-link::after { content: ' ↓'; display: inline-block; transition: transform .25s var(--ease-out); }
.text-link:hover { color: var(--neutral-950); }
.text-link:hover::after { transform: translateY(3px); }

/* Hero: centred brush mark written once, then the headline. */
.hero { background: linear-gradient(var(--app-canvas) 55%, var(--sky-dawn)); padding: 6vh 0 18vh; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.mark { width: min(440px, 72vw); color: var(--neutral-950); margin-bottom: 4vh; }
.brush { display: block; width: 100%; height: auto; overflow: visible; }
.brush .spine { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: write 1.9s var(--ease-ink) .3s forwards; }
.brush .seal { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: seal-drop .55s cubic-bezier(.3, 1.6, .5, 1) 2s forwards; }
.brush .ripple { fill: none; stroke: var(--brand-seal); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; opacity: 0; animation: ripple 2.4s var(--ease-out) 2.25s; }
@keyframes write { to { stroke-dashoffset: 0; } }
@keyframes seal-drop { to { transform: scale(1); } }
@keyframes ripple { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
h1 { font-size: clamp(38px, 5.8vw, 76px); line-height: 1.22; font-weight: 500; letter-spacing: -.035em; margin: 0 0 24px; }
.hero .lead { max-width: 30em; color: var(--neutral-600); font-size: 17px; margin: 0 0 36px; }
.actions { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.status { margin: 28px 0 0; font-size: 13px; color: var(--neutral-500); display: inline-flex; align-items: center; gap: 10px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-seal); }
.hero-inner > :not(.mark) { animation: rise .9s var(--ease-out) backwards; }
.hero-inner > h1 { animation-delay: .5s; }
.hero-inner > .lead { animation-delay: .65s; }
.hero-inner > .actions, .hero-inner > .status { animation-delay: .8s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* The day: a pinned sky behind the section. site.js drives --o-* (tone weights) and the sun. */
.day { position: relative; isolation: isolate; color: var(--day-fg, var(--neutral-950)); --day-fg-2: var(--neutral-600); transition: color .6s ease; }
.day.is-night { --day-fg: var(--night-fg); --day-fg-2: var(--night-fg-2); }
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sky-pin { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }
.tone { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.dawn { background: linear-gradient(var(--sky-dawn), color-mix(in srgb, var(--sky-dawn) 70%, var(--sky-noon))); opacity: var(--o-dawn, 1); }
.noon { background: var(--sky-noon); opacity: var(--o-noon, 0); }
.dusk { background: linear-gradient(color-mix(in srgb, var(--sky-dusk) 75%, var(--sky-night)), var(--sky-dusk) 70%); opacity: var(--o-dusk, 0); }
.night { background: radial-gradient(120% 80% at 75% 10%, color-mix(in srgb, var(--sky-night) 88%, #3a4256), var(--sky-night)); opacity: var(--o-night, 0); }
.sun, .moon { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform, opacity; }
.sun { width: 58px; height: 58px; margin: -29px; background: var(--brand-seal); box-shadow: 0 0 80px 10px color-mix(in srgb, var(--brand-seal) 28%, transparent); transform: translate3d(var(--sun-x, 10vw), var(--sun-y, 70vh), 0); opacity: var(--o-sun, 1); }
.moon { width: 54px; height: 54px; margin: -27px; background: #ecebe4; box-shadow: 0 0 60px 6px rgb(236 235 228 / 18%); transform: translate3d(84vw, 18vh, 0); opacity: var(--o-night, 0); overflow: hidden; }
.moon::after { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; background: var(--sky-night); transform: translate(14px, -6px); }
.stars { position: absolute; inset: 0; opacity: var(--o-night, 0); }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #f4f3ee; }
.stars i:nth-child(1) { left: 12%; top: 14%; } .stars i:nth-child(2) { left: 22%; top: 30%; width: 3px; height: 3px; } .stars i:nth-child(3) { left: 35%; top: 9%; } .stars i:nth-child(4) { left: 48%; top: 22%; } .stars i:nth-child(5) { left: 58%; top: 7%; width: 3px; height: 3px; } .stars i:nth-child(6) { left: 66%; top: 33%; } .stars i:nth-child(7) { left: 88%; top: 12%; } .stars i:nth-child(8) { left: 92%; top: 36%; width: 3px; height: 3px; } .stars i:nth-child(9) { left: 6%; top: 44%; } .stars i:nth-child(10) { left: 41%; top: 40%; } .stars i:nth-child(11) { left: 72%; top: 48%; } .stars i:nth-child(12) { left: 28%; top: 54%; }
.day.is-night .stars i { animation: twinkle 3.6s ease-in-out infinite; }
.stars i:nth-child(3n) { animation-delay: -1.2s; } .stars i:nth-child(3n+1) { animation-delay: -2.4s; }
@keyframes twinkle { 50% { opacity: .25; } }
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 26vh; }
.hills path { fill: #0a0a0a; }
.hills .far { opacity: calc(var(--hill-base) + var(--o-night, 0) * .35); }
.hills .near { opacity: calc(var(--hill-base) * 1.6 + var(--o-night, 0) * .5); }

.day-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); column-gap: 64px; padding-bottom: 18vh; }
.day-intro { grid-column: 1 / -1; text-align: center; max-width: 34em; margin: 0 auto; padding: 14vh 0 4vh; }
.day-intro h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.35; font-weight: 500; letter-spacing: -.02em; margin: 0 0 14px; }
.day-intro p:last-child { color: var(--day-fg-2); margin: 0; }
.chapters { grid-column: 1; }
.chapter { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; padding: 8vh 0; transition: opacity .5s ease; }
.js .chapter { opacity: .28; }
.js .chapter.is-active { opacity: 1; }
.chapter time { display: block; font-size: clamp(52px, 6vw, 84px); line-height: 1; font-weight: 200; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-bottom: 22px; }
.chapter h3 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.4; font-weight: 500; margin: 0 0 14px; }
.chapter p { color: var(--day-fg-2); margin: 0; max-width: 24em; transition: color .6s ease; }
.chapter .aside { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--brand-seal); font-size: 15px; }

.stage { grid-column: 2; grid-row: 2; position: sticky; top: calc(50vh - min(300px, 38vh)); height: min(600px, 76vh); align-self: start; }
.stage-inner { position: relative; height: 100%; }
.scene { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .55s ease, transform .7s var(--ease-out); pointer-events: none; }
.scene.on, .stage:not([data-active]) .scene[data-scene="0"] { opacity: 1; transform: none; }
.scene-inline { display: none; }

/* Mock app window, drawn with product tokens */
.win { width: 100%; max-width: 620px; height: min(440px, 64vh); display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgb(0 0 0 / 45%), 0 12px 30px -18px rgb(0 0 0 / 20%); overflow: hidden; color: var(--neutral-950); font-size: 13px; line-height: 1.6; text-align: left; }
.titlebar { flex: none; display: flex; gap: 7px; align-items: center; height: 34px; padding: 0 14px; background: var(--app-canvas); border-bottom: 1px solid var(--line); }
.titlebar i { width: 10px; height: 10px; border-radius: 50%; background: var(--neutral-200); }
.app-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 128px 1fr; }
.app-body.split { grid-template-columns: .82fr 1.18fr; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; background: var(--app-canvas); border-right: 1px solid var(--line); font-size: 12px; color: var(--neutral-500); }
.side b, .side span { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; white-space: nowrap; }
.side .me { background: var(--accent-bg); color: var(--neutral-950); font-weight: 500; margin-bottom: 8px; }
.side svg, .who svg, .im-head svg, .hint svg { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--neutral-950); }
.convo { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 14px; }
.convo.narrow { padding: 18px 16px; border-right: 1px solid var(--line); background: var(--app-canvas); }
.msg p { margin: 0; }
.msg.user { align-self: flex-end; max-width: 86%; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.msg.user p { padding: 8px 13px; border-radius: 18px 18px 6px 18px; background: var(--accent-bg); }
.files { display: flex; gap: 6px; }
.files em { font-style: normal; font-size: 11px; padding: 3px 9px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); color: var(--neutral-600); }
.msg.bot { max-width: 92%; }
.who { display: flex; align-items: center; gap: 9px; font-weight: 600; margin-bottom: 8px; }
.brief p { margin: 0 0 10px; color: var(--neutral-700); }
.brief ul, .dream ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.brief li, .dream li { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 10px; background: var(--app-canvas); box-shadow: inset 0 0 0 1px var(--line); }
.brief li b, .dream li b { flex: none; font-size: 11px; font-weight: 500; color: var(--neutral-500); min-width: 3.4em; }
.brief li:first-child b { color: var(--brand-seal); }
.composer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 9px 9px 9px 14px; border-radius: 16px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--neutral-200) 60%, transparent), var(--composer-shadow); background: var(--surface); color: var(--neutral-400); font-size: 12px; }
.composer i { width: 26px; height: 26px; border-radius: 9px; background: var(--accent); position: relative; }
.composer i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border: solid var(--accent-contrast); border-width: 1.5px 1.5px 0 0; transform: translate(-50%, -25%) rotate(-45deg); }
.task { border-radius: 11px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--plan-accent-border); background: var(--plan-accent-bg); }
.task b { display: block; font-weight: 600; margin-bottom: 8px; }
.task ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12px; color: var(--neutral-500); }
.task li { display: flex; align-items: center; gap: 9px; }
.task li::before { content: ''; flex: none; width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--neutral-300); }
.task li.done { color: var(--neutral-700); }
.task li.done::before { border: 0; background: var(--accent); }
.task li.run { color: var(--neutral-950); }
.task li.run::before { border-color: var(--neutral-200); border-top-color: var(--neutral-950); }
.scene.on .task li.run::before { animation: spin .9s linear infinite; }
.scene.on .task li.run span { background: linear-gradient(90deg, var(--activity-text) 30%, var(--activity-shimmer-peak) 50%, var(--activity-text) 70%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Phone with IM chat and the voice capsule */
.device { position: relative; width: 272px; height: min(540px, 70vh); border-radius: 40px; padding: 12px; background: #141416; box-shadow: 0 40px 90px -40px rgb(0 0 0 / 55%), 0 0 0 1px rgb(255 255 255 / 6%) inset; text-align: left; }
.device::before { content: ''; position: absolute; inset: 12px; border-radius: 30px; background: var(--surface); }
.device > * { position: relative; }
.im-head { display: flex; align-items: center; gap: 9px; padding: 22px 18px 12px; font-size: 13px; border-bottom: 1px solid var(--line); color: var(--neutral-950); }
.im { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; font-size: 12.5px; line-height: 1.55; }
.im p { margin: 0; max-width: 82%; padding: 8px 12px; }
.im .r { align-self: flex-end; border-radius: 16px 16px 5px 16px; background: var(--accent); color: var(--accent-contrast); }
.im .l { align-self: flex-start; border-radius: 16px 16px 16px 5px; background: var(--neutral-100); color: var(--neutral-950); }
.scene.on .im p { animation: rise .5s var(--ease-out) backwards; }
.scene.on .im p:nth-child(2) { animation-delay: .5s; } .scene.on .im p:nth-child(3) { animation-delay: 1.3s; } .scene.on .im p:nth-child(4) { animation-delay: 1.9s; }
.voice { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; white-space: nowrap; padding: 9px 16px; border-radius: 999px; font-size: 12px; color: var(--neutral-600); background: var(--frosted-background); -webkit-backdrop-filter: var(--frosted-filter); backdrop-filter: var(--frosted-filter); box-shadow: 0 0 0 1px var(--line), 0 8px 24px -10px rgb(0 0 0 / 30%); }
.wave { display: flex; align-items: center; gap: 3px; height: 16px; }
.wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--brand-seal); transform: scaleY(.4); }
.scene.on .wave i { animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -.3s; } .wave i:nth-child(3) { animation-delay: -.6s; } .wave i:nth-child(4) { animation-delay: -.15s; } .wave i:nth-child(5) { animation-delay: -.45s; }
@keyframes wave { 50% { transform: scaleY(1); } }

/* Result in the right pane, edited in place */
.doc { position: relative; padding: 18px 22px; font-size: 11.5px; line-height: 1.65; overflow: hidden; }
.doc-name { display: inline-block; font-size: 11px; color: var(--neutral-500); padding: 2px 8px; border-radius: 6px; background: var(--app-canvas); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 12px; }
.doc h4 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.doc .sec { margin: 10px 0 4px; font-weight: 600; font-size: 12px; }
.doc .txt { margin: 0 0 4px; color: var(--neutral-700); }
.shrink { border-radius: 6px; margin: 0 -6px; padding: 2px 6px; }
.cut { overflow: hidden; max-height: 4em; }
.scene.on .shrink { animation: mark-edit 2.2s ease .6s both; }
.scene.on .cut { animation: collapse .6s var(--ease-out) 1.6s forwards; }
.saved { position: absolute; right: 16px; top: 16px; font-size: 11px; color: var(--success); opacity: 0; }
.saved::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); margin-right: 6px; vertical-align: 1px; }
.scene.on .saved { animation: fade-in .4s ease 2.2s forwards; }
@keyframes mark-edit { 0%, 100% { background: transparent; } 20%, 70% { background: color-mix(in srgb, var(--brand-seal) 9%, transparent); } }
@keyframes collapse { to { max-height: 0; opacity: 0; margin: 0; } }
@keyframes fade-in { to { opacity: 1; } }

/* Notes and calendar, laid like paper on a desk */
.board { grid-template-columns: 1fr 1fr; gap: 0; align-content: center; text-align: left; }
.note, .cal { background: var(--surface); border-radius: 14px; padding: 18px 20px; box-shadow: 0 0 0 1px var(--line), 0 30px 70px -36px rgb(0 0 0 / 45%); font-size: 12.5px; color: var(--neutral-950); }
.note { transform: rotate(-2.5deg) translateX(12px); z-index: 1; }
.cal { transform: rotate(2deg) translate(-12px, 36px); }
.label { display: block; font-size: 11px; letter-spacing: .2em; color: var(--neutral-500); margin-bottom: 8px; }
.note h4 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.note ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.note li { display: flex; gap: 9px; align-items: center; color: var(--neutral-700); }
.note li::before { content: ''; flex: none; width: 13px; height: 13px; box-sizing: border-box; border-radius: 4px; border: 1.5px solid var(--neutral-300); }
.note li.ok { color: var(--neutral-500); text-decoration: line-through; text-decoration-color: var(--neutral-300); }
.note li.ok::before { background: var(--accent); border-color: var(--accent); }
.hint { display: flex; align-items: center; gap: 8px; margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--neutral-500); }
.hint svg { width: 18px; height: 18px; }
.days, .grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.days b { font-weight: 400; font-size: 11px; color: var(--neutral-500); text-align: center; }
.grid { grid-template-rows: repeat(5, 22px); margin: 6px 0 12px; background: repeating-linear-gradient(var(--line) 0 1px, transparent 1px 26px); }
.ev { font-style: normal; font-size: 10.5px; line-height: 1.3; padding: 3px 5px; border-radius: 5px; background: var(--accent-bg); color: var(--neutral-700); overflow: hidden; white-space: nowrap; }
.e1 { grid-column: 1; grid-row: 2 / 4; } .e2 { grid-column: 3; grid-row: 1 / 2; }
.e3 { grid-column: 5; grid-row: 2 / 4; background: color-mix(in srgb, var(--brand-seal) 14%, var(--surface)); color: var(--brand-seal); box-shadow: inset 2px 0 0 var(--brand-seal); }
.scene.on .e3 { animation: drop .6s cubic-bezier(.3, 1.4, .5, 1) .6s backwards; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
.remind { margin: 0; font-size: 11.5px; color: var(--neutral-600); display: flex; align-items: center; gap: 8px; }
.remind::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-seal); }

.dream { border-radius: 12px; padding: 14px 16px; background: linear-gradient(160deg, color-mix(in srgb, #3a4256 10%, var(--surface)), var(--surface)); box-shadow: inset 0 0 0 1px var(--line); }
.dream > p { margin: 12px 0 0; color: var(--neutral-700); }
.scene.on .dream li { animation: rise .6s var(--ease-out) backwards; }
.scene.on .dream li:nth-child(2) { animation-delay: .25s; } .scene.on .dream li:nth-child(3) { animation-delay: .5s; }

/* Closing: the night continues into the trial invitation */
.trial { background: var(--sky-night); color: var(--night-fg); padding: 18vh 0 16vh; }
.trial-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.trial h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.25; font-weight: 500; letter-spacing: -.03em; margin: 0 0 18px; }
.trial .lead { color: var(--night-fg-2); margin: 0 0 36px; }
.button.light { background: var(--night-fg); color: #111; }
.button.light:hover { color: #fff; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 12vh 0 0; max-width: 820px; text-align: left; }
.facts dt { font-size: 12px; letter-spacing: .24em; color: var(--brand-seal); margin-bottom: 8px; }
.facts dd { margin: 0; color: var(--night-fg-2); font-size: 14px; }

.site-foot { padding: 28px 0 40px; font-size: 13px; color: var(--neutral-600); border-top: 1px solid var(--line); }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-inner span:last-child { display: flex; gap: 20px; }

/* Legal pages */
.legal { max-width: 720px; padding: 64px 0 80px; }
.legal h1 { font-size: 40px; }
.legal h2 { margin-top: 40px; font-size: 21px; line-height: 1.5; font-weight: 600; }
.legal p, .legal li { color: var(--neutral-700); }
.legal ul { padding-left: 1.4em; }
.date { font-size: 14px; color: var(--neutral-500); }

/* Narrow screens: no pinned stage; each chapter carries its own copy of the scene (site.js). */
@media (max-width: 900px) {
  .shell { width: calc(100% - 40px); }
  .day-grid { grid-template-columns: 1fr; }
  .stage { display: none; }
  .sun, .moon { display: none; }
  .scene-inline { display: grid; position: relative; inset: auto; margin-top: 32px; opacity: 1; transform: none; }
  .chapter { min-height: 0; padding: 9vh 0; }
  .js .chapter { opacity: 1; }
  .board { grid-template-columns: 1fr; }
  .note { transform: rotate(-1.5deg); margin: 0 8px; }
  .cal { transform: rotate(1.5deg); margin: -10px 8px 24px; }
  .facts { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .bar { height: 58px; }
  .app-body { grid-template-columns: 1fr; }
  .side { display: none; }
  .app-body.split { grid-template-columns: 1fr; }
  .convo.narrow { display: none; }
  .scene-inline .win { height: auto; min-height: 340px; }
  .device { height: 500px; }
  .legal { padding: 40px 0; }
  .legal h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .brush .spine { stroke-dashoffset: 0; }
  .brush .seal { transform: none; }
  .saved { opacity: 1; }
}
