/* =========================================================================
   biblical.recipes - global stylesheet
   "Ancient warmth meets modern clarity"
   ========================================================================= */

:root, [data-theme="light"] {
  --color-bg:               #f8f5f0;
  --color-surface:          #faf8f4;
  --color-surface-2:        #fdf9f5;
  --color-surface-offset:   #f2ede5;
  --color-surface-offset-2: #ece5db;
  --color-surface-dynamic:  #e3dbd0;
  --color-divider:          #d8d0c5;
  --color-border:           #cdc4b7;
  --color-text:             #2c2416;
  --color-text-muted:       #7a6e5f;
  --color-text-faint:       #b5a898;
  --color-text-inverse:     #fdf9f2;
  --color-primary:          #5c7a3e;
  --color-primary-hover:    #4a6230;
  --color-primary-active:   #384a24;
  --color-primary-highlight:#dce8d0;
  --color-secondary:        #b8602a;
  --color-secondary-hover:  #9a4e22;
  --color-secondary-active: #7d3d1a;
  --color-secondary-highlight: #f0ddd0;
  --color-gold:             #c49a3c;
  --color-gold-highlight:   #f0e5c8;

  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1.25rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px oklch(0.18 0.03 55 / 0.07);
  --shadow-md: 0 4px 14px oklch(0.18 0.03 55 / 0.09);
  --shadow-lg: 0 12px 36px oklch(0.18 0.03 55 / 0.13);

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Work Sans', 'Helvetica Neue', sans-serif;

  --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,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.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;
}

