/* Hush site. One night look, colors from the app's own theme (src/lib/theme.ts)
   and its meadow art. No third-party resources: the serif is self-hosted (OFL),
   the body uses the system font, like the app. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #11131c;
  --bg2: #161a26;
  --panel: #1b2030;
  --card: #222840;
  --line: #2e3650;
  --text: #eaecf6;
  --body: #c4c9da;
  --sub: #9aa1b8;
  --moon: #d9c18c;
  --moon-hi: #fde3b5;
  --indigo: #484d81;
  --lavender: #6a699d;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --gutter: 20px;
  --wide: 1120px;
}

@media (max-width: 400px) {
  :root { --gutter: 16px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  z-index: 0;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--body);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* night sky: soft indigo and moon glows plus a faint star field, fixed behind everything */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(48rem 34rem at 88% -8%, rgba(72, 77, 129, 0.55), rgba(72, 77, 129, 0) 70%),
    radial-gradient(36rem 28rem at -12% 18%, rgba(106, 105, 157, 0.22), rgba(106, 105, 157, 0) 70%),
    radial-gradient(22rem 22rem at 76% 26%, rgba(253, 227, 181, 0.09), rgba(253, 227, 181, 0) 70%),
    radial-gradient(60rem 30rem at 50% 115%, rgba(72, 77, 129, 0.28), rgba(72, 77, 129, 0) 70%);
}
body::after {
  opacity: 0.55;
  background-image:
    radial-gradient(1.2px 1.2px at 22px 34px, rgba(253, 227, 181, 0.9), rgba(253, 227, 181, 0) 100%),
    radial-gradient(1px 1px at 141px 88px, rgba(234, 236, 246, 0.8), rgba(234, 236, 246, 0) 100%),
    radial-gradient(1.4px 1.4px at 203px 170px, rgba(253, 227, 181, 0.7), rgba(253, 227, 181, 0) 100%),
    radial-gradient(1px 1px at 72px 206px, rgba(234, 236, 246, 0.6), rgba(234, 236, 246, 0) 100%),
    radial-gradient(1px 1px at 266px 22px, rgba(234, 236, 246, 0.7), rgba(234, 236, 246, 0) 100%);
  background-size: 290px 250px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0) 85%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0) 85%);
}

::selection { background: rgba(217, 193, 140, 0.35); color: var(--text); }

img { max-width: 100%; height: auto; }

h1, h2, h3 { color: var(--text); margin: 0; }
h1, h2 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.04;
  /* Cormorant's default old-style "1" reads as a capital I: use lining figures */
  font-variant-numeric: lining-nums;
}
h1, h2, h3 { scroll-margin-top: 96px; }
p { margin: 0 0 1em; }
strong { color: var(--text); font-weight: 650; }

a {
  color: var(--moon);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(217, 193, 140, 0.5);
}
a:hover { color: var(--moon-hi); text-decoration-color: currentColor; }
a.contact { overflow-wrap: anywhere; }

:focus-visible {
  outline: 3px solid var(--moon-hi);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- floating nav pill ---------- */
.top {
  position: relative;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}
.pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(27, 32, 48, 0.74);
  border: 1px solid rgba(234, 236, 246, 0.09);
  box-shadow: 0 14px 34px -16px rgba(4, 5, 12, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.pill a,
.foot-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--body);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
}
.pill a:hover,
.foot-nav a:hover { background: rgba(234, 236, 246, 0.07); color: var(--text); }
.pill a[aria-current="page"],
.foot-nav a[aria-current="page"] { background: rgba(217, 193, 140, 0.15); color: var(--moon-hi); }
.pill .nav-home { padding-left: 6px; }
.nav-home img { width: 32px; height: 32px; border-radius: 9px; display: block; }
.pill a:focus-visible,
.foot-nav a:focus-visible { border-radius: 999px; outline-offset: 2px; }

