/* ============================================================
   Food Truth — app.css
   Every value comes from the Food Truth design system
   (claude.ai design-system artifact "Food Truth"): the custom
   properties below are its tokens, named the same.

   No inline styles anywhere on the site: the CSP has no
   'unsafe-inline' and build.mjs refuses a style="" attribute.
   ============================================================ */

:root {
  /* color */
  --carrot: #f79337;          /* the logo orange; fills only, never text on light */
  --carrot-deep: #a84f0c;     /* orange for text on light grounds */
  --carrot-tint: #fce6cf;
  --soil-900: #201a16;
  --soil-800: #2e2620;
  --soil-700: #4a3f37;
  --soil-500: #7a6c61;
  --soil-overlay: rgba(32, 26, 22, 0.64);
  --linen-50: #fbf8f3;
  --linen-100: #f3ece1;
  --linen-200: #e3d8c8;
  --paper: #ffffff;
  --leaf: #4a6630;
  --leaf-tint: #e4ead6;
  --on-dark: #f6f1ea;
  --on-dark-muted: #bfb3a6;

  --surface: var(--linen-50);
  --surface-alt: var(--linen-100);
  --ink: var(--soil-900);
  --ink-muted: var(--soil-700);
  --line: var(--linen-200);
  --line-strong: var(--soil-500);
  --link: var(--carrot-deep);
  --focus: var(--soil-900);

  /* type */
  --font-display: Jost, Futura, "Century Gothic", system-ui, sans-serif;
  --font-text: Newsreader, Georgia, "Times New Roman", serif;

  /* spacing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px; --space-32: 128px;

  /* radius, shadow, layout */
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px; --radius-pill: 999px;
  --shadow-raised: 0 1px 2px rgba(32, 26, 22, 0.06), 0 8px 24px rgba(32, 26, 22, 0.08);
  --container-max: 1200px;
  --measure: 68ch;
  --header-height: 80px;
  --gutter: var(--space-6);
}
@media (max-width: 640px) { :root { --gutter: var(--space-4); --header-height: 64px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-height) + var(--space-4)); }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-text); font-size: 18px; line-height: 28px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--soil-900); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.footer :focus-visible, .hero :focus-visible, .splash :focus-visible, .quote--dark :focus-visible { outline-color: var(--carrot); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); margin: 0; }
p { margin: 0 0 var(--space-4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--space-4); top: -100px; z-index: 50; background: var(--soil-900); color: var(--on-dark); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); font-family: var(--font-display); }
.skip:focus { top: var(--space-2); }
.center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.wrap { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: var(--space-24) 0; }
.band--tight { padding: var(--space-16) 0; }
.band--alt { background: var(--surface-alt); }
@media (max-width: 640px) { .band { padding: var(--space-16) 0; } .band--tight { padding: var(--space-12) 0; } }

/* the brand's second voice: small, tracked, uppercase */
.eyebrow {
  font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--carrot-deep); margin: 0 0 var(--space-3);
}
.lead { font-family: var(--font-text); font-size: 22px; line-height: 32px; color: var(--ink-muted); max-width: var(--measure); }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-6); border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-family: var(--font-display); font-size: 14px; line-height: 16px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--lg { min-height: 56px; padding: 0 var(--space-8); font-size: 15px; }
.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: 13px; }
.btn--primary { background: var(--carrot); border-color: var(--carrot); color: var(--soil-900); }
.btn--primary:hover { background: var(--soil-900); border-color: var(--soil-900); color: var(--carrot); }
.btn--secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--linen-50); }
.btn--ghost { background: transparent; border-color: var(--on-dark); color: var(--on-dark); }
.btn--ghost:hover { background: var(--on-dark); color: var(--soil-900); }

