/* ============================================================
   Pistachio Milk — visual identity: "soft organic, tactile, bold"
   Signature: the milk itself as visual language — pistachio-green
   poured/settled LIQUID (organic SVG shapes + poured-edge dividers)
   on a warm, grainy shell-cream base.

   Boldness is spent on: (1) the poured-liquid hero, (2) poured-edge
   section/footer dividers, (3) one or two oversized, tightly-set
   Fraunces display moments (page title, Quick Answer). Everything
   else is kept quiet.

   Palette (named values, everything derived from them):
     pistachio-flesh #A8C66C  shell-cream #F2EBDC  husk #6B5B4A
     deep-pistachio  #3E5622  blush #D98E73 (single warm pop, <=5%)

   Type: Fraunces (soft, low optical-contrast — NOT a Playfair/Canela
   high-contrast serif) for display; Figtree (humanist sans, tall
   x-height) for body.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Figtree:wght@400;500;600;700&display=swap");

:root {
  /* named base palette */
  --flesh:      #a8c66c;
  --cream:      #f2ebdc;
  --husk:       #6b5b4a;
  --deep:       #3e5622;
  --blush:      #d98e73;

  /* derived warm-cream surfaces */
  --cream-2:    #ece3d0;   /* alt sections / cards */
  --cream-3:    #e5dac3;   /* deeper panel */
  --line:       #ddd0b6;   /* warm hairline */
  --line-soft:  #e8ddc7;

  /* derived ink (all AA on cream) */
  --ink:        #3a3026;   /* headings / strongest (~9:1) */
  --text:       #574a3b;   /* body (~7:1) — a touch deeper than husk for reading comfort */
  --muted:      #6b5b4a;   /* husk: secondary text (~5.5:1) */

  /* derived greens */
  --deep-ink:   #34491c;   /* link/heading green, strong contrast */
  --flesh-deep: #4f6b29;   /* darker flesh for small accent text/edges (AA ~5:1) */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Figtree", system-ui, -apple-system, sans-serif;

  --measure: 40rem;
  --wrap:    72rem;
  --radius:  14px;         /* softer, more tactile than the old 6px */
  --radius-sm: 8px;

  /* poured-edge divider (a "pour lip" wave), tinted per use via mask color */
  --pour: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 70' preserveAspectRatio='none'%3E%3Cpath d='M0,38 C160,70 330,8 520,30 C700,51 860,72 1040,40 C1110,28 1160,30 1200,36 L1200,70 L0,70 Z' fill='%23000'/%3E%3C/svg%3E");
}

/* ---------- grain: subtle tactile noise over the cream base ---------- */
/* Fixed, pointer-transparent, very low opacity feTurbulence — cheap,
   no image files, gives the cream a paper-like tactility. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
/* keep real content above the grain layer */
.site-header, main, .site-footer, .pour-divider { position: relative; z-index: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--deep-ink); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--flesh-deep); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }
.wrap--narrow { max-width: var(--measure); }

.skip-link {
  position: absolute; left: -999px;
  background: var(--ink); color: var(--cream); padding: .6rem 1rem; z-index: 20;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--deep); outline-offset: 2px; border-radius: 2px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 66px;
}
.brand { display: inline-flex; align-items: baseline; gap: .4rem; text-decoration: none; }
.brand__mark {
  font-family: var(--font-display); font-weight: 600; font-size: 1.4rem;
  font-variation-settings: "opsz" 40; color: var(--ink); letter-spacing: -.01em;
}
.brand__sub {
  font-family: var(--font-display); font-weight: 500; font-size: 1.4rem;
  font-variation-settings: "opsz" 40; color: var(--deep);
}
.nav { display: flex; gap: 1.4rem; font-family: var(--font-body); font-size: .95rem; font-weight: 500; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--deep); }

.nav-toggle, .nav-toggle__btn { display: none; }

/* ---------- typographic primitives ---------- */
.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: .76rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--deep);
  margin: 0 0 .6rem;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; color: var(--ink); }
h1 { font-weight: 600; font-variation-settings: "opsz" 38; letter-spacing: -.015em; }
h2 { font-weight: 600; font-variation-settings: "opsz" 32; letter-spacing: -.01em; }
h3 { font-weight: 600; font-variation-settings: "opsz" 24; }

/* ---------- poured-edge divider (signature) ---------- */
/* A reusable "pour lip" wave. Colour set by `color`; the wave is the
   masked fill, so it tints to whatever section follows it. */
.pour-divider { height: 56px; line-height: 0; }
.pour-divider span {
  display: block; width: 100%; height: 100%;
  background: currentColor;
  -webkit-mask: var(--pour) no-repeat center / 100% 100%;
          mask: var(--pour) no-repeat center / 100% 100%;
}

