/* Pipkin: shared site stylesheet (landing + guides).
   Token world carried over from the launch page: warm cream canvas,
   moss green primary, Satoshi body / Cabinet Grotesk display. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

:root {
  --canvas:        #f6f4ef;
  --surface:       #ffffff;
  --elevated:      #fcfaf6;
  --text:          #1a1814;
  --text-2:        #6b6557;
  --text-3:        #9a9285;
  --border:        rgba(20, 18, 14, 0.08);
  --border-strong: rgba(20, 18, 14, 0.14);
  --primary:       #4a7c59;
  --primary-hov:   #3e6a4a;
  --primary-soft:  rgba(74, 124, 89, 0.10);
  --on-primary:    #ffffff;
  --sleep:         #6a6cad;
  --feed:          #cd8255;
  --diaper:        #8c7456;
  --milestone:     #c47891;
  --insight:       #5a8a5c;
  --screenshot-bg: #4d937f; /* teal of the App Store frames, for image placeholders */
  --shadow-sm:     0 1px 2px oklch(20% 0.04 60deg / 0.05);
  --shadow-md:     0 4px 14px oklch(20% 0.04 60deg / 0.06);
  --shadow-lg:     0 12px 32px oklch(20% 0.04 60deg / 0.08);
  --shadow-xl:     0 24px 60px oklch(20% 0.04 60deg / 0.10);
  --radius-sm:     0.625rem;
  --radius-md:     0.875rem;
  --radius-lg:     1.25rem;
  --radius-xl:     1.75rem;
  --radius-pill:   999px;
  --container:     1200px;
  --header-h:      4.5rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas:        #161511;
    --surface:       #1f1d18;
    --elevated:      #262320;
    --text:          #f0ede6;
    --text-2:        #a09988;
    --text-3:        #6f685c;
    --border:        rgba(240, 237, 230, 0.07);
    --border-strong: rgba(240, 237, 230, 0.14);
    --primary:       #72a882;
    --primary-hov:   #88bd99;
    --primary-soft:  rgba(114, 168, 130, 0.16);
    --on-primary:    #0e1410;
    --sleep:         #9598d3;
    --feed:          #e5a37a;
    --diaper:        #b89878;
    --milestone:     #dc91a8;
    --insight:       #82a585;
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-md:     0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg:     0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-xl:     0 24px 60px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
[data-theme="dark"] {
  --canvas:        #161511;
  --surface:       #1f1d18;
  --elevated:      #262320;
  --text:          #f0ede6;
  --text-2:        #a09988;
  --text-3:        #6f685c;
  --border:        rgba(240, 237, 230, 0.07);
  --border-strong: rgba(240, 237, 230, 0.14);
  --primary:       #72a882;
  --primary-hov:   #88bd99;
  --primary-soft:  rgba(114, 168, 130, 0.16);
  --on-primary:    #0e1410;
  --sleep:         #9598d3;
  --feed:          #e5a37a;
  --diaper:        #b89878;
  --milestone:     #dc91a8;
  --insight:       #82a585;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md:     0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg:     0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-xl:     0 24px 60px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* ---------- Base type & browser surfaces ---------- */
body {
  font-family: 'Satoshi', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.display, h1, h2, h3 {
  font-family: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(2.375rem, 4.2vw + 1rem, 4rem); }
h2 { font-size: clamp(1.75rem, 2.2vw + 1rem, 2.625rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
::selection { background: var(--primary); color: var(--on-primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--text-3) transparent; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.lede { font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem); color: var(--text-2); max-width: 38rem; text-wrap: pretty; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.625rem; font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.nav { display: none; gap: 1.75rem; margin-left: auto; font-weight: 500; font-size: 0.9375rem; color: var(--text-2); }
.nav a { transition: color 0.18s ease-out; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
@media (min-width: 820px) { .nav { display: flex; } }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
@media (min-width: 820px) { .header-cta { margin-left: 0; } }
.mob-link { font-weight: 600; font-size: 0.9375rem; color: var(--text-2); }
.mob-link:hover { color: var(--text); }
@media (min-width: 820px) { .mob-link { display: none; } }
.icon-btn {
  width: 2.375rem; height: 2.375rem; display: grid; place-items: center;
  border-radius: var(--radius-pill); color: var(--text-2);
  border: 1px solid var(--border-strong);
  transition: color 0.18s ease-out, background 0.18s ease-out;
}
.icon-btn:hover { color: var(--text); background: var(--primary-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 700; border-radius: var(--radius-pill);
  padding: 0.75rem 1.5rem; font-size: 0.9875rem; line-height: 1.2;
  transition: background 0.18s ease-out, color 0.18s ease-out, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hov); box-shadow: var(--shadow-md); }
.btn-ghost { border: 1.5px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn-lg { padding: 0.9375rem 1.875rem; font-size: 1.0625rem; }
.btn-sm { padding: 0.5rem 1.125rem; font-size: 0.875rem; }

/* App Store badge: Apple's official artwork, unmodified, in a hover wrapper */
.appstore-badge {
  display: inline-block; border-radius: 0.6875rem;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease-out;
}
.appstore-badge img { height: 3.375rem; width: auto; display: block; }
.appstore-badge:hover { transform: translateY(-2px); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.25rem, 5vw, 3.75rem); }
.section-head p { margin-top: 1rem; color: var(--text-2); font-size: 1.0625rem; text-wrap: pretty; }
.band { background: var(--surface); border-block: 1px solid var(--border); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 7vw, 6rem) 0; overflow: clip; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 2rem; } }
.hero-copy p.lede { margin-top: 1.375rem; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.125rem; }
.hero-note { margin-top: 1.125rem; font-size: 0.875rem; color: var(--text-3); }
.hero-note a { text-decoration: underline; text-underline-offset: 3px; }
.hero-note a:hover { color: var(--text); }

/* Hero device shot: a pre-cropped asset (hero-phone.jpg), so no CSS
   cropping math; the crop was cut ~1.5% inside the bezel in the source art. */
.phone-crop {
  margin-inline: auto;
  width: min(20rem, 78vw);
  border-radius: 1.125rem;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: #1a1814;
}
.phone-crop img { width: 100%; height: auto; }
.hero .phone-crop { animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(2.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Proof strip ---------- */
.proof-strip { border-block: 1px solid var(--border); background: var(--surface); }
.proof-strip .container {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem;
  padding-block: 1.75rem;
}
@media (min-width: 820px) { .proof-strip .container { grid-template-columns: repeat(4, 1fr); } }
.proof { font-size: 0.9375rem; color: var(--text-2); display: flex; gap: 0.625rem; align-items: flex-start; }
.proof svg { width: 1.125rem; height: 1.125rem; flex: none; margin-top: 0.125rem; color: var(--primary); }
.proof strong { color: var(--text); font-weight: 700; display: block; }

/* ---------- Screenshot rail ---------- */
.shots { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  display: flex; gap: 1.25rem; padding: 0.5rem clamp(1.25rem, calc((100vw - var(--container)) / 2 + 2.5rem), 50vw) 1.5rem;
  scrollbar-width: thin;
}
.shots li { flex: none; scroll-snap-align: start; width: min(17.5rem, 72vw); }
.shots img {
  width: 100%; height: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  background: var(--screenshot-bg);
}

/* ---------- How it works ---------- */
.steps { display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem 1.625rem 1.875rem; box-shadow: var(--shadow-sm); }
.step h3 { display: flex; align-items: baseline; gap: 0.75rem; }
.step h3::before {
  counter-increment: step; content: counter(step);
  font-size: 0.875rem; font-weight: 800; color: var(--primary);
  background: var(--primary-soft); border-radius: var(--radius-pill);
  width: 1.75rem; height: 1.75rem; display: inline-grid; place-items: center; flex: none;
  transform: translateY(-0.125rem);
}
.step p { margin-top: 0.75rem; color: var(--text-2); font-size: 0.9675rem; }
.step p strong { color: var(--text); }

/* ---------- Guides ---------- */
.guide-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }
.guide-card {
  display: flex; flex-direction: column; gap: 0.625rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem 1.5rem 1.625rem;
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.guide-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.guide-card h3 { font-size: 1.0925rem; }
.guide-card p { color: var(--text-2); font-size: 0.9175rem; flex: 1; }
.guide-card .go { color: var(--primary); font-weight: 700; font-size: 0.875rem; }
.topic { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; align-self: flex-start; padding: 0.1875rem 0.625rem; border-radius: var(--radius-pill); }
.topic-sleep { color: var(--sleep); background: color-mix(in srgb, var(--sleep) 12%, transparent); }
.topic-feed { color: var(--feed); background: color-mix(in srgb, var(--feed) 14%, transparent); }
.topic-diaper { color: var(--diaper); background: color-mix(in srgb, var(--diaper) 14%, transparent); }
.topic-app { color: var(--insight); background: color-mix(in srgb, var(--insight) 12%, transparent); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 46rem; display: grid; gap: 0.75rem; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.faq-list details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-list summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-weight: 700; padding: 1.0625rem 1.25rem; font-size: 1.0125rem; letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 0.625rem; height: 0.625rem;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg); transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-list .faq-body { padding: 0 1.25rem 1.1875rem; color: var(--text-2); font-size: 0.9675rem; max-width: 60ch; }
.faq-body a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.faq-body a:hover { color: var(--primary-hov); }

/* ---------- Pledge ---------- */
.pledge-card {
  max-width: 46rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm);
}
.pledge-card p { margin-bottom: 1rem; color: var(--text-2); }
.pledge-card p:last-child { margin-bottom: 0; }
.pledge-card .promise { font-weight: 700; color: var(--text); }
.pledge-card .signature { font-size: 0.875rem; color: var(--text-3); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary); color: var(--on-primary); }
.cta-band .container { padding-block: clamp(3.5rem, 7vw, 5.5rem); display: grid; gap: 1.75rem; justify-items: start; }
@media (min-width: 900px) { .cta-band .container { grid-template-columns: 1fr auto; align-items: center; } }
.cta-band h2 { color: inherit; max-width: 22ch; }
.cta-band p { margin-top: 0.875rem; max-width: 44ch; color: color-mix(in srgb, var(--on-primary) 84%, var(--primary)); font-size: 1.0625rem; }
.cta-band .under { margin-top: 0.75rem; font-size: 0.8425rem; color: color-mix(in srgb, var(--on-primary) 72%, var(--primary)); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .container { padding-block: 3.25rem 2rem; display: grid; gap: 2.25rem; }
@media (min-width: 820px) { .site-footer .container { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-tag { margin-top: 0.875rem; color: var(--text-2); font-size: 0.9175rem; max-width: 26ch; }
.footer-col h4 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.625rem; }
.footer-col a { color: var(--text-2); font-size: 0.9375rem; transition: color 0.18s ease-out; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; color: var(--text-3); font-size: 0.8425rem; }

/* ---------- Guide article pages ---------- */
.article-wrap { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 1024px) { .article-wrap { grid-template-columns: minmax(0, 1fr) 19rem; gap: 4rem; align-items: start; } }
.crumbs { font-size: 0.8425rem; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.375rem; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--text-3); }
.article h1 { font-size: clamp(2rem, 3vw + 0.75rem, 3rem); max-width: 22ch; }
.article .dateline { margin-top: 1.125rem; font-size: 0.875rem; color: var(--text-3); }
.article .intro { margin-top: 1.5rem; font-size: 1.125rem; color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.5rem, 1.4vw + 1rem, 1.875rem); margin-top: 2.75rem; margin-bottom: 0.875rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.625rem; }
.prose p { margin-top: 1rem; color: var(--text-2); }
.prose p strong, .prose li strong { color: var(--text); }
.prose ul, .prose ol { margin-top: 1rem; padding-left: 1.375rem; color: var(--text-2); }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--primary); font-weight: 700; }
.prose a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--primary-hov); }
.table-scroll { overflow-x: auto; margin-top: 1.375rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; min-width: 30rem; }
.prose th, .prose td { text-align: left; padding: 0.75rem 1.125rem; border-bottom: 1px solid var(--border); }
.prose th { font-size: 0.8125rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-3); background: var(--elevated); }
.prose tr:last-child td { border-bottom: 0; }
.prose td { color: var(--text-2); font-variant-numeric: tabular-nums; }
.prose td:first-child { color: var(--text); font-weight: 600; }
.in-pipkin {
  margin-top: 1.5rem; background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent);
  border-radius: var(--radius-lg); padding: 1.375rem 1.5rem 1.5rem;
}
.in-pipkin h3 { display: flex; align-items: center; gap: 0.5625rem; color: var(--text); margin-top: 0; }
.in-pipkin h3 img { width: 1.375rem; height: 1.375rem; border-radius: 0.375rem; }
.in-pipkin p { color: var(--text-2); }
.disclaimer { margin-top: 2.75rem; padding: 1.125rem 1.375rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--elevated); font-size: 0.875rem; color: var(--text-3); max-width: 68ch; }

/* Article sidebar */
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.side-card + .side-card { margin-top: 1.25rem; }
.side-card h2 { font-size: 1.0625rem; margin-bottom: 0.75rem; }
.side-card .shot { width: 100%; height: auto; border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 1rem; background: var(--screenshot-bg); }
.side-card p { font-size: 0.9175rem; color: var(--text-2); }
.side-card .btn { margin-top: 1.125rem; width: 100%; }
.side-card ul li { margin-bottom: 0.6875rem; }
.side-card ul a { font-size: 0.9175rem; color: var(--text-2); }
.side-card ul a:hover { color: var(--primary); }
.side-sticky { position: sticky; top: calc(var(--header-h) + 1.5rem); }