.link {
  font-family: var(--font-display); font-size: 14px; font-weight: 500; letter-spacing: 0.06em;
  color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.link:hover { color: var(--soil-900); }

/* ---------- header ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar.is-scrolled { box-shadow: var(--shadow-raised); }
.bar-inner { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.bar-logo { display: block; line-height: 0; }
.bar-logo img { height: 52px; width: auto; }
@media (max-width: 640px) { .bar-logo img { height: 40px; } }
.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav a {
  font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink); text-decoration: none; padding: var(--space-2) 0; border-bottom: 1.5px solid transparent;
}
.nav a:hover { border-bottom-color: currentColor; }
.nav a[aria-current="page"] { color: var(--carrot-deep); border-bottom-color: var(--carrot-deep); }
.nav a.nav-cta { background: var(--carrot); color: var(--soil-900); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); border: 0; }
.nav a.nav-cta:hover { background: var(--soil-900); color: var(--carrot); }
.nav a.nav-cta[aria-current="page"] { background: var(--soil-900); color: var(--carrot); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: var(--radius-sm); }
.menu-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-raised);
    padding: var(--space-2) var(--gutter) var(--space-4);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .nav a.nav-cta { margin-top: var(--space-4); text-align: center; }
}

/* ---------- hero ---------- */
.hero { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: var(--soil-900); color: var(--on-dark); min-height: 420px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-img--top { object-position: center 25%; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--soil-overlay); }
.hero-body { position: relative; z-index: 1; max-width: 880px; padding: var(--space-24) var(--gutter); display: flex; flex-direction: column; align-items: center; }
h1, h2, h3 { text-wrap: balance; }
.hero-title { font-family: var(--font-display); font-weight: 300; font-size: 52px; line-height: 58px; letter-spacing: -0.015em; color: var(--on-dark); margin: 0 0 var(--space-4); }
.hero .eyebrow { color: var(--on-dark); margin: 0; }
.hero-body .eyebrow:first-child { margin-bottom: var(--space-4); }
.hero--plain { background: var(--surface-alt); color: var(--ink); min-height: 0; }
.hero--plain::after { content: none; }
.hero--plain .hero-body { padding: var(--space-16) var(--gutter) var(--space-12); }
.hero--plain .hero-title { color: var(--ink); }
.hero--plain .eyebrow { color: var(--carrot-deep); }
.hero--plain .lead { margin: 0 auto var(--space-6); }
.hero--plain .row { justify-content: center; }
@media (max-width: 640px) { .hero { min-height: 320px; } .hero-title { font-size: 38px; line-height: 44px; } }

/* ---------- section heading ---------- */
.sh { max-width: 760px; margin-bottom: var(--space-12); }
.sh--center { margin-left: auto; margin-right: auto; text-align: center; }
.sh--center .lead { margin-left: auto; margin-right: auto; }
.sh-title { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 46px; letter-spacing: -0.01em; margin: 0 0 var(--space-4); }
@media (max-width: 640px) { .sh-title { font-size: 30px; line-height: 36px; } }

/* ---------- home: points, tenets, steps, split ---------- */
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); margin-bottom: var(--space-12); }
.point h3 { font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: var(--space-3); }
.point p { font-size: 16px; line-height: 24px; color: var(--ink-muted); }

.tenets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8) var(--space-6); }
.tenet { display: flex; flex-direction: column; gap: var(--space-3); text-align: center; }
.tenet img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); background: var(--linen-200); margin-bottom: var(--space-2); }
.tenet h3 { font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; }
.tenet p { font-size: 16px; line-height: 24px; color: var(--ink-muted); margin: 0; }
.tenet .link { align-self: center; margin-top: auto; }
.tenet--more { justify-content: center; padding: var(--space-6); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
.step { display: flex; flex-direction: column; align-items: flex-start; }
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); background: var(--linen-200); margin-bottom: var(--space-6); }
.step h3 { font-size: 22px; line-height: 28px; font-weight: 500; margin-bottom: var(--space-3); }
.step p { font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.step .eyebrow { margin-bottom: var(--space-2); }
.step .link { margin-top: auto; }

.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-12); align-items: center; }
.split-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); }

@media (max-width: 960px) { .tenets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .points, .steps, .split { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .tenets { grid-template-columns: 1fr; } }

/* ---------- quote ---------- */
.quote { margin: 0; padding: var(--space-16) var(--gutter); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-6); }
.quote-mark { width: 20px; height: auto; }
.quote blockquote { margin: 0; max-width: 30ch; font-family: var(--font-text); font-style: italic; font-weight: 300; font-size: 30px; line-height: 40px; color: var(--ink); }
.quote figcaption { font-family: var(--font-display); font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }
.quote figcaption span { display: block; letter-spacing: 0.04em; text-transform: none; font-weight: 400; margin-top: var(--space-1); }
.quote--dark { background: var(--soil-900); }
.quote--dark blockquote { color: var(--on-dark); }
.quote--dark figcaption { color: var(--on-dark-muted); }
@media (max-width: 640px) { .quote blockquote { font-size: 24px; line-height: 32px; } }

