/* ================= THEME TOKENS ================= */
:root {
  --color-primary: #4A7C59;        /* Sage green — primary accent */
  --color-primary-dark: #375D42;
  --color-secondary: #D96B43;      /* Terracotta — secondary accent */
  --color-bg: #FAF6EF;             /* Warm cream */
  --color-card: #F3EEE3;
  --color-text: #2B2A26;
  --color-text-muted: #6B655C;
  --header-height: 64px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

h1, h2, h3, .logo {
  font-family: 'Sora', sans-serif;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* ================= HEADER / NAV ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}
.logo span { color: var(--color-secondary); }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.nav-link:hover {
  background: rgba(74, 124, 89, 0.1);
  color: var(--color-primary);
}
.nav-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.nav-link.active {
  background: var(--color-primary);
  color: #fff;
}
.nav-link.active:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jump-btn {
  background: var(--color-secondary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.jump-btn:hover {
  background: #B8532F;
  transform: translateY(-1px);
}
.jump-btn:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Hamburger (mobile only) */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  background: var(--color-bg);
  border-top: 1px solid rgba(0,0,0,0.06);
  transition: max-height 0.3s ease;
}
.mobile-nav.open {
  max-height: 400px;
}
.mobile-nav .nav-link {
  border-radius: 0;
  padding: 14px 20px;
}
.mobile-jump {
  margin: 10px 20px 16px;
  text-align: center;
}

/* ================= HERO ================= */
.hero {
  padding: 56px 20px 40px;
  text-align: center;
}
.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
}
.hero p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ================= CATEGORY SECTIONS ================= */
.category-section {
  padding: 48px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.category-section.alt {
  background: var(--color-card);
  max-width: 100%;
}
.category-section.alt > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.category-section h2 {
  font-size: 1.5rem;
  margin: 0 0 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.recipe-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.recipe-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -12px rgba(0,0,0,0.15);
}
.recipe-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 16px;
}
.tag {
  display: inline-block;
  background: rgba(74, 124, 89, 0.12);
  color: var(--color-primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.recipe-card h3 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.recipe-card p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ================= FEATURED RECIPE DETAIL ================= */
.recipe-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 60px;
}
.recipe-detail h2 {
  font-size: 1.75rem;
  margin: 0 0 8px;
}
.recipe-detail .meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}
.recipe-detail h3 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
}
.ingredient-list, .instructions {
  padding-left: 20px;
  line-height: 1.7;
}

.ad-slot {
  border: 1px dashed rgba(0,0,0,0.25);
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  text-align: center;
  padding: 40px 20px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 8px 0 24px;
}
.ad-slot--leaderboard {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 24px 20px;
}

/* Macro badge grid */
.macro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0 4px;
}
.macro-badge {
  background: var(--color-card);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}
.macro-value {
  display: block;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--color-primary-dark);
}
.macro-label {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.recipe-header h1 {
  font-size: 1.9rem;
  margin: 0 0 6px;
}
.recipe-story {
  margin: 24px 0;
  line-height: 1.75;
  font-size: 0.98rem;
}
.recipe-story p { margin: 0 0 14px; }
.recipe-ingredients h2,
.recipe-instructions h2 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
}

/* ================= FOOTER ================= */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-logo { color: #fff; }
.footer-logo span { color: #F2C9B4; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: #fff; }

/* ================= RESPONSIVE ================= */
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
  .mobile-nav { display: none !important; }
  .hero h1 { font-size: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-link, .jump-btn, .recipe-card, .hamburger span, .mobile-nav {
    transition: none !important;
  }
}

/* ================= LEGAL PAGES ================= */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  line-height: 1.75;
}
.legal-container h1 {
  font-size: 2rem;
  margin: 0 0 8px;
  color: var(--color-primary-dark);
}
.legal-container .updated {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0 0 32px;
}
.legal-container h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
  color: var(--color-primary-dark);
}
.legal-container p {
  margin: 0 0 16px;
}
.legal-container ul,
.legal-container ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.legal-container li {
  margin-bottom: 8px;
}
.legal-container a {
  color: var(--color-secondary);
  font-weight: 600;
}
.legal-container hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin: 36px 0;
}

