/* =====================================================================
   withful - release marketing site
   Self-contained, no remote fonts or scripts.

   Design read: consumer app landing for parents, partners, and App Review;
   quiet, private, native-app language with real app screenshots.
   Dials 5 / 3 / 4.

   Tokens are tuned around the current red app icon and Morning Dew app
   screenshots. Theme is locked per page (light OR dark), switched via [data-theme]
   + prefers-color-scheme.

   Shape system (locked): interactive = pill; cards/sections = 18px;
   inputs = 12px; device frame = 52px. Accent (locked): withful red.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Site chrome, light (Morning Dew + app icon, web-tuned) */
  --bg: #F4F8F4;
  --bg-2: #EAF2EE;
  --surface: #FFFFFF;
  --surface-2: #F8FBF8;
  --ink: #20312D;
  --ink-2: #5D706A;
  --ink-3: #879791;
  --accent: #C84D3F;
  --accent-deep: #A93A32;
  --accent-soft: rgba(200, 77, 63, 0.11);
  --accent-line: rgba(200, 77, 63, 0.24);
  --on-accent: #FFFFFF;
  --border: rgba(32, 49, 45, 0.12);
  --border-strong: rgba(32, 49, 45, 0.20);
  --shadow-sm: 0 1px 2px rgba(32, 49, 45, 0.06), 0 4px 14px rgba(32, 49, 45, 0.06);
  --shadow-md: 0 2px 4px rgba(32, 49, 45, 0.06), 0 18px 40px rgba(32, 49, 45, 0.10);
  --shadow-device: 0 30px 70px rgba(32, 49, 45, 0.20), 0 8px 24px rgba(32, 49, 45, 0.12);

  /* Legacy app-screen tokens retained for supporting mini UI accents */
  --app-bg-top: #F7F5FD;
  --app-bg-bot: #EFEDF9;
  --app-surface: #FFFFFF;
  --app-surface-2: #FAF8FF;
  --app-input: #EEEAF8;
  --app-sep: rgba(37, 34, 56, 0.12);
  --app-ink: #252238;
  --app-ink-2: #615C78;
  --app-ink-3: #8A849D;
  --app-accent: #6D63B8;
  --app-accent-deep: #564BA3;
  --app-on-accent: #FFFFFF;
  --app-sage: #6E8E7A;
  --app-honey: #C89C4C;
  --app-rose: #C873A0;
  --app-bronze: #8A739E;
  --app-ember: #B96A84;
  --app-gold: #7487C7;
  --app-glass: rgba(255, 255, 255, 0.72);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "New York", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;

  /* Shape */
  --r-card: 18px;
  --r-input: 12px;
  --r-pill: 999px;
  --r-device: 52px;

  /* Rhythm */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(72px, 11vw, 132px);
}

:root[data-theme="dark"] {
  --bg: #101915;
  --bg-2: #0B120F;
  --surface: #17231F;
  --surface-2: #1F2E28;
  --ink: #F0F8F2;
  --ink-2: #BAD0C6;
  --ink-3: #7F988D;
  --accent: #F09A8A;
  --accent-deep: #FFC0B4;
  --accent-soft: rgba(240, 154, 138, 0.14);
  --accent-line: rgba(240, 154, 138, 0.28);
  --on-accent: #23100D;
  --border: rgba(240, 248, 242, 0.10);
  --border-strong: rgba(240, 248, 242, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 4px 14px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.30), 0 20px 44px rgba(0, 0, 0, 0.40);
  --shadow-device: 0 34px 80px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.40);

  --app-bg-top: #100E1D;
  --app-bg-bot: #0B0917;
  --app-surface: #181527;
  --app-surface-2: #211D33;
  --app-input: #221E32;
  --app-sep: rgba(240, 236, 255, 0.12);
  --app-ink: #F0ECFF;
  --app-ink-2: #BEB6D8;
  --app-ink-3: #887FA7;
  --app-accent: #AAA0F2;
  --app-accent-deep: #C8C1FF;
  --app-on-accent: #151329;
  --app-sage: #9FC4AE;
  --app-honey: #D9B868;
  --app-rose: #D99AB1;
  --app-bronze: #B7A1CF;
  --app-ember: #DD91A7;
  --app-gold: #AAB7F0;
  --app-glass: rgba(33, 29, 51, 0.62);
}

