:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.75rem);
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --space-20: 5rem; --space-24: 6rem;

  --bg: oklch(0.972 0.014 82);
  --surface: oklch(0.993 0.006 85);
  --tint: oklch(0.945 0.02 110);
  --ink: oklch(0.26 0.03 145);
  --muted: oklch(0.46 0.025 140);
  --line: oklch(0.26 0.03 145 / 0.14);
  --accent: oklch(0.53 0.14 42);
  --accent-hover: oklch(0.46 0.13 40);
  --herb: oklch(0.36 0.06 145);
  --herb-soft: oklch(0.92 0.04 140);

  --font-display: 'Erode', 'Georgia', serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;
  --shadow: 0 1px 2px oklch(0.3 0.03 70 / .06), 0 8px 24px oklch(0.3 0.03 70 / .08);
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--surface); padding: var(--space-2) var(--space-4); z-index: 100; }
.skip:focus { left: var(--space-4); top: var(--space-4); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(var(--space-4), 4vw, var(--space-10)); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: oklch(0.972 0.014 82 / .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); min-height: 72px; }
.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo-word { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 2rem; letter-spacing: -0.01em; color: var(--herb); }
.logo-sub { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.nav { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.nav a { font-size: var(--text-sm); font-weight: 500; text-decoration: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--herb-soft); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
@media (max-width: 920px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); flex-direction: column; padding: var(--space-3) var(--space-4) var(--space-5); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: var(--space-3); min-height: 44px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-6); border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: var(--text-sm); text-decoration: none; border: 1px solid var(--accent); transition: background .2s, border-color .2s, color .2s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--tint); border-color: var(--line); color: var(--ink); }
.text-link { font-size: var(--text-sm); font-weight: 600; color: var(--accent); text-underline-offset: 4px; }
.kicker { font-size: var(--text-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* Hero */
.hero { padding-block: clamp(var(--space-8), 5vw, var(--space-16)); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: center; }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-3xl); line-height: 1.02; letter-spacing: -0.02em; margin-top: var(--space-4); }
.hero-who { font-size: var(--text-lg); color: var(--muted); margin-top: var(--space-6); max-width: 34ch; line-height: 1.45; }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-8); }
.hero-img img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 3/4; object-fit: cover; box-shadow: var(--shadow); max-height: 78vh; }
@media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; } .hero-img img { max-height: 60vh; } }

/* Sections */
.section { padding-block: clamp(var(--space-12), 7vw, var(--space-24)); }
.section--tight { padding-block: var(--space-8) clamp(var(--space-12), 7vw, var(--space-24)); }
.section--tint { background: var(--tint); }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); letter-spacing: -0.01em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.section-title + .cat-grid, .section-head + .grid, .section-title + .grid { margin-top: var(--space-8); }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 20vw, 260px); gap: var(--space-4); }
.cat-tile { position: relative; overflow: hidden; border-radius: var(--radius-md); text-decoration: none; color: #fff; background: var(--ink); }
.cat-tile--wide { grid-column: span 2; grid-row: span 2; }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.18 0.02 145 / .78), transparent 60%); }
.cat-tile:hover img { transform: scale(1.04); }
.cat-label { position: absolute; left: var(--space-5); bottom: var(--space-4); right: var(--space-5); z-index: 1; display: flex; flex-direction: column; }
.cat-name { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); line-height: 1.1; }
.cat-count { font-size: var(--text-xs); opacity: .9; margin-top: var(--space-1); }
@media (max-width: 820px) { .cat-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; } .cat-tile--wide { grid-column: span 2; grid-row: span 1; } }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-8) var(--space-6); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid, .grid--3 { grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-3); } }
.card-link { display: block; text-decoration: none; }
.card-img { overflow: hidden; border-radius: var(--radius-md); aspect-ratio: 3/4; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.card-link:hover .card-img img { transform: scale(1.04); }
.card-body { padding-top: var(--space-3); }
.card-title { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); line-height: 1.3; margin-top: var(--space-1); }
.card-link:hover .card-title { color: var(--accent); }
.card-meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: center; margin-top: var(--space-2); font-size: var(--text-xs); color: var(--muted); }
.protein-pill { background: var(--herb-soft); color: var(--herb); font-weight: 600; padding: 2px var(--space-2); border-radius: 999px; }

