:root {
  --bg: #f3eadc;
  --bg-elevated: #fbf6ee;
  --bg-gradient: radial-gradient(ellipse 70% 50% at 0% 0%, #c45c2624, #0000 50%),
    radial-gradient(ellipse 50% 40% at 100% 10%, #d4a0171f, #0000 46%),
    linear-gradient(180deg, #f7f0e4, #efe4d2);
  --ink: #1c1612;
  --text: #53483e;
  --text-muted: #7a6d60;
  --text-h: #1c1612;
  --accent: #c45c26;
  --accent-light: #e07a3d;
  --accent-mint: #c45c26;
  --accent-mint-bg: #c45c261a;
  --accent-mint-border: #c45c2638;
  --accent-gold: #c99212;
  --accent-gold-soft: #c9921224;
  --accent-sage: #3f5c48;
  --border: #1c16121a;
  --border-hover: #1c161233;
  --surface: #fbf6eeeb;
  --surface-solid: #fbf6ee;
  --code-bg: #ece2d0;
  --navbar-bg: #1c1612f0;
  --navbar-border: #fbf6ee14;
  --shadow-sm: 0 1px 0 #1c16120f;
  --shadow: 0 18px 40px #1c161214;
  --shadow-hover: 0 28px 50px #1c161224;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --heading: "Newsreader", Georgia, serif;
  --sans: "Sora", system-ui, sans-serif;
  --mono: ui-monospace, monospace;
  --nav-height: 62px;
  --page-max: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="home"] {
  --bg: #f3eadc;
  --bg-elevated: #fbf6ee;
  --bg-gradient: radial-gradient(ellipse 70% 50% at 0% 0%, #c45c2624, #0000 50%),
    radial-gradient(ellipse 50% 40% at 100% 10%, #d4a0171f, #0000 46%),
    linear-gradient(180deg, #f7f0e4, #efe4d2);
  --ink: #1c1612;
  --text: #53483e;
  --text-muted: #7a6d60;
  --text-h: #1c1612;
  --accent: #c45c26;
  --accent-light: #e07a3d;
  --accent-mint: #c45c26;
  --accent-mint-bg: #c45c261a;
  --accent-mint-border: #c45c2638;
  --navbar-bg: #1c1612f0;
  --surface: #fbf6eeeb;
  --surface-solid: #fbf6ee;
}

html[data-theme="kitchen"] {
  --bg: #e8efe3;
  --bg-elevated: #f4f8f0;
  --bg-gradient: radial-gradient(ellipse 70% 50% at 0% 0%, #3d6b3429, #0000 50%),
    radial-gradient(ellipse 50% 40% at 100% 8%, #b88c301a, #0000 46%),
    linear-gradient(180deg, #eef4ea, #dfe8d6);
  --ink: #152016;
  --text: #445043;
  --text-muted: #6a7664;
  --text-h: #152016;
  --accent: #3d6b34;
  --accent-light: #5a8f48;
  --accent-mint: #3d6b34;
  --accent-mint-bg: #3d6b341f;
  --accent-mint-border: #3d6b343d;
  --accent-gold: #b88c30;
  --navbar-bg: #152016f2;
  --surface: #f4f8f0eb;
  --surface-solid: #f4f8f0;
}

html[data-theme="dish"] {
  --bg: #f6e8e6;
  --bg-elevated: #fbf1ef;
  --bg-gradient: radial-gradient(ellipse 70% 50% at 0% 0%, #8b2e3a29, #0000 50%),
    radial-gradient(ellipse 50% 40% at 100% 8%, #c45c261a, #0000 46%),
    linear-gradient(180deg, #f9ecea, #eed9d5);
  --ink: #2a1216;
  --text: #5c4246;
  --text-muted: #84686c;
  --text-h: #2a1216;
  --accent: #8b2e3a;
  --accent-light: #b04856;
  --accent-mint: #8b2e3a;
  --accent-mint-bg: #8b2e3a1f;
  --accent-mint-border: #8b2e3a3d;
  --navbar-bg: #2a1216f2;
  --surface: #fbf1efeb;
  --surface-solid: #fbf1ef;
}

html[data-theme="plot"] {
  --bg: #e4eef0;
  --bg-elevated: #f0f7f8;
  --bg-gradient: radial-gradient(ellipse 70% 50% at 0% 0%, #2a6a7a29, #0000 50%),
    radial-gradient(ellipse 50% 40% at 100% 8%, #3d99701a, #0000 46%),
    linear-gradient(180deg, #ebf4f6, #d5e4e8);
  --ink: #102028;
  --text: #3d545c;
  --text-muted: #678088;
  --text-h: #102028;
  --accent: #2a6a7a;
  --accent-light: #3d8a9c;
  --accent-mint: #2a6a7a;
  --accent-mint-bg: #2a6a7a1f;
  --accent-mint-border: #2a6a7a3d;
  --navbar-bg: #102028f2;
  --surface: #f0f7f8eb;
  --surface-solid: #f0f7f8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg-gradient) fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3,
h4 {
  color: var(--text-h);
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10000;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
}

.skip-link:focus {
  top: 12px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: var(--bg-gradient) fixed;
  color: var(--text);
}

.app-main {
  flex: 1 1 auto;
}

.page-container {
  animation: pageIn 0.5s ease both;
  margin: 0 auto;
  max-width: var(--page-max);
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 4.5rem;
  width: 100%;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-eyebrow {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  gap: 0.45rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.page-title {
  color: var(--text-h);
  font-family: var(--heading);
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.55rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
  max-width: 38rem;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-top: 3.4rem;
}

.section__head {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

/* Splash */
.boot-screen {
  align-items: center;
  background: radial-gradient(ellipse 70% 50% at 50% 40%, #fff8ee 0, #0000 60%),
    linear-gradient(180deg, #fbf6ee, #f3eadc 55%, #eadcc8);
  color: #8a5a38;
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 5000;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-screen.is-done {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.boot-screen__stage {
  height: 280px;
  position: relative;
  width: min(320px, 82vw);
}

.boot-screen__core {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.boot-screen__spinner {
  animation: spin 0.75s linear infinite;
  border: 3px solid #e4d3bc;
  border-radius: 50%;
  border-top-color: #c45c26;
  height: 44px;
  width: 44px;
}

.boot-screen__label {
  color: #9a6b48;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.boot-screen__icon {
  animation: bootFloat 2.8s ease-in-out infinite;
  color: #c45c26;
  display: grid;
  height: 46px;
  opacity: 0.72;
  place-items: center;
  position: absolute;
  width: 46px;
}

.boot-screen__icon svg {
  height: 32px;
  width: 32px;
}

.boot-screen__icon.is-whisk {
  animation-delay: 0s;
  color: #b4532a;
  left: 50%;
  margin-left: -23px;
  top: 8px;
}

.boot-screen__icon.is-pan {
  animation-delay: 0.35s;
  color: #7a8f4a;
  right: 12px;
  top: 58px;
}

.boot-screen__icon.is-tomato {
  animation-delay: 0.7s;
  bottom: 52px;
  color: #c23b2a;
  right: 28px;
}

.boot-screen__icon.is-herb {
  animation-delay: 1s;
  bottom: 8px;
  color: #4f7a3c;
  left: 50%;
  margin-left: -23px;
}

.boot-screen__icon.is-hat {
  animation-delay: 1.35s;
  bottom: 52px;
  color: #c45c26;
  left: 28px;
}

.boot-screen__icon.is-board {
  animation-delay: 1.7s;
  color: #a67c52;
  left: 12px;
  top: 58px;
}

@keyframes bootFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

/* Nav */
.site-nav {
  background: var(--navbar-bg);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-nav__inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--page-max);
  padding: 0.7rem clamp(1.1rem, 4vw, 3rem);
}

.site-nav__brand {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  gap: 0.55rem;
  line-height: 1;
  user-select: none;
}

.site-logo--invert {
  color: #f0945a;
}

.site-logo__mark {
  flex-shrink: 0;
}

.site-logo__word {
  color: var(--text-h);
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.site-logo--invert .site-logo__word {
  color: #f6efe4;
}

.site-logo__word em {
  color: inherit;
  font-style: italic;
  font-weight: 500;
}

.site-logo--nav .site-logo__mark {
  height: 28px;
  width: 28px;
}

.site-logo--nav .site-logo__word {
  font-size: 1.35rem;
}

.site-logo--footer .site-logo__mark {
  height: 34px;
  width: 34px;
}

.site-logo--footer .site-logo__word {
  font-size: 1.7rem;
}

.site-nav__links {
  align-items: center;
  display: flex;
  gap: 0.15rem;
}

.site-nav__link {
  border-radius: 4px;
  color: rgba(246, 239, 228, 0.68);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav__link:hover {
  background: #f6efe414;
  color: #f6efe4;
}

.site-nav__link--active {
  background: var(--accent);
  color: #f6efe4;
}

.site-nav__toggle {
  align-items: center;
  background: transparent;
  border: 1px solid #f6efe429;
  border-radius: 6px;
  color: #f6efe4;
  cursor: pointer;
  display: none;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.site-nav__mobile {
  display: none;
}

/* Buttons */
.btn {
  align-items: center;
  border-radius: 6px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0.02em;
  outline: none;
  padding: 12px 28px;
  text-decoration: none;
  transition: 0.25s var(--ease);
  user-select: none;
}

.btn-primary {
  background: var(--accent);
  border: 1.5px solid transparent;
  box-shadow: 0 8px 18px #c45c2638;
  color: #fff8ef;
}

html[data-theme="kitchen"] .btn-primary,
html[data-theme="plot"] .btn-primary,
html[data-theme="dish"] .btn-primary {
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-mint-bg);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--accent);
}

.btn:focus-visible,
.site-nav__link:focus-visible,
.harvest-chip:focus-visible,
.filter-chip:focus-visible,
.fav-btn:focus-visible,
.popup__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero */
.hero {
  align-items: stretch;
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  grid-template-columns: 1.05fr 0.95fr;
  padding: 0.5rem 0 2.5rem;
}

.hero__badge {
  align-items: center;
  background: var(--accent);
  border-radius: 4px;
  color: #fff8ef;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 1.35rem;
  padding: 0.35rem 0.8rem;
  text-transform: uppercase;
}

.hero__title {
  color: var(--text-h);
  font-family: var(--heading);
  font-size: clamp(2.7rem, 6vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0 0 1.2rem;
}

.hero__title em {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.hero__lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 0 0 2rem;
  max-width: 32rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__visual {
  background: #1c1612;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.hero__visual img {
  display: block;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  width: 100%;
}

.hero__visual-caption {
  background: #1c1612c7;
  bottom: 1rem;
  color: #f6efe4;
  font-size: 0.72rem;
  font-weight: 600;
  left: 1rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.75rem;
  position: absolute;
  text-transform: uppercase;
}

/* Harvest */
.harvest-banner {
  background: var(--accent-mint-bg) !important;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent) !important;
  border-radius: 6px !important;
  box-shadow: var(--shadow-sm);
  margin-top: 1.75rem;
  padding: 1.4rem 1.6rem !important;
}

.harvest-banner h3 {
  font-family: var(--heading);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.harvest-banner p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.harvest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.harvest-chip {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.harvest-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Stats */
.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.stat-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
  padding: 1.2rem 1.35rem !important;
}

.stat-card__icon {
  border-radius: 6px;
  display: grid;
  flex-shrink: 0;
  height: 46px;
  place-items: center;
  width: 46px;
}

.stat-card__icon--green {
  background: var(--accent-mint-bg);
  border: 1px solid var(--accent-mint-border);
  color: var(--accent);
}

.stat-card__icon--gold {
  background: var(--accent-gold-soft);
  border: 1px solid #c9921240;
  color: var(--accent-gold);
}

.stat-card__icon--rose {
  background: #c45c261a;
  border: 1px solid #c45c2633;
  color: var(--accent);
}

.stat-card__label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

.stat-card__value {
  color: var(--text-h);
  font-family: var(--heading);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  margin: 0;
}

/* Recipe cards */
.recipe-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.recipe-card__title a,
.recipe-card__link {
  color: inherit;
  text-decoration: none;
}

.recipe-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.recipe-card__media {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.recipe-card__media img,
.recipe-card__link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
  width: 100%;
}

.recipe-card__link {
  display: block;
  height: 100%;
}

.recipe-card:hover .recipe-card__media img {
  transform: scale(1.06);
}

.recipe-card__badge {
  background: var(--accent);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  left: 16px;
  letter-spacing: 0.2px;
  padding: 5px 12px;
  position: absolute;
  top: 16px;
}

.fav-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  z-index: 2;
  backdrop-filter: blur(8px);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(25, 62, 45, 0.1);
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 44px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
  transition: 0.3s var(--ease);
  width: 44px;
}

.fav-btn:hover {
  transform: scale(1.06);
}

.fav-btn.is-on {
  background: #fff;
}

.recipe-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  padding: 24px 28px;
}

.recipe-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  background: var(--accent-mint-bg);
  border-radius: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 2px 8px;
}

.recipe-card__title {
  color: var(--text-h);
  font-family: var(--heading);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px;
}

.recipe-card__excerpt {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
  overflow: hidden;
}

.recipe-card__meta {
  align-items: center;
  border-top: 1px solid var(--border);
  color: var(--text);
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding-top: 16px;
}

.dot {
  background: #c58f4a;
  border-radius: 50%;
  display: inline-block;
  height: 6px;
  margin-right: 4px;
  width: 6px;
}

.dot--easy {
  background: #448f68;
}

.dot--hard {
  background: #c45c26;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 0.4rem;
}

/* Process */
.process-panel {
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #cbbfb0;
  padding: 2.4rem clamp(1.4rem, 4vw, 2.4rem);
}

.process-panel .page-eyebrow {
  color: var(--accent-light);
}

.process-panel .page-title {
  color: #f6efe4;
  margin-bottom: 1.75rem;
}

.process-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.process-step {
  background: #fbf6ee0a;
  border: 1px solid #f6efe41a;
  border-radius: 6px;
  overflow: hidden;
  padding: 1.5rem 1.3rem;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.process-step:hover {
  border-color: #e07a3d73;
  transform: translateY(-3px);
}

.process-step h4 {
  color: #f6efe4;
  font-family: var(--heading);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.process-step p {
  color: #cbbfb0;
  font-size: 0.92rem;
  margin: 0;
}

.process-step__num {
  bottom: -0.4rem;
  color: var(--accent);
  font-family: var(--heading);
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.18;
  pointer-events: none;
  position: absolute;
  right: 0.6rem;
}

.process-step__icon {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 4px;
  color: var(--accent-light);
  display: grid;
  height: 40px;
  margin-bottom: 1rem;
  place-items: center;
  width: 40px;
}

/* Category tiles */
.category-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(4, 1fr);
}

.category-tile {
  border-radius: var(--radius-lg);
  color: #f6efe4;
  display: block;
  min-height: 170px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.category-tile img {
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  width: 100%;
}

.category-tile__veil {
  background: linear-gradient(#0000, #1c1612e0);
  inset: 0;
  position: absolute;
}

.category-tile__label {
  bottom: 16px;
  font-family: var(--heading);
  font-size: 1.45rem;
  left: 18px;
  position: absolute;
}

/* Newsletter */
.newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.2fr 1fr;
  margin-top: 3.4rem;
  padding: 2rem;
}

.newsletter h2 {
  margin: 0 0 0.5rem;
}

.newsletter p {
  color: var(--text-muted);
  margin: 0;
}

.newsletter form {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
}

.newsletter input {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-h);
  font-size: 15px;
  padding: 12px 14px;
}

.newsletter input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-mint-bg);
  outline: none;
}

.newsletter__note {
  color: var(--accent-sage);
  font-size: 0.88rem;
  margin: 0;
}

/* Footer */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--border);
  color: #cbbfb0;
  margin-top: auto;
  padding: 3.2rem clamp(1.25rem, 4vw, 3rem) 1.75rem;
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.5fr 1fr 1fr;
  margin: 0 auto;
  max-width: var(--page-max);
}

.site-footer__logo {
  margin-bottom: 1rem;
}

.site-footer__brand p {
  color: #cbbfb0;
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
  max-width: 24rem;
}

.site-footer__col h4 {
  color: #f6efe4;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.site-footer__col a {
  color: #cbbfb0;
  display: block;
  margin-bottom: 0.55rem;
  text-decoration: none;
}

.site-footer__col a:hover {
  color: #f6efe4;
}

.site-footer__bar {
  align-items: center;
  border-top: 1px solid #f6efe414;
  color: #8f8376;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 1rem;
  justify-content: space-between;
  margin: 2.2rem auto 0;
  max-width: var(--page-max);
  padding-top: 1.1rem;
}

.site-footer__live {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
}

.site-footer__live::before {
  animation: pulse 1.8s ease infinite;
  background: #7cb86a;
  border-radius: 50%;
  content: "";
  height: 8px;
  width: 8px;
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

/* Kitchen search */
.search-filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.search-filters__row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.6fr 0.7fr;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.search-field label,
.filter-legend {
  color: var(--text-h);
  font-size: 0.82rem;
  font-weight: 600;
}

.search-field__wrap {
  position: relative;
}

.search-field__wrap svg {
  color: var(--text-muted);
  left: 14px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.input-premium,
.difficulty-select {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-h);
  font-size: 15px;
  padding: 14px 16px;
  width: 100%;
}

.input-premium {
  padding-left: 44px;
}

.input-premium:focus,
.difficulty-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-mint-bg);
  outline: none;
}

.filter-legend {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  margin: 1.2rem 0 0.7rem;
  text-transform: uppercase;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
}

.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #f6efe4;
}

.results-count {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 1.2rem 0 0;
}

.page-header {
  margin-bottom: 1.6rem;
}

.toolbar-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

/* Recipe detail */
.dish-top {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.back-link {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
}

.dish-kicker {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0.85rem 0 0.5rem;
  text-transform: uppercase;
}

.dish-title {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.1;
  margin: 0 0 0.7rem;
}

.dish-lead {
  color: var(--text);
  font-size: 1.05rem;
  margin: 0 0 1.1rem;
  max-width: 46rem;
}

.dish-facts {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  gap: 1.1rem;
  margin-bottom: 1.6rem;
  padding-bottom: 1.1rem;
}

.dish-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1.15fr;
}

.ing-panel h2,
.steps h2 {
  font-size: 1.45rem;
  margin: 0 0 1rem;
}

.scale-box {
  align-items: center;
  background: var(--accent-mint-bg);
  border-radius: 10px;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding: 0.85rem 1rem;
}

.scale-box span {
  font-size: 0.82rem;
  font-weight: 600;
}

.scale-controls {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.scale-controls button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  height: 32px;
  width: 32px;
}

.scale-controls strong {
  min-width: 4.5rem;
  text-align: center;
}

.ing-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ing-list li {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.ing-list input {
  accent-color: var(--accent);
  margin-top: 3px;
}

.ing-list label {
  cursor: pointer;
  flex: 1;
}

.ing-list label.is-checked {
  color: var(--text-muted);
  text-decoration: line-through;
}

.plot-tag {
  background: var(--accent-mint-bg);
  border-radius: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  white-space: nowrap;
}

.dish-photo {
  border-radius: 10px;
  min-height: 280px;
  overflow: hidden;
}

.dish-photo img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.timer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
  padding: 1.2rem 1.3rem;
}

.timer-card h3 {
  margin: 0 0 0.2rem;
}

.timer-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 0.9rem;
}

.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-bottom: 0.8rem;
}

.timer-presets button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
}

.timer-row {
  align-items: center;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto 1fr auto;
}

.timer-display {
  background: var(--accent-mint-bg);
  border-radius: 10px;
  font-family: var(--heading);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  min-width: 110px;
  padding: 0.55rem 0.9rem;
  text-align: center;
}

.steps {
  margin-top: 2rem;
}

.steps ol {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  counter-increment: step;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: auto 1fr;
  padding: 1rem 1.1rem;
}

.steps li::before {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  content: counter(step);
  display: grid;
  font-size: 0.85rem;
  font-weight: 700;
  height: 28px;
  place-items: center;
  width: 28px;
}

.nutrition,
.plot-to-plate {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1.2rem;
  padding: 1.2rem 1.3rem;
}

.nutrition-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, 1fr);
}

.nutrition-grid div {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 0.7rem;
}

.nutrition-grid span {
  color: var(--text-muted);
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Plot */
.bed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 8px 0 24px;
}

.bed-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 20px;
  transition: 0.3s var(--ease);
}

.bed-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.raised-bed {
  background: #1a120c;
  border: 10px solid #3a2418;
  border-radius: 8px;
  box-shadow: inset 0 10px 40px rgba(0, 0, 0, 0.45), 0 18px 40px #1c16121f;
  margin: 0 auto;
  max-width: 900px;
  padding: 20px;
  width: 100%;
}

.soil-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.soil-plot {
  background: linear-gradient(#2d1e15, #1f140e);
  border: 2px solid #3d281a;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 220px;
  justify-content: space-between;
  padding: 20px;
  text-align: left;
  transition: 0.35s var(--ease);
}

.soil-plot.is-hidden {
  display: none;
}

.soil-plot__top,
.soil-plot__bar-row,
.soil-plot__foot {
  display: flex;
  justify-content: space-between;
}

.soil-plot__kind {
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.soil-status {
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
}

.soil-status--ready {
  background: rgba(30, 70, 52, 0.9);
  color: #d1fae5;
}

.soil-status--growing {
  background: rgba(58, 134, 200, 0.95);
  color: #dbeafe;
}

.soil-status--flower {
  background: rgba(197, 143, 74, 0.95);
  color: #fff;
}

.soil-status--sprout {
  background: rgba(157, 78, 221, 0.95);
  color: #f3e8ff;
}

.soil-plot h3 {
  color: #fff;
  font-size: 17px;
  margin: 0;
}

.soil-plot em {
  color: #91796d;
  font-size: 11px;
  font-style: italic;
}

.bar {
  background: #3d2b1f;
  border-radius: 2px;
  height: 4px;
  margin: 4px 0 8px;
  overflow: hidden;
}

.bar span {
  background: var(--accent-light);
  display: block;
  height: 100%;
}

.soil-plot__bar-row,
.soil-plot__foot {
  color: #ac9285;
  font-size: 10px;
}

.soil-plot__foot {
  border-top: 1px solid #3d2b1f;
  color: #dcc6ba;
  font-size: 11.5px;
  padding-top: 6px;
}

/* Popups */
.popup {
  align-items: center;
  display: none;
  inset: 0;
  padding: 24px;
  pointer-events: auto;
  position: fixed;
  z-index: 80;
}

.popup.is-open {
  display: flex;
}

.popup--left {
  justify-content: flex-start;
}

.popup--center {
  justify-content: center;
}

.popup__scrim {
  backdrop-filter: blur(7px);
  background: #1c16127a;
  inset: 0;
  position: absolute;
}

.popup.is-open .popup__scrim {
  animation: rr-scrim-in 0.4s ease both;
}

.popup__card {
  background: #fbf6ee;
  border-radius: 18px;
  box-shadow: 0 32px 80px #1c161247;
  color: #1c1612;
  font-family: var(--sans);
  max-height: min(90vh, 640px);
  overflow: auto;
  position: relative;
  width: min(100%, 420px);
  z-index: 1;
}

.popup.is-open .popup__card--center {
  animation: rr-from-center 0.5s var(--ease) both;
}

.popup.is-open .popup__card--left {
  animation: rr-from-left 0.55s var(--ease) both;
}

.popup__photo {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.popup__photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.popup__photo::after {
  background: linear-gradient(#0000, #fbf6ee);
  content: "";
  height: 70px;
  inset: auto 0 0 0;
  position: absolute;
}

.popup__kicker {
  background: #c45c26;
  border-radius: 4px;
  bottom: 18px;
  color: #fff8ef;
  font-size: 11px;
  font-weight: 700;
  left: 18px;
  letter-spacing: 0.14em;
  padding: 5px 10px;
  position: absolute;
  text-transform: uppercase;
  z-index: 1;
}

.popup__kicker--inline {
  display: inline-block;
  margin-bottom: 12px;
  position: static;
}

.popup__pad {
  padding: 22px 24px 24px;
}

.popup__card--photo .popup__pad {
  padding-top: 8px;
}

.popup__title {
  color: #1c1612;
  font-family: var(--heading);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 48px 10px 0;
}

.popup__title em {
  color: #c45c26;
  font-style: italic;
  font-weight: 500;
}

.popup__body {
  color: #5c5048;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 16px;
}

.popup__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.popup__meta li {
  background: #c45c261a;
  border-radius: 999px;
  color: #c45c26;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
}

.popup__crops {
  border: 1px solid #1c16121a;
  border-radius: 12px;
  list-style: none;
  margin: 0 0 18px;
  overflow: hidden;
  padding: 0;
}

.popup__crops li {
  align-items: center;
  border-bottom: 1px solid #1c161214;
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  padding: 12px 14px;
}

.popup__crops li:last-child {
  border-bottom: 0;
}

.popup__crops strong {
  color: #7a6d60;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.popup__crops strong.is-ready {
  color: #3d6b34;
}

.popup__cta {
  background: #c45c26;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 22px #c45c2647;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 48px;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.popup__cta:hover {
  background: #e07a3d;
}

.popup__close {
  background: #fbf6eeeb;
  border: 0;
  border-radius: 8px;
  color: #5c5048;
  cursor: pointer;
  font-size: 22px;
  height: 36px;
  line-height: 1;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  z-index: 3;
}

.popup__close:hover {
  background: #c45c26;
  color: #fff;
}

@keyframes rr-scrim-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rr-from-left {
  from {
    opacity: 0;
    transform: translateX(-72px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rr-from-center {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Legal */
.legal-page {
  max-width: 760px;
}

.legal-page__body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.legal-page__body h2 {
  color: var(--text-h);
  font-family: var(--heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
}

.legal-page__body p,
.legal-page__body li {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.75;
}

.legal-page__body p {
  margin: 0 0 1rem;
}

.legal-page__body ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.legal-contact {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 0.9fr 1.1fr;
  margin-bottom: 1.5rem;
}

.legal-contact__card,
.legal-contact__form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
}

.legal-contact__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.legal-contact__form label {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-contact__form input,
.legal-contact__form textarea {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-h);
  font: 500 1rem/1.5 var(--sans);
  padding: 0.7rem 0.8rem;
}

.legal-contact__form input:focus,
.legal-contact__form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-mint-bg);
  outline: none;
}

.about-split {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.1fr 0.9fr;
}

.about-split img {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  object-fit: cover;
  width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dish-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__visual,
  .hero__visual img {
    min-height: 280px;
  }

  .process-grid,
  .stats-grid,
  .newsletter {
    grid-template-columns: 1fr;
  }

  .search-filters__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-nav__toggle {
    display: flex;
  }

  .site-nav__links--desktop {
    display: none;
  }

  .site-nav.is-open {
    height: auto;
  }

  .site-nav__mobile {
    background: var(--navbar-bg);
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 1.1rem 1rem;
  }

  .site-nav.is-open .site-nav__mobile {
    display: flex;
  }

  .site-nav__mobile .site-nav__link {
    padding: 0.8rem 0.9rem;
  }

  .site-logo--nav .site-logo__word {
    font-size: 1.2rem;
  }

  .site-footer__grid {
    gap: 2rem;
    grid-template-columns: 1fr;
  }

  .nutrition-grid,
  .timer-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-container {
    padding-bottom: 3rem;
    padding-top: 1.25rem;
  }

  .popup,
  .popup--center,
  .popup--left {
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
  }

  .popup__card {
    border-radius: 18px 18px 10px 10px;
    max-height: min(92vh, 640px);
    width: 100%;
  }

  .popup__title {
    font-size: 24px;
  }

  .hero__title {
    font-size: 2.4rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .dish-top {
    flex-direction: column;
  }

  .btn {
    width: auto;
  }
}

@media (max-width: 480px) {
  .recipe-card__body {
    padding: 18px 18px 20px;
  }

  .harvest-banner,
  .search-filters,
  .newsletter {
    padding: 1.1rem !important;
  }

  .stat-card {
    padding: 1rem !important;
  }
}

@media (max-width: 720px) {
  .legal-contact,
  .about-split {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