/* ---------- home: hero ---------- */
.hero,
.band {
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.hero {
  display: grid;
  gap: 36px;
  padding-top: 28px;
  padding-bottom: 72px;
}
.hero h1 {
  font-size: clamp(2.625rem, 1.75rem + 4.6vw, 5.25rem);
  margin-bottom: 20px;
}
@media (min-width: 900px) {
  .hero h1 { max-width: 12ch; }
}
.promise {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--body);
  max-width: 34rem;
  margin: 0;
}
.badge-row { margin: 28px 0 0; }
.badge {
  display: inline-block;
  border-radius: 10px;
  line-height: 0;
}
.badge img { display: block; height: 54px; width: auto; }

.hero-art {
  position: relative;
  isolation: isolate;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 4% 0 10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(253, 227, 181, 0.16), rgba(106, 105, 157, 0.12) 55%, rgba(17, 19, 28, 0) 100%);
}

/* the phone: double bezel, an outer shell with a hairline around an inner screen */
.phone {
  width: min(76vw, 300px);
  margin-inline: auto;
  padding: 7px;
  border-radius: 48px;
  background: linear-gradient(160deg, rgba(234, 236, 246, 0.16), rgba(234, 236, 246, 0.03) 42%, rgba(234, 236, 246, 0.07));
  border: 1px solid rgba(234, 236, 246, 0.1);
  box-shadow:
    0 44px 90px -34px rgba(4, 5, 12, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 140px -30px rgba(106, 105, 157, 0.45);
}
.phone-core {
  border-radius: 41px;
  overflow: hidden;
  background: var(--bg);
}
.phone img { display: block; width: 100%; height: auto; }

/* hero phone shows the top of the home screen only, and fades out below the bedtime card */
.hero-phone .phone-core { aspect-ratio: 780 / 1190; }
.hero-phone .phone-core img { height: 100%; object-fit: cover; object-position: top; }
.hero-phone {
  -webkit-mask-image: linear-gradient(#000 86%, transparent 100%);
  mask-image: linear-gradient(#000 86%, transparent 100%);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: 56px;
    padding-top: 44px;
    padding-bottom: 120px;
  }
  .hero-copy { padding-bottom: 24px; }
  .hero .phone { width: 310px; }
}

/* ---------- home: sections ---------- */
.band { padding-top: 72px; padding-bottom: 72px; }
.band h2 { font-size: clamp(2.375rem, 1.6rem + 3vw, 3.75rem); margin-bottom: 32px; }

.how { display: grid; gap: 56px; }
.how-art .phone { width: min(70vw, 290px); }
@media (min-width: 900px) {
  .band { padding-top: 112px; padding-bottom: 112px; }
  .how { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 80px; align-items: start; }
  .how-art { position: sticky; top: 96px; }
  .how-art .phone { width: 300px; }
}

/* numbered steps: a real sequence, drawn as a moonlit path */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 2px 0 40px 78px;
  font-size: 1.0625rem;
}
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -6px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 1.875rem/1 var(--serif);
  font-variant-numeric: lining-nums;
  color: var(--moon-hi);
  background: radial-gradient(circle at 50% 30%, rgba(253, 227, 181, 0.22), rgba(72, 77, 129, 0.55));
  border: 1px solid rgba(217, 193, 140, 0.4);
  box-shadow: 0 0 0 6px var(--bg), 0 0 34px -6px rgba(253, 227, 181, 0.45);
}
.steps > li::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 58px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(rgba(217, 193, 140, 0.45), rgba(46, 54, 80, 0.7));
}
.steps > li:last-child::after { display: none; }
.steps > li.lead > strong:first-child {
  display: block;
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 6px;
}

/* split sections: heading left, plain list right */
.split { display: grid; gap: 8px; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; }
  .split-head h2 { position: sticky; top: 104px; }
}

.plain { list-style: none; margin: 0; padding: 0; }
.plain li {
  position: relative;
  padding: 17px 0 17px 30px;
  border-top: 1px solid var(--line);
}
.plain li:last-child { border-bottom: 1px solid var(--line); }
.plain li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 27px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--moon);
}