/* ---------- cards (posts) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); margin-bottom: var(--space-8); }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); }
.card-media { aspect-ratio: 4 / 3; background: var(--linen-100); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); flex: 1; }
.card-body .eyebrow { margin: 0; }
.card-title { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 500; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:focus-visible { outline: none; }
.card:has(a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.card-text { font-size: 16px; line-height: 24px; color: var(--ink-muted); margin: 0; }
.card-meta { margin-top: auto; padding-top: var(--space-2); font-family: var(--font-display); font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* ---------- blog index ---------- */
.chips { list-style: none; margin: 0 0 var(--space-12); padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
/* The Real Food links at the foot of those pages are a band of their
   own, so they take no space below. (This used to be scoped to
   .band--tight, which also caught the blog tabs and pushed them flat
   against the first row of cards.) */
nav.band .chips { margin: 0; }
.chips a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.chips a:hover { border-color: var(--ink); }
.chips a[aria-current="page"] { background: var(--soil-900); border-color: var(--soil-900); color: var(--on-dark); }
.chips .n { margin-left: var(--space-2); color: var(--ink-muted); font-weight: 400; letter-spacing: 0; }
.chips a[aria-current="page"] .n { color: var(--on-dark-muted); }
.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); margin: 0 0 var(--space-12); padding: 0; list-style: none; }
.legend li { padding: var(--space-6); border-radius: var(--radius-md); background: var(--paper); border: 1px solid var(--line); font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.legend strong { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.18em; color: var(--ink); margin-bottom: var(--space-2); }
@media (max-width: 760px) { .legend { grid-template-columns: 1fr; } }
.pager { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; font-family: var(--font-display); font-size: 14px; color: var(--ink-muted); }
.pager .btn[aria-disabled="true"] { visibility: hidden; }

/* ---------- post ---------- */
.post-head { max-width: 760px; margin: 0 auto; padding: var(--space-16) var(--gutter) var(--space-8); text-align: center; }
.post-head .eyebrow a { color: inherit; text-decoration: none; }
.post-title { font-weight: 300; font-size: 52px; line-height: 58px; letter-spacing: -0.015em; margin: 0 0 var(--space-4); }
.post-date { font-family: var(--font-display); font-size: 14px; color: var(--ink-muted); margin: 0; }
@media (max-width: 640px) { .post-title { font-size: 34px; line-height: 40px; } }
.post-image { max-width: 960px; margin: 0 auto var(--space-12); padding: 0 var(--gutter); }
.post-image img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius-md); }
.post-foot { max-width: var(--measure); margin: var(--space-12) auto 0; padding: var(--space-8) 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-6); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.post-nav a { display: block; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 17px; line-height: 24px; }
.post-nav a span { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--carrot-deep); margin-bottom: var(--space-1); }
.post-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: 1; text-align: left; } }