/* ---------- hero: the poured, settled liquid (signature) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--cream);
  padding: 3.5rem 0 2rem;
}
.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center;
}
.hero__title {
  font-family: var(--font-display); color: var(--ink);
  font-weight: 600; font-variation-settings: "opsz" 40;
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02;
  letter-spacing: -.025em; margin: 0 0 1.1rem; max-width: 14ch;
}
.hero__title em { font-style: italic; color: var(--deep); font-variation-settings: "opsz" 60; }
.hero__lede {
  font-size: 1.2rem; color: var(--muted); max-width: 34ch; margin: 0;
}
/* the liquid vessel */
.hero__liquid { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 30rem; margin-inline: auto; }
.hero__liquid svg { width: 100%; height: 100%; display: block; }
/* gentle settle motion on the liquid surface — static-first; this only
   adds a slow drift. Disabled under reduced-motion (see bottom). */
.liquid-surface { transform-origin: center; animation: settle 9s ease-in-out infinite; }
.liquid-shine   { animation: shine 9s ease-in-out infinite; }
@keyframes settle {
  0%,100% { transform: translateY(0) scaleY(1); }
  50%     { transform: translateY(-6px) scaleY(1.015); }
}
@keyframes shine {
  0%,100% { opacity: .5; } 50% { opacity: .75; }
}

/* ---------- article ---------- */
.article { padding: 2.75rem 0 4rem; }
.article__head { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.article__title {
  font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0 0 .75rem;
  font-variation-settings: "opsz" 40; letter-spacing: -.02em;
}
.article__standfirst {
  font-family: var(--font-display); font-weight: 400; font-variation-settings: "opsz" 28;
  font-size: 1.35rem; line-height: 1.4; color: var(--deep); margin: 0;
}

/* provenance */
.provenance {
  display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; margin-top: 1.5rem;
  font-family: var(--font-body); font-size: .85rem; color: var(--muted);
  padding: .9rem 1.1rem; background: var(--cream-2);
  border-radius: var(--radius-sm); border-left: 3px solid var(--flesh);
}
.provenance strong { color: var(--ink); font-weight: 600; }
.provenance a { color: var(--deep-ink); }

/* ---------- Quick Answer: oversized, tightly-set display moment ---------- */
.quick-answer {
  position: relative; margin: 0 0 2.25rem; padding: 1.4rem 1.5rem 1.5rem;
  background: var(--cream-2); border-radius: var(--radius);
  border: 1px solid var(--line);
}
.quick-answer::before {
  content: ""; position: absolute; left: 0; top: 1.3rem; bottom: 1.3rem; width: 4px;
  border-radius: 4px; background: var(--blush);   /* the single warm pop (decorative) */
}
.quick-answer__label {
  font-family: var(--font-body); font-weight: 700; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--deep);
  margin: 0 0 .5rem;
}
.quick-answer__text {
  font-family: var(--font-display); font-weight: 500; font-variation-settings: "opsz" 30;
  font-size: 1.3rem; line-height: 1.4; color: var(--ink); margin: 0;
  letter-spacing: -.01em;
}

/* prose */
.prose { overflow-wrap: break-word; color: var(--text); }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.6rem; }
.prose h3 { font-size: 1.22rem; margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .4rem; }
.prose li::marker { color: var(--flesh-deep); }
.prose blockquote {
  margin: 1.5rem 0; padding: .5rem 0 .5rem 1.25rem;
  border-left: 3px solid var(--flesh); color: var(--muted); font-style: italic;
}
.prose code {
  font-family: ui-monospace, monospace; font-size: .9em;
  background: var(--cream-3); padding: .1em .35em; border-radius: 4px;
}
/* real sequences get numbered markers; facts do not */
.prose ol { counter-reset: step; list-style: none; padding-left: 0; }
.prose ol > li {
  position: relative; padding-left: 2.6rem; counter-increment: step; min-height: 1.8rem;
}
.prose ol > li::before {
  content: counter(step); position: absolute; left: 0; top: -.1rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--flesh); color: var(--deep);
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  display: inline-flex; align-items: center; justify-content: center;
}

/* callout */
.callout {
  margin: 1.75rem 0; padding: 1rem 1.25rem; background: var(--cream-2);
  border-radius: var(--radius-sm); border-left: 3px solid var(--blush);
  font-family: var(--font-body); font-size: .96rem; color: var(--text);
}
.callout strong { color: var(--ink); }
.callout > * + * { margin-top: .6rem; }

/* recipe card */
.recipe-card {
  margin: 2rem 0; padding: 1.6rem 1.75rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--cream-2);
}
.recipe-card__meta {
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 0 0 1.25rem;
  font-family: var(--font-body); font-size: .85rem; color: var(--muted);
}
.recipe-card__meta strong { color: var(--ink); font-weight: 600; }
.recipe-card h2, .recipe-card h3 { margin-top: 0; }

