/* The landing page (/). Colours and sizes are the shared variables from /canon.css and /tokens.css; nothing typed here.
   No web font: the system face, named once. Animates transform and opacity only. Mobile first (375), then 760, 900. */
:root {
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --night: linear-gradient(180deg, var(--ground-deep) 0%, var(--ground) 38%, var(--ground) 100%);
  --lift: color-mix(in srgb, var(--indigo-mid) 22%, var(--ground));
  --violet: color-mix(in srgb, var(--glass) 80%, var(--ground));
  --ember: color-mix(in srgb, var(--gold) 14%, var(--violet));
  --art: min(110vw, 480px);
  --gutter: max(var(--space-4), env(safe-area-inset-left));
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  color: var(--ink);
  font: var(--w-body) var(--fs-body) / 1.45 var(--sys);
  background:
    radial-gradient(1px 1px at 12% 18%, var(--ink-muted), transparent),
    radial-gradient(1.5px 1.5px at 82% 9%, var(--ink-muted), transparent),
    radial-gradient(1px 1px at 70% 42%, var(--ink-muted), transparent),
    radial-gradient(1px 1px at 24% 66%, var(--ink-muted), transparent),
    radial-gradient(1.5px 1.5px at 91% 81%, var(--ink-muted), transparent),
    radial-gradient(1px 1px at 8% 90%, var(--ink-muted), transparent),
    var(--ground);
  background-size: 520px 560px, 520px 560px, 520px 560px, 520px 560px, 520px 560px, 520px 560px, auto;
  overflow-x: clip;
}
img, canvas, picture { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: var(--indigo); }
em { font-style: normal; color: var(--gold); }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--space-2); top: -60px; z-index: 30; background: var(--gold); color: var(--on-gold); padding: var(--space-3) var(--space-4); border-radius: var(--radius-control); }
.skip:focus { top: var(--space-2); }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }


/* top bar */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: max(var(--space-3), env(safe-area-inset-top)) var(--gutter) var(--space-3); border-bottom: 1px solid transparent; transition: background-color .2s, border-color .2s; }
.bar.scrolled { background: var(--glass-blur); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--hairline); }
.wordmark { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: var(--fs-title); min-height: 44px; display: inline-flex; align-items: center; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-pill); background: var(--glass); box-shadow: var(--glass-edge), var(--glass-drop); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-secondary); }

section { padding: var(--space-16) var(--gutter); position: relative; overflow-x: clip; }
h2 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; font-size: clamp(var(--fs-displaySmall), 8vw, 44px); text-wrap: balance; }
.fine, .note, figcaption { font-size: var(--fs-secondary); color: var(--ink-muted); }

