/* Grandma Mae's Remedy Book
   Warm farmhouse kitchen: linen paper, moss cardigan green, honey, stained index cards. */

:root {
  --paper: oklch(0.955 0.022 82);
  --paper-deep: oklch(0.915 0.032 78);
  --card: oklch(0.985 0.012 90);
  --ink: oklch(0.25 0.025 55);
  --ink-soft: oklch(0.42 0.03 60);
  --moss: oklch(0.38 0.065 135);
  --moss-deep: oklch(0.29 0.05 140);
  --moss-light: oklch(0.9 0.035 125);
  --honey: oklch(0.8 0.14 78);
  --honey-deep: oklch(0.7 0.15 65);
  --tomato: oklch(0.56 0.16 32);
  --rule: oklch(0.8 0.04 225 / 0.45);
  --on-moss: oklch(0.96 0.02 95);

  --font-display: "Alegreya", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-hand: "Homemade Apple", cursive;

  --step--1: 1rem;
  --step-0: 1.1875rem;
  --step-1: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
  --step-2: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
  --step-3: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  --step-4: clamp(2.75rem, 1.8rem + 4vw, 4.75rem);

  --gutter: clamp(1.125rem, 4vw, 3rem);
  --radius: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 1px 0 oklch(0.3 0.03 60 / 0.06), 0 12px 28px -12px oklch(0.3 0.04 60 / 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--moss); text-underline-offset: 0.18em; }

:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tomato);
  margin-bottom: 0.75rem;
}
.eyebrow-light { color: var(--honey); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--moss); color: var(--on-moss);
  font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); letter-spacing: 0.005em;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--moss-deep), 0 10px 22px -10px oklch(0.3 0.06 140 / 0.7);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.btn:hover { background: var(--moss-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--moss-deep); }
.btn-small { min-height: 48px; padding: 0.5rem 1.125rem; font-size: 1.0625rem; }
.btn-big { min-height: 62px; padding: 1rem 2rem; font-size: var(--step-1); width: 100%; }
.btn-honey { background: var(--honey); color: var(--ink); box-shadow: 0 2px 0 var(--honey-deep), 0 12px 26px -10px oklch(0.2 0.05 60 / 0.6); }
.btn-honey:hover { background: oklch(0.84 0.13 82); }

/* Ribbon + header */
.ribbon {
  background: var(--moss-deep); color: var(--on-moss);
  font-size: var(--step--1); text-align: center;
  padding: 0.5rem var(--gutter);
}
.ribbon p { margin: 0; }
.nw { white-space: nowrap; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.625rem var(--gutter);
  background: oklch(0.955 0.022 82 / 0.94);
  border-bottom: 1px solid oklch(0.8 0.03 70 / 0.5);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: oklch(0.955 0.022 82 / 0.82); backdrop-filter: blur(8px); }
}
.wordmark { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1; }
.wordmark-hand { font-family: var(--font-hand); font-size: 0.8rem; color: var(--tomato); }
.wordmark-serif { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin-top: 0.35rem; }
.site-nav { display: none; gap: 1.75rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: var(--step--1); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 960px) { .site-nav { display: flex; } }

/* Hero */
.hero {
  display: grid; gap: 2rem;
  padding: clamp(1.5rem, 4vw, 4rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  max-width: 1280px; margin: 0 auto;
}
.hero h1 { font-size: var(--step-4); }
.hero h1 em { font-style: italic; font-weight: 700; color: var(--moss); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); margin-top: 1.25rem; max-width: 34ch; }
.hero-buy { margin-top: 1.75rem; max-width: 26rem; }
.assurances {
  list-style: none; padding: 0; margin: 1rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem;
  font-size: var(--step--1); color: var(--ink-soft);
}
.assurances li::before { content: "✓"; color: var(--moss); font-weight: 700; margin-right: 0.4rem; }

.hero-photo { position: relative; margin: 0; }
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: 22px;
  box-shadow: 0 30px 60px -30px oklch(0.3 0.05 60 / 0.6);
}

.note {
  font-family: var(--font-hand);
  color: var(--ink);
  line-height: 1.8;
}
.note-hero {
  position: absolute; left: -0.5rem; bottom: 1.5rem;
  background: var(--card);
  padding: 0.9rem 1.2rem 0.7rem;
  font-size: 0.95rem;
  border-radius: 4px;
  transform: rotate(-3deg);
  box-shadow: var(--shadow-card);
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 4rem; }
  .hero-photo { transform: rotate(1.5deg); }
  .note-hero { left: -2.5rem; bottom: 3rem; font-size: 1.05rem; }
}

/* Proof strip */
.proof { background: var(--paper-deep); padding: 1.75rem var(--gutter); }
.proof-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1100px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3rem;
}
.proof-list li { font-size: var(--step--1); color: var(--ink-soft); }
.proof-list strong { font-family: var(--font-display); font-size: var(--step-2); color: var(--ink); margin-right: 0.4rem; }

