/* Milk First — milkfirstapp.com
   "The 3 AM kitchen": editorial serif + sharpie handwriting + warm paper.
   One mom's story, told down the page. */

:root {
  --paper: #FAF5EA;
  --paper-deep: #F2EADA;
  --surface: #FFFEFB;
  --ink: #2A2520;
  --muted: #6E675C;
  --line: #E6DCC9;
  --sage: #3E7C63;
  --sage-deep: #2C5C48;
  --sage-soft: rgba(62, 124, 99, 0.12);
  --gold: #B7791F;
  --night: #191511;
  --night-ink: #F3EDE0;
  --night-muted: #A89F8F;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Karla', -apple-system, sans-serif;
  --hand: 'Caveat', cursive;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(42,37,32,.06), 0 3px 10px rgba(42,37,32,.06);
  --shadow-md: 0 3px 8px rgba(42,37,32,.08), 0 16px 40px rgba(42,37,32,.12);
  --dur: .22s;
  --ease: cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.51 0 0 0 0 0.44 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav-bar, footer, section, .article { position: relative; z-index: 2; }
img { max-width: 100%; display: block; }
a { color: var(--sage); text-decoration-color: rgba(62,124,99,.4); }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 22px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 4.6vw, 54px); font-variation-settings: "SOFT" 60, "WONK" 1; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-variation-settings: "SOFT" 60, "WONK" 1; }
h3 { font-size: 24px; }
.lede { font-size: clamp(17px, 1.9vw, 20px); color: var(--muted); line-height: 1.65; }
.fine { font-size: 13.5px; color: var(--muted); }
strong { color: var(--ink); font-weight: 700; }

/* handwriting + highlighter */
.hand { font-family: var(--hand); font-size: 1.5em; line-height: 1.1; color: var(--sage-deep); font-weight: 600; }
.hand.gold { color: var(--gold); }
.hl { background: linear-gradient(transparent 58%, rgba(62,124,99,.22) 58%, rgba(62,124,99,.22) 92%, transparent 92%); }
.hl-gold { background: linear-gradient(transparent 58%, rgba(183,121,31,.25) 58%, rgba(183,121,31,.25) 92%, transparent 92%); }
.timestamp {
  font-family: var(--hand); font-size: 30px; color: var(--gold);
  display: block; margin-bottom: 10px; transform: rotate(-2deg);
}

/* Nav */
.nav-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 245, 234, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.nav-bar.scrolled { border-bottom-color: var(--line); }
nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; font-family: var(--sans); }
.logo img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.logo-mark { display: none; }
.links { display: flex; align-items: center; gap: 22px; }
.links a { color: var(--muted); font-weight: 700; font-size: 15px; text-decoration: none; }
.links a:hover { color: var(--ink); }
@media (max-width: 720px) { .links a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-block; background: var(--sage); color: #fff !important;
  font-family: var(--sans); font-weight: 800; font-size: 17px; padding: 15px 28px;
  border-radius: 100px; border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 0 var(--sage-deep);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--sage-deep); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--sage-deep); }
.btn-ghost {
  display: inline-block; color: var(--sage-deep); font-weight: 800; text-decoration: none;
  padding: 14px 24px; border: 2px solid var(--sage); border-radius: 100px;
}
.btn-ghost:hover { background: var(--sage-soft); }
.reassure { font-size: 14.5px; color: var(--muted); margin-top: 16px; }

/* Sections */
section { padding: 72px 0; }
.subtle { background: var(--paper-deep); }
.eyebrow {
  display: inline-block; font-family: var(--hand); font-size: 24px;
  color: var(--sage-deep); margin-bottom: 12px; transform: rotate(-1.5deg);
}

/* Hero */
.hero { padding: 48px 0 84px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 44px; align-items: center;
}
.hero-grid > div { min-width: 0; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin: 8px 0 22px; }
.hero .lede { margin-bottom: 32px; }
.proof-strip { display: grid; gap: 9px; margin-top: 28px; font-size: 14px; color: var(--muted); font-weight: 600; }
.proof-strip span::before { content: "✓ "; color: var(--sage); font-weight: 800; }