/* Page head */
.page-head { padding-block: clamp(var(--space-10), 6vw, var(--space-16)) 0; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl); line-height: 1.05; letter-spacing: -0.02em; margin-top: var(--space-3); max-width: 20ch; }
.page-blurb { color: var(--muted); margin-top: var(--space-4); max-width: 55ch; }

/* Recipe */
.recipe-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(var(--space-8), 5vw, var(--space-16)); padding-block: clamp(var(--space-6), 4vw, var(--space-12)); align-items: start; }
.recipe-photo { margin: 0; position: sticky; top: 96px; }
.recipe-photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.crumbs { display: flex; gap: var(--space-2); font-size: var(--text-xs); color: var(--muted); }
.crumbs a { color: var(--accent); font-weight: 600; text-decoration: none; }
.crumbs a:first-child { color: var(--muted); font-weight: 500; }
.recipe-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl); line-height: 1.05; letter-spacing: -0.02em; margin-top: var(--space-4); }
.recipe-summary { color: var(--muted); margin-top: var(--space-5); max-width: 52ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; margin: var(--space-8) 0 0; }
.stat { background: var(--surface); padding: var(--space-4); }
.stat--protein { grid-column: 1 / -1; background: var(--herb); color: var(--surface); display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.stat dt { font-size: var(--text-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat--protein dt { color: oklch(0.9 0.03 140); }
.stat dd { margin: var(--space-1) 0 0; font-weight: 600; font-size: var(--text-base); }
.stat--protein dd { font-family: var(--font-display); font-size: var(--text-xl); margin: 0; }
.stat--protein small { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; opacity: .85; }
.yield { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-3); }
.recipe-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.recipe-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(var(--space-8), 5vw, var(--space-16)); padding-bottom: clamp(var(--space-12), 7vw, var(--space-24)); border-top: 1px solid var(--line); padding-top: clamp(var(--space-8), 5vw, var(--space-12)); }
.block-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); }
.block-note { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-1); }
.ing-list { list-style: none; padding: 0; margin: var(--space-5) 0 0; }
.ing-list li { border-bottom: 1px solid var(--line); }
.ing-list label { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; cursor: pointer; min-height: 44px; }
.ing-list input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--herb); flex: none; }
.ing-list input:checked + span { color: var(--muted); text-decoration: line-through; }
.step-list { list-style: none; padding: 0; margin: var(--space-5) 0 0; counter-reset: step; }
.step-list li { counter-increment: step; position: relative; padding: 0 0 var(--space-6) var(--space-12); max-width: 62ch; }
.step-list li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--herb-soft); color: var(--herb); font-weight: 600; font-size: var(--text-sm); display: grid; place-items: center; }
.storage { background: var(--tint); border-radius: var(--radius-md); padding: var(--space-5) var(--space-6); margin-top: var(--space-4); }
.storage h3 { font-size: var(--text-base); font-weight: 600; }
.storage p { margin-top: var(--space-1); color: var(--muted); }
.fine { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-5); }
@media (max-width: 860px) {
  .recipe-top, .recipe-body { grid-template-columns: 1fr; }
  .recipe-photo { position: static; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: oklch(0.9 0.015 90); padding-block: var(--space-12) var(--space-8); }
.footer-inner { display: flex; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 2rem; line-height: 1; color: #fff; }
.footer-tag { margin-top: var(--space-2); font-size: var(--text-sm); opacity: .85; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); align-items: center; }
.footer-nav a { font-size: var(--text-sm); text-decoration: none; opacity: .9; padding-block: var(--space-2); }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.site-footer .fine { color: oklch(0.8 0.015 90); border-top: 1px solid oklch(1 0 0 / .14); padding-top: var(--space-5); margin-top: var(--space-8); }

@media print {
  .site-header, .site-footer, .recipe-actions, .section--tint, .crumbs { display: none; }
  .recipe-top, .recipe-body { grid-template-columns: 1fr 1fr; }
  .recipe-photo { position: static; }
}
