/* Worren site. Tokens mirror the design system (packages/design-system Palette.swift,
   Paper "ds" page): DM Sans, square corners, primary #F15734, secondary #FFB300. */
:root {
  color-scheme: light;
  --primary50: #FDEBE7; --primary100: #FAC4B7; --primary300: #F37558;
  --primary400: #F15734; --primary500: #D7340F; --primary600: #A7280C; --primary800: #481105; --primary900: #180602;
  --secondary100: #FFF0CC; --secondary300: #FFD060; --secondary500: #FFB300;
  --n000: #FFFFFF; --n902: #F5F5F5; --n200: #E5E5E5; --n300: #CCCCCC; --n400: #898989;
  --n500: #5C5C5C; --n600: #454545; --n800: #171717; --n900: #000000;
  --danger-bg: #FDECEC; --danger: #D61212; --success-bg: #EBFFEB; --success: #2B7D24;

  --bg: var(--n000);
  --ink: var(--n800);
  --muted: var(--n500);
  --line: var(--n200);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── INTRO ── */
.intro-layer { display: none; }
html.intro .intro-layer {
  display: block; position: fixed; inset: 0; z-index: 100; background: var(--secondary500);
}
html.intro .intro-layer.playing { background: transparent; }
html.intro body { overflow: hidden; }
#intro-canvas { width: 100%; height: 100%; }
.intro-skip {
  position: absolute; right: 20px; bottom: 20px; font: 500 13px/1 var(--font); letter-spacing: .04em;
  color: var(--primary900); background: transparent; border: 1px solid var(--primary900); padding: 9px 14px; cursor: pointer;
  transition: opacity .3s;
}
.intro-skip:hover { background: var(--primary900); color: var(--secondary500); }
.intro-layer.leaving .intro-skip { opacity: 0; pointer-events: none; }

/* Hero entrance plays once the intro is gone (or immediately without it). */
.hero-copy > *, .hero-stage { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
body.ready .hero-copy > *, body.ready .hero-stage { opacity: 1; transform: none; }
body.ready .hero-copy > :nth-child(2) { transition-delay: .06s; }
body.ready .hero-copy > :nth-child(3) { transition-delay: .14s; }
body.ready .hero-copy > :nth-child(4) { transition-delay: .2s; }
body.ready .hero-copy > :nth-child(5) { transition-delay: .26s; }
body.ready .hero-stage { transition-delay: .1s; }

/* ── BUTTONS (ds: buttons) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; font: 500 15px/18px var(--font); border: 0; cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 14px; }
.btn-primary { background: var(--primary400); color: var(--n800); }
.btn-primary:hover { background: var(--primary500); color: var(--n000); }
.btn-secondary { background: var(--n000); color: var(--n600); outline: 1px solid var(--n900); outline-offset: -1px; }
.btn-secondary:hover { background: var(--n800); color: var(--n000); }
.btn-inverse { background: var(--n900); color: var(--n000); }
.btn-inverse:hover { background: var(--primary500); }
:focus-visible { outline: 2px solid var(--primary500); outline-offset: 2px; }

/* ── CHIPS / BADGES ── */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; color: var(--n800); border: 1px solid var(--n800); background: var(--n000); white-space: nowrap;
}
.chip-dark { background: var(--n800); color: var(--n000); }
.chip-live i { width: 6px; height: 6px; background: var(--primary400); animation: pulse 1.6s steps(2) infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.badge { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: var(--n800); color: var(--n000); padding: 3px 7px; margin-left: 6px; vertical-align: 2px; }

/* ── LIST ITEMS (ds: list) ── */
.list { list-style: none; display: grid; gap: 6px; }
.li { display: flex; align-items: center; gap: 10px; background: var(--n902); padding: 9px 10px; min-height: 44px; }
.li-dot { width: 4px; height: 4px; background: var(--n800); flex-shrink: 0; margin: 0 4px; }
.li-body { display: grid; flex: 1; min-width: 0; }
.li-body b { font-weight: 500; font-size: 13px; line-height: 17px; }
.li-body small { font-size: 11px; color: var(--muted); line-height: 14px; }
.li-trail { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.li-danger { background: var(--danger-bg); } .li-danger .li-dot { background: var(--danger); } .li-danger .li-trail { color: var(--danger); }
.li-success { background: var(--success-bg); } .li-success .li-dot { background: var(--success); } .li-success .li-trail { color: var(--success); }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter); background: rgba(255,255,255,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.wordmark svg { width: 18px; height: 18px; fill: var(--primary400); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.wordmark:hover svg { transform: rotate(90deg); }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ── HERO ── */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(48px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy { display: grid; justify-items: start; gap: 28px; }
.hero-title { font-weight: 500; font-size: clamp(44px, 6.4vw, 88px); line-height: .98; letter-spacing: -.045em; }
.hero-title .line { display: block; }
.hero-title em { font-style: normal; color: var(--primary400); }
.hero-sub { max-width: 34em; font-size: clamp(16px, 1.5vw, 18px); color: var(--n600); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: clamp(20px, 4vw, 44px); padding-top: 8px; border-top: 1px solid var(--line); width: 100%; }
.hero-stats div { padding-top: 14px; }
.hero-stats dt { font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.hero-stats dd { font-size: 13px; color: var(--muted); }

.hero-stage { position: relative; aspect-ratio: 4 / 5; min-height: 480px; display: grid; place-items: center; background: var(--secondary500); overflow: hidden; }
.shader { position: absolute; inset: 0; width: 100%; height: 100%; }

.phone {
  position: relative; width: min(290px, 78%); aspect-ratio: 9 / 18.5; background: var(--n900); padding: 10px;
  border-radius: 38px; box-shadow: 14px 14px 0 var(--primary800);
}
.phone-notch { position: absolute; top: 18px; left: 50%; width: 76px; height: 22px; margin-left: -38px; background: var(--n900); border-radius: 12px; z-index: 2; }
.phone-screen { height: 100%; background: var(--n000); border-radius: 29px; overflow: hidden; padding: 50px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.prompt { display: flex; align-items: baseline; gap: 8px; font-size: 12px; background: var(--n902); padding: 9px 11px; min-height: 36px; }
.prompt-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--n400); flex-shrink: 0; }
.prompt-text { color: var(--ink); }
.caret { width: 6px; height: 12px; background: var(--primary400); align-self: center; animation: pulse 1s steps(2) infinite; }
.app { display: flex; flex-direction: column; gap: 10px; flex: 1; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.app.show { opacity: 1; transform: none; }
.app > * { flex-shrink: 0; }
.app-head { display: grid; }
.app-kicker { font-size: 11px; color: var(--primary500); font-weight: 500; }
.app-title { font-size: 24px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.app-cta { margin-top: auto; background: var(--primary400); color: var(--n800); font-size: 13px; font-weight: 500; text-align: center; padding: 11px; }

/* ── STRIP ── */
.strip { border-block: 1px solid var(--line); overflow: hidden; padding: 16px 0; }
.strip-track { display: flex; gap: 10px; width: max-content; animation: marquee 48s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── SECTIONS ── */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 136px) var(--gutter); }
.section-tint { max-width: none; background: var(--n902); }
.section-tint > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-inline: auto; }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head-split { grid-template-columns: 1fr 1fr; align-items: end; gap: 24px 48px; }
.eyebrow { font-size: 13px; color: var(--primary500); font-weight: 500; letter-spacing: .02em; }
.eyebrow::before { content: "// "; color: var(--n300); }
.section h2 { font-weight: 500; font-size: clamp(34px, 5vw, 60px); line-height: 1.02; letter-spacing: -.04em; max-width: 14em; }
.section-sub { color: var(--n600); max-width: 32em; }
.num { font-size: 13px; color: var(--n400); font-variant-numeric: tabular-nums; }
.section h3 { font-weight: 500; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.section p { color: var(--n600); }
@media (max-width: 820px) { .section-head-split { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--n800); }
.feature { display: grid; align-content: start; gap: 12px; padding: 32px 32px 8px 0; }
.feature + .feature { padding-left: 32px; border-left: 1px solid var(--line); }
.feature-block { width: 44px; height: 44px; margin-bottom: 20px; }
.feature-block .fa { fill: var(--primary400); } .feature-block .fb { fill: var(--primary600); }
.feature:hover .feature-block { animation: cut .5s steps(1) 1; }
@keyframes cut { 33% { transform: rotate(90deg); } 66% { transform: scale(.6); } }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--n000); padding: 28px; display: grid; gap: 12px; align-content: start; }
.step-demo { margin-top: 12px; min-height: 96px; display: grid; align-content: end; justify-items: start; }
.mono { font-size: 14px; background: var(--secondary100); padding: 10px 12px; border-left: 3px solid var(--secondary500); color: var(--n800); }
.list-mini { width: 100%; }

@media (max-width: 900px) {
  .features, .steps { grid-template-columns: 1fr; }
  .feature, .feature + .feature { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ── CHARTS (ds: charts — 10px blocks, 4px gap) ── */
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.chart-card { border: 1px solid var(--line); padding: 22px 22px 18px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.chart-wide { grid-column: span 2; }
.chart-card figcaption { display: grid; gap: 1px; }
.chart-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary500); margin-bottom: 6px; }
.chart-card figcaption b { font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.chart-card figcaption small { font-size: 13px; color: var(--muted); }
.chart { display: grid; gap: var(--gap, 4px); position: relative; }
.chart i { display: block; aspect-ratio: 1; background: var(--n902); transition: background-color .25s; }
.chart i.on { background: var(--c); }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--n400); padding-top: 4px; border-top: 1px dashed var(--n200); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.k-primary { background: var(--primary400); } .k-secondary { background: var(--secondary300); } .k-dark { background: var(--n500); }
.tip {
  position: absolute; transform: translate(-50%, calc(-100% - 10px)); background: var(--primary400); color: var(--n000);
  padding: 8px 12px; font-size: 12px; line-height: 1.3; white-space: nowrap; pointer-events: none; z-index: 2;
  box-shadow: 3px 3px 0 var(--primary800);
}
.tip small { display: block; opacity: .85; font-size: 11px; }
.app-chart { --gap: 3px; }
@media (max-width: 980px) { .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .charts { grid-template-columns: minmax(0, 1fr); } .chart-wide { grid-column: auto; } }

/* ── PRICING ── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--n000); padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.plan-name { font-size: 14px; font-weight: 500; }
.plan-price { font-size: 56px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.plan-price small { display: block; font-size: 13px; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-top: 8px; }
.plan ul { list-style: none; display: grid; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.plan li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--primary400); margin-right: 10px; vertical-align: 2px; }
.plan .btn { margin-top: auto; }
.plan-featured { outline: 2px solid var(--n800); outline-offset: -2px; box-shadow: 10px 10px 0 var(--secondary500); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* ── FAQ (ds: accordion) ── */
.faq { border-top: 1px solid var(--n800); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-size: clamp(17px, 2vw, 20px); font-weight: 500; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 14px; height: 14px; flex-shrink: 0; background:
  linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; max-width: 42em; }

/* ── WAITLIST ── */
.waitlist { position: relative; min-height: 560px; display: grid; place-items: center; padding: 96px var(--gutter); background: var(--secondary500); overflow: hidden; }
.waitlist-card { position: relative; background: var(--n000); padding: clamp(28px, 5vw, 56px); width: min(560px, 100%); display: grid; gap: 16px; box-shadow: 12px 12px 0 var(--primary800); }
.waitlist-card h2 { font-weight: 500; font-size: clamp(34px, 5vw, 52px); line-height: 1; letter-spacing: -.04em; }
.waitlist-card p { color: var(--n600); }
.wl-form { display: flex; gap: 0; margin-top: 8px; }
.wl-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; font: 16px var(--font); border: 1px solid var(--n800); border-right: 0; background: var(--n000); color: var(--ink); border-radius: 0; }
.wl-form input:focus { outline: none; border-color: var(--primary500); box-shadow: inset 0 0 0 1px var(--primary500); }
.wl-form input.invalid { border-color: var(--danger); background: var(--danger-bg); }
.wl-form .btn { min-height: 48px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-error { color: var(--danger) !important; font-size: 14px; }
.wl-form .btn:disabled { opacity: .6; cursor: progress; }
.wl-success { color: var(--success) !important; font-weight: 500; }

/* ── FOOTER ── */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px var(--gutter); font-size: 13px; color: var(--muted); }
.footer nav { display: flex; gap: 20px; }
.footer a:hover { color: var(--ink); }
.footer .wordmark { font-size: 16px; color: var(--ink); }

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { aspect-ratio: auto; min-height: 560px; }
}
@media (max-width: 480px) {
  .hero-stats { gap: 16px; } .hero-stats dt { font-size: 20px; }
  .wl-form { flex-direction: column; } .wl-form input { border-right: 1px solid var(--n800); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .reveal, .hero-copy > *, .hero-stage { opacity: 1; transform: none; }
}