/* Phones: hand-placed polaroid feel */
.phone-shot {
  width: 100%; max-width: 300px; border-radius: 32px;
  border: 6px solid #201d1a; box-shadow: var(--shadow-md); display: block;
}
.shot-tilt { transform: rotate(1.6deg); }
.shot-tilt-l { transform: rotate(-1.4deg); }
.hero-shots { display: flex; justify-content: center; position: relative; width: max-content; margin: 0 auto; }
.annotation {
  position: absolute; font-family: var(--hand); font-size: 26px; line-height: 1.05;
  color: var(--sage-deep); max-width: 190px; transform: rotate(-4deg);
}
.annotation svg { display: block; margin-top: 4px; }
/* Below the grid collapse, annotations become captions under the phone:
   no overlap, no misaimed arrows. Must match the .hero-grid/.feature-row breakpoints. */
@media (max-width: 860px) {
  .annotation { position: static !important; max-width: none; margin: 14px auto 0; text-align: center !important; transform: rotate(-2deg); }
  .annotation svg { display: none; }
  .hero-shots, .art { flex-direction: column; align-items: center; }
}
.art { display: flex; justify-content: center; position: relative; width: max-content; margin: 0 auto; max-width: 100%; }

/* tape */
.taped { position: relative; }
.taped::after {
  content: ""; position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 110px; height: 30px; background: rgba(214, 199, 166, .55);
  border-left: 1px dashed rgba(42,37,32,.12); border-right: 1px dashed rgba(42,37,32,.12);
}

/* Story chapters */
.chapter { max-width: 680px; margin: 0 auto; }
.chapter p { margin: 15px 0; font-size: 17.5px; }
.story-beat { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.35; margin: 18px 0; }

/* Night (3 AM) */
.night { background: var(--night); color: var(--night-ink); }
.night h2, .night h3, .night strong, .night .story-beat { color: var(--night-ink); }
.night p { color: var(--night-muted); }
.night .timestamp { color: #E3B45E; font-size: 34px; }
.night .phone-shot { border-color: #383226; }
.night .night-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; align-items: center; }
@media (max-width: 780px) { .night .night-grid { grid-template-columns: 1fr; } }

/* Pain list — fridge notes */
.pain-list { display: grid; gap: 14px; margin: 26px 0; }
.pain-list li {
  list-style: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; padding: 16px 20px; font-size: 17px;
  box-shadow: var(--shadow-sm); position: relative;
}
.pain-list li:nth-child(odd) { transform: rotate(-.5deg); }
.pain-list li:nth-child(even) { transform: rotate(.5deg); }

/* Calculator */
.calc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-md);
  max-width: 540px; margin: 0 auto; position: relative;
}
.calc label { display: block; font-weight: 800; font-size: 15px; margin: 16px 0 6px; }
.calc input[type="number"] {
  width: 100%; font-size: 24px; font-weight: 800; font-family: var(--sans);
  padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
}
.calc input[type="range"] { width: 100%; accent-color: var(--sage); }
.calc-result { margin-top: 22px; padding: 20px; border-radius: var(--radius); background: var(--sage-soft); text-align: center; }
.calc-result .big { font-family: var(--serif); font-size: 46px; font-weight: 600; color: var(--sage-deep); line-height: 1.05; }
.calc-result p { font-size: 15px; color: var(--muted); margin-top: 6px; }

/* Feature rows */
.feature-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; align-items: center; padding: 40px 0; }
.feature-row.flip > div:first-child { order: 2; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.flip > div:first-child { order: unset; }
}
.feature-row h3 { font-size: 25px; margin-bottom: 12px; }
.feature-row p { color: var(--muted); }
.feature-row .mini { margin-top: 12px; font-size: 15.5px; }
.feature-row .mini li { margin-left: 20px; margin-top: 6px; color: var(--muted); }