.faq .qa { padding: 24px 0; border-top: 1px solid var(--line); }
.faq .qa:last-child { border-bottom: 1px solid var(--line); }
.faq h3 { font: 650 1.1875rem/1.4 var(--sans); margin-bottom: 8px; }
.faq p { margin: 0; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(rgba(22, 26, 38, 0), rgba(22, 26, 38, 0.95));
}
.foot-inner {
  max-width: var(--wide);
  margin-inline: auto;
  padding: 56px var(--gutter) 64px;
}
.site-foot h2 { font-size: 2rem; margin-bottom: 14px; }
.links { font-size: 1.0625rem; margin-bottom: 0; }
.links .sep { color: var(--sub); padding-inline: 4px; }
.made-by { color: var(--sub); margin: 24px 0 0; }
.site-foot.slim .foot-inner { padding: 28px var(--gutter) 40px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -6px; }
.foot-nav .nav-home { padding-left: 6px; }

/* ---------- reading pages (support, privacy) ---------- */
.reading {
  max-width: 45rem;
  margin-inline: auto;
  padding: 40px var(--gutter) 88px;
}
.reading h1 { font-size: clamp(2.625rem, 1.9rem + 3vw, 4rem); margin: 20px 0 14px; }
.updated { color: var(--sub); }
.lede {
  font: 700 clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem)/1.16 var(--serif);
  font-variant-numeric: lining-nums;
  color: var(--text);
  letter-spacing: -0.006em;
  margin: 28px 0 0;
}
.sec { margin-top: 64px; }
.reading h2 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); margin-bottom: 18px; }
.reading h3 { font: 650 1.1875rem/1.4 var(--sans); margin: 36px 0 10px; }
.reading h2 + h3 { margin-top: 8px; }
.reading ul, .reading ol { margin: 0 0 1em; }

.dots { list-style: none; padding: 0; }
.dots > li { position: relative; padding-left: 26px; margin: 12px 0; }
.dots > li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.66em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moon);
}

.steps.compact > li { padding: 4px 0 28px 62px; }
.steps.compact > li::before { width: 42px; height: 42px; top: -2px; font-size: 1.5rem; }
.steps.compact > li::after { left: 21px; top: 48px; }
.steps.compact > li.lead > strong:first-child { font-size: 1.125rem; }

/* privacy: the short version sits in a double-bezel card */
.summary {
  padding: 6px;
  border-radius: 32px;
  background: rgba(234, 236, 246, 0.04);
  border: 1px solid rgba(234, 236, 246, 0.09);
  box-shadow: 0 30px 70px -40px rgba(4, 5, 12, 0.9);
}
.card-core {
  border-radius: 26px;
  padding: 28px 24px 14px;
  background: linear-gradient(180deg, #1e2336, var(--panel));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}
.summary h2 { font-size: 2rem; }
.sec.summary { margin-top: 40px; }

/* privacy tables scroll sideways inside their own box on a phone */
.table-wrap {
  overflow-x: auto;
  margin: 22px 0 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(to right, var(--panel) 30%, rgba(27, 32, 48, 0)) left center / 48px 100% no-repeat local,
    linear-gradient(to left, var(--panel) 30%, rgba(27, 32, 48, 0)) right center / 48px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(234, 236, 246, 0.18), rgba(234, 236, 246, 0)) left center / 16px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(234, 236, 246, 0.18), rgba(234, 236, 246, 0)) right center / 16px 100% no-repeat scroll,
    var(--panel);
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 1rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { color: var(--text); font-weight: 650; }
td:first-child { color: var(--text); width: 38%; }
tbody tr:last-child td { border-bottom: 0; }
@media (min-width: 1000px) {
  .privacy .table-wrap { margin-inline: -88px; }
}

.contact-sec p { font-size: 1.25rem; }

/* ---------- motion (only when the viewer allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  a, .pill a, .foot-nav a {
    transition: color 0.5s var(--spring), background-color 0.5s var(--spring), text-decoration-color 0.5s var(--spring);
  }
  .badge { transition: transform 0.6s var(--spring); }
  .badge:hover { transform: translateY(-2px); }
  .badge:active { transform: scale(0.98); }

  /* the meadow phone settles up as it scrolls in; transform only, so nothing is ever hidden */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: settle both var(--spring);
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
  }
}
@keyframes settle {
  from { transform: translateY(48px) scale(0.96); }
  to { transform: none; }
}
