/* Sonder web design system. Tokens mirror the native app's Atmospheric theme (SonderTheme.swift).
   Ground, ink, raised, line and "now" come from there; the display and serif faces are open-source stand-ins for
   SF Pro Compressed Heavy and New York, which Apple does not license for web use. See DESIGN_SYSTEM.md. */

@font-face { font-family: "Barlow Condensed"; src: url(/assets/fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/assets/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/assets/fonts/newsreader-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/assets/fonts/newsreader-latin-wght-italic.woff2) format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(/assets/fonts/hanken-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* colour: app Atmospheric theme */
  --ivory: #FBF6F0; --ivory-raised: #F4EADF; --ivory-line: #E4D5C8;
  --ink: #1E1715; --ink-soft: #5E4F49; --ink-faint: #6B5B54;
  --night: #0F0A09; --night-raised: #2A201E; --night-line: #43342F; --night-ink: #F8EFE9; --night-soft: #C9B8AF;
  --now: #C7381F; --now-fill: #D03A22; --now-dark: #FF7A55;
  --risk: #B3261E; --good: #2A7A59; --good-dark: #6FD0A6;
  --peach: #F7B28F; --coral: #FB663E; --magenta: #A91F5C; --orb-pink: #DF519C; --indigo: #2A2A78; --yolk: #FFF38A;
  /* type */
  --f-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed", Impact, sans-serif;
  --f-serif: "Newsreader", "New York", Georgia, "Times New Roman", serif;
  --f-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* space (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 144px;
  --gutter: clamp(16px, 5vw, 56px); --max: 1180px; --prose: 68ch;
  --r-sm: 12px; --r: 22px; --r-lg: 34px; --pill: 999px;
  --ease: cubic-bezier(.22,.8,.2,1); --spring: cubic-bezier(.34,1.45,.5,1);
  --dur: .5s;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--night); }
body { margin: 0; font-family: var(--f-sans); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--ivory); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--now); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--now-dark); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1; }

/* ---------- type ---------- */
.caps, .h-caps { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: .005em; line-height: .88; }
.serif, .h-serif { font-family: var(--f-serif); font-weight: 560; letter-spacing: -.012em; line-height: 1.08; }
.h-serif em, .serif em, em.own { font-style: italic; font-weight: 420; }
.label { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.on-dark .label { color: var(--night-soft); }
.lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); max-width: 46ch; }
.on-dark .lede { color: var(--night-soft); }
.fine { font-size: .875rem; color: var(--ink-soft); line-height: 1.5; }
.on-dark .fine { color: var(--night-soft); }

