/* ============================================================
   Bedhead — "Dawn on paper"
   Light editorial. Warm paper ground, dark indigo ink, the Dawn
   gradient confined to the phone device and small accents.
   Deep-indigo footer bookends the page (night returns).
   ============================================================ */

:root {
  --paper: #f7f2ec;
  --card: #fffdfa;
  --ink: #1a1f40;
  --ink-72: rgba(26,31,64,.72);
  --ink-58: rgba(26,31,64,.58);
  --ink-42: rgba(26,31,64,.42);
  --ink-30: rgba(26,31,64,.30);
  --line: rgba(26,31,64,.12);
  --line-soft: rgba(26,31,64,.07);

  /* Dawn gradient (device + accents) */
  --g0:#1a1f40; --g1:#2e2954; --g2:#594073; --g3:#995c78; --g4:#d9876e; --g5:#f2b887; --g6:#ffd4a3;
  --gradient: linear-gradient(180deg,#1a1f40,#2e2954 22%,#594073 46%,#995c78 66%,#d9876e 84%,#f2b887);
  --gradient-h: linear-gradient(90deg,#1a1f40,#594073 38%,#995c78 60%,#d9876e 82%,#f2b887);

  --gold:#f5d96e;       /* device only (on dark) */
  --warm:#c2602f;       /* warm accent that survives on paper */

  --footer-bg:#14182e;
  --on-dark-95: rgba(243,239,232,.95);
  --on-dark-65: rgba(243,239,232,.62);
  --on-dark-35: rgba(243,239,232,.34);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", system-ui, sans-serif;
  --maxw: 1080px;
  --reading: 680px;
  --gutter: clamp(22px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-weight: 300;
  color: var(--ink); line-height: 1.55; background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* faint dawn wash, upper-right only */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(110% 70% at 95% -12%,
    rgba(245,184,135,.42), rgba(217,135,110,.10) 34%, transparent 58%);
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- type ---------- */
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-42); }
h1, h2, h3 { font-weight: 300; margin: 0; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5.8vw, 4rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.1; }
p { margin: 0; }
.lede { font-size: clamp(1.05rem, 2.1vw, 1.28rem); color: var(--ink-72); max-width: 44ch; line-height: 1.5; }
.numeral { font-weight: 200; letter-spacing: -.03em; line-height: 1; font-variant-numeric: proportional-nums; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { padding-block: clamp(64px, 11vh, 120px); }
.rule { height: 1px; border: 0; background: var(--line); margin: 0; }
.grule { height: 2px; border: 0; background: var(--gradient-h); opacity: .5; margin: 0; border-radius: 2px; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter); position: sticky; top: 0; z-index: 30;
  background: rgba(247,242,236,.78); backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 400; color: var(--ink); }
.brand .mk { width: 26px; height: 26px; border-radius: 6px; flex: none; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav-links a { color: var(--ink-58); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 7vh, 84px); padding-bottom: clamp(48px, 9vh, 100px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 68px); align-items: center; }
.hero h1 { margin-top: 16px; }
.hero .lede { margin-top: 22px; }
.cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.badge-soon { display: inline-flex; align-items: center; gap: 9px; background: var(--ink); color: #fff;
  padding: 13px 20px; border-radius: 13px; font-size: 15px; font-weight: 400; }
.badge-soon .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g5);
  box-shadow: 0 0 0 4px rgba(242,184,135,.25); }
.cta-meta { font-size: 13.5px; color: var(--ink-42); }

/* real app screenshot, auto-trimmed to the device (transparent corners) */
.device-wrap { display: flex; justify-content: center; align-items: center; }
.hero-phone {
  width: min(290px, 76vw); height: auto; display: block; align-self: center;
  filter: drop-shadow(0 54px 72px rgba(26,31,64,.5)) drop-shadow(0 10px 22px rgba(26,31,64,.32));
}

/* ---------- features ---------- */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.feat.reverse .feat-visual { order: -1; }
.feat-copy .eyebrow { margin-bottom: 14px; }
.feat-copy h2 + p { margin-top: 14px; color: var(--ink-72); max-width: 40ch; }
.feat-tag { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--warm);
  border: 1px solid rgba(194,96,47,.35); padding: 5px 12px; border-radius: 999px; }
.feat-visual { display: flex; justify-content: center; }