/* ================= COOKIE CONSENT BANNER ================= */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 520px;
  margin: 0 auto;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.35);
  z-index: 100;
}
.cookie-banner p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.cookie-banner a {
  color: #F2C9B4;
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 10px;
}
.cookie-btn {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.cookie-btn--accept {
  background: var(--color-secondary);
  color: #fff;
}
.cookie-btn--accept:hover { background: #B8532F; }
.cookie-btn--decline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.cookie-btn--decline:hover { background: rgba(255,255,255,0.1); }

@media (min-width: 640px) {
  .macro-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Recipe hero image */
.recipe-hero {
  margin: 24px 0;
}
.recipe-hero img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

/* In-article figures */
.recipe-figure {
  margin: 16px 0 20px;
}
.recipe-figure img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.recipe-figure figcaption {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.instructions li {
  margin-bottom: 14px;
}

/* Portrait photo (tall image) */
.recipe-figure--portrait {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.recipe-figure--portrait img {
  max-height: none;
}

.macro-note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 8px 0 0;
  line-height: 1.5;
}

/* ================= HERO SLIDER ================= */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--color-card);
}
.slides {
  position: relative;
  height: clamp(240px, 38vw, 520px);
}
.slide {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  text-decoration: none;
  transform: translateX(100%);
  transition: transform 0.5s ease;
}
.slide.is-current {
  transform: translateX(0);
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.slide-caption {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.slide-kicker {
  background: rgba(255,255,255,0.9);
  color: var(--color-primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.slide-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.15;
}
.slide-meta {
  font-size: 0.85rem;
  opacity: 0.92;
}
.slide-btn {
  margin-top: 10px;
  background: var(--color-secondary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 999px;
  transition: all 0.3s ease;
}
.slide:hover .slide-btn,
.slide:focus-visible .slide-btn {
  background: #B8532F;
  transform: translateY(-1px);
}
.slide:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}
.slider-btn {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.slider-btn:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.slider-btn:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-dots {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 16px;
  display: flex;
  gap: 8px;
}
.slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.3s ease;
}
.slider-dot.is-active {
  width: 26px;
  background: #fff;
}
@media (min-width: 768px) {
  .slide-caption { padding: 0 32px 48px; }
  .slide-title { font-size: 2.1rem; }
  .slide-meta { font-size: 0.95rem; }
  .slider-prev { left: 24px; }
  .slider-next { right: 24px; }
  .slider-dots { right: 32px; bottom: 24px; }
}
@media (max-width: 520px) {
  .slider-btn { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
}

/* ================= HERO FLOWING BACKGROUND ================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 20px 96px;
}
.hero-inner {
  position: relative;
  z-index: 1;
}
.hero p {
  color: #4A453E;
}
.hero-flow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.flow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
}
.flow-blob--sage {
  width: 360px;
  height: 360px;
  left: -90px;
  top: -110px;
  background: var(--color-primary);
  opacity: 0.55;
  animation: flow-drift-a 9s ease-in-out infinite alternate;
}
.flow-blob--terra {
  width: 330px;
  height: 330px;
  right: -70px;
  top: -50px;
  background: var(--color-secondary);
  opacity: 0.45;
  animation: flow-drift-b 11s ease-in-out infinite alternate;
}
.flow-blob--gold {
  width: 300px;
  height: 300px;
  left: 38%;
  bottom: -170px;
  background: #F2C14E;
  opacity: 0.5;
  animation: flow-drift-c 13s ease-in-out infinite alternate;
}
.flow-wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 90px;
  will-change: transform;
}
.flow-wave--one {
  fill: var(--color-primary);
  opacity: 0.22;
  animation: flow-wave-move 12s linear infinite;
}
.flow-wave--two {
  fill: var(--color-secondary);
  opacity: 0.18;
  height: 70px;
  animation: flow-wave-move 17s linear infinite reverse;
}
@keyframes flow-drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(180px, 90px) scale(1.25); }
}
@keyframes flow-drift-b {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-170px, 80px) scale(0.9); }
}
@keyframes flow-drift-c {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-150px, -50px) scale(1.2); }
}
@keyframes flow-wave-move {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (min-width: 768px) {
  .flow-blob--sage { width: 460px; height: 460px; }
  .flow-blob--terra { width: 420px; height: 420px; }
  .flow-blob--gold { width: 380px; height: 380px; }
  .flow-wave { height: 120px; }
  .flow-wave--two { height: 95px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-blob, .flow-wave { animation: none; }
}

/* ================= HERO VIDEO ================= */
.hero--video {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 20px 110px;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom, rgba(20,16,12,0.45), rgba(20,16,12,0.62));
}
.hero--video .hero-inner { max-width: 720px; }
.hero--video h1 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.hero--video p {
  color: rgba(255,255,255,0.94);
}
/* if the video file is missing, fall back to the flowing colors */
.hero--novideo .hero-video,
.hero--novideo .hero-shade { display: none; }
.hero--novideo h1 { color: var(--color-text); text-shadow: none; }
.hero--novideo p { color: #4A453E; }
.hero--video .flow-wave { display: none; }
.hero--novideo .flow-wave { display: block; }

/* ================= ARTICLE BACKGROUND COLORS ================= */
.page-flow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.page-flow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
  will-change: transform;
}
.page-flow span:nth-child(1) {
  width: 420px; height: 420px; left: -120px; top: -100px;
  background: var(--flow-a);
  animation: flow-drift-a 10s ease-in-out infinite alternate;
}
.page-flow span:nth-child(2) {
  width: 380px; height: 380px; right: -100px; top: 22%;
  background: var(--flow-b);
  animation: flow-drift-b 12s ease-in-out infinite alternate;
}
.page-flow span:nth-child(3) {
  width: 360px; height: 360px; left: 30%; bottom: -160px;
  background: var(--flow-c);
  animation: flow-drift-c 14s ease-in-out infinite alternate;
}
/* each article has its own colors */
.theme-chicken { --flow-a: #D96B43; --flow-b: #F2C14E; --flow-c: #C8553D; }
.theme-turkey  { --flow-a: #4A7C59; --flow-b: #A8C686; --flow-c: #E5B84B; }
.theme-salmon  { --flow-a: #2A9D8F; --flow-b: #F28C6F; --flow-c: #F2C14E; }
.theme-cups    { --flow-a: #8CC63F; --flow-b: #F7DC4A; --flow-c: #BFE3D0; }
.theme-breakfast { --flow-a: #F4A261; --flow-b: #7B8CDE; --flow-c: #F2C14E; }
@media (prefers-reduced-motion: reduce) {
  .page-flow span { animation: none; }
}