/* Letter */
.letter { padding: clamp(3rem, 8vw, 6.5rem) var(--gutter); background: var(--moss); color: var(--on-moss); }
.letter-inner { max-width: 38rem; margin: 0 auto; font-size: var(--step-1); line-height: 1.6; }
.letter-inner p { font-family: var(--font-display); font-weight: 500; }
.letter-open, .letter-sign { font-family: var(--font-hand) !important; color: var(--honey); font-size: var(--step-1); }
.letter-sign { margin-top: 1.5rem; }

/* Section heads */
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: var(--step-3); }
.section-sub { margin-top: 1rem; color: var(--ink-soft); font-size: var(--step-1); }

/* Inside / table of contents */
.inside { padding: clamp(4rem, 9vw, 7rem) var(--gutter); max-width: 1000px; margin: 0 auto; }
.toc { list-style: none; counter-reset: ch; margin: 0; padding: 0; }
.toc li {
  counter-increment: ch;
  display: flex; align-items: baseline; gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid oklch(0.8 0.03 70 / 0.6);
  font-size: var(--step-1);
}
.toc li::before {
  content: counter(ch);
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  color: var(--tomato); min-width: 1.6ch;
}
.toc-title { font-family: var(--font-display); font-weight: 700; }
.toc-dots { flex: 1; border-bottom: 2px dotted oklch(0.7 0.03 70); transform: translateY(-0.3em); min-width: 1rem; }
.toc-count { font-size: var(--step--1); color: var(--ink-soft); white-space: nowrap; }
.inside-foot { margin-top: 1.75rem; color: var(--ink-soft); max-width: 44ch; }

/* Peek: recipe cards */
.peek { background: var(--paper-deep); padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.peek .section-head, .cards { max-width: 1200px; margin-left: auto; margin-right: auto; }
.cards { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: start; }

.card {
  background-color: var(--card);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.1rem - 1px), var(--rule) calc(2.1rem - 1px), var(--rule) 2.1rem);
  background-position: 0 5.6rem;
  border-top: 6px solid var(--tomato);
  border-radius: 6px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-card);
  transition: transform 400ms var(--ease-out);
}
.card-a { transform: rotate(-1.4deg); }
.card-b { transform: rotate(0.9deg) translateY(0.75rem); border-top-color: var(--moss); }
.card-c { transform: rotate(-0.6deg); border-top-color: var(--honey-deep); }
@media (hover: hover) { .card:hover { transform: rotate(0) translateY(-4px); } }

.card-chapter { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.25rem; }
.card h3 { font-size: var(--step-2); margin-bottom: 1rem; }
.card h4 { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.15rem; margin: 0.75rem 0 0.25rem; color: var(--moss); }
.card ul, .card ol { margin: 0; padding-left: 1.3rem; }
.card li { line-height: 2.1rem; font-size: 1.0625rem; }
.card-note {
  font-family: var(--font-hand); font-size: 0.85rem; line-height: 1.9;
  color: var(--tomato); margin: 1rem 0 0;
}

/* Pantry */
.pantry { display: grid; background: var(--card); }
.pantry-photo { margin: 0; }
.pantry-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.pantry-copy { padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); align-self: center; max-width: 34rem; }
.pantry-copy h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.pantry-copy p { font-size: var(--step-1); color: var(--ink-soft); }
@media (min-width: 900px) {
  .pantry { grid-template-columns: 1.4fr 1fr; }
  .pantry-photo img { aspect-ratio: auto; min-height: 520px; }
}

/* Mae */
.mae {
  display: grid; gap: 2.5rem; align-items: center;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  max-width: 1150px; margin: 0 auto;
}
.mae-photo { margin: 0; max-width: 460px; }
.mae-photo img { border-radius: 50% 50% 22px 22px / 38% 38% 22px 22px; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow-card); }
.mae-copy h2 { font-size: var(--step-3); margin-bottom: 1.25rem; }
.mae-copy p { max-width: 58ch; }
.note-mae { font-size: 1rem; color: var(--tomato); margin-top: 1.5rem; }
@media (min-width: 860px) { .mae { grid-template-columns: 0.8fr 1.2fr; gap: 4.5rem; } }