/* sources & disclaimer */
.sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.sources__title { font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.sources__list { font-family: var(--font-body); font-size: .9rem; color: var(--muted); }
.disclaimer {
  margin-top: 2.5rem; padding: 1rem 1.25rem; background: var(--cream-2);
  border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: .86rem; color: var(--text); border-left: 3px solid var(--flesh);
}
.disclaimer strong { color: var(--ink); }

/* ---------- home / sections ---------- */
.section { padding: 3rem 0; position: relative; }
.section__title { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 .4rem; font-variation-settings: "opsz" 34; }
.section__intro { color: var(--muted); margin: 0 0 1.75rem; max-width: var(--measure); }

.card-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); margin-top: 1.5rem; }
.card {
  display: block; padding: 1.5rem; text-decoration: none; color: inherit;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card:hover { border-color: var(--flesh-deep); transform: translateY(-3px); box-shadow: 0 10px 24px -16px rgba(58,48,38,.45); }
.card__eyebrow { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--flesh-deep); margin-bottom: .5rem; }
.card__title { display: block; font-family: var(--font-display); font-weight: 600; font-variation-settings: "opsz" 24; font-size: 1.2rem; line-height: 1.2; margin: 0 0 .5rem; color: var(--ink); }
.card__desc { font-size: .96rem; color: var(--muted); margin: 0; }

.silo-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); margin: 2rem 0; }

/* ---------- breadcrumb ---------- */
.breadcrumb { background: transparent; }
.breadcrumb__list {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  list-style: none; margin: 0; padding: .9rem 0 0;
  font-family: var(--font-body); font-size: .82rem; color: var(--muted);
}
.breadcrumb__item { display: inline-flex; align-items: center; gap: .4rem; }
.breadcrumb__item + .breadcrumb__item::before { content: "›"; color: var(--flesh-deep); margin-right: .1rem; }
.breadcrumb__item a { color: var(--muted); text-decoration: none; }
.breadcrumb__item a:hover { color: var(--deep); }
.breadcrumb__item [aria-current="page"] { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.faq__title { font-size: 1.6rem; margin: 0 0 1.25rem; font-variation-settings: "opsz" 32; }
.faq__list { display: flex; flex-direction: column; gap: .75rem; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); padding: 0 1.2rem; }
.faq__item[open] { border-color: var(--flesh-deep); background: var(--cream-2); }
.faq__q {
  cursor: pointer; list-style: none; padding: 1.05rem 0;
  font-family: var(--font-display); font-weight: 600; font-variation-settings: "opsz" 20;
  font-size: 1.08rem; color: var(--ink);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; color: var(--flesh-deep); font-weight: 600; font-size: 1.4rem; line-height: 1; }
.faq__item[open] .faq__q::after { content: "–"; }
.faq__a { padding: 0 0 1.15rem; color: var(--text); font-size: 1rem; }

/* ---------- tables ---------- */
.table-wrap { max-width: 100%; overflow-x: auto; margin: 1.75rem 0; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: .75rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--flesh); background: var(--cream-2); }
.prose tbody tr:hover { background: var(--cream-2); }
.table-note { font-family: var(--font-body); font-size: .8rem; color: var(--muted); margin: -.75rem 0 1.75rem; }

/* ---------- footer (with poured top edge) ---------- */
.site-footer { background: var(--cream-3); color: var(--text); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; padding-block: 2.75rem; }
.site-footer__brand { max-width: 28rem; }
.site-footer__brand .brand__mark, .site-footer__brand .brand__sub { font-size: 1.25rem; }
.site-footer__brand p { font-size: .95rem; color: var(--muted); margin: .6rem 0 0; }
.site-footer__nav { display: flex; flex-direction: column; gap: .5rem; font-family: var(--font-body); font-size: .92rem; }
.site-footer__heading { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--deep); margin-bottom: .15rem; }
.site-footer__nav a { color: var(--muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--deep); }
.site-footer__legal { border-top: 1px solid var(--line); padding-block: 1.25rem; }
.site-footer__legal p { font-family: var(--font-body); font-size: .82rem; color: var(--muted); margin: 0; }
/* the poured lip sits directly above the footer; colour matches footer bg */
.pour-divider--footer { color: var(--cream-3); margin-top: 3rem; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero__liquid { max-width: 22rem; order: -1; }
}

@media (max-width: 720px) {
  .site-header__inner { flex-wrap: wrap; }
  .nav-toggle__btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--cream); color: var(--ink); cursor: pointer;
  }
  .nav-toggle__btn:hover { border-color: var(--deep); color: var(--deep); }
  .nav-toggle__bars { position: relative; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, background-color .2s ease; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after  { top: 6px; }
  .nav-toggle { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .nav-toggle:focus-visible ~ .nav-toggle__btn { outline: 3px solid var(--deep); outline-offset: 2px; }
  .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bars { background: transparent; }
  .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }
  .nav { display: none; }
  .nav-toggle:checked ~ .nav { display: flex; flex-direction: column; flex-basis: 100%; order: 3; margin: 0 -1.5rem; padding: .25rem 0; border-top: 1px solid var(--line); }
  .nav a { padding: .8rem 1.5rem; }
  .nav a:hover { background: var(--cream-2); }
}

@media (max-width: 640px) {
  body { font-size: 1.04rem; }
  .brand__sub { display: none; }
  .provenance { flex-direction: column; gap: .3rem; }
  .quick-answer__text { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .liquid-surface, .liquid-shine { animation: none !important; }
}