/* 2.1 hero */
.hero { min-height: 100svh; padding-top: 76px; padding-bottom: var(--space-8); display: flex; flex-direction: column; align-items: center; text-align: center; background: radial-gradient(ellipse 70% 38% at 50% 32%, color-mix(in srgb, var(--gold) 15%, transparent), transparent 70%); }
.hero h1 { display: contents; }
.h1-top, .h1-bot { display: block; position: relative; z-index: 1; font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(32px, 9.4vw, 60px); max-width: 12em; text-wrap: balance; }
.h1-top { order: 1; }
.hero-art { order: 2; }
.h1-bot { order: 3; }
.sub { order: 4; }
.cta { order: 5; }
.art { position: relative; width: var(--art); aspect-ratio: 1; flex: none; margin-block: calc(var(--art) * -0.17); z-index: 0; }
.art .still, .art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The Star artboard is 640 wide and the stills show its middle 390: the canvas is drawn that much larger and centred. */
.art.hero-art canvas, .art.final-art canvas { inset: auto; max-width: none; left: 50%; top: 50%; width: 164%; height: 164%; transform: translate(-50%, -50%); }
.art canvas { opacity: 0; transition: opacity .25s ease-out; touch-action: pan-y; }
.art.live canvas { opacity: 1; }
.art.live .still, .art.live .stills { visibility: hidden; }
.art.warm canvas { opacity: 0; }
.art.warm .still, .art.warm .stills { visibility: visible; }
.sub { margin-top: var(--space-4); font-size: var(--fs-lede); color: var(--ink-muted); max-width: 26em; position: relative; }
.cta { margin-top: var(--space-5); width: 100%; max-width: 420px; position: relative; }
.cta-head { font-weight: 600; margin-bottom: var(--space-3); color: var(--ink); }
.objection { margin-top: var(--space-3); font-size: var(--fs-secondary); color: var(--ink-muted); }
.wl-row { display: flex; gap: var(--space-2); }
.wl input { flex: 1; min-width: 0; min-height: 52px; padding: 0 var(--space-4); font: inherit; color: var(--ink); background: var(--well); border: 1px solid var(--hairline); border-radius: var(--radius-control); }
.wl input::placeholder { color: var(--ash-text); }
.wl button { min-height: 52px; padding: 0 var(--space-5); font: inherit; font-weight: 700; color: var(--on-gold); background: var(--gold); border: 0; border-radius: var(--radius-control); box-shadow: var(--primary-drop); cursor: pointer; }
.wl button:disabled { opacity: .6; }
.wl button:active, .store:active { transform: scale(.98); }
.note { min-height: 1.4em; margin-top: var(--space-2); }
.note.bad { color: var(--alert); }
.wl [role="status"] { color: var(--ink); }
.store { display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 56px; min-width: 190px; padding: 6px var(--space-6); border-radius: 12px; background: black; color: var(--ink); text-decoration: none; border: 1px solid var(--ash); line-height: 1.1; }
.store-small { font-size: var(--fs-note); }
.store-big { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.store img { height: 48px; width: auto; }
.store:has(.store-badge) { padding: 0; background: none; border: 0; min-width: 0; min-height: 0; }

/* 2.2 lecture */
.lecture { text-align: center; padding-block: var(--space-16) var(--space-12); max-width: 760px; margin: 0 auto; }
.lecture p { margin-top: var(--space-4); color: var(--ink-muted); font-size: var(--fs-lede); }

/* 2.3 the story: static panels by default; the stage pins once story.js adds .is-live */
.story { padding: 0; background: linear-gradient(180deg, var(--ground) 0%, var(--lift) 60%, var(--violet) 100%); }
.stage-art { display: none; }
.panels { display: grid; gap: var(--space-12); padding: var(--space-8) var(--gutter) var(--space-16); max-width: 960px; margin: 0 auto; }
.panel { display: grid; gap: var(--space-4); justify-items: start; }
.panel-art { display: flex; width: 100%; justify-content: center; margin-block: -24px; }
.panel-art img { width: min(44vw, 260px); height: auto; margin-inline: 0; }
.caption .big { font-size: clamp(var(--fs-title), 6vw, 34px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance; }
.caption p + p { margin-top: var(--space-3); color: var(--ink-muted); font-size: var(--fs-lede); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4) 0 var(--space-3); border-radius: var(--radius-pill); border: 1.5px solid var(--ash); color: var(--ash-text); font-weight: 600; font-size: var(--fs-secondary); transition: color .2s, border-color .2s; }
.chip .spark { width: 18px; height: 18px; fill: none; stroke: var(--ash); stroke-width: 1.6; stroke-linejoin: round; }
.chip.lit { color: var(--gold); border-color: var(--gold); }
.chip.lit .spark { fill: var(--gold); stroke: var(--gold); }
.progress { display: none; }
.story.is-live { height: 300svh; }
.story.is-live .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: var(--space-4); padding: 64px var(--gutter) var(--space-6); }
.story.is-live .stage-art { display: block; position: relative; flex: none; width: 100%; max-width: 560px; margin-inline: auto; aspect-ratio: 390 / 340; }
.story.is-live .story-art { position: absolute; inset: 6% 6% 6% 6%; width: auto; aspect-ratio: auto; margin: 0; }
.story.is-live .hole-still { position: absolute; left: 0; top: 50%; width: 46%; height: auto; transform: translateY(-50%) scale(var(--hole-scale, .8)); opacity: var(--hole-op, 0); }
.story.is-live .stage-art.rive-on .hole-still { display: none; }
.story-art .still { object-fit: contain; }
.story.is-live .panels { display: grid; width: 100%; max-width: 560px; margin-inline: auto; padding: 0; gap: 0; }
.story.is-live .panel { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none; align-content: start; }
.story.is-live .panel.on { opacity: 1; transform: none; pointer-events: auto; }
.story.is-live .panel-art { display: none; }
.story.is-live .progress { display: block; position: absolute; left: 6px; top: 12vh; bottom: 12vh; width: 3px; border-radius: 2px; background: var(--track); }
.story.is-live .progress i { position: absolute; inset: 0; border-radius: inherit; background: var(--ash); transform-origin: top; transform: scaleY(var(--p, 0)); }
.story.is-live .progress.done i { background: var(--gold); }

