/* Belly Birth Baby: shared styles. Tokens from the app's design/DESIGN.md.
   Self-hosted fonts, no external requests. */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/InstrumentSerif-Regular.woff2") format("woff2"), url("/assets/fonts/InstrumentSerif-Regular.ttf") format("truetype"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/InstrumentSerif-Italic.woff2") format("woff2"), url("/assets/fonts/InstrumentSerif-Italic.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/Manrope-Medium.woff2") format("woff2"), url("/assets/fonts/Manrope-Medium.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/Manrope-SemiBold.woff2") format("woff2"), url("/assets/fonts/Manrope-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/Manrope-Bold.woff2") format("woff2"), url("/assets/fonts/Manrope-Bold.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/assets/fonts/Manrope-ExtraBold.woff2") format("woff2"), url("/assets/fonts/Manrope-ExtraBold.ttf") format("truetype"); }

:root {
  --ground: #F6F2EC;
  --surface: #FFFFFF;
  --surface-muted: #F1EAE0;
  --border: #EBE4DA;
  --ink: #221F2A;
  --ink-2: #514E63;
  --muted: #6B6873;
  --sleep: #4E5391;
  --sleep-tint: #EBEAF5;
  --feed: #B5552F;
  --feed-tint: #F8E9E2;
  --diaper: #3F7D6E;
  --diaper-tint: #E6EFEB;
  --pill: #EDE5DA;
  --night: #1C1B2E;
  --on-sleep: #FFFFFF;
  --radius: 24px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

/* Night palette: system dark mode, and the always-night band on the home page. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1C1B2E;
    --surface: #26253A;
    --surface-muted: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --ink: #F3EFE8;
    --ink-2: #B9B6CF;
    --muted: #B9B6CF;
    --sleep: #8F89D6;
    --sleep-tint: rgba(143, 137, 214, 0.16);
    --feed: #E08A66;
    --feed-tint: rgba(224, 138, 102, 0.14);
    --diaper: #7DBFAE;
    --diaper-tint: rgba(125, 191, 174, 0.14);
    --pill: rgba(255, 255, 255, 0.08);
    --on-sleep: #1C1B2E;
  }
}
.night {
  --ground: #1C1B2E;
  --surface: #26253A;
  --surface-muted: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --ink: #F3EFE8;
  --ink-2: #B9B6CF;
  --muted: #B9B6CF;
  --sleep: #8F89D6;
  --sleep-tint: rgba(143, 137, 214, 0.16);
  --feed: #E08A66;
  --feed-tint: rgba(224, 138, 102, 0.14);
  --diaper: #7DBFAE;
  --diaper-tint: rgba(125, 191, 174, 0.14);
  --on-sleep: #1C1B2E;
  background: var(--ground);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 760px; }

/* ---------- Header ---------- */

.site-header { padding: 18px 0 6px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
  white-space: nowrap;
}

.app-icon { width: 38px; height: 38px; border-radius: 10px; flex: none; display: block; }

.site-nav { display: flex; gap: 2px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 0 14px;
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--sleep); background: var(--sleep-tint); }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0 0 0.45em; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.08; }
h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); }
h2 { font-size: clamp(2rem, 5.6vw, 3rem); }
h3 { font-family: var(--ui); font-size: 1.1rem; font-weight: 800; line-height: 1.3; }

p { margin: 0 0 1em; }
a { color: var(--sleep); text-underline-offset: 2px; text-decoration-thickness: 1px; }
strong { font-weight: 700; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.eyebrow .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sleep); }
.eyebrow--feed .dot { background: var(--feed); }
.eyebrow--diaper .dot { background: var(--diaper); }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- Cards & buttons ---------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--sleep); color: var(--on-sleep); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-quiet { background: var(--sleep-tint); color: var(--sleep); }

/* App Store button: ink fill, text in the ground colour (as in the app). */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  background: var(--ink);
  color: var(--ground);
  border-radius: 16px;
  padding: 10px 22px 10px 16px;
  text-decoration: none;
  text-align: left;
  line-height: 1.15;
  transition: transform 0.15s;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge:active { transform: scale(0.97); }
.store-badge svg { flex: none; }
.store-badge .line1 { display: block; font-size: 0.7rem; font-weight: 600; opacity: 0.8; }
.store-badge .line2 { display: block; font-size: 1.18rem; font-weight: 800; letter-spacing: -0.01em; }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 40px;
  padding: 36px 0 52px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-direction: column; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 700;
}
.footer-links a:hover { color: var(--sleep); }
.footer-links .sister { color: var(--muted); font-weight: 600; }
.footer-links .sister strong { color: var(--ink-2); }
.disclaimer { font-size: 0.86rem; max-width: 640px; margin: 0; }
.copyright { margin: 0; font-size: 0.86rem; }

/* ---------- Content pages ---------- */

.page-hero { text-align: center; padding: 44px 0 8px; }
.page-hero .app-icon { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 18px; }
.page-hero h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); }

.prose section { margin: 36px 0; }
.prose h2 { font-size: clamp(1.6rem, 4.6vw, 2rem); margin-bottom: 0.4em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose a { overflow-wrap: anywhere; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--sleep-tint);
  padding: 1px 6px;
  border-radius: 6px;
}

.lead-card { padding: 24px 24px 10px; margin: 28px 0; }
.lead-card h2 { margin-top: 0; }

.table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.table table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table th { font-weight: 800; }
.table tr:last-child td { border-bottom: 0; }

.contact-card { text-align: center; padding: 28px 24px; background: var(--sleep-tint); border: none; }
.contact-card h2 { margin-top: 0; }

/* FAQ (home and support) */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  min-height: 60px;
  padding: 16px 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sleep-tint);
  color: var(--sleep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Reveal animation (CSS only) ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.24s; }
.d4 { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .btn, .store-badge, .site-nav a, .faq summary::after { transition: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .section { padding: 52px 0; }
  .brand { font-size: 1.25rem; gap: 8px; }
  .app-icon { width: 34px; height: 34px; border-radius: 9px; }
  .site-nav a { padding: 0 10px; font-size: 0.9rem; }
}