/* System preference when the user has not chosen explicitly */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101915; --bg-2: #0B120F; --surface: #17231F; --surface-2: #1F2E28;
    --ink: #F0F8F2; --ink-2: #BAD0C6; --ink-3: #7F988D;
    --accent: #F09A8A; --accent-deep: #FFC0B4; --accent-soft: rgba(240,154,138,0.14);
    --accent-line: rgba(240,154,138,0.28); --on-accent: #23100D;
    --border: rgba(240,248,242,0.10); --border-strong: rgba(240,248,242,0.18);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.30), 0 4px 14px rgba(0,0,0,0.30);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.30), 0 20px 44px rgba(0,0,0,0.40);
    --shadow-device: 0 34px 80px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.40);
    --app-bg-top: #100E1D; --app-bg-bot: #0B0917; --app-surface: #181527;
    --app-surface-2: #211D33; --app-input: #221E32; --app-sep: rgba(240,236,255,0.12);
    --app-ink: #F0ECFF; --app-ink-2: #BEB6D8; --app-ink-3: #887FA7;
    --app-accent: #AAA0F2; --app-accent-deep: #C8C1FF; --app-on-accent: #151329;
    --app-sage: #9FC4AE; --app-honey: #D9B868; --app-rose: #D99AB1;
    --app-bronze: #B7A1CF; --app-ember: #DD91A7; --app-gold: #AAB7F0;
    --app-glass: rgba(33,29,51,0.62);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 12px 18px; border-radius: var(--r-input);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-md);
  transition: top 0.18s ease;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Brand wordmark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(32,49,45,0.10), 0 8px 18px rgba(32,49,45,0.12);
}
:root[data-theme="dark"] .brand__mark {
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(240,248,242,0.10), 0 8px 18px rgba(0,0,0,0.35);
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.brand__name { font-size: 19px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.is-stuck { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__link { color: var(--ink-2); font-size: 15px; transition: color 0.16s ease; }
.nav__link:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border-strong); color: var(--ink-2);
  transition: color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent-line); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .ico { font-size: 19px; }
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

.nav__menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 16px; font-weight: 560; line-height: 1; white-space: nowrap;
  padding: 14px 22px; border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}
.btn .ico { font-size: 18px; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(63,89,84,0.25); }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(0) scale(0.99); }
:root[data-theme="dark"] .btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent-line); color: var(--accent-deep); transform: translateY(-1px); }
:root[data-theme="dark"] .btn--ghost:hover { color: var(--accent); }
.btn--sm { padding: 10px 16px; font-size: 14.5px; }
.btn--block { width: 100%; }
.btn--link { padding: 0; background: none; border: none; color: var(--accent-deep); font-weight: 560; gap: 7px; }
:root[data-theme="dark"] .btn--link { color: var(--accent); }
.btn--link .ico { transition: transform 0.18s ease; }
.btn--link:hover .ico { transform: translateX(3px); }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-deep);
}
:root[data-theme="dark"] .eyebrow { color: var(--accent); }

.display {
  font-size: clamp(2.2rem, 4.7vw, 3.25rem);
  line-height: 1.07; letter-spacing: 0; font-weight: 650;
  color: var(--ink); text-wrap: balance;
}
.display em { font-style: normal; color: var(--accent-deep); }
:root[data-theme="dark"] .display em { color: var(--accent); }