[data-theme="dark"] {
  --color-bg:               #1a1610;
  --color-surface:          #1f1b14;
  --color-surface-2:        #252018;
  --color-surface-offset:   #1c1810;
  --color-surface-offset-2: #2a251b;
  --color-surface-dynamic:  #2e2a20;
  --color-divider:          #2a2518;
  --color-border:           #38321e;
  --color-text:             #e8dfc8;
  --color-text-muted:       #9e9278;
  --color-text-faint:       #6b6150;
  --color-text-inverse:     #1e1a12;
  --color-primary:          #8ab060;
  --color-primary-hover:    #6d9245;
  --color-primary-active:   #5a7a38;
  --color-primary-highlight:#2a3820;
  --color-secondary:        #d4845a;
  --color-secondary-hover:  #c06840;
  --color-secondary-active: #a85530;
  --color-secondary-highlight: #3a2218;
  --color-gold:             #d4aa50;
  --color-gold-highlight:   #3a3018;
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 36px oklch(0 0 0 / 0.45);
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--transition-interactive), color var(--transition-interactive);
  overflow-x: clip; /* safety net: no accidental horizontal scroll on mobile (clip keeps sticky working) */
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, button { font-size: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
p { max-width: 70ch; }

::selection { background: var(--color-primary-highlight); color: var(--color-text); }

/* ---------- a11y ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
a.sr-only:focus, .skip-link:focus {
  position: fixed; top: var(--space-3); left: var(--space-3); z-index: 200;
  width: auto; height: auto; clip: auto;
  padding: var(--space-3) var(--space-5); background: var(--color-primary);
  color: var(--color-text-inverse); border-radius: var(--radius-md);
}
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6); }
.container-default { max-width: var(--content-default); }
.container-narrow { max-width: var(--content-narrow); }
.section { padding-block: var(--space-20); }
.section-tight { padding-block: var(--space-12); }
.section-offset { background: var(--color-surface-offset); }

.eyebrow {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--color-secondary);
}
.section-title { font-size: var(--text-xl); }
.lead { font-size: var(--text-lg); color: var(--color-text-muted); font-weight: 300; }
.muted { color: var(--color-text-muted); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-6); height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text); }
.brand svg { height: 30px; width: auto; color: var(--color-primary); }
.brand-text { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; }
.brand-text .dot { color: var(--color-secondary); }

.nav-links { display: flex; align-items: center; gap: var(--space-1); list-style: none; }
.nav-links a {
  display: inline-block; padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted);
  border-radius: var(--radius-sm); transition: color var(--transition-interactive), background var(--transition-interactive);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-text); background: var(--color-surface-offset); }

.nav-actions { display: flex; align-items: center; gap: var(--space-1); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: none; background: transparent;
  color: var(--color-text-muted); border-radius: var(--radius-md);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.icon-btn:hover { color: var(--color-text); background: var(--color-surface-offset); }
.icon-btn svg { width: 20px; height: 20px; }

.nav-toggle { display: none; }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }

/* mobile nav search drawer */
.search-bar { display: none; padding-block: var(--space-3); border-top: 1px solid var(--color-divider); }
.search-bar.open { display: block; }
.search-bar input {
  width: 100%; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-md);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-8); border: 1px solid transparent;
  border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.025em; line-height: 1.2; min-height: 44px;
  transition: all var(--transition-interactive);
}
.btn-primary { background: var(--color-primary); color: var(--color-text-inverse); }
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-primary:active { background: var(--color-primary-active); transform: none; }
.btn-secondary { background: var(--color-secondary); color: var(--color-text-inverse); }
.btn-secondary:hover { background: var(--color-secondary-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { font-size: var(--text-base); padding: var(--space-4) var(--space-10); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 84vh; display: flex; align-items: center;
  color: var(--color-text-inverse); overflow: hidden; isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, oklch(0.2 0.03 55 / 0.78) 0%, oklch(0.2 0.03 55 / 0.42) 55%, oklch(0.2 0.03 55 / 0.2) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-inner { max-width: 720px; padding-block: var(--space-20); }
.hero h1 { font-size: var(--text-hero); color: #fff; font-weight: 600; letter-spacing: -0.02em; margin-bottom: var(--space-5); }
.hero .subhead { font-size: var(--text-lg); color: oklch(0.97 0.01 80 / 0.92); font-weight: 300; max-width: 38ch; margin-bottom: var(--space-8); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-8); }
.hero .hero-cta .btn-ghost { color: #fff; border-color: oklch(1 0 0 / 0.5); }
.hero .hero-cta .btn-ghost:hover { background: oklch(1 0 0 / 0.1); border-color: #fff; color: #fff; }
.hero-scripture { font-family: var(--font-display); font-style: italic; font-size: var(--text-base); color: oklch(0.97 0.01 80 / 0.8); }

.page-hero {
  position: relative; color: var(--color-text-inverse); overflow: hidden; isolation: isolate;
  padding-block: clamp(var(--space-16), 12vw, var(--space-24));
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, oklch(0.2 0.03 55 / 0.6), oklch(0.2 0.03 55 / 0.75));
}
.page-hero .hero-bg { z-index: -2; }
.page-hero h1 { font-size: var(--text-3xl); color: #fff; }
.page-hero p { color: oklch(0.97 0.01 80 / 0.9); font-size: var(--text-lg); font-weight: 300; max-width: 50ch; margin-top: var(--space-3); }

/* ---------- recipe cards ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-6); }
.recipe-card {
  background: var(--color-surface); border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
  display: flex; flex-direction: column;
}
.recipe-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.recipe-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--color-surface-dynamic); }
.recipe-card-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.recipe-card-category { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-secondary); }
.recipe-card-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; }
.recipe-card-scripture { font-style: italic; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: auto; }

/* featured asymmetric grid */
.featured-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-6); }
.featured-grid .feature-main img { aspect-ratio: 16/10; }
.featured-grid .feature-side { display: grid; gap: var(--space-6); }
.featured-grid .feature-side .recipe-card img { aspect-ratio: 16/9; }

/* ---------- scripture block ---------- */
.scripture-block {
  border-left: 3px solid var(--color-secondary); background: var(--color-secondary-highlight);
  padding: var(--space-4) var(--space-6); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-8) 0;
}
.scripture-block blockquote { font-family: var(--font-display); font-style: italic; font-size: var(--text-lg); color: var(--color-text); margin-bottom: var(--space-2); }
.scripture-block cite { font-size: var(--text-sm); color: var(--color-secondary); font-weight: 600; font-style: normal; }

/* ---------- seven species ---------- */
.species-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-4); }
.species-item { text-align: center; }
.species-emoji { font-size: 2.4rem; line-height: 1; margin-bottom: var(--space-2); display: block; }
.species-name { font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; }
.species-ref { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---------- two-column content ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-bottom: var(--space-2); }

/* ---------- email opt-in ---------- */
.optin {
  background: var(--color-primary-active); color: var(--color-text-inverse);
  border-radius: var(--radius-xl); padding: clamp(var(--space-8), 5vw, var(--space-16));
  text-align: center;
}
[data-theme="dark"] .optin { background: var(--color-primary-highlight); color: var(--color-text); }
.optin h2 { color: inherit; font-size: var(--text-2xl); }
.optin p { margin: var(--space-3) auto var(--space-6); color: oklch(0.97 0.01 80 / 0.85); }
[data-theme="dark"] .optin p { color: var(--color-text-muted); }
.optin-form { display: flex; flex-wrap: wrap; gap: var(--space-3); max-width: 520px; margin-inline: auto; }
/* flex-basis 0 on the main axis + a width floor: works in a row (inputs
   share width, min 180px) AND in a column (no 180px height stretch). */