/* ---------- prose: posts and long pages ---------- */
.prose { max-width: var(--measure); margin: 0 auto; }
.prose > * + * { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 var(--space-6); }
.prose h2 { font-weight: 400; font-size: 30px; line-height: 36px; margin: var(--space-12) 0 var(--space-4); }
.prose h3 { font-weight: 500; font-size: 22px; line-height: 28px; margin: var(--space-8) 0 var(--space-3); }
.prose h4 { font-weight: 500; font-size: 18px; line-height: 24px; margin: var(--space-6) 0 var(--space-2); }
.prose > :first-child, .prose > .eyebrow + * { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--carrot-deep); }
.prose ul.cols { columns: 2; column-gap: var(--space-8); }
.prose ul.cols li { break-inside: avoid; }
@media (max-width: 520px) { .prose ul.cols { columns: 1; } }
.prose blockquote { margin: var(--space-8) 0; padding: 0 0 0 var(--space-6); border-left: 3px solid var(--carrot); font-style: italic; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-12) 0; }
.prose figure { margin: var(--space-8) 0; }
.prose figure img { border-radius: var(--radius-md); margin: 0 auto; max-height: 720px; width: auto; }
.prose figure a { display: block; }
.prose figcaption { margin-top: var(--space-3); font-family: var(--font-display); font-size: 13px; line-height: 18px; color: var(--ink-muted); text-align: center; }
.prose figure.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); }
.prose figure.gallery img { width: 100%; height: 100%; max-height: none; aspect-ratio: 1; object-fit: cover; }
.video { position: relative; aspect-ratio: 16 / 9; margin: var(--space-8) 0; background: var(--soil-900); border-radius: var(--radius-md); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .note { font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.prose .callout { padding: var(--space-6); background: var(--carrot-tint); border-radius: var(--radius-md); font-family: var(--font-display); font-size: 17px; font-weight: 500; }
.prose .callout a { color: var(--soil-900); }
.prose .refs li { font-size: 16px; line-height: 24px; }
.downloads { list-style: none; padding: 0 !important; }
.downloads li { display: flex; gap: var(--space-3); align-items: baseline; }
.downloads span { font-family: var(--font-display); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; color: var(--ink-muted); }
.terms dt { font-family: var(--font-display); font-size: 15px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; margin-top: var(--space-6); }
.terms dd { margin: var(--space-2) 0 0; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--measure); margin: 0 auto; }
.qa { padding: var(--space-8) 0; border-bottom: 1px solid var(--line); }
.qa:first-child { padding-top: 0; }
.qa h2 { font-weight: 500; font-size: 22px; line-height: 28px; margin-bottom: var(--space-3); }
.qa p:last-child { margin-bottom: 0; }
.qa figure { margin: var(--space-6) 0 0; }
.qa figure img { border-radius: var(--radius-md); max-height: 420px; width: auto; margin: 0 auto; }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); margin-bottom: var(--space-8); }
.videos .video { margin: 0; }
@media (max-width: 700px) { .videos { grid-template-columns: 1fr; } }

/* ---------- infographics ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-8) var(--space-6); }
.gallery-grid figure { margin: 0; }
.gallery-grid a { display: block; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.gallery-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; transition: transform .3s ease; }
.gallery-grid a:hover img { transform: scale(1.03); }
.gallery-grid figcaption { margin-top: var(--space-3); font-family: var(--font-display); font-size: 15px; font-weight: 500; text-align: center; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-16); }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; gap: var(--space-8); } }
.email { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin: var(--space-6) 0; }
.email-addr { font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 400; color: var(--ink); text-decoration-color: var(--carrot); text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.copied { font-family: var(--font-display); font-size: 14px; color: var(--leaf); }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.plain-list a { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.contact-side h2 { margin-bottom: var(--space-4); }

/* ---------- footer ---------- */
.footer { background: var(--soil-900); color: var(--on-dark); padding: var(--space-16) var(--gutter) var(--space-8); }
.footer-top, .footer-bottom { max-width: var(--container-max); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-12); padding-bottom: var(--space-12); border-bottom: 1px solid var(--soil-800); }
.footer-logo { height: 56px; width: auto; }
.footer-brand p { margin: var(--space-4) 0 0; font-size: 16px; line-height: 24px; color: var(--on-dark-muted); max-width: 34ch; }
.footer h2 { font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--carrot); margin-bottom: var(--space-4); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer li a { font-family: var(--font-display); font-size: 15px; color: var(--on-dark); text-decoration: none; }
.footer li a:hover { color: var(--carrot); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); padding-top: var(--space-6); font-family: var(--font-display); font-size: 13px; color: var(--on-dark-muted); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--carrot); text-decoration: none; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- splash ---------- */
.splash-page { background: var(--soil-900); }
.splash { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: var(--on-dark); text-align: center; padding: var(--space-16) var(--gutter); }
.splash-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash::after { content: ""; position: absolute; inset: 0; background: var(--soil-overlay); }
.splash-body, .splash-social { position: relative; z-index: 1; }
.splash-body { display: flex; flex-direction: column; align-items: center; gap: var(--space-8); }
.splash-logo { width: min(340px, 80vw); height: auto; }
.splash-title { font-family: var(--font-display); font-weight: 300; font-size: 72px; line-height: 76px; letter-spacing: -0.02em; color: var(--on-dark); max-width: 22ch; text-wrap: balance; }
.splash-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.splash-social { list-style: none; margin: var(--space-16) 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-6); }
.splash-social a { font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark); text-decoration: none; }
.splash-social a:hover { color: var(--carrot); }
@media (max-width: 640px) { .splash-title { font-size: 44px; line-height: 48px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ============================================================
   Cooking mode (cook.js): the launch buttons on a recipe post,
   the badge on its card, and the full-screen <dialog>.
   Phone first; a tablet or desktop gets the ingredient list as a
   sidebar and the steps as tabs.
   ============================================================ */
.card-media { position: relative; }
.badge { display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill); font-family: var(--font-display); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; line-height: 18px; }
.badge--cook { position: absolute; left: var(--space-3); top: var(--space-3); background: var(--soil-900); color: var(--on-dark); }

.cook-launch { margin-top: var(--space-6); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.cook-launch[hidden] { display: none; }
.cook-launch-label { margin: 0; font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--carrot-deep); }
.cook-launch-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.cook-launch .btn { font-variant-numeric: tabular-nums; }
.cook-launch-note { margin: 0; font-family: var(--font-display); font-size: 14px; color: var(--ink-muted); }

html.cook-open { overflow: hidden; }
.cook {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--linen-50); color: var(--ink);
  font-family: var(--font-text); overscroll-behavior: contain;
}
.cook::backdrop { background: var(--soil-900); }
.cook.is-run { background: var(--soil-900); color: var(--on-dark); }
.cook-frame { height: 100%; }
:where(.cook) button { font: inherit; }   /* :where() keeps this from outranking .btn and .cook-btn */
.cook :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cook.is-run :focus-visible { outline-color: var(--carrot); }
.cook [tabindex="-1"]:focus { outline: none; }
.cook-eyebrow { margin: 0; font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--carrot-deep); }