/* Compare */
.compare-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15.5px; }
.compare-table th, .compare-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table th { background: var(--paper-deep); font-size: 14px; font-family: var(--sans); }
.compare-table td:first-child { font-weight: 700; }
.compare-table .yes { color: var(--sage); font-weight: 800; }
.compare-table .no { color: var(--muted); }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* Letter */
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.founder {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 40px 38px; box-shadow: var(--shadow-md);
  max-width: 660px; margin: 0 auto; transform: rotate(-.4deg); position: relative;
}
.founder p { margin-bottom: 15px; font-size: 17px; }
.founder .sig { font-family: var(--hand); font-size: 30px; color: var(--sage-deep); transform: rotate(-2deg); display: inline-block; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; max-width: 760px; margin: 34px auto 0; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px; text-align: left; box-shadow: var(--shadow-sm);
}
.price-card.hot { border: 2px solid var(--sage); box-shadow: var(--shadow-md); position: relative; transform: rotate(.4deg); }
.badge {
  position: absolute; top: -16px; left: 22px; font-family: var(--hand);
  background: var(--gold); color: #fff; font-size: 19px; padding: 3px 14px;
  border-radius: 100px; transform: rotate(-2deg);
}
.price-card .amount { font-family: var(--serif); font-size: 42px; font-weight: 600; margin: 8px 0 2px; }
.price-card .per { font-size: 14.5px; color: var(--muted); }
.price-card ul { margin: 16px 0 22px; }
.price-card li { list-style: none; padding: 5px 0; font-size: 15.5px; color: var(--muted); }
.price-card li::before { content: "✓ "; color: var(--sage); font-weight: 800; }

/* FAQ */
.faq { max-width: 700px; margin: 26px auto 0; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 800; cursor: pointer; font-size: 16.5px; }
.faq details p { color: var(--muted); margin-top: 10px; font-size: 15.5px; }

/* Articles */
.article { padding: 36px 0 72px; }
.article h1 { font-size: clamp(32px, 4.4vw, 46px); margin-bottom: 14px; }
.article h2 { font-size: 28px; margin: 34px 0 12px; }
.article h3 { font-size: 21px; margin: 24px 0 8px; }
.article p { margin: 12px 0; }
.article ul, .article ol { margin: 12px 0 12px 24px; }
.article li { margin: 6px 0; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.cta-box { background: var(--sage-soft); border-radius: var(--radius); padding: 24px; margin: 30px 0; text-align: center; }
.cta-box p { margin-bottom: 14px; font-weight: 700; }

/* Footer */
footer { background: var(--paper-deep); border-top: 1px solid var(--line); padding: 44px 0 30px; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; margin-bottom: 26px; }
@media (max-width: 720px) { footer .cols { grid-template-columns: 1fr 1fr; } }
footer a { display: block; color: var(--muted); font-size: 14.5px; padding: 3px 0; text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .col-title { font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-bottom: 8px; font-family: var(--sans); }

/* Reveal — scoped to .js so content can never hide if scripts fail */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Mobile air — the hero needs room to breathe on small screens */
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 26px 0 56px; }
  h1 { font-size: clamp(33px, 9.4vw, 42px); }
  .hero h1 { margin: 10px 0 20px; }
  .hero .lede { font-size: 17px; line-height: 1.7; margin-bottom: 30px; }
  .eyebrow { font-size: 23px; }
  .reassure { margin-top: 14px; line-height: 1.6; }
  .proof-strip { margin-top: 28px; gap: 12px 18px; }
  .hero-shots { margin-top: 44px; }
  .chapter p { font-size: 17.5px; }
}

/* Guide pages: answer-first + hub */
.answer-box {
  background: var(--sage-soft); border-left: 4px solid var(--sage);
  border-radius: var(--radius); padding: 18px 22px; margin: 18px 0 26px;
  font-size: 17.5px;
}
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0 34px; }
@media (max-width: 700px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); text-decoration: none; }
.guide-card h3 { font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.guide-card p { font-size: 14.5px; color: var(--muted); }

/* Hub link lists */
.hub-links { columns: 2; gap: 30px; margin: 14px 0 30px; list-style: none; }
@media (max-width: 640px) { .hub-links { columns: 1; } }
.hub-links li { margin: 0 0 9px; break-inside: avoid; }
.hub-links a { font-size: 15.5px; font-weight: 600; }

/* In-the-app note: screenshot + instructions on content pages */
.app-note {
  display: flex; gap: 22px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 22px; margin: 30px 0;
  box-shadow: var(--shadow-sm);
}
.app-note img {
  width: 130px; height: auto; flex-shrink: 0;
  border-radius: 16px; border: 4px solid #201d1a; box-shadow: var(--shadow-sm);
}
.app-note h3 { font-size: 19px; margin-bottom: 6px; }
.app-note p { font-size: 15.5px; color: var(--muted); margin: 0 0 8px; }
.app-note .links-line { font-size: 14px; }
@media (max-width: 560px) { .app-note { flex-direction: column; align-items: flex-start; } .app-note img { width: 150px; margin: 0 auto; } }