/* 2.4 forecast */
.forecast { text-align: center; max-width: 760px; margin: 0 auto; background: var(--violet); max-width: none; }
.forecast > * { max-width: 560px; margin-inline: auto; }
.forecast > p { margin-top: var(--space-4); color: var(--ink-muted); font-size: var(--fs-lede); }
.note-card { position: relative; display: flex; gap: var(--space-3); align-items: flex-start; text-align: left; margin-top: var(--space-8); padding: var(--space-4); padding-top: var(--space-5); background: var(--glass-blur); border-radius: var(--radius-card); box-shadow: var(--frost-edge), var(--frost-drop); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.note-card img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.note-card .app { font-size: var(--fs-note); color: var(--ink-muted); text-transform: uppercase; letter-spacing: var(--track-label); font-weight: 600; }
.note-card .t { font-weight: 700; }
.note-card .b { color: var(--ink-muted); font-size: var(--fs-secondary); }
.tag { position: absolute; top: var(--space-2); right: var(--space-3); padding: 2px var(--space-2); border-radius: var(--radius-pill); border: 1px solid var(--ash); color: var(--ash-text); font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; }
.note-card[data-slide] { opacity: 0; transform: translateY(16px); transition: opacity .25s ease-out, transform .25s ease-out; }
.note-card.in, html:not(.js) .note-card[data-slide] { opacity: 1; transform: none; }

/* 2.5 miss a day */
.miss, .inside, .trust { background: radial-gradient(ellipse 110% 45% at 50% 100%, color-mix(in srgb, var(--gold) 16%, var(--glass)), transparent 72%), var(--violet); }
.miss { text-align: center; }
.miss > h2, .miss-static, .miss-live, .trail { max-width: 760px; margin-inline: auto; }
.miss-static[hidden] { display: none; }
.miss-static { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.miss-static figure { display: flex; flex-direction: column; align-items: center; }
.scene { display: flex; justify-content: center; align-items: center; }
.scene img { width: min(40vw, 190px); height: auto; margin-inline: -4px; }
.miss-static img { -webkit-mask-image: radial-gradient(closest-side, black 72%, transparent 100%); mask-image: radial-gradient(closest-side, black 72%, transparent 100%); }
.miss-live { margin-top: var(--space-6); padding-bottom: var(--space-4); }
.miss-live[hidden] { display: none; }
/* the live scene is the file's TodayStage (hole left, star right); its stills match until it has settled */
.art.miss-art { width: min(100%, 440px); aspect-ratio: 390 / 340; margin: 0 auto; }
.art.miss-art canvas { inset: 0; width: 100%; height: 100%; left: auto; top: auto; transform: none; }
.miss-art .stills { position: absolute; inset: 0; display: flex; align-items: center; }
.miss-art .stills img { position: absolute; top: 50%; transform: translateY(-50%); height: auto; }
.miss-art .s-hole { left: 0; width: 46%; }
.miss-art .s-bad, .miss-art .s-good { right: 0; width: 46%; }
.miss-art .s-good, .miss-art.is-kept .s-bad, .miss-art.is-kept .s-hole { display: none; }
.miss-art.is-kept .s-good { display: block; }
.toggle { min-height: 52px; padding: 0 var(--space-6); font: inherit; font-weight: 700; color: var(--ink); background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); box-shadow: var(--glass-edge), var(--glass-drop); cursor: pointer; margin-top: var(--space-4); position: relative; z-index: 2; }
.miss-caption { margin-top: var(--space-4); font-weight: 600; min-height: 1.5em; }
.trail { position: relative; margin-top: var(--space-10); padding: var(--space-8) var(--space-4) var(--space-4); border-radius: var(--radius-card); background: var(--frost-fill), var(--frost-base); box-shadow: var(--frost-edge); }
.trail img { width: 100%; height: auto; }

/* 2.6 inside */
.inside { overflow: hidden; }
.inside h2 { max-width: 960px; margin: 0 auto var(--space-8); }
.phones { display: flex; gap: var(--space-6); overflow-x: auto; scroll-snap-type: x mandatory; padding: var(--space-2) var(--gutter) var(--space-4); margin-inline: calc(var(--gutter) * -1); scrollbar-width: none; overscroll-behavior-x: contain; }
.phones::-webkit-scrollbar { display: none; }
.phones li { flex: 0 0 72%; max-width: 300px; scroll-snap-align: center; }
.phones li p { margin-top: var(--space-3); color: var(--ink-muted); text-align: center; }
.phone { padding: 6px; border-radius: 34px; background: var(--ground-deep); border: 1px solid var(--hairline); box-shadow: var(--frost-drop); }
.phone img { width: 100%; height: auto; border-radius: 28px; }

/* 2.7 trust */
.trust > h2, .lists, .ads, .founder { max-width: 960px; margin-inline: auto; }
.lists { display: grid; gap: var(--space-8); margin-top: var(--space-8); }
.ticks li { font-size: var(--fs-heading); }
.lists h3 { font-size: var(--fs-title); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--space-4); }
.ticks li { position: relative; padding: var(--space-3) 0 var(--space-3) 34px; border-top: 1px solid var(--hairline); color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 18px; height: 18px; background: var(--indigo); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.ads { margin-top: var(--space-8); padding: var(--space-4); border-radius: var(--radius-control); background: var(--well); }
.founder { margin-top: var(--space-8); padding: var(--space-6); border-radius: var(--radius-card); background: var(--frost-fill), var(--frost-base); box-shadow: var(--frost-edge); font-size: var(--fs-lede); }
.founder footer { margin-top: var(--space-3); color: var(--ink-muted); font-size: var(--fs-secondary); }

/* 2.8 faq */
.faq { background: radial-gradient(ellipse 110% 40% at 50% 0%, color-mix(in srgb, var(--gold) 10%, var(--glass)), transparent 75%), var(--ground); }
.faq > * { max-width: 760px; margin-inline: auto; }
.faq h2 { margin-bottom: var(--space-6); }
details { border-top: 1px solid var(--hairline); }
summary { cursor: pointer; list-style: none; min-height: 56px; display: flex; align-items: center; padding: var(--space-3) 0; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-left: auto; padding-left: var(--space-4); color: var(--gold); font-size: var(--fs-title); }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 0 var(--space-4); color: var(--ink-muted); }