/* Reviews (only rendered with real data) */
.reviews { padding: clamp(4rem, 9vw, 7rem) var(--gutter); background: var(--paper-deep); }
.reviews .section-head, .review-list { max-width: 1100px; margin-left: auto; margin-right: auto; }
.review-list { columns: 3 300px; column-gap: 1.5rem; }
.review {
  break-inside: avoid; margin: 0 0 1.5rem;
  background: var(--card); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
.review blockquote { margin: 0 0 1rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; line-height: 1.45; }
.review figcaption { font-size: var(--step--1); color: var(--ink-soft); }
.review-stars { color: var(--honey-deep); letter-spacing: 0.1em; margin-bottom: 0.5rem; }

/* Offer */
.offer { background: var(--moss-deep); color: var(--on-moss); padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.offer-inner { max-width: 1100px; margin: 0 auto; display: grid; gap: 2.5rem; align-items: center; }
.offer-book { margin: 0 auto; max-width: min(380px, 62vw); }
.offer-book img { border-radius: 16px; box-shadow: 0 40px 70px -30px oklch(0.1 0.03 140 / 0.9); transform: rotate(-2deg); }
.offer-copy h2 { font-size: var(--step-3); color: var(--on-moss); margin-bottom: 1.5rem; }
.offer-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.offer-list li { position: relative; padding: 0.6rem 0 0.6rem 2.25rem; border-bottom: 1px solid oklch(0.6 0.04 140 / 0.4); }
.offer-list li::before {
  content: ""; position: absolute; left: 0; top: 0.95rem;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--honey) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%23312a1f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.offer-price { font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); line-height: 1; margin-bottom: 1.25rem; color: var(--honey); }
.offer-price-note { display: block; font-family: var(--font-body); font-weight: 400; font-size: var(--step--1); color: var(--on-moss); margin-top: 0.5rem; }
.offer-secure { font-size: var(--step--1); opacity: 0.85; margin-top: 1rem; }
.offer .btn-big { max-width: 26rem; }
@media (min-width: 860px) { .offer-inner { grid-template-columns: 0.85fr 1.15fr; gap: 5rem; } }

/* Guarantee */
.guarantee {
  display: grid; gap: 1.75rem; align-items: center;
  max-width: 900px; margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}
.seal {
  width: 140px; height: 140px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: var(--honey); color: var(--ink);
  box-shadow: inset 0 0 0 6px var(--honey), inset 0 0 0 8px oklch(0.3 0.04 60 / 0.35);
  transform: rotate(-8deg);
}
.seal-days { font-family: var(--font-display); font-weight: 800; font-size: 3rem; line-height: 0.9; }
.seal-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; }
.guarantee h2 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.guarantee p { max-width: 55ch; color: var(--ink-soft); }
@media (min-width: 720px) { .guarantee { grid-template-columns: auto 1fr; gap: 3rem; } }

/* FAQ */
.faq { padding: clamp(3.5rem, 8vw, 6rem) var(--gutter); max-width: 900px; margin: 0 auto; }
.faq-list details { border-bottom: 1px solid oklch(0.8 0.03 70 / 0.7); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 64px; padding: 1rem 0;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-1);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-content: center;
  background: var(--moss-light); color: var(--moss-deep);
  font-family: var(--font-body); font-size: 1.4rem; line-height: 1;
  transition: transform 250ms var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--ink-soft); max-width: 62ch; padding-bottom: 1rem; }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq-list details::details-content { block-size: 0; overflow: hidden; transition: block-size 320ms var(--ease-out), content-visibility 320ms allow-discrete; }
  .faq-list details[open]::details-content { block-size: auto; }
}

/* Last call */
.last-call {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) clamp(5rem, 10vw, 7rem);
  background: var(--paper-deep);
}
.last-call h2 { font-size: var(--step-3); max-width: 18ch; margin: 0 auto 2rem; }
.last-call .btn-big { max-width: 26rem; }

/* Footer */
.site-footer { background: var(--ink); color: oklch(0.85 0.02 80); padding: 3rem var(--gutter) 7rem; font-size: var(--step--1); }
.site-footer > * { max-width: 70ch; margin-left: auto; margin-right: auto; }
.footer-mark { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--on-moss); }
.footer-mark .wordmark-hand { color: var(--honey); margin-right: 0.35rem; }
.site-footer a { color: var(--honey); }
.disclaimer { line-height: 1.55; }
.copyright { opacity: 0.7; margin: 0; }

/* Sticky mobile buy bar */
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: oklch(0.985 0.012 90 / 0.97);
  border-top: 1px solid oklch(0.8 0.03 70 / 0.6);
  box-shadow: 0 -10px 30px -12px oklch(0.3 0.04 60 / 0.35);
  transform: translateY(110%);
  transition: transform 320ms var(--ease-out);
}
.sticky-buy.is-visible { transform: translateY(0); }
.sticky-price { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.sticky-buy .btn { flex: 1; max-width: 16rem; }
@media (min-width: 960px) { .sticky-buy { display: none; } }

/* Entrance motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .reveal.is-in { opacity: 1; transform: none; }
  .hero-copy > * { animation: rise 800ms var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .hero-copy > :nth-child(4) { animation-delay: 240ms; }
  .hero-photo { animation: settle 1100ms var(--ease-out) 120ms both; }
  .note-hero { animation: rise 700ms var(--ease-out) 700ms both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes settle { from { opacity: 0; transform: rotate(0deg) scale(0.97); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* Legal pages */
.legal h1 { font-size: var(--step-3); }
.legal p { max-width: 62ch; }

/* Thank-you page */
.thanks { padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 9vw, 7rem); }
.thanks-inner { max-width: 36rem; margin: 0 auto; }
.thanks h1 { font-size: var(--step-4); margin-bottom: 1.5rem; }
.thanks-lede { font-size: var(--step-1); line-height: 1.5; }
.thanks-download .btn-big { margin: 0.5rem 0 1.5rem; }
.thanks-tips { padding-left: 1.25rem; color: var(--ink-soft); }
.thanks-tips li { margin-bottom: 0.6rem; }
.thanks-help { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid oklch(0.8 0.03 70 / 0.6); color: var(--ink-soft); }
.thanks-note { font-size: 1rem; color: var(--tomato); margin-top: 2rem; }
