/* Cradle public site — same register as the app: calm, precise, solid surfaces,
   hairline borders, one accent. Tokens mirror static/styles.css. */
:root {
  --ground: #f7f7f8; --surface: #ffffff; --surface-2: #f1f1f3;
  --hover: rgba(20, 20, 30, .045); --border: #e6e6ea; --border-strong: #d6d6dc;
  --text: #1a1a1f; --text-dim: #6b6b75; --text-faint: #a0a0a9;
  --accent: #2f5d50; --accent-ink: #ffffff; --accent-soft: rgba(47, 93, 80, .10);
  --sleep: #5b6ccf; --feed: #a8702b; --diaper: #3d8a66; --danger: #c4554d;
  --radius: 12px; --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(20, 20, 30, .04);
  --glass: rgba(247, 247, 248, .85);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e0e11; --surface: #16161a; --surface-2: #1d1d22;
    --hover: rgba(255, 255, 255, .05); --border: #26262c; --border-strong: #35353c;
    --text: #ececef; --text-dim: #9a9aa3; --text-faint: #5e5e66;
    --accent: #8fbfa9; --accent-ink: #0e1a16; --accent-soft: rgba(143, 191, 169, .12);
    --sleep: #97a4ef; --feed: #cf9c55; --diaper: #6cb392; --danger: #d9776f;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --glass: rgba(14, 14, 17, .85);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--text); background: var(--ground);
  line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
::selection { background: var(--accent-soft); }

svg.dd { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -.15em; overflow: visible; }
.doodle { color: var(--accent); font-size: 26px; line-height: 1; display: inline-block; }
.doodle.lg { font-size: 44px; }
.doodle.xl { font-size: 80px; }
.doodle.dim { color: var(--text-faint); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 680px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; font-weight: 650; }
h1 { font-size: clamp(34px, 5.2vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 34px); }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
p.lede { color: var(--text-dim); font-size: 18px; max-width: 560px; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; min-height: 42px; border-radius: var(--radius-sm); font-weight: 500; font-size: 15px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  transition: background .12s, border-color .12s, transform .08s; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-lg { padding: 13px 22px; min-height: 48px; font-size: 16px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--glass);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 17px; letter-spacing: -.01em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .doodle { font-size: 24px; }
nav.main { display: flex; gap: 2px; margin-left: 8px; }
nav.main a { color: var(--text-dim); font-size: 14px; padding: 7px 10px; border-radius: 7px; }
nav.main a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
nav.main a[aria-current="page"] { color: var(--text); font-weight: 600; }
.top .spacer { flex: 1; }
.top .cta { display: flex; gap: 8px; align-items: center; }
.top .btn { min-height: 36px; padding: 7px 14px; font-size: 14px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; font-size: 22px; color: var(--text-dim); }
.menu-btn:hover { background: var(--hover); }
@media (max-width: 820px) {
  nav.main { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 12px 12px; margin: 0; }
  nav.main a { padding: 11px 10px; font-size: 16px; }
  .top.open nav.main { display: flex; }
  .menu-btn { display: inline-flex; }
  .top .cta .btn-ghost { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: 84px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin: 10px 0 18px; max-width: 12ch; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero .note { margin-top: 14px; font-size: 13.5px; color: var(--text-faint); }
.hero .note b { color: var(--text-dim); font-weight: 500; }
@media (max-width: 820px) {
  .hero { padding: 48px 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { max-width: none; }
}

/* phone mock — a real "Today" screen in miniature, drawn with the same tokens */
.phone {
  width: 300px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; padding: 18px 16px 22px; box-shadow: 0 1px 2px rgba(20,20,30,.06), 0 24px 60px rgba(20,20,30,.10);
}
.phone .bar { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-faint); margin-bottom: 14px; }
.phone .bar b { color: var(--text); font-weight: 600; font-size: 14px; }
.phone .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phone .card { background: var(--ground); border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; }
.phone .card .k { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.phone .card .v { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.phone .card .s { font-size: 11px; color: var(--text-faint); }
.phone .card.sleep .k { color: var(--sleep); } .phone .card.feed .k { color: var(--feed); } .phone .card.diaper .k { color: var(--diaper); }
.phone .rhythm { margin-top: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.phone .rhythm .t { color: var(--text-dim); font-size: 11px; }
.phone .rhythm b { font-weight: 600; }
.phone .quick { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.phone .quick span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-dim); padding: 8px 4px; border: 1px solid var(--border); border-radius: 10px; }
.phone .quick .doodle { font-size: 20px; color: var(--text); }

/* ---------- sections ---------- */
section { padding: 64px 0; border-top: 1px solid var(--border); }
section.plain { border-top: none; }
.section-head { max-width: 620px; margin-bottom: 36px; }
.section-head p { color: var(--text-dim); margin-top: 10px; font-size: 16.5px; }
.grid { display: grid; gap: 14px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid.c3, .grid.c2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px 24px; box-shadow: var(--shadow-1);
}
.card .doodle { margin-bottom: 14px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--text-dim); font-size: 14.5px; }
.card .price { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin: 6px 0 2px; }

/* split feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split p { color: var(--text-dim); margin-top: 10px; }
.split ul { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.split li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-dim); font-size: 15px; }
.split li .doodle { font-size: 18px; margin-top: 2px; flex: none; }
@media (max-width: 820px) { .split, .split.flip { grid-template-columns: 1fr; gap: 24px; } .split.flip > :first-child { order: 0; } }
/* grid/flex children default to min-width:auto, which lets wide content (the editions
   strip, stat tiles) push the page wider than the viewport on phones */
.split > *, .grid > *, .hero .wrap > *, .band > *, .stat-tiles > *, .card, .timeline { min-width: 0; }
body { overflow-x: hidden; }

/* timeline illustration (the moat) */
.timeline { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-1); }
.timeline .row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); align-items: baseline; }
.timeline .row:first-child { border-top: none; padding-top: 0; }
.timeline .when { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .02em; }
.timeline .what { font-size: 14.5px; }
.timeline .what small { display: block; color: var(--text-dim); font-size: 12.5px; }
.timeline .what .doodle { font-size: 16px; margin-right: 6px; }

/* editions strip (how the Book works) */
.editions { display: flex; align-items: center; gap: 0; margin-top: 22px; overflow-x: auto; padding-bottom: 4px; }
.editions .ed { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); min-width: 78px; }
.editions .ed b { display: flex; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.editions .ed.book b { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-size: 20px; }
.editions .line { flex: 1; min-width: 14px; height: 1px; background: var(--border-strong); }

/* stats mock */
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tiles .tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat-tiles .tile .k { font-size: 12px; color: var(--text-dim); }
.stat-tiles .tile .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-tiles .tile .d { font-size: 12px; color: var(--diaper); }
.stat-tiles .tile .d.neg { color: var(--text-faint); }
@media (max-width: 480px) { .stat-tiles { grid-template-columns: 1fr 1fr; } .stat-tiles .tile:last-child { grid-column: 1 / -1; } .phone { width: 100%; max-width: 300px; } }
.pred { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.pred .doodle { font-size: 28px; color: var(--sleep); }
.pred b { display: block; font-weight: 600; }
.pred small { color: var(--text-dim); }

/* ask mock */
.ask { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.ask .q { display: inline-block; background: var(--surface-2); border-radius: 14px 14px 4px 14px; padding: 9px 13px; font-size: 14.5px; margin-bottom: 12px; }
.ask .a { font-size: 14.5px; color: var(--text-dim); border-left: 2px solid var(--accent); padding-left: 12px; }
.ask .src { margin-top: 10px; font-size: 12px; color: var(--text-faint); display: flex; gap: 8px; flex-wrap: wrap; }
.ask .src span { border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }

/* charity band */
.band { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.band .big { font-size: 56px; font-weight: 650; letter-spacing: -.03em; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.band p { color: var(--text-dim); margin-top: 8px; max-width: 60ch; }
@media (max-width: 640px) { .band { grid-template-columns: 1fr; padding: 26px; } }

/* FAQ */
.faq details { border-top: 1px solid var(--border); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; font-weight: 500; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-size: 20px; font-weight: 300; transition: transform .15s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-dim); padding: 0 0 16px; max-width: 64ch; }

/* pre-footer CTA */
.cta-band { text-align: center; padding: 72px 0; }
.cta-band .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 13.5px; color: var(--text-dim); }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin-bottom: 10px; font-weight: 600; }
footer ul { list-style: none; display: grid; gap: 6px; }
footer a { color: var(--text-dim); }
footer a:hover { color: var(--text); }
footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 8px; color: var(--text-faint); font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 820px) { footer .wrap { grid-template-columns: 1fr 1fr; } }

/* ---------- document pages (about, privacy, demo) ---------- */
.doc { padding: 64px 0 80px; }
.doc h1 { margin: 6px 0 14px; }
.doc h2 { font-size: 20px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--text-dim); font-size: 16px; }
.doc p { margin-bottom: 12px; }
.doc ul { padding-left: 20px; display: grid; gap: 6px; margin-bottom: 12px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc .updated { color: var(--text-faint); font-size: 13.5px; margin-bottom: 24px; }
.doc .values { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 8px; }
@media (max-width: 640px) { .doc .values { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; font-size: 15px; margin: 8px 0 16px; }
.kv dt { color: var(--text-faint); }
.kv dd { color: var(--text); }

/* demo page */
.demo-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin: 24px 0; box-shadow: var(--shadow-1); }
.demo-card .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.demo-card .who { font-size: 14px; color: var(--text-dim); }
.demo-card .who b { color: var(--text); font-weight: 600; }
.notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; color: var(--text-dim); background: var(--surface-2); margin-top: 14px; }
.notice .doodle { font-size: 18px; margin-top: 1px; flex: none; }

/* ---------- articles ---------- */
.articles-head { padding: 56px 0 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.lang { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang button { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--text-dim); min-height: 32px; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.article-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 36px; }
@media (max-width: 820px) { .article-list { grid-template-columns: 1fr; } }
.article-card { display: block; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1); transition: border-color .12s; }
.article-card:hover { text-decoration: none; border-color: var(--border-strong); }
.article-card .meta { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.article-card .meta .stage { color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.article-card h3 { margin-bottom: 6px; font-size: 16.5px; }
.article-card p { color: var(--text-dim); font-size: 14px; }
.article { padding: 48px 0; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
.article .wrap { max-width: 680px; }
.article h2 { margin: 8px 0 18px; }
.article p { color: var(--text-dim); font-size: 17px; margin-bottom: 16px; line-height: 1.65; }
.article .meta { font-size: 13px; color: var(--text-faint); display: flex; gap: 10px; flex-wrap: wrap; }
.article .sources { margin-top: 20px; font-size: 13px; color: var(--text-faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article .sources a { border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--text-dim); }
.article .sources a:hover { border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.article .disclaimer { margin-top: 18px; font-size: 13px; color: var(--text-faint); }
.shelf-note { border-top: 1px solid var(--border); padding: 40px 0 64px; text-align: center; color: var(--text-dim); }
.shelf-note .actions { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