/* light cards holding charts */
.card { width: 100%; max-width: 430px; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px; box-shadow: 0 30px 60px -42px rgba(26,31,64,.4); }
.card .eyebrow { font-size: 11px; }
.stat-lg { font-weight: 200; font-size: clamp(2.5rem, 6.6vw, 3.4rem); color: var(--ink); }
.delta { font-size: 14px; color: var(--ink-58); margin-top: 6px; }
.delta .down { color: var(--warm); } .delta .up { color: #2f7d4f; }

/* charts on light */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .track { stroke: var(--ink-30); stroke-width: .8; stroke-dasharray: 1.5 3; fill: none; }
.chart .wave { stroke: var(--ink); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.chart .dot { fill: var(--ink-58); } .chart .dot-dim { fill: var(--ink-30); }
.chart .dot-gold { fill: var(--g4); }
.chart text { font-size: 9px; letter-spacing: .06em; fill: var(--ink-42); font-family: var(--font); }

/* stage bar = slices of the gradient */
.stages { display: flex; height: 15px; border-radius: 5px; overflow: hidden; margin-top: 8px; gap: 2px; }
.stages span { display: block; }
.stages .s-deep { background: var(--g0); } .stages .s-core { background: var(--g2); }
.stages .s-rem { background: var(--g3); } .stages .s-awake { background: var(--g4); }
.stage-key { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12.5px; color: var(--ink-58); }
.stage-key b { display: block; font-weight: 200; font-size: 18px; color: var(--ink); }

/* notification card */
.notif { display: flex; align-items: center; gap: 13px; }
.notif img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.notif .nhead { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .1em; color: var(--ink-42); }
.notif .ntitle { color: var(--ink); margin-top: 2px; }
.notif .nbody { color: var(--ink-58); font-size: 14px; }

/* ---------- quiet section ---------- */
.quiet { text-align: center; }
.quiet h2 { max-width: 17ch; margin-inline: auto; }
.nots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.not { font-size: 14px; color: var(--ink-72); padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(26,31,64,.03); }
.not s { color: var(--ink-42); text-decoration-color: var(--warm); text-decoration-thickness: 1.5px; }
.quiet-foot { margin-top: 28px; font-size: 15px; color: var(--ink-72); max-width: 50ch; margin-inline: auto; }

/* ---------- footer (deep indigo) ---------- */
.foot { background: var(--footer-bg); color: var(--on-dark-65); padding: 56px var(--gutter) 60px; margin-top: clamp(40px,8vh,90px); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px 48px;
  align-items: flex-start; justify-content: space-between; }
.foot .brand { color: var(--on-dark-95); }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.foot-links a { color: var(--on-dark-65); transition: color .2s; }
.foot-links a:hover { color: var(--on-dark-95); }
.foot-fine { width: 100%; margin-top: 32px; padding-top: 26px; border-top: 1px solid rgba(243,239,232,.12);
  font-size: 12.5px; color: var(--on-dark-35); max-width: 74ch; line-height: 1.6; }
.foot-fine a { color: var(--on-dark-65); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- content pages (privacy / terms / support) ---------- */
.doc { max-width: var(--reading); margin: 0 auto; padding: clamp(40px,7vh,80px) var(--gutter) clamp(48px,9vh,90px); }
.doc .eyebrow { margin-bottom: 14px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc .updated { margin-top: 14px; color: var(--ink-42); font-size: 14px; }
.doc h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin-top: 44px; }
.doc p, .doc li { color: var(--ink-72); font-size: 16.5px; line-height: 1.7; }
.doc p { margin-top: 16px; }
.doc ul { margin: 14px 0 0; padding-left: 20px; }
.doc li { margin-top: 9px; }
.doc strong { color: var(--ink); font-weight: 500; }
.doc a { color: var(--warm); text-decoration: underline; text-underline-offset: 2px; }
.faq { margin-top: 34px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-size: 18px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 22px; color: var(--ink-42); transition: transform .2s; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--ink-72); padding-bottom: 20px; margin-top: 0; max-width: 60ch; }
.backlink { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--ink-58); }
.backlink:hover { color: var(--ink); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.reveal { opacity: 0; animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal.d1 { animation-delay: .05s; } .reveal.d2 { animation-delay: .15s; }
.reveal.d3 { animation-delay: .28s; } .reveal.d4 { animation-delay: .42s; }
.wave-anim { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s ease .4s forwards; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero-grid, .feat { grid-template-columns: 1fr; }
  .hero-visual, .device-wrap { order: -1; }
  .feat.reverse .feat-visual { order: 0; }
  .nav-links .hide-sm { display: none; }
  .card { max-width: 100%; }
  /* ≥44px tap targets on touch */
  .nav-links a, .foot-links a, .backlink { padding-block: 11px; display: inline-block; }
  .nav .brand, .foot .brand { padding-block: 8px; }
}

/* ---------- a11y ---------- */
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; } .wave-anim { stroke-dashoffset: 0; }
}