/* ---------- grain (the app's texture) ---------- */
.grain { position: relative; isolation: isolate; }
.grain::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n' x='0' y='0'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); background-size: 220px; }
.grain > * { position: relative; z-index: 1; }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header-h); display: flex; align-items: center; gap: var(--s5); padding: 0 var(--gutter); color: var(--night-ink); transition: background-color .3s, color .3s, box-shadow .3s; }
.site-header.is-solid { background: color-mix(in srgb, var(--night) 94%, transparent); box-shadow: 0 1px 0 var(--night-line); }
body.light-top .site-header:not(.is-solid) { color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #FFF38A 0 14%, #FB663E 38%, #DF519C 66%, #2A2A78 100%); box-shadow: 0 0 14px rgba(251,102,62,.55); flex: none; }
.brand-word { font-family: var(--f-display); font-weight: 800; font-size: 1.75rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.primary-nav { display: flex; gap: var(--s5); margin-left: auto; }
.primary-nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 2px; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav a[aria-current] { border-bottom-color: var(--now-dark); }
.header-cta { text-decoration: none; font-weight: 700; font-size: .92rem; padding: 10px 18px; border-radius: var(--pill); background: var(--night-ink); color: var(--night); white-space: nowrap; }
body.light-top .site-header:not(.is-solid) .header-cta { background: var(--ink); color: var(--ivory); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; }
.nav-bars, .nav-bars::before { display: block; width: 22px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .3s var(--ease); }
.nav-bars::before { content: ""; position: absolute; top: 7px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-bars { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-bars::before { transform: translateY(-7px) rotate(-90deg); top: 7px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; margin-left: auto; }
  .header-cta { display: none; }
  .primary-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0; padding: var(--s4) var(--gutter) var(--s6); background: var(--night); color: var(--night-ink); border-bottom: 1px solid var(--night-line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .primary-nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .primary-nav a { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 2.2rem; padding: 10px 0; border: 0; line-height: 1; }
  .site-header.nav-open { background: var(--night); color: var(--night-ink); }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: var(--pill); border: 1.5px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; transition: transform .25s var(--spring), background-color .2s, box-shadow .2s; }
.btn:active { transform: scale(.975); }
.btn-now { background: var(--now-fill); color: #fff; }
.on-dark .btn-now { background: var(--now-dark); color: #1A0B05; }
.btn-now:hover { box-shadow: 0 8px 28px -8px rgba(251,102,62,.7); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: var(--ivory); }
.btn-ghost { border-color: color-mix(in srgb, currentColor 40%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(72px, 11vw, 144px); position: relative; }
.on-dark { background: var(--night); color: var(--night-ink); }
.on-ivory { background: var(--ivory); color: var(--ink); }
.on-raised { background: var(--ivory-raised); color: var(--ink); }
.on-rust { background: linear-gradient(168deg, #D8392A 0%, #C4302F 38%, #A91F5C 100%); color: #FFF7F1; }
.on-rust .lede, .on-rust .fine { color: #FFE4D8; }
.on-rust .label { color: #FFD7C6; }
.head { display: grid; gap: var(--s4); margin-bottom: clamp(32px, 5vw, 64px); max-width: 780px; }
.head h2 { font-size: clamp(2.6rem, 1.4rem + 5vw, 5.2rem); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

/* ---------- orb host ---------- */
.orb-anchor { width: var(--d, 280px); height: var(--d, 280px); max-width: 100%; position: relative; margin-inline: auto; }
.orb-anchor.left { margin-inline: 0 auto; }
.orb-anchor img.orb-still { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; box-shadow: 0 0 80px 10px rgba(251,102,62,.35); }
html.orb-on .orb-anchor img.orb-still { visibility: hidden; }
.orb-host { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 30; pointer-events: none; will-change: transform; contain: layout style; }
.orb-host canvas, .orb-host img { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); max-width: none; }
.orb-host img { border-radius: 50%; object-fit: cover; }
@media print { .orb-host { display: none; } }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: grid; align-items: center; padding-top: calc(var(--header-h) + 24px); padding-bottom: 64px; overflow: hidden; background:
  radial-gradient(70% 55% at 62% 55%, rgba(169,31,92,.34), transparent 70%),
  radial-gradient(50% 40% at 30% 85%, rgba(251,102,62,.18), transparent 70%), var(--night); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(16px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(4.2rem, 2rem + 10.5vw, 10.5rem); display: grid; gap: .04em; }
.hero h1 .h-caps { color: var(--night-ink); display: block; }
.hero h1 .h-serif { font-size: .48em; line-height: 1; letter-spacing: -.02em; color: #FFC9B4; font-weight: 500; font-style: italic; display: block; }
.hero .lede { margin-top: var(--s5); color: var(--night-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); align-items: center; }
.hero-status { margin-top: var(--s5); display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--night-soft); }
.hero-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--now-dark); box-shadow: 0 0 0 4px rgba(255,122,85,.2); }
.hero .orb-anchor { --d: min(520px, 46vw); }
.hero-fragments { position: absolute; inset: 0; pointer-events: none; }
@media (max-width: 860px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 8px); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero .orb-anchor { --d: min(320px, 78vw); order: -1; margin-block: 8px 0; }
  .hero h1 { font-size: clamp(4rem, 3rem + 14vw, 6.4rem); }
}

/* entrance */
.js .rise { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .rise.in { opacity: 1; transform: none; }

/* ---------- worries ---------- */
.worries { text-align: center; }
.worry-stage { display: grid; gap: var(--s4); justify-items: center; max-width: 760px; margin: 0 auto; min-height: 330px; align-content: start; }
.bubble { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.35rem, 1rem + 1.6vw, 2.1rem); padding: 14px 26px; border-radius: 28px 28px 28px 8px; background: var(--night-raised); border: 1px solid var(--night-line); max-width: 92%; }
.bubble:nth-child(even) { border-radius: 28px 28px 8px 28px; justify-self: end; background: #3a1d28; }
.bubble:nth-child(odd) { justify-self: start; }
.js .worry-stage .bubble { opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .6s var(--ease), transform .7s var(--spring), filter .8s, margin .8s var(--ease); }
.js .worry-stage .bubble.in { opacity: 1; transform: none; }
.js .worry-stage.resolved .bubble { opacity: 1; transform: scale(.94); color: var(--night-soft); background: transparent; border-color: var(--night-line); }
.resolve { margin-top: var(--s7); }
.resolve h2 { font-size: clamp(2.6rem, 1.4rem + 6vw, 6rem); }
.js .resolve { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .resolve.in { opacity: 1; transform: none; }
.worries .orb-anchor { --d: 200px; margin-top: var(--s7); }

/* ---------- demos ---------- */
.demo { background: #fff; border: 1px solid var(--ivory-line); border-radius: var(--r-lg); padding: clamp(20px, 3.5vw, 40px); box-shadow: 0 30px 60px -40px rgba(60,20,10,.35); }
.on-dark .demo { background: var(--night-raised); border-color: var(--night-line); box-shadow: none; }
.demo-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.on-dark .demo-tag { color: var(--night-soft); }
.demo-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--now); }
.on-dark .demo-tag::before { background: var(--now-dark); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); border: 0; padding: 0; margin: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--pill); border: 1.5px solid color-mix(in srgb, currentColor 30%, transparent); font-weight: 650; transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--spring); }
.chip input:checked + span { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.on-dark .chip input:checked + span { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--now); outline-offset: 3px; }
.on-dark .chip input:focus-visible + span { outline-color: var(--now-dark); }
.chip input:active + span { transform: scale(.96); }
.range { width: 100%; accent-color: var(--now-fill); height: 44px; }
.range-row { display: grid; gap: var(--s2); }
.range-row output, .big-fig { font-family: var(--f-sans); font-weight: 700; font-variant-numeric: tabular-nums; }
legend, .field-label { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: var(--s2); display: block; }

/* flow bar */
.flow { display: grid; gap: var(--s3); }
.flow-bar { display: flex; height: 76px; border-radius: 20px; overflow: hidden; background: var(--ivory-raised); position: relative; }
.flow-seg { height: 100%; display: grid; align-content: center; padding: 0 12px; font-size: .8rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; transition: flex-basis .8s var(--ease), background-color .4s; flex: 0 0 auto; }
.flow-seg small { display: block; font-weight: 500; opacity: .85; font-size: .72rem; }
.seg-rent { background: #7A2D3A; } .seg-food { background: #A8472F; } .seg-move { background: #C26A2A; }
.seg-buy { background: var(--ink); } .seg-free { background: linear-gradient(90deg, #DF519C, #FB663E); }
.seg-short { background: repeating-linear-gradient(135deg, var(--risk) 0 8px, #8f1d17 8px 16px); }
.flow-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--ink-soft); }
.flow-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.readout { display: grid; gap: 2px; padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--ivory-raised); transition: background-color .4s, color .4s; }
.readout .big-fig { font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem); line-height: 1.05; }
.readout.is-short { background: #F6D9D3; color: #6d140e; }
.readout.is-ok .big-fig { color: var(--good); }
.readout .why { font-size: .95rem; color: inherit; opacity: .85; }
.verdict { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--pill); font-weight: 750; font-size: .9rem; }
.verdict.fits { background: #D8EFE4; color: #17503A; } .verdict.tight { background: #FBE7C5; color: #6B4306; } .verdict.short { background: #F6D9D3; color: #6d140e; }
.verdict::before { font-weight: 800; }
.verdict.fits::before { content: "✓"; } .verdict.tight::before { content: "!"; } .verdict.short::before { content: "–"; }
.mini-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mini-table td { padding: 10px 0; border-bottom: 1px solid var(--ivory-line); }
.mini-table td:last-child { text-align: right; font-weight: 700; }
.on-dark .mini-table td { border-color: var(--night-line); }

/* stage with orb */
.stage { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .stage { grid-template-columns: 1fr; } }
.stage .orb-anchor { --d: 240px; }

/* two futures */
.futures { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 640px) { .futures { grid-template-columns: 1fr; } }
.future { border-radius: var(--r); padding: var(--s5); border: 1px solid var(--night-line); display: grid; gap: var(--s3); align-content: start; }
.future.a { background: #1d1513; } .future.b { background: linear-gradient(160deg, #6a1f3f, #a2362a); border-color: transparent; color: #fff; }
.future .big-fig { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem); line-height: 1; }
.future .k { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; font-weight: 700; }
.chart { width: 100%; max-width: 720px; height: auto; overflow: visible; }
.chart path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .la { stroke: #C9B8AF; } .chart .lb { stroke: #FFB09A; }
.chart .axis { stroke: currentColor; stroke-opacity: .18; stroke-width: 1; } .chart text { fill: currentColor; opacity: .78; font-size: 11px; font-family: var(--f-sans); }
.gap-line { font-family: var(--f-serif); font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); margin-top: var(--s5); }

/* goal */
.goal-bar { height: 14px; border-radius: 99px; background: #E9DDD1; position: relative; overflow: visible; }
.goal-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--ink); width: 0; transition: width 1s var(--ease); }
.goal-bar .tick { position: absolute; top: -5px; width: 2px; height: 24px; background: var(--now); transition: left .8s var(--ease); }
.goal-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); font-size: .92rem; color: var(--ink-soft); margin-top: var(--s3); }
.timeline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--s4); }
.timeline span { width: 22px; height: 28px; border-radius: 6px; background: #E9DDD1; transition: background-color .5s, transform .5s var(--spring); }
.timeline span.on { background: var(--ink); }
.timeline span.end { background: var(--now-fill); transform: scaleY(1.2); }

/* ask */
.chat { display: grid; gap: var(--s3); min-height: 200px; align-content: start; max-height: 520px; overflow-y: auto; }
.msg { max-width: 88%; padding: 14px 18px; border-radius: 20px; line-height: 1.5; font-size: 1rem; animation: pop .5s var(--ease) both; }
.msg.me { justify-self: end; background: var(--night-ink); color: var(--night); border-bottom-right-radius: 6px; }
.msg.bot { background: var(--night-raised); border: 1px solid var(--night-line); border-bottom-left-radius: 6px; }
.msg.bot ul { margin: 8px 0 0; display: grid; gap: 4px; }
.msg.bot li { display: flex; justify-content: space-between; gap: 18px; font-variant-numeric: tabular-nums; }
.action-card { margin-top: 12px; padding: 14px; border-radius: 16px; background: #1d1513; border: 1px dashed var(--now-dark); display: grid; gap: 10px; }
.action-card .row { display: flex; gap: 10px; flex-wrap: wrap; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.thinking { display: inline-flex; gap: 5px; padding: 6px 2px; }
.thinking i { width: 8px; height: 8px; border-radius: 50%; background: var(--now-dark); animation: dot 1.1s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- phones ---------- */
.phone { position: relative; width: min(100%, 300px); aspect-ratio: 1206 / 2622; border-radius: 15% / 7%; overflow: hidden; background: #000; border: 6px solid #15100f; box-shadow: 0 0 0 1px #3a2c28, 0 40px 80px -30px rgba(0,0,0,.6); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone.light-frame { border-color: #2a2220; }
.phones { display: flex; justify-content: center; align-items: flex-start; gap: clamp(8px, 2vw, 28px); }
.phones .phone { flex: 0 1 260px; }
.phones .phone:nth-child(2) { margin-top: 56px; }
.phones .phone:nth-child(3) { margin-top: 112px; }
@media (max-width: 700px) { .phones .phone:nth-child(3) { display: none; } .phones .phone:nth-child(2) { margin-top: 36px; } }
.parallax { transition: transform .12s linear; will-change: transform; }
.callouts { display: grid; gap: var(--s3); }
.callout { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: baseline; padding: var(--s3) 0; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.callout b { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; min-width: 7.5rem; }
.sample-note { font-size: .875rem; margin-top: var(--s3); }

/* editorial / chapters */
.month-xl { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; line-height: .82; font-size: clamp(4rem, 1rem + 8.4vw, 10rem); color: var(--now); margin-left: -.04em; }
.month-xl.sep { color: #A8802F; } .month-xl.aug { color: #5B7A3A; }
.quote { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem); line-height: 1.2; }
.chapter-list { display: grid; gap: var(--s6); }
.chapter-list li { padding-top: var(--s4); border-top: 1px solid var(--ivory-line); }
.chapter-list .m { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 2.2rem; line-height: 1; }

/* cards */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar { display: grid; gap: var(--s2); padding-top: var(--s4); border-top: 2px solid currentColor; align-content: start; }
.pillar h3 { font-family: var(--f-serif); font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.pillar p { color: inherit; opacity: .82; }
.status { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--pill); border: 1.5px solid currentColor; }
.status.soon { color: var(--now); } .on-dark .status.soon { color: var(--now-dark); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { border-radius: var(--r-lg); border: 1.5px solid var(--ivory-line); background: #fff; padding: var(--s6); display: grid; gap: var(--s3); align-content: start; position: relative; }
.plan h3 { font-family: var(--f-display); font-weight: 800; font-size: 2rem; text-transform: uppercase; line-height: 1; }
.plan .price { font-size: 3rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.plan .offer { font-weight: 700; color: var(--now); }
.plan.best { background: linear-gradient(165deg, #1b1210, #3a1630 70%, #6a1f3f); color: var(--night-ink); border-color: transparent; transform: translateY(-14px); box-shadow: 0 40px 80px -40px rgba(120,20,60,.7); }
.plan.best .price small, .plan.best .fine { color: var(--night-soft); } .plan.best .offer { color: #FFB09A; }
.plan.best .badge { position: absolute; top: -14px; left: var(--s6); background: var(--now-dark); color: #1A0B05; font-weight: 800; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: 6px 14px; border-radius: var(--pill); }
@media (max-width: 900px) { .plan.best { transform: none; } }
.plan ul { display: grid; gap: 6px; font-size: .95rem; }
.plan li::before { content: "·"; margin-right: 8px; font-weight: 900; }
.compare { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.compare th, .compare td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--ivory-line); vertical-align: top; }
.compare th { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* feature groups */
.fgroup { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 6vw, 96px); padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--ivory-line); }
@media (max-width: 860px) { .fgroup { grid-template-columns: 1fr; } }
.fgroup h2 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.4rem); }
.fgroup ul { display: grid; gap: var(--s4); }
.fgroup li { display: grid; gap: 2px; padding-bottom: var(--s4); border-bottom: 1px solid var(--ivory-line); }
.fgroup li:last-child { border: 0; }
.fgroup li b { font-family: var(--f-serif); font-size: 1.25rem; font-weight: 600; }
.fgroup li span { color: var(--ink-soft); }
.fgroup .tagrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* page header (inner pages) */
.page-hero { padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(32px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(3.6rem, 2rem + 8vw, 8rem); }
.page-hero .lede { margin-top: var(--s4); }
.page-hero.on-dark { background: radial-gradient(60% 80% at 80% 30%, rgba(169,31,92,.35), transparent 70%), var(--night); }

/* legal / prose */
.legal { display: grid; grid-template-columns: 250px minmax(0, var(--prose)); gap: clamp(32px, 6vw, 96px); padding-bottom: clamp(64px, 9vw, 120px); align-items: start; }
@media (max-width: 960px) { .legal { grid-template-columns: 1fr; } }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .92rem; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; }
@media (max-width: 960px) { .toc { position: static; border: 1px solid var(--ivory-line); border-radius: var(--r); padding: var(--s4) var(--s5); background: var(--ivory-raised); } }
.toc-title { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; color: var(--ink-soft); margin-bottom: var(--s3); }
.toc ol { display: grid; gap: 2px; counter-reset: t; }
.toc a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink-soft); }
.toc a:hover, .toc a[aria-current] { color: var(--ink); text-decoration: underline; }
.prose { max-width: var(--prose); }
.prose h2 { font-family: var(--f-serif); font-weight: 600; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); line-height: 1.12; letter-spacing: -.01em; margin: clamp(40px, 5vw, 64px) 0 var(--s4); scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-weight: 750; font-size: 1.1rem; margin: var(--s6) 0 var(--s2); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--s4); }
.prose ul { list-style: disc; padding-left: 1.3em; display: block; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li { margin-bottom: 6px; padding-left: 4px; }
.prose a { color: var(--now); font-weight: 600; }
.prose strong { font-weight: 750; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--s4) 0 var(--s5); font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ivory-line); vertical-align: top; }
.prose th { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.notice { border: 1.5px solid var(--now); border-radius: var(--r); padding: var(--s4) var(--s5); background: #FFF1EA; color: #5a1a0e; font-size: .95rem; margin-bottom: var(--s6); }
.notice b { display: block; margin-bottom: 4px; }
.pending { background: #FBE7C5; color: #5c3a05; font-weight: 700; padding: 1px 8px; border-radius: 6px; font-size: .88em; white-space: nowrap; }
.updated { color: var(--ink-soft); font-size: .92rem; margin-bottom: var(--s5); }

/* faq */
.faq { border-top: 1px solid var(--ivory-line); }
.faq:last-child { border-bottom: 1px solid var(--ivory-line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 52px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; transition: transform .3s var(--spring); flex: none; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 20px; max-width: 62ch; color: var(--ink-soft); }
.faq-a a { color: var(--now); font-weight: 600; }
.faq-group { margin-bottom: var(--s7); }
.faq-group h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 2.2rem; margin-bottom: var(--s3); line-height: 1; }
.help-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
@media (max-width: 860px) { .help-cards { grid-template-columns: 1fr; } }
.help-card { padding: var(--s5); border: 1.5px solid var(--ivory-line); border-radius: var(--r); background: #fff; display: grid; gap: var(--s2); text-decoration: none; transition: transform .3s var(--spring), border-color .2s; align-content: start; }
.help-card:hover { transform: translateY(-3px); border-color: var(--ink); }
.help-card h3 { font-family: var(--f-serif); font-weight: 600; font-size: 1.3rem; }
.help-card p { color: var(--ink-soft); font-size: .95rem; }

/* how it works */
.steps { counter-reset: s; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 90px 1fr; gap: var(--s5); padding: var(--s6) 0; border-top: 1px solid var(--ivory-line); align-items: start; }
.step::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--f-display); font-weight: 800; font-size: 4rem; line-height: .85; color: var(--now); }
.step h3 { font-family: var(--f-serif); font-weight: 600; font-size: 1.7rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); max-width: 56ch; }
@media (max-width: 560px) { .step { grid-template-columns: 56px 1fr; } .step::before { font-size: 2.8rem; } }

/* cta band */
.cta { text-align: center; }
.cta h2 { font-size: clamp(3.2rem, 1.6rem + 8vw, 8.4rem); }
.cta .hero-actions { justify-content: center; }
.cta .lede { margin-inline: auto; margin-top: var(--s4); }

/* footer */
.site-footer { background: var(--night); color: var(--night-ink); padding: var(--s9) var(--gutter) var(--s6); position: relative; z-index: 2; }
.footer-inner { width: min(100%, var(--max)); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s7); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: var(--s6); } }
.footer-line { font-family: var(--f-serif); font-style: italic; font-size: 1.5rem; margin: var(--s4) 0 var(--s3); color: #FFC9B4; }
.footer-small { color: var(--night-soft); font-size: .92rem; }
.footer-h { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; color: var(--night-soft); margin-bottom: var(--s3); }
.footer-col { display: grid; gap: 2px; align-content: start; }
.footer-col a { text-decoration: none; padding: 8px 0; min-height: 40px; display: inline-block; }
.footer-col a:hover { text-decoration: underline; }
.footer-fine { width: min(100%, var(--max)); margin: var(--s8) auto 0; padding-top: var(--s5); border-top: 1px solid var(--night-line); color: var(--night-soft); font-size: .85rem; }

/* ---------- reduced motion & no-js ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .rise, .js .worry-stage .bubble, .js .resolve { opacity: 1 !important; transform: none !important; }
  .js .worry-stage.resolved .bubble { opacity: 1 !important; }
}
html:not(.js) .worry-stage .bubble, html:not(.js) .resolve { opacity: 1; transform: none; }

/* ---------- hero fragments: small pieces of a life the orb is holding ---------- */
.hero-orb { position: relative; }
.frags { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.frag { position: absolute; padding: 9px 16px; border-radius: var(--pill); background: var(--night-raised); border: 1px solid var(--night-line); font-weight: 650; font-size: .88rem; color: var(--night-ink); white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); }
.frag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--now-dark); margin-right: 8px; }
.f1 { top: 4%; left: -6%; } .f2 { bottom: 6%; right: -4%; } .f3 { top: 54%; left: -12%; }
@media (max-width: 1180px) { .f3 { display: none; } }
.f2::before { background: var(--orb-pink); } .f3::before { background: #FFF38A; }
.js .frag { opacity: 0; transform: translateY(10px) scale(.94); animation: fragIn 1s var(--spring) forwards; }
.js .f1 { animation-delay: 1.9s; } .js .f2 { animation-delay: 2.3s; } .js .f3 { animation-delay: 2.7s; }
@keyframes fragIn { to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .f1 { top: 4%; left: 2%; } .f2 { bottom: 6%; right: 2%; } .f3 { display: none; } .frag { font-size: .8rem; padding: 7px 12px; } }
@media (prefers-reduced-motion: reduce) { .js .frag { opacity: 1; transform: none; animation: none; } }

/* the first screen never waits for a scroll observer: it enters on load */
.js .hero .rise { opacity: 0; transform: translateY(22px); transition: none; animation: riseIn 1s var(--ease) both; animation-delay: calc(.25s + var(--i, 0) * 110ms); }
@keyframes riseIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .hero .rise { opacity: 1; transform: none; animation: none; } }

@media (max-width: 860px) {
  .hero-orb { order: -1; }
  .hero .orb-anchor { --d: min(250px, 64vw); margin-block: 0 8px; }
  .hero h1 { font-size: clamp(3.4rem, 1rem + 15.5vw, 5.6rem); }
}
@media (max-width: 860px) { .frags { display: none; } }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* matrix fixes: short laptops, High Contrast, translation length, 320px */
@media (min-width: 861px) and (max-height: 720px) { .hero h1 { font-size: clamp(3.2rem, 17vh, 8rem); } .hero { padding-bottom: 32px; } .hero .lede { margin-top: var(--s4); } .hero-actions { margin-top: var(--s5); } }
@media (forced-colors: active) { .orb-host canvas, .orb-host img, .orb-anchor img, .phone img, .brand-dot { forced-color-adjust: none; } }
.split > *, .stage > *, .fgroup > *, .hero-grid > *, .legal > * { min-width: 0; }
.phones .phone { min-width: 0; }
.primary-nav a { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .month-xl { font-size: clamp(3.6rem, 1rem + 17vw, 8rem); }
  .footer-inner { grid-template-columns: 1fr; }
  .primary-nav { overflow-x: hidden; }
}
.quote, .lede, .prose p { overflow-wrap: break-word; }

.label + h2, .label + h1 { margin-top: var(--s3); }