.h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  line-height: 1.1; letter-spacing: 0; font-weight: 650; text-wrap: balance;
}
.h3 { font-size: 1.32rem; line-height: 1.25; letter-spacing: 0; font-weight: 620; }
.lede { font-size: clamp(1.08rem, 1.7vw, 1.28rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.muted { color: var(--ink-2); }
.section-head { max-width: 46rem; }
.section-head .h2 { margin-bottom: 14px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); scroll-margin-top: 86px; }
.section--tint { background: var(--bg-2); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 76px); padding-bottom: var(--section-y); position: relative; overflow: hidden; }
.hero__glow { display: none; }
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.12fr 0.88fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__copy { max-width: 42rem; }
.hero__eyebrow { margin-bottom: 22px; }
.hero__title { margin-bottom: 20px; }
.hero__lede { margin-bottom: 32px; max-width: 31rem; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero__art { display: flex; justify-content: center; }

/* ---------- Manifesto ---------- */
.manifesto { text-align: center; }
.manifesto__inner { max-width: 50rem; margin-inline: auto; }
.manifesto .h2 { margin-bottom: 28px; }
.manifesto__serif {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.32; letter-spacing: 0;
  color: var(--ink); margin-bottom: 22px; text-wrap: balance;
}
.manifesto__body { font-size: clamp(1.05rem, 1.6vw, 1.18rem); color: var(--ink-2); max-width: 40rem; margin-inline: auto; }

/* ---------- Bento (features) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-top: 52px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.cell { padding: clamp(24px, 2.6vw, 36px); display: flex; flex-direction: column; }
.cell__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-deep); font-size: 23px; margin-bottom: 20px;
}
:root[data-theme="dark"] .cell__icon { color: var(--accent); }
.cell .h3 { margin-bottom: 10px; }
.cell__body { color: var(--ink-2); font-size: 1.02rem; }

.cell--log { grid-column: span 5; grid-row: span 2; align-items: center; justify-content: space-between; gap: 26px; padding-bottom: 0; }
.cell--log .cell__head { text-align: center; max-width: 22rem; }
.cell--feed { grid-column: span 7; }
.cell--nudge { grid-column: span 7; }
.cell--reflect { grid-column: span 12; flex-direction: row; align-items: center; gap: clamp(28px, 4vw, 64px); }
.cell--reflect .cell__head { flex: 1; min-width: 0; }
.cell--reflect .cell__art { flex: none; }

.siri-note {
  margin-top: 22px;
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.siri-note__kicker {
  color: var(--accent-deep); font-weight: 700; font-size: 0.88rem;
}
:root[data-theme="dark"] .siri-note__kicker { color: var(--accent); }
.siri-note__quote { color: var(--ink); font-weight: 600; }

/* feed mini visual: a tiny stacked moment list */
.mini { margin-top: 22px; display: grid; gap: 10px; }
.mini__row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px;
}
.mini__ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; flex: none; }
.mini__txt { min-width: 0; }
.mini__t { font-size: 14.5px; font-weight: 560; color: var(--ink); }
.mini__s { font-size: 12.5px; color: var(--ink-3); }

/* nudge mini: a reminder chip */
.reminder {
  margin-top: 22px; display: flex; align-items: center; gap: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
}
.reminder__bell { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px;
  background: color-mix(in srgb, var(--app-honey) 16%, transparent); color: var(--app-honey); flex: none; }
.reminder__txt { flex: 1; min-width: 0; }
.reminder__t { font-size: 14.5px; font-weight: 560; }
.reminder__s { font-size: 12.5px; color: var(--ink-3); }
.reminder__switch { width: 42px; height: 25px; border-radius: 999px; background: var(--accent); position: relative; flex: none; }
.reminder__switch::after { content: ""; position: absolute; top: 2.5px; right: 2.5px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }

/* ---------- Privacy ---------- */
.privacy__top { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 44rem; }
.privacy__grid {
  margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden;
}
.pcell { background: var(--surface); padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.pcell__ico { font-size: 24px; color: var(--accent-deep); }
:root[data-theme="dark"] .pcell__ico { color: var(--accent); }
.pcell__t { font-weight: 600; font-size: 1.04rem; letter-spacing: 0; }
.pcell__s { color: var(--ink-2); font-size: 0.95rem; }
.support__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.text-link {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:root[data-theme="dark"] .text-link { color: var(--accent); }

/* ---------- Reading pages ---------- */
.legal .section { padding-top: clamp(64px, 9vw, 112px); }
.legal__wrap {
  max-width: 820px;
}
.legal .display {
  margin-top: 18px;
  margin-bottom: 18px;
  max-width: 12ch;
}
.legal .lede {
  max-width: 44rem;
}
.legal__meta {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 0.95rem;
}
.legal__card,
.legal__contact {
  margin-top: 32px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
}
.legal__card h2,
.legal__contact h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.42rem;
  line-height: 1.18;
}
.legal__card h2:not(:first-child) {
  margin-top: 34px;
}
.legal__card h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}
.legal__card p,
.legal__contact p {
  color: var(--ink-2);
}
.legal__card p + p {
  margin-top: 12px;
}
.email a {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:root[data-theme="dark"] .email a { color: var(--accent); }

/* ---------- Looks ---------- */
.looks__row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.look {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px 11px 12px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.look:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.look__swatch { width: 30px; height: 30px; border-radius: 50%; position: relative; flex: none; border: 1px solid rgba(0,0,0,0.08); overflow: hidden; }
.look__swatch span { position: absolute; right: 4px; bottom: 4px; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,0.55); }
.look__name { font-size: 14.5px; font-weight: 560; letter-spacing: 0; }
.look__name small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }

