/* Pundora landing — the scroll-paced opening (founder direction 2026-09-16).
   Tokens follow the design directive (Project info/design/design-directive.md)
   and the app's own tokens: file paper, iron-gall ink, oxblood as THE accent,
   EB Garamond for display, Instrument Sans for everything else — including
   dates and numbers on this page (no monospace here, by founder decision).
   Every motion is tied to the visitor's scroll; the counter alone has a clock. */

:root {
  --bg: #f6f4ef;
  --surface: #fcfbf8;
  --inset: #f0ede6;
  --text: #171310;
  --muted: #6b635a;
  --faint: #98917f;
  --hair: #e4dfd4;
  --hair2: #ede9e0;
  --accent: #7a2733;
  --accent-ink: #61202a;
  --accent-line: #d3aca6;
  --on-accent: #fbf6f4;
  --ink: #100e0c;
  --ink-text: #ebe7df;
  --ink-muted: #9a9186;
  --serif: 'EB Garamond', Charter, Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  --hundred: 'Instrument Serif', var(--serif);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; overscroll-behavior-y: none; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
.serif { font-family: var(--serif); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; }
.col { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.two.list { grid-template-columns: 1fr 1.2fr; }

/* The bar */
.bar { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 44px; height: 54px; padding: 0 10px 0 26px; white-space: nowrap; background: var(--ink); color: var(--ink-text); border: 1px solid rgba(235,231,223,.16); border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 12px 32px rgba(0,0,0,.18); }
.bar .wm { font-family: var(--serif); font-size: 17px; letter-spacing: .16em; padding-left: .16em; color: var(--ink-text); }
.bar .links { display: flex; gap: 34px; font-size: 14.5px; }
.bar .links a { color: var(--ink-muted); }
.bar .links a:hover { color: var(--ink-text); }
.bar .cta { display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 500; }
.bar .cta:hover { filter: brightness(1.08); }

/* Screens */
.screen { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 110px 8vw 80px; }
.screen.paper { background: var(--bg); color: var(--text); }
.screen.leaf { background: var(--surface); color: var(--text); }
.screen.oxblood { background: var(--accent); color: var(--on-accent); }
.screen.ink { background: var(--ink); color: var(--ink-text); }
.kick { font-size: 17px; font-weight: 500; color: var(--accent); letter-spacing: .005em; }
.lab { font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.ink .lab { color: var(--ink-muted); }
.h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 0.98; text-wrap: balance; margin: 0; font-size: clamp(64px, 9.5vw, 132px); }
.h1.mid { font-size: clamp(44px, 5.8vw, 84px); }
.oxblood .h1 { font-size: clamp(52px, 7.6vw, 108px); }
.h1 em { font-family: var(--hundred); font-style: italic; font-weight: 400; letter-spacing: 0; }
.sub { font-family: var(--serif); font-size: 22px; line-height: 1.4; max-width: 44ch; text-wrap: pretty; color: var(--muted); }
#s1 .sub { max-width: 40ch; }
.sub.dim { color: inherit; opacity: .82; }
.ink .sub.dim { color: var(--ink-muted); opacity: 1; font-size: 20px; }
.small { font-size: 13px; color: var(--faint); }
.rules { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.rules span { display: block; background: currentColor; }
.rules .thin { height: 1.5px; }
.rules .heavy { height: 4px; }

/* Buttons */
.ctarow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 4px; font-size: 15px; font-weight: 500; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border: 1px solid var(--accent-line); color: var(--text); }

/* Screen 3: citations */
.cites { color: var(--ink-text); }
.cite { display: grid; grid-template-columns: 230px 1fr; gap: 0 18px; padding: 12px 0; border-bottom: 1px solid rgba(235,231,223,.1); align-items: center; }
.cite .c { font-family: var(--serif); font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink-text); }
.cite .v { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); font-size: 14px; }
.tick { width: 18px; height: 18px; flex: none; }
.tick path { fill: none; stroke: #cd8b90; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Screen 4: the counter */
.num { font-family: var(--serif); font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; font-size: clamp(64px, 12vw, 176px); }

/* Screen 5: the card */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 4px; padding: 20px 22px; max-width: 56ch; box-shadow: 0 1px 2px rgba(23,19,16,.05), 0 8px 24px rgba(23,19,16,.06); }
.card .q { font-size: 16px; border-bottom: 1px solid var(--hair2); padding-bottom: 12px; margin-bottom: 12px; }
.card .a { display: flex; flex-direction: column; gap: 8px; }
.card .big { font-size: 22px; }
.card .small { font-size: 13.5px; color: var(--muted); }