.cook-round {
  width: 44px; height: 44px; flex: none; border-radius: var(--radius-pill); border: 1.5px solid var(--soil-700);
  background: transparent; color: var(--on-dark); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cook-round--photo { position: absolute; top: calc(var(--space-4) + env(safe-area-inset-top)); left: var(--space-4); border: 0; background: var(--soil-overlay); }
.cook-round--light { border-color: var(--line-strong); color: var(--ink); }

/* ---- overview ---- */
.cook-over { height: 100%; display: flex; flex-direction: column; }
.cook-over-scroll { flex: 1; overflow-y: auto; }
.cook-over-media { position: relative; height: min(300px, 38vh); background: var(--soil-900); }
.cook-over-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cook-over-media.is-empty { height: 96px; }
.cook-over-body { position: relative; margin-top: calc(-1 * var(--space-6)); background: var(--linen-50); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.cook-over-title { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: 30px; line-height: 36px; letter-spacing: -0.01em; }
.cook-over-intro { margin: 0; font-size: 17px; line-height: 26px; color: var(--ink-muted); }
.cook-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.cook-stats div { display: flex; flex-direction: column-reverse; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3); }
.cook-stats dd { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 28px; }
.cook-stats dt { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.cook-makes { margin: 0; font-family: var(--font-display); font-size: 15px; color: var(--ink-muted); }
.cook-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-top: var(--space-2); }
.cook-list-head span { font-family: var(--font-display); font-size: 14px; color: var(--ink-muted); white-space: nowrap; }
.cook-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-1) 0; }
.cook-finish { margin: 0; font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.cook-over-foot { flex: none; display: flex; gap: var(--space-3); padding: var(--space-4) var(--space-6) calc(var(--space-4) + env(safe-area-inset-bottom)); background: var(--linen-50); border-top: 1px solid var(--line); }
.cook-over-foot .btn { flex: 1; }

/* ---- the ingredient checklist (overview and sidebar) ---- */
.cook-group + .cook-group { margin-top: var(--space-2); }
.cook-group-name { margin: var(--space-3) 14px var(--space-1); font-family: var(--font-display); font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--carrot-deep); }
.cook-ings { list-style: none; margin: 0; padding: 0; }
.cook-ing {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 48px; padding: var(--space-2) 14px;
  border: 0; border-bottom: 1px solid var(--linen-100); background: transparent; color: var(--ink); text-align: left; cursor: pointer;
}
.cook-ings li:last-child .cook-ing { border-bottom: 0; }
.cook-box { width: 22px; height: 22px; flex: none; border-radius: var(--radius-sm); border: 1.5px solid var(--soil-500); background: var(--paper); color: var(--paper); display: flex; align-items: center; justify-content: center; }
.cook-box svg { visibility: hidden; stroke-width: 3; }
.cook-ing-text { font-family: var(--font-display); font-size: 16px; line-height: 22px; }
.cook-ing[aria-pressed="true"] .cook-box { background: var(--leaf); border-color: var(--leaf); }
.cook-ing[aria-pressed="true"] .cook-box svg { visibility: visible; }
.cook-ing[aria-pressed="true"] .cook-ing-text { color: var(--soil-500); text-decoration: line-through; }
.cook-ing.is-now { background: var(--carrot-tint); }
.cook-now { margin-left: auto; padding-left: var(--space-2); font-family: var(--font-display); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--carrot-deep); white-space: nowrap; }