/* ---------- Closing CTA + form ---------- */
.cta { text-align: center; }
.cta__inner { max-width: 38rem; margin-inline: auto; }
.cta .h2 { margin-bottom: 14px; }
.cta__lede { margin-bottom: 32px; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.signup { display: flex; flex-direction: column; gap: 10px; max-width: 30rem; margin-inline: auto; text-align: left; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13.5px; font-weight: 560; color: var(--ink-2); padding-left: 2px; }
.field__input-wrap { display: flex; gap: 10px; }
.input-shell { position: relative; flex: 1; }
.input-shell .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--ink-3); pointer-events: none; }
.input {
  width: 100%; padding: 15px 16px 15px 44px; border-radius: var(--r-input);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink); font-size: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.signup__help { font-size: 13px; color: var(--ink-3); padding-left: 2px; }
.signup__status { font-size: 14.5px; font-weight: 560; min-height: 1.2em; padding-left: 2px; }
.signup__status[data-state="success"] { color: var(--accent-deep); display: flex; align-items: center; gap: 8px; }
:root[data-theme="dark"] .signup__status[data-state="success"] { color: var(--accent); }
.signup__status[data-state="error"] { color: #A94A4F; }
:root[data-theme="dark"] .signup__status[data-state="error"] { color: #E58C8C; }
.cta__avail { margin-top: 26px; font-size: 14px; color: var(--ink-3); }

/* ---------- Footer ---------- */
.footer { padding-block: 48px; border-top: 1px solid var(--border); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer__tag { color: var(--ink-2); font-size: 14.5px; max-width: 26rem; }
.footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13.5px; color: var(--ink-3); }
.footer__meta a:hover { color: var(--ink); }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); opacity: 0.6; }

/* =====================================================================
   DEVICE SCREENSHOTS: real Morning Dew simulator captures inside the
   iPhone frame geometry used by the screenshot pipeline.
   ===================================================================== */
.device {
  position: relative;
  width: clamp(280px, 33vw, 366px);
  aspect-ratio: 1022 / 2082;
  filter:
    drop-shadow(0 34px 58px rgba(59,52,55,0.24))
    drop-shadow(0 8px 18px rgba(59,52,55,0.14));
  flex: none;
}
:root[data-theme="dark"] .device {
  filter:
    drop-shadow(0 34px 68px rgba(0,0,0,0.55))
    drop-shadow(0 8px 24px rgba(0,0,0,0.38));
}
.device--hero { width: clamp(280px, 33vw, 366px); }
.device--sm { width: clamp(224px, 25vw, 300px); }
.device .frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.device .screen {
  position: absolute;
  left: 5.088%;
  top: 2.209%;
  width: 89.824%;
  height: 95.581%;
  border-radius: 13.73% / 6.33%;
  object-fit: cover;
  object-position: top center;
  background: #eaf4ef;
  z-index: 1;
}
.cell--log .device { margin-bottom: -18%; }
.cell--reflect .device { margin-block: -4%; }

/* ---------- Scroll reveal (gated on .js so no-JS visitors see content) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.js [data-reveal].in-view { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: 0.07s; }
.js [data-reveal-delay="2"] { transition-delay: 0.14s; }
.js [data-reveal-delay="3"] { transition-delay: 0.21s; }

/* gentle hero device float */
@media (prefers-reduced-motion: no-preference) {
  .float { animation: float 7s ease-in-out infinite; }
  @keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 8px; }
  .hero__copy { max-width: 38rem; }
  .hero__art { margin-top: 18px; }
  .cell--log { grid-column: span 12; grid-row: span 1; }
  .cell--feed, .cell--nudge { grid-column: span 6; }
  .cell--reflect { grid-column: span 12; }
  .privacy__grid { grid-template-columns: repeat(2, 1fr); }
  .support__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero { padding-top: 20px; padding-bottom: 36px; }
  .hero__lede { margin-bottom: 24px; }
  .hero__art { margin-top: 8px; }
  .device--hero { width: 180px; }
  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 64px; left: var(--gutter); right: var(--gutter);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
    padding: 12px; box-shadow: var(--shadow-md);
  }
  .nav__links.is-open .nav__link { padding: 10px 8px; width: 100%; }
  .nav__menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill);
    background: transparent; border: 1px solid var(--border-strong); color: var(--ink-2); }
  .nav__menu-btn .ico { font-size: 20px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .cell--feed, .cell--nudge { grid-column: span 12; }
  .cell--reflect { flex-direction: column; align-items: flex-start; }
  .cell--reflect .cell__art { align-self: center; }
  .privacy__grid { grid-template-columns: 1fr; }
  .field__input-wrap { flex-direction: column; }
  .field__input-wrap .btn { width: 100%; }
  .cta__actions { flex-direction: column; }
  .cta__actions .btn { width: 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .nav__name-text { display: none; }
}