.optin-form input { flex: 1 1 0; min-width: min(180px, 100%); }

.field {
  width: 100%; padding: var(--space-3) var(--space-4); min-height: 44px;
  border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-text); border-radius: var(--radius-md);
}
.optin .field { border-color: transparent; }
.field::placeholder { color: var(--color-text-faint); }

.form-success { text-align: center; padding: var(--space-8); }
.form-success .check { font-size: 2.4rem; color: var(--color-primary); }
.form-error {
  margin-top: var(--space-3); font-size: var(--text-sm); font-weight: 600;
  color: #fff; background: var(--color-secondary);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
}

/* ---------- recipe detail ---------- */
.recipe-layout { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-12); align-items: start; }
.recipe-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-5); padding: var(--space-4) 0;
  border-block: 1px solid var(--color-divider); font-size: var(--text-sm); color: var(--color-text-muted);
  margin-block: var(--space-6);
}
.recipe-meta strong { color: var(--color-text); font-weight: 600; }
.recipe-hero-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }

.ingredient-list { list-style: none; display: grid; gap: var(--space-1); }
.ingredient-list label {
  display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); cursor: pointer; transition: background var(--transition-interactive);
}
.ingredient-list label:hover { background: var(--color-surface-offset); }
.ingredient-list label.checked { color: var(--color-text-faint); text-decoration: line-through; }
.ingredient-checkbox { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--color-primary); flex: none; }

.steps { list-style: none; counter-reset: step; display: grid; gap: var(--space-5); }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700;
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  background: var(--color-primary-highlight); color: var(--color-primary-active);
  border-radius: var(--radius-full);
}
[data-theme="dark"] .steps li::before { color: var(--color-primary); }

.recipe-sidebar { position: sticky; top: 92px; display: grid; gap: var(--space-6); }
.card-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); }
.card-panel h3 { margin-bottom: var(--space-3); }

/* tables */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table caption { text-align: left; font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-3); }
.data-table th, .data-table td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-divider); }
.data-table thead th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.data-table tbody tr:hover { background: var(--color-surface-offset); }
.nutrition-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- filter pills ---------- */
.filter-bar { position: sticky; top: 68px; z-index: 50; background: oklch(from var(--color-bg) l c h / 0.9); backdrop-filter: blur(8px); padding-block: var(--space-4); border-bottom: 1px solid var(--color-divider); }
.filter-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-pill {
  padding: var(--space-2) var(--space-5); min-height: 40px; border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text-muted); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 500; transition: all var(--transition-interactive);
}
.filter-pill:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-pill.active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-text-inverse); }

/* ---------- ingredients page categories ---------- */
.ingredient-cat { margin-bottom: var(--space-16); }
.ingredient-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.ingredient-tile { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); transition: box-shadow var(--transition-interactive), transform var(--transition-interactive); }
.ingredient-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ingredient-tile h3 { font-size: var(--text-base); display: flex; align-items: baseline; gap: var(--space-2); }
.ingredient-tile .ref { font-size: var(--text-xs); color: var(--color-secondary); font-weight: 600; }
.ingredient-tile p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }

/* ---------- shop ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-8); }
.product-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }
.product-price { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--color-primary); }
.product-price .free { color: var(--color-secondary); }
.pantry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-5); }
.pantry-card { background: var(--color-surface-2); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-5); }

/* ---------- testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
.testimonial { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); }
.testimonial blockquote { font-family: var(--font-display); font-style: italic; font-size: var(--text-base); }
.testimonial .who { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-3); font-weight: 600; }
.stars { color: var(--color-gold); letter-spacing: 2px; margin-bottom: var(--space-2); }

.check-list { list-style: none; display: grid; gap: var(--space-3); text-align: left; max-width: 440px; margin-inline: auto; }
.check-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.check-list li::before { content: "✓"; color: var(--color-primary); font-weight: 700; }
.x-list { list-style: none; display: grid; gap: var(--space-3); }
.x-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.x-list li::before { content: "✕"; color: var(--color-secondary); font-weight: 700; }

/* ---------- ads ---------- */
.ad-unit {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; margin-block: var(--space-8);
  border: 1px dashed var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface-offset); color: var(--color-text-faint);
  font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase;
}
.ad-unit::after { content: "Advertisement"; }
.ad-unit[data-ad-slot="sidebar-top"] { min-height: 250px; }