/* Screen 6: the digest */
.bubble { background: var(--inset); border: 1px solid var(--hair2); border-radius: 12px; border-top-left-radius: 3px; padding: 14px 18px; max-width: 46ch; font-size: 15px; }
.bubble p { margin: 0 0 6px; }
.bubble p.gap { margin: 10px 0 0; }
.bubble p.small { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.bubble b { font-weight: 600; }
.bubble .item { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--hair); }
.bubble .when { font-size: 12.5px; font-weight: 500; color: var(--accent-ink); display: inline-block; width: 96px; flex: none; font-variant-numeric: tabular-nums; }

/* Screen 7: the spine */
.spine { position: relative; padding-left: 34px; }
.spine::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 1px; background: var(--hair); }
.spine .row { position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 0 18px; padding: 14px 0; border-bottom: 1px solid var(--hair2); align-items: baseline; }
.spine .row::before { content: ""; position: absolute; left: -31px; top: 22px; width: 13px; height: 2px; background: var(--accent); }
.spine .d { font-size: 12.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.spine .t { font-size: 17px; }
.spine .t b { font-weight: 600; }

/* Why Pundora */
.why { background: var(--bg); padding: 140px 8vw 96px; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 56px; }
.why .col { gap: 18px; }
.why .h1.mid { font-size: clamp(36px, 4.6vw, 64px); max-width: 22ch; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.cell h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.15; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--text); }
.cell ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cell li { font-size: 14.5px; line-height: 1.45; color: var(--text); padding-left: 18px; position: relative; text-wrap: pretty; }
.cell li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 2px; background: var(--accent); }
.cell:last-child h3 { color: var(--muted); border-bottom-color: var(--hair); }
.cell:last-child li { color: var(--muted); }
.trust { border-top: 1px solid var(--hair); padding-top: 32px; }
.trust p { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--muted); max-width: 60ch; text-wrap: pretty; }

/* Footer */
.foot { padding: 40px 8vw 56px; font-size: 14px; color: var(--muted); background: var(--bg); }
.flinks { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.flinks a:hover { color: var(--text); }
.pending { opacity: .8; }
.co a { border-bottom: 1px solid var(--hair); }

/* Motion: timed to the scroll, never to a clock. Screens simply show where scroll
   timelines are unsupported, or when the reader asks for reduced motion. */
@supports (animation-timeline: view()) {
  .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 10% entry 60%; }
  .rise.d1 { animation-range: entry 20% entry 70%; }
  .rise.d2 { animation-range: entry 30% entry 80%; }
  .rise.d3 { animation-range: entry 40% entry 90%; }
  .rise.d4 { animation-range: entry 50% entry 100%; }
  .drawx { transform-origin: left center; animation: drawx linear both; animation-timeline: view(); animation-range: entry 10% entry 90%; }
  .drawx.late { animation-range: entry 30% entry 100%; }
  .typeit { animation: typeit linear both; animation-timeline: view(); animation-range: entry 25% entry 85%; }
  .slideup { animation: slideup linear both; animation-timeline: view(); animation-range: entry 20% entry 90%; }
  .tick path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: stroke linear both; animation-timeline: view(); animation-range: entry 40% entry 85%; }
  .tick.t2 path { animation-range: entry 55% entry 95%; }
  .tick.t3 path { animation-range: entry 70% entry 100%; }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes drawx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes typeit { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes slideup { from { opacity: 0; transform: translateY(80px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes stroke { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .drawx, .typeit, .slideup, .tick path { animation: none !important; clip-path: none !important; transform: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
}

/* Touch devices scroll natively, one screen at a time, by snapping. */
@media (hover: none) and (pointer: coarse) {
  html { scroll-snap-type: y mandatory; }
  .screen { scroll-snap-align: start; scroll-snap-stop: always; }
}

/* Phones */
@media (max-width: 820px) {
  .screen { padding: 96px 20px 56px; }
  .two, .two.list { grid-template-columns: 1fr; gap: 36px; }
  .h1 { font-size: clamp(48px, 15vw, 88px); }
  .h1.mid { font-size: clamp(34px, 9.5vw, 56px); }
  .oxblood .h1 { font-size: clamp(38px, 11vw, 72px); }
  .sub { font-size: 19px; }
  .num { font-size: clamp(44px, 13vw, 88px); }
  .cite { grid-template-columns: 1fr; gap: 4px 0; }
  .bar { top: 12px; gap: 16px; padding: 0 8px 0 16px; height: 48px; width: calc(100% - 24px); justify-content: space-between; }
  .bar .links { display: none; }
  .bar .cta { padding: 8px 14px; font-size: 13px; }
  .why { padding: 96px 20px 64px; gap: 40px; }
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .foot { padding: 32px 20px 48px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
