/* =====================================================================
   Naomi's Cooking — 2026 design system
   Clean & modern. Fresh-green accent honouring the original brand.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&family=Inter:wght@400;450;500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root{
  --max: 1120px;
  --max-text: 760px;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Light theme */
  --bg: #FBFBF8;
  --bg-soft: #F4F6F1;
  --surface: #FFFFFF;
  --surface-2: #F6F7F3;
  --text: #16201A;
  --text-soft: #3C4A41;
  --muted: #6B776E;
  --border: #E7EAE2;
  --border-strong: #D7DCD0;

  --accent: #2F8F4E;
  --accent-600: #267A41;
  --accent-700: #1E6535;
  --accent-soft: #E9F4EC;
  --accent-ring: rgba(47,143,78,.28);
  --on-accent: #FFFFFF;

  --warm: #E07A3F;          /* secondary accent for variety */
  --warm-soft: #FBEDE3;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20,40,30,.05);
  --shadow: 0 2px 6px rgba(20,40,30,.06), 0 18px 40px -24px rgba(20,50,30,.30);
  --shadow-lg: 0 8px 18px rgba(20,40,30,.08), 0 30px 60px -28px rgba(20,50,30,.40);

  --header-h: 64px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

:root[data-theme="dark"]{
  --bg: #0E120F;
  --bg-soft: #141A15;
  --surface: #161D18;
  --surface-2: #1D2620;
  --text: #ECEFE9;
  --text-soft: #C4CDC4;
  --muted: #93A096;
  --border: #283128;
  --border-strong: #36423A;

  --accent: #54CB80;
  --accent-600: #43B870;
  --accent-700: #36A463;
  --accent-soft: rgba(84,203,128,.12);
  --accent-ring: rgba(84,203,128,.32);
  --on-accent: #06210F;

  --warm: #F0945E;
  --warm-soft: rgba(240,148,94,.14);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 2px 8px rgba(0,0,0,.45), 0 24px 50px -28px rgba(0,0,0,.7);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.5), 0 40px 80px -30px rgba(0,0,0,.8);
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img{ max-width: 100%; display: block; }

a{ color: var(--accent-600); text-decoration: none; }
a:hover{ color: var(--accent-700); }

h1,h2,h3{ font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--text); letter-spacing: -.01em; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

