/* Family Recap — website.
   The app's world, translated to the web: cream paper, soft pastel watercolor,
   Maple, and the app's teal for actions. Headings in Fraunces (self-hosted —
   no third-party font requests, in line with our privacy promise); body text
   in the reader's system font, so it reads like the app does on their phone. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fffbf5;
  --paper-deep: #fbf4ea;
  --ink: #31383a;
  --ink-soft: #5f676a;
  --ink-faint: #8f9699;
  --line: #ece2d4;
  --teal: #2f9c9a;          /* the app's #5BC0BE, deepened for AA contrast on cream */
  --teal-ink: #24807e;
  --teal-wash: #e4f3f1;
  --rose: #c1786c;          /* "Family" in the wordmark */
  --rose-wash: #fbefeb;
  --sage: #5f9178;          /* "Recap" in the wordmark */
  --sage-wash: #eef5f0;
  --lavender: #a08cc4;
  --maple: #b4643d;         /* Maple's fur */
  --measure: 62ch;
  --radius: 22px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { 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;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 560;
  letter-spacing: -0.012em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}
h2 { font-size: clamp(30px, 4.2vw, 44px); margin: 0 0 16px; }
h3 { font-size: 21px; margin: 0 0 6px; }
p { margin: 0 0 14px; }

a { color: var(--teal-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
a:focus-visible, .button:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

.eyebrow {
  display: inline-block;
  font: 600 13px/1 var(--body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: calc(var(--measure) + 44px); margin: 0 auto; padding: 0 22px; }

/* ── Header ────────────────────────────────────────────────────────────── */
header.site { position: relative; z-index: 2; }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
header.site .brand {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 600 17px/1 var(--body); color: var(--ink); text-decoration: none;
}
header.site .brand img { width: 34px; height: 34px; }
header.site nav { display: flex; gap: 22px; font-size: 15px; }
header.site nav a { color: var(--ink-soft); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--ink); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 16px;
  background: var(--teal); color: #fff; font: 600 16px/1 var(--body);
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(47, 156, 154, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { color: #fff; background: var(--teal-ink); transform: translateY(-1px); }
.button.quiet { background: transparent; color: var(--teal-ink); box-shadow: inset 0 0 0 2px var(--teal); }
.button.quiet:hover { background: var(--teal-wash); color: var(--teal-ink); }
.note { font-size: 14px; color: var(--ink-faint); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
/* The watercolor wash sits behind header and hero together, so the page
   opens as one painted sheet rather than a bar on top of a picture. */
.top-wash {
  position: absolute; inset: 0 0 auto 0; height: 1040px; z-index: 0; pointer-events: none;
  background: url("assets/wash.jpg") center 30% / cover no-repeat;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
  mask-image: linear-gradient(to bottom, #000 62%, transparent);
}
.hero { position: relative; padding: 0 0 72px; }
.hero .wrap { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; }
.hero .maple { width: min(320px, 74vw); margin-top: 4px; }
.hero h1 { margin: -26px 0 0; }
.hero .wordmark { width: min(320px, 76vw); }
.hero .tagline {
  font-family: var(--display); font-style: italic; font-weight: 450;
  font-size: clamp(22px, 3vw, 28px); line-height: 1.3; color: var(--ink);
  margin: 10px 0 6px;
}
.hero .lede { max-width: 40ch; color: var(--ink-soft); font-size: clamp(17px, 2vw, 19px); margin: 0 0 26px; text-wrap: pretty; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero .note { margin-top: 14px; }

/* ── Sections ──────────────────────────────────────────────────────────── */
section.block { padding: 88px 0; }
section.block.tint-rose { background: var(--rose-wash); }
section.block.tint-sage { background: var(--sage-wash); }
section.block.tint-deep { background: var(--paper-deep); }
.section-head { max-width: 46rem; margin: 0 0 40px; }
.section-head p { color: var(--ink-soft); font-size: 18px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Why */
.why { display: grid; gap: 48px; grid-template-columns: 1.1fr 0.9fr; align-items: center; }
.why .story p { font-size: 18px; color: var(--ink); }
.why .story p.soft { color: var(--ink-soft); }
.why .questions {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px 24px; box-shadow: 0 14px 40px rgba(49, 56, 58, 0.06);
}
.why .questions p {
  font-family: var(--display); font-style: italic; font-weight: 420; font-size: 24px; line-height: 1.35;
  margin: 0 0 10px; color: var(--ink);
}
.why .questions p:nth-child(2) { color: var(--rose); }
.why .questions p:nth-child(3) { color: var(--sage); }
.why .questions p:nth-child(4) { color: var(--lavender); }
.why .questions span { display: block; margin-top: 14px; font-size: 15px; color: var(--ink-soft); }

/* More than sleep */
.influences { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.influence {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 18px 18px;
}
.influence .swatch { width: 30px; height: 30px; border-radius: 50%; margin-bottom: 12px; filter: saturate(0.9); }
.influence h3 { font-size: 18px; }
.influence p { font-size: 15px; color: var(--ink-soft); margin: 0; }
.influence.sleep { border-color: #d9d2ea; }
.callout {
  margin-top: 28px; padding: 22px 26px; border-radius: 18px;
  background: #fff; border: 1px dashed #d6cbbb; color: var(--ink-soft);
}
.callout strong { color: var(--ink); }

/* How it works */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { text-align: center; }
.step img {
  width: 100%; max-width: 280px; aspect-ratio: 1 / 1; object-fit: contain; margin: 0 auto 10px;
  /* soften the edges of the painted backdrops so they melt into the page */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
}
.step .num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal-wash); color: var(--teal-ink); font: 700 14px/1 var(--body); margin-bottom: 10px;
}
.step p { color: var(--ink-soft); max-width: 30ch; margin: 0 auto; }

/* Maple & safe AI */
.ai { display: grid; gap: 48px; grid-template-columns: 0.9fr 1.1fr; align-items: start; }
.insight {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px 22px; box-shadow: 0 14px 40px rgba(49, 56, 58, 0.07);
}
.insight .who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.insight .who img { width: 46px; height: 46px; }
.insight .who strong { display: block; font-size: 16px; }
.insight .who span { font-size: 13px; color: var(--ink-faint); }
.insight p { font-size: 17px; margin: 0; }
.insight .tag {
  position: absolute; top: 18px; right: 18px; font: 600 11px/1 var(--body); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint); background: var(--paper-deep); padding: 6px 8px; border-radius: 8px;
}
.ai .maple-side { width: min(260px, 70%); margin: 26px auto 0; }
.promises { display: grid; gap: 14px; margin: 8px 0 0; padding: 0; list-style: none; }
.promises li {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start;
  background: rgba(255, 255, 255, 0.7); border: 1px solid #dcebe1; border-radius: 16px; padding: 16px 18px;
}
.promises .icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #fff; color: var(--sage); border: 1px solid #dcebe1;
}
.promises .icon svg { width: 18px; height: 18px; }
.promises strong { display: block; font-size: 16px; margin-bottom: 2px; }
.promises span { color: var(--ink-soft); font-size: 15px; }

/* Journal */
.journal { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.post {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.post:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(49, 56, 58, 0.09); color: var(--ink); }
.post img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post .body { padding: 18px 20px 22px; display: grid; gap: 8px; }
.post .kicker { font: 600 12px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }
.post h3 { font-size: 21px; margin: 0; }
.post p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* Family */
.family { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: center; }
.facts { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.fact b { display: block; font-family: var(--display); font-weight: 560; font-size: 26px; color: var(--maple); }
.fact span { font-size: 15px; color: var(--ink-soft); }

/* Closing */
.closing { text-align: center; }
.closing img { width: 96px; margin: 0 auto 8px; }
.closing p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 24px; font-size: 18px; }

/* ── Text pages (privacy, support, journal articles) ───────────────────── */
.page { padding: 40px 0 80px; }
.page .narrow > h1 { font-size: clamp(34px, 5vw, 46px); margin: 0 0 10px; }
.page .meta { color: var(--ink-faint); font-size: 15px; margin: 0 0 30px; }
.page h2 { font-size: 26px; margin: 40px 0 10px; }
.page h3 { font-size: 19px; margin: 24px 0 6px; }
.page p, .page li { font-size: 18px; }
.page ul, .page ol { padding-left: 1.2em; }
.page li { margin: 6px 0; }
.page .card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin: 22px 0; }
.page .card p:last-child { margin: 0; }
.article-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin: 6px 0 28px; }
.takeaway { background: var(--sage-wash); border: 1px solid #dcebe1; border-radius: 18px; padding: 20px 22px; margin: 28px 0; }
.takeaway strong { display: block; font-family: var(--display); font-weight: 560; font-size: 20px; margin-bottom: 6px; }
.sources { font-size: 15px; color: var(--ink-soft); border-top: 1px solid var(--line); margin-top: 44px; padding-top: 18px; }
.sources ol { padding-left: 1.2em; }
.sources li { font-size: 15px; margin: 6px 0; }
.disclaimer { font-size: 14px; color: var(--ink-faint); }
.todo { background: #fff3cd; border-radius: 4px; padding: 0 4px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--ink-faint); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer.site nav a { color: var(--ink-soft); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .influences { grid-template-columns: repeat(2, 1fr); }
  .journal { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  section.block { padding: 64px 0; }
  .why, .ai, .family { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .journal { grid-template-columns: 1fr; }
  header.site nav { gap: 16px; font-size: 14px; }
  header.site nav .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .influences, .facts { grid-template-columns: 1fr; }
  .hero .actions .button { width: 100%; }
}

/* ── Motion ────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .hero .maple { animation: rise 760ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero h1, .hero .tagline, .hero .lede, .hero .actions, .hero .note { animation: fade 900ms 420ms ease-out both; }
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 700ms ease; }
  .reveal.seen { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