/* 2.9 final + footer */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; background: radial-gradient(ellipse 70% 40% at 50% 28%, color-mix(in srgb, var(--indigo) 12%, transparent), transparent 70%), var(--ground); padding-bottom: var(--space-12); }
.final .art { --art: min(90vw, 380px); }
.final h2 { max-width: 12em; position: relative; margin-top: var(--space-2); }
.final .cta { margin-top: var(--space-6); }
.foot { padding: var(--space-8) var(--gutter) calc(var(--space-12) + env(safe-area-inset-bottom)); text-align: center; background: var(--ground); color: var(--ink-muted); font-size: var(--fs-secondary); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-6); margin-bottom: var(--space-3); }
.foot a { color: var(--ink-muted); display: inline-flex; align-items: center; min-height: 44px; }

/* 2.10 sticky bar (phones only) */
.sticky { display: none; }
@media (max-width: 760px) {
  main { padding-bottom: 72px; }
  .sticky { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--gutter) max(var(--space-3), env(safe-area-inset-bottom)); background: var(--glass-blur); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--hairline); transform: translateY(110%); transition: transform .25s ease-out; }
  .sticky.show { transform: none; }
  .sticky img { width: 44px; height: 44px; border-radius: 10px; }
  .sticky div { flex: 1; min-width: 0; }
  .sticky .n { font-weight: 700; line-height: 1.2; }
  .sticky .s { font-size: var(--fs-note); color: var(--ink-muted); line-height: 1.25; }
  .sticky .pill { background: var(--gold); color: var(--on-gold); box-shadow: var(--primary-drop); font-weight: 700; padding: 0 var(--space-4); }
}
@media (min-width: 761px) {
  .phones { justify-content: center; overflow: visible; }
  .phones li { flex: 1 1 0; }
  .lists { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
  .ticks li { font-size: var(--fs-body); }
  .miss-static { grid-template-columns: 1fr 1fr; }
  .panels { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto auto auto 1fr; column-gap: var(--space-12); align-items: start; text-align: left; justify-items: start; max-width: 1180px; margin: 0 auto; padding-top: 96px; }
  .h1-top, .h1-bot { grid-column: 1; max-width: 11em; font-size: clamp(44px, 5.2vw, 76px); }
  .h1-top { grid-row: 2; align-self: end; order: 0; }
  .h1-bot { grid-row: 3; order: 0; margin-top: .3em; }
  .hero { background: radial-gradient(ellipse 40% 50% at 75% 50%, color-mix(in srgb, var(--gold) 15%, transparent), transparent 70%); }
  .sub { grid-column: 1; grid-row: 4; order: 0; }
  .cta { grid-column: 1; grid-row: 5; order: 0; }
  .hero-art { --art: 560px; grid-column: 2; grid-row: 1 / 7; order: 0; align-self: center; justify-self: center; margin: 0; }
  .story.is-live { height: 260vh; }
  .story.is-live .stage { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr); align-items: center; align-content: center; gap: var(--space-12); max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
  .story.is-live .stage-art { max-width: none; }
  .story.is-live .panels { max-width: none; }
  .story.is-live .progress { left: max(16px, calc(50vw - 590px)); }
  .final .art { --art: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* atmosphere: a sparse field of four-point stars over the hero and the story, and grain over the art only (never text) */
.field { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.field i { position: absolute; width: 12px; height: 12px; background: var(--ink-muted); opacity: .6; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.field i:nth-child(1) { left: 12%; top: 18%; }
.field i:nth-child(2) { left: 86%; top: 12%; width: 16px; height: 16px; }
.field i:nth-child(3) { left: 7%; top: 62%; width: 9px; height: 9px; }
.field i:nth-child(4) { left: 91%; top: 70%; }
.field i:nth-child(5) { left: 55%; top: 6%; width: 8px; height: 8px; }
.art::after { content: ""; position: absolute; inset: -6%; pointer-events: none; background: url("/assets/art/grain.webp"); opacity: .28; -webkit-mask-image: radial-gradient(closest-side, black 25%, transparent 100%); mask-image: radial-gradient(closest-side, black 25%, transparent 100%); }
.hero > *:not(.field), .story > *:not(.field) { position: relative; z-index: 1; }
/* the stills' own edges fade out, so no hard seam shows where one still's crop meets the next */
.panel-art img { -webkit-mask-image: radial-gradient(closest-side, black 72%, transparent 100%); mask-image: radial-gradient(closest-side, black 72%, transparent 100%); }
.story:not(.is-live) .field { display: none; }

/* the two store buttons side by side, Apple's and Google's, the same height (Google's badge is sized to match Apple's) */
.stores { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3); }
/* the gallery: a swipeable row on phones, a staggered grid from tablet up */
.phones li:nth-child(even) { margin-top: var(--space-6); }
.phones li { flex: 0 0 64%; }
@media (min-width: 761px) {
  .phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8) var(--space-6); max-width: 960px; margin-inline: auto; overflow: visible; scroll-snap-type: none; }
  .phones li { max-width: none; }
  .phones li:nth-child(n) { margin-top: 0; }
  .phones li:nth-child(3n + 2) { margin-top: var(--space-12); }
}
.store-play { min-height: 48px; padding-block: 2px; min-width: 150px; }
/* Google's PNG carries its own clear space: shown taller so its visible badge matches Apple's 48 px. */
.store img.store-badge-play { height: 72px; margin: -12px -10px; }