/* ---- one step at a time ---- */
.cook-run { height: 100%; display: flex; }
.cook-side { display: none; }
.cook-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cook-bar { display: grid; grid-template-columns: 76px 1fr 76px; align-items: center; gap: var(--space-2); padding: calc(var(--space-4) + env(safe-area-inset-top)) 20px 0; }
.cook-count { margin: 0; text-align: center; font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-dark-muted); }
.cook-wake { justify-self: end; text-align: right; font-family: var(--font-display); font-size: 11px; line-height: 13px; color: var(--on-dark-muted); }
.cook-wake[hidden] { display: block; visibility: hidden; }
.cook-tabs { padding: var(--space-3) 20px 0; }
.cook-tabs ol { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-1); }
.cook-tabs li { flex: 1; min-width: 0; }
.cook-tab { display: block; width: 100%; padding: var(--space-2) 0; border: 0; background: transparent; cursor: pointer; }
.cook-tab::before { content: ""; display: block; height: 4px; border-radius: var(--radius-pill); background: var(--soil-700); }
.cook-tab.is-past::before, .cook-tab[aria-current="step"]::before { background: var(--carrot); }
.cook-tab-num, .cook-tab-name { display: none; }
.cook-body { flex: 1; overflow-y: auto; padding: var(--space-6) var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: var(--space-6); }
.cook-step { display: flex; flex-direction: column; gap: 20px; }
.cook-step-name { margin: 0; font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--carrot); }
.cook-step-text { margin: 0; font-family: var(--font-text); font-weight: 400; font-size: 28px; line-height: 38px; color: var(--on-dark); }
.cook-step-note { margin: 0; font-size: 18px; line-height: 27px; font-style: italic; color: var(--on-dark-muted); }
.cook-uses-label { margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-muted); }
.cook-uses ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cook-uses li { padding: 6px var(--space-3); border-radius: var(--radius-pill); background: var(--soil-800); font-family: var(--font-display); font-size: 14px; line-height: 20px; color: var(--on-dark); }
.cook-step-side { display: flex; flex-direction: column; gap: var(--space-4); }

.cook-timer { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius-md); background: var(--soil-800); }
.cook-timer-label { margin: 0; display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-muted); }
.cook-timer-time { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: 64px; line-height: 64px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.cook-timer-bar { display: block; height: 6px; border-radius: var(--radius-pill); background: var(--soil-700); overflow: hidden; }
.cook-timer-fill { display: block; width: 0; height: 100%; background: var(--carrot); transition: width .25s linear; }
.cook-timer-actions { display: flex; gap: var(--space-2); }
.cook-timer.is-done { background: var(--carrot-deep); }
.cook-timer.is-done .cook-timer-label { color: var(--on-dark); }
.cook-timer.is-done .cook-timer-fill { background: var(--on-dark); }
.cook-timer.is-done .cook-btn--fill { background: var(--on-dark); }

.cook-btn {
  min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-display); font-size: 14px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}
.cook-btn--fill { flex: 1; border: 0; background: var(--carrot); color: var(--soil-900); }
.cook-btn--line { border: 1.5px solid var(--on-dark); background: transparent; color: var(--on-dark); }
.cook-btn--icon { width: 48px; padding: 0; display: flex; align-items: center; justify-content: center; }
.cook-btn--big { min-height: 56px; font-size: 15px; }
.cook-btn:hover { filter: brightness(1.06); }