.muted{ color: var(--muted); }
.sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Header ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner{
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{ display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover{ color: var(--text); }
.brand .mark{ width: 38px; height: 38px; flex: none; border-radius: 11px; box-shadow: var(--shadow-sm); }
.brand .wordmark{ display: flex; flex-direction: column; line-height: 1; }
.brand .wordmark b{ font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand .wordmark span{ font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.topbar-actions{ display: flex; align-items: center; gap: 8px; }

.icon-btn{
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: var(--pill);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover{ border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg{ width: 19px; height: 19px; }
.icon-btn .sun{ display: none; }
:root[data-theme="dark"] .icon-btn .moon{ display: none; }
:root[data-theme="dark"] .icon-btn .sun{ display: block; }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  padding: 64px 0 30px;
  text-align: center;
  overflow: hidden;
}
.hero::before{
  content: "";
  position: absolute;
  inset: -40% 0 auto 0;
  height: 460px;
  background:
    radial-gradient(60% 80% at 50% 0%, var(--accent-soft) 0%, transparent 70%);
  z-index: -1;
}
.eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  color: var(--accent-700);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 6px 13px; border-radius: var(--pill);
  margin-bottom: 20px;
}
.hero h1{
  font-size: clamp(34px, 6vw, 58px);
  margin: 0 auto 14px;
  max-width: 14ch;
}
.hero .lede{
  max-width: 56ch;
  margin: 0 auto 30px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-soft);
}
.hero .signoff{ font-family: var(--font-display); font-weight: 500; color: var(--accent-700); }

/* ---------- Search ---------- */
.searchwrap{ max-width: 620px; margin: 0 auto; }
.search{
  position: relative;
  display: flex; align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--pill);
  box-shadow: var(--shadow);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search:focus-within{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow);
}
.search .search-icon{ position: absolute; left: 20px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input{
  flex: 1;
  width: 100%;
  border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 17px; color: var(--text);
  padding: 16px 18px 16px 50px;
  border-radius: var(--pill);
}
.search input::placeholder{ color: var(--muted); }
.search .clear{
  display: none;
  margin-right: 8px;
  border: 0; background: var(--surface-2); color: var(--muted);
  width: 30px; height: 30px; border-radius: var(--pill); cursor: pointer;
  font-size: 16px; line-height: 1;
}
.search .clear:hover{ color: var(--text); }
.search.has-value .clear{ display: inline-grid; place-items: center; }

/* Quick chips */
.chips{
  display: flex; flex-wrap: wrap; justify-content: center; gap: 9px;
  margin: 20px auto 0; max-width: 720px;
}
.chip{
  font-size: 13.5px; font-weight: 500;
  padding: 8px 15px; border-radius: var(--pill);
  background: var(--surface); color: var(--text-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.chip:hover{ border-color: var(--accent); color: var(--accent-700); transform: translateY(-1px); }
.chip[aria-pressed="true"]{ background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- Results ---------- */
.results-head{
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 40px 0 16px;
}
.results-head h2{ font-size: 22px; margin: 0; }
#meta{ font-size: 14.5px; }

.results{
  list-style: none; padding: 0; margin: 0 0 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.card{
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card a{ display: flex; flex-direction: column; height: 100%; color: inherit; }
.card a:hover{ color: inherit; }

.card .thumb{
  height: 120px;
  display: grid; place-items: center;
  position: relative;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-700) 100%);
  color: #fff;
}
.card .thumb svg{ width: 40px; height: 40px; opacity: .92; }
.card .thumb.v1{ background: linear-gradient(135deg, #34A35A, #1E6535); }
.card .thumb.v2{ background: linear-gradient(135deg, #E07A3F, #C25A28); }
.card .thumb.v3{ background: linear-gradient(135deg, #3E8E7E, #245C50); }
.card .thumb.v4{ background: linear-gradient(135deg, #D4A02C, #A9761A); }
.card .thumb.v5{ background: linear-gradient(135deg, #6E8BCB, #43578F); }

.card .body{ padding: 16px 17px 17px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3{ font-size: 18px; margin: 0; }
.card .summary{
  font-size: 14px; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tagrow{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tag{
  font-size: 11.5px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--pill);
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border);
}

/* States */
.state{
  text-align: center; padding: 56px 20px; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface);
}
.state .big{ font-size: 40px; margin-bottom: 8px; }
.state h3{ margin: 0 0 6px; color: var(--text); }
.skeleton-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 20px; }
.skeleton{ height: 230px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface-2) 30%, var(--bg-soft) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer{ to{ background-position: -200% 0; } }

/* ---------- Footer ---------- */
.site-footer{
  border-top: 1px solid var(--border);
  margin-top: 50px;
  padding: 30px 0 40px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
.site-footer .brand{ justify-content: center; margin-bottom: 10px; }

/* ---------- Recipe page ---------- */
.recipe-nav{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 26px 0 8px;
}
.back{ display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--text-soft); }
.back:hover{ color: var(--accent-700); }
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-family: inherit; font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  border-radius: var(--pill); cursor: pointer;
  transition: all .18s var(--ease);
}
.btn:hover{ border-color: var(--accent); color: var(--accent-700); }
.btn svg{ width: 17px; height: 17px; }

.recipe{ max-width: 940px; margin: 0 auto; padding-bottom: 30px; }
.recipe-hero{ margin: 14px 0 30px; }
.recipe-hero .kicker{ font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-700); font-weight: 600; }
.recipe-hero h1{ font-size: clamp(30px, 5vw, 46px); margin: 8px 0 14px; }
.recipe-hero .summary{ font-size: 18px; color: var(--text-soft); max-width: 62ch; }
.recipe-hero .tagrow{ margin-top: 18px; }
.recipe-hero .posted{ margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.recipe-grid{
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.ingredients{ position: sticky; top: calc(var(--header-h) + 18px); }
.panel h2{ font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.panel h2 svg{ width: 20px; height: 20px; color: var(--accent); }

.ing-list{ list-style: none; padding: 0; margin: 0; }
.ing-list li{
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 15.5px;
}
.ing-list li:last-child{ border-bottom: 0; }
.ing-list li::before{
  content: ""; flex: none; margin-top: 8px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

.steps{ list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li{
  position: relative;
  counter-increment: step;
  padding: 0 0 22px 52px;
  font-size: 16.5px; color: var(--text-soft);
}
.steps li:last-child{ padding-bottom: 0; }
.steps li::before{
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-700);
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  display: grid; place-items: center;
}
.steps li::after{
  content: ""; position: absolute; left: 16.5px; top: 36px; bottom: 6px;
  width: 1.5px; background: var(--border);
}
.steps li:last-child::after{ display: none; }

.notes{ margin-top: 30px; }
.notes .panel{ background: var(--warm-soft); border-color: color-mix(in srgb, var(--warm) 25%, transparent); }
.notes h2 svg{ color: var(--warm); }

/* ---------- Breadcrumbs ---------- */
.crumbs{
  font-size: 13.5px; color: var(--muted);
  margin: 18px 0 4px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
}
.crumbs a{ color: var(--text-soft); }
.crumbs a:hover{ color: var(--accent-700); }
.crumbs span[aria-current]{ color: var(--muted); }

/* kicker as link on recipe pages */
a.kicker{ color: var(--accent-700); }
a.kicker:hover{ text-decoration: underline; }

/* ---------- Compact hero (category / hub pages) ---------- */
.hero-compact{ padding: 30px 0 6px; text-align: left; }
.hero-compact h1{ margin-left: 0; margin-right: 0; max-width: none; }
.hero-compact .lede{ margin-left: 0; }
.hero-compact .chips{ justify-content: flex-start; margin-left: 0; }

/* ---------- A–Z hub ---------- */
.az-index{
  display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 10px;
  position: sticky; top: var(--header-h); z-index: 5;
  padding: 10px 0; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px);
}
.az-index a{
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--text-soft); background: var(--surface);
}
.az-index a:hover{ border-color: var(--accent); color: var(--accent-700); }
.az-group{ margin: 26px 0; }
.az-group h2{
  font-size: 26px; color: var(--accent-700);
  border-bottom: 2px solid var(--border); padding-bottom: 8px; margin: 0 0 14px;
}
.az-list{
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 22px;
}
.az-list a{ color: var(--text-soft); font-size: 15px; }
.az-list a:hover{ color: var(--accent-700); }

/* ---------- Footer category nav ---------- */
.foot-cats{
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px;
  margin-bottom: 18px; font-size: 14px;
}
.foot-cats a{ color: var(--text-soft); }
.foot-cats a:hover{ color: var(--accent-700); }

/* ---------- Responsive ---------- */
@media (max-width: 820px){
  .recipe-grid{ grid-template-columns: 1fr; gap: 24px; }
  .ingredients{ position: static; }
}
@media (max-width: 560px){
  .container{ padding: 0 16px; }
  .hero{ padding: 44px 0 24px; }
  .brand .wordmark span{ display: none; }
  .results{ grid-template-columns: 1fr 1fr; gap: 13px; }
  .card .thumb{ height: 84px; }
  .card .thumb svg{ width: 30px; height: 30px; }
  .card h3{ font-size: 15.5px; }
}
@media (max-width: 380px){
  .results{ grid-template-columns: 1fr; }
}

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

/* ---------- Text / legal pages ---------- */
.page{ max-width: var(--max-text); margin: 0 auto; padding: 10px 0 20px; }
.page h1{ font-size: clamp(28px, 5vw, 40px); margin: 18px 0 6px; }
.page .updated{ color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.prose{ font-size: 16.5px; color: var(--text-soft); }
.prose h2{ font-size: 22px; margin: 30px 0 10px; color: var(--text); }
.prose h3{ font-size: 18px; margin: 22px 0 8px; color: var(--text); }
.prose p{ margin: 0 0 14px; }
.prose ul{ margin: 0 0 14px; padding-left: 20px; }
.prose li{ margin: 6px 0; }
.prose a{ text-decoration: underline; }

/* Contact form */
.form{ display: grid; gap: 14px; max-width: 520px; margin: 8px 0 0; }
.form label{ font-size: 14px; font-weight: 500; color: var(--text); display: grid; gap: 6px; }
.form input, .form textarea{
  font-family: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; width: 100%;
}
.form input:focus, .form textarea:focus{ outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.form .btn-primary{
  justify-self: start; background: var(--accent); color: var(--on-accent);
  border: 0; padding: 12px 22px; font-weight: 600; border-radius: var(--pill); cursor: pointer; font-size: 15px;
}
.form .btn-primary:hover{ background: var(--accent-600); }
.hp{ position: absolute; left: -9999px; }

/* ---------- Cookie consent banner ---------- */
#nc-consent{
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-width: 720px; margin: 0 auto;
}
.nc-consent-inner{
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px;
}
.nc-consent-text{ margin: 0; flex: 1 1 320px; font-size: 14px; color: var(--text-soft); line-height: 1.5; }
.nc-consent-text a{ color: var(--accent-700); text-decoration: underline; }
.nc-consent-actions{ display: flex; gap: 10px; flex: 0 0 auto; }
.nc-consent-actions .nc-accept{ background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.nc-consent-actions .nc-accept:hover{ background: var(--accent-600); color: var(--on-accent); }

.foot-legal{ display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 10px 0 0; font-size: 13.5px; }
.foot-legal a, .foot-legal button{
  color: var(--muted); background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 13.5px; padding: 0;
}
.foot-legal a:hover, .foot-legal button:hover{ color: var(--accent-700); }

/* ---------- Print ---------- */
@media print{
  .topbar, .recipe-nav, .site-footer, .notes .panel{ box-shadow: none; }
  .topbar, .recipe-nav, .icon-btn, .btn, .back{ display: none !important; }
  body{ background: #fff; color: #000; font-size: 12pt; }
  .panel{ border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .ingredients{ position: static; }
  .recipe-grid{ grid-template-columns: 1fr; }
  .steps li::before{ background: #eee; color: #000; }
}