/* ---------- affiliate ---------- */
.affiliate-link { color: var(--color-secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.affiliate-link:hover { color: var(--color-secondary-hover); }
.disclaimer { font-size: var(--text-xs); color: var(--color-text-muted); font-style: italic; background: var(--color-surface-offset); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }

/* ---------- divider ---------- */
.rule { border: none; border-top: 1px solid var(--color-divider); margin-block: var(--space-12); }

/* ---------- footer ---------- */
.site-footer { background: var(--color-surface-offset-2); border-top: 1px solid var(--color-divider); padding-block: var(--space-16) var(--space-8); margin-top: var(--space-24); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--space-8); }
.footer-brand .brand-text { font-size: 1.3rem; }
.footer-tagline { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: var(--space-3); max-width: 32ch; }
.footer-col h4 { font-family: var(--font-body); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-muted); margin-bottom: var(--space-3); }
.footer-col ul { list-style: none; display: grid; gap: var(--space-2); }
.footer-col a { font-size: var(--text-sm); color: var(--color-text-muted); }
.footer-col a:hover { color: var(--color-text); }
.footer-social { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); font-size: var(--text-xs); color: var(--color-text-muted); }
.footer-bottom .disclaimer { background: none; padding: 0; max-width: 60ch; }

/* ---------- cookie notice ---------- */
.cookie-notice {
  position: fixed; bottom: var(--space-4); left: var(--space-4); right: var(--space-4); z-index: 150;
  max-width: 520px; margin-inline: auto;
  display: flex; gap: var(--space-4); align-items: center; justify-content: space-between;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
}
.cookie-notice p { margin: 0; }
.cookie-notice a { color: var(--color-primary); text-decoration: underline; }
.cookie-notice button {
  flex: none; padding: var(--space-2) var(--space-5); min-height: 40px;
  background: var(--color-primary); color: var(--color-text-inverse);
  border: none; border-radius: var(--radius-md); font-weight: 600;
}

/* ---------- utilities ---------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.stack > * + * { margin-top: var(--space-4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

/* =========================================================================
   responsive
   ========================================================================= */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: var(--space-8); }
  .recipe-layout { grid-template-columns: 1fr; }
  .recipe-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .species-row { grid-template-columns: repeat(4, 1fr); row-gap: var(--space-6); }
}

@media (max-width: 720px) {
  .nav-links, .nav-search-desktop { display: none; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 68px;
    background: var(--color-surface); border-bottom: 1px solid var(--color-divider);
    padding: var(--space-4); gap: var(--space-1); box-shadow: var(--shadow-lg);
  }
  .nav.open .nav-links a { padding: var(--space-3) var(--space-4); }
  .nav-toggle { display: inline-flex; }
  .hero { min-height: 78vh; }
  .grid-2 { grid-template-columns: 1fr; }

  /* Forms stack cleanly on phones/small tablets. Reset the flex-basis so
     inputs don't inherit 180px as their HEIGHT once the axis turns vertical. */
  .optin-form { flex-direction: column; align-items: stretch; }
  .optin-form .field,
  .optin-form input,
  .optin-form .btn { flex: 0 0 auto; width: 100%; }

  /* Footer bottom row stacks instead of cramming on one line. */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .footer-bottom .disclaimer { max-width: 100%; }
}

@media (max-width: 560px) {
  .container { padding-inline: var(--space-4); }
  .section { padding-block: var(--space-12); }
  .species-row { grid-template-columns: repeat(2, 1fr); }

  /* Compacter footer op mobiel: brand vol breed, linkkolommen 2-op-een-rij,
     minder padding/marge zodat de footer niet onnodig hoog wordt. */
  .site-footer { padding-block: var(--space-10) var(--space-6); margin-top: var(--space-12); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-5); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-tagline { margin-top: var(--space-2); }
  .footer-social { margin-top: var(--space-3); }
  .footer-bottom { margin-top: var(--space-8); padding-top: var(--space-5); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }

  /* Wide data tables: allow horizontal scroll within their own box and
     tighten spacing so they stay readable instead of breaking the layout. */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .data-table th, .data-table td { padding: var(--space-2) var(--space-3); }
  .product-card, .pantry-card { padding: var(--space-6); }
  .optin { padding: var(--space-8) var(--space-5); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .recipe-sidebar, .ad-unit, .cookie-notice, .optin, .nav-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .recipe-layout { grid-template-columns: 1fr; }
}