.cook-next { display: none; }
.cook-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cook-pill { min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--carrot); background: transparent; color: var(--carrot); cursor: pointer; font-family: var(--font-display); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cook-pill.is-done { background: var(--carrot); color: var(--soil-900); }

.cook-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding: var(--space-4) 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--soil-800); }

/* ---- done ---- */
.cook-done { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: var(--space-8); text-align: center; }
.cook-done-close { position: absolute; top: calc(var(--space-4) + env(safe-area-inset-top)); right: var(--space-4); }
.cook-done-mark { width: 40px; height: auto; }
.cook-done-title { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: 40px; line-height: 46px; }
.cook-done-text { margin: 0; max-width: 32ch; font-size: 18px; line-height: 28px; color: var(--ink-muted); }
.cook-done-actions { display: flex; flex-direction: column; gap: var(--space-3); width: 100%; max-width: 360px; margin-top: var(--space-3); }

/* ---- tablet and up: sidebar, step tabs, larger type ---- */
@media (min-width: 900px) and (min-height: 560px) {
  .cook-over-scroll { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .cook-over-media { position: sticky; top: 0; height: 100%; max-height: 100%; }
  .cook-over-media.is-empty { height: 100%; }
  .cook-over-body { margin: 0; border-radius: 0; padding: var(--space-12); max-width: 720px; }
  .cook-over-title { font-size: 40px; line-height: 46px; }
  .cook-over-foot { justify-content: flex-end; padding: var(--space-4) var(--space-12) calc(var(--space-4) + env(safe-area-inset-bottom)); }
  .cook-over-foot .btn { flex: none; min-width: 240px; }

  .cook-side { display: flex; flex-direction: column; width: 360px; flex: none; background: var(--linen-50); color: var(--ink); overflow: hidden; }
  .cook-side-media { height: 170px; flex: none; }
  .cook-side-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .cook-side-head { padding: 20px var(--space-6) var(--space-2); }
  .cook-side-title { margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 28px; }
  .cook-side-count { margin: var(--space-1) 0 0; font-family: var(--font-display); font-size: 14px; color: var(--ink-muted); }
  .cook-side-list { flex: 1; overflow-y: auto; padding: 0 var(--space-3) var(--space-6); }
  .cook-side .cook-ing { border-radius: var(--radius-sm); border-bottom-color: var(--linen-100); }

  .cook-bar { grid-template-columns: 44px 1fr auto; padding: var(--space-6) 40px 0; }
  .cook-count { text-align: left; color: var(--carrot); font-size: 14px; }
  .cook-wake { font-size: 13px; }
  .cook-tabs { padding: 20px 40px 0; }
  .cook-tabs ol { flex-wrap: wrap; gap: var(--space-2); }
  .cook-tabs li { flex: none; }
  .cook-tab { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--soil-700); color: var(--on-dark-muted); font-family: var(--font-display); font-size: 14px; font-weight: 500; }
  .cook-tab::before { display: none; }
  .cook-tab-num, .cook-tab-name { display: inline; }
  .cook-tab-num { font-size: 12px; opacity: 0.8; }
  .cook-tab.is-past { border-color: var(--soil-800); background: var(--soil-800); color: var(--on-dark); }
  .cook-tab[aria-current="step"] { border-color: var(--carrot); background: var(--carrot); color: var(--soil-900); }

  .cook-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-content: start; align-items: start; padding: var(--space-12) 40px var(--space-6); }
  .cook-step-text { font-size: 38px; line-height: 50px; }
  .cook-uses { display: none; }
  .cook-timer { padding: var(--space-6); }
  .cook-timer-time { font-size: 88px; line-height: 88px; }
  .cook-next { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); border: 1.5px solid var(--soil-800); border-radius: var(--radius-md); }
  .cook-next-label { margin: 0; font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-muted); }
  .cook-next-text { margin: 0; font-family: var(--font-display); font-size: 20px; line-height: 28px; color: var(--on-dark); }

  .cook-nav { display: flex; justify-content: space-between; padding: 20px 40px calc(var(--space-8) + env(safe-area-inset-bottom)); }
  .cook-nav .cook-btn--line { min-width: 200px; }
  .cook-nav .cook-btn--fill { flex: none; min-width: 260px; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .cook-step-text { font-size: 24px; line-height: 33px; }
  .cook-timer-time { font-size: 52px; line-height: 52px; }
}
