:root {
  --bg: #f5ead5;
  --bg-soft: #fcf7ef;
  --surface: rgba(255, 249, 241, 0.82);
  --surface-strong: rgba(255, 252, 247, 0.94);
  --surface-olive: rgba(238, 243, 233, 0.9);
  --surface-warm: rgba(251, 234, 217, 0.9);
  --text: #2f2118;
  --muted: #6a5648;
  --line: rgba(67, 41, 26, 0.12);
  --accent: #a6432a;
  --accent-deep: #7d2c18;
  --accent-soft: #f3c8b2;
  --olive: #576347;
  --saffron: #db9428;
  --shadow: 0 30px 80px rgba(94, 63, 40, 0.14);
  --shadow-soft: 0 18px 40px rgba(94, 63, 40, 0.1);
  --radius-xl: 38px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Manrope", "Avenir Next", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 203, 152, 0.52), transparent 34%),
    radial-gradient(circle at top right, rgba(95, 114, 78, 0.18), transparent 30%),
    linear-gradient(180deg, #f3e4c8 0%, #f9f4ec 46%, #efe2ca 100%);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.18), transparent 48%),
    repeating-linear-gradient(0deg, rgba(73, 48, 34, 0.02) 0 1px, transparent 1px 11px);
  mix-blend-mode: soft-light;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p,
ul,
ol,
h1,
h2,
h3 {
  margin: 0;
}

button,
input {
  font: inherit;
}

code {
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  background: rgba(61, 38, 24, 0.08);
  font-family: "SFMono-Regular", "SF Mono", Monaco, monospace;
  font-size: 0.92em;
}

[hidden] {
  display: none !important;
}

.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;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  overflow: clip;
}

.site-main {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto 4rem;
}

.site-aura {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(24px);
  opacity: 0.85;
  z-index: -1;
}

.site-aura--one {
  top: 6rem;
  right: -4rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: rgba(250, 192, 138, 0.5);
}

.site-aura--two {
  top: 24rem;
  left: -5rem;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: rgba(87, 99, 71, 0.16);
}

.site-aura--three {
  bottom: 8rem;
  right: 12%;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: rgba(219, 148, 40, 0.12);
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 1.35rem auto 1.6rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(64, 38, 23, 0.12);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff6ef;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-copy {
  display: grid;
  gap: 0.08rem;
}

.brand-copy strong,
h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1.05rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.83rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.site-nav a {
  padding: 0.68rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-panel,
.page-hero,
.section-block,
.directory-panel,
.paper-panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.4rem;
  padding: 2.2rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(255, 232, 208, 0.84), transparent 35%),
    linear-gradient(160deg, rgba(255, 250, 243, 0.84), rgba(244, 232, 212, 0.76));
  overflow: hidden;
}

.hero-copy,
.hero-notes,
.section-heading,
.workflow-card,
.category-card,
.recipe-card__body,
.paper-panel,
.footer-copy {
  display: grid;
  gap: 0.9rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel h1,
.page-hero h1,
.recipe-detail h1 {
  font-size: clamp(2.5rem, 4vw, 4.6rem);
}

.hero-lede,
.page-lede {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-search,
.hero-actions,
.directory-controls,
.card-meta-row,
.eyebrow-row,
.tag-row,
.chip-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.search-field {
  display: flex;
  align-items: center;
  min-height: 3.35rem;
  min-width: min(100%, 22rem);
  padding: 0.3rem;
  border: 1px solid rgba(67, 41, 26, 0.12);
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.search-field--wide {
  flex: 1;
  min-width: min(100%, 18rem);
}

.search-field input {
  flex: 1;
  width: 100%;
  padding: 0 1rem;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button:hover,
.filter-chip:hover,
.recipe-card:hover,
.category-card:hover,
.workflow-card:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff8f1;
  box-shadow: 0 18px 30px rgba(125, 44, 24, 0.22);
}

.button--ghost {
  background: rgba(255, 251, 246, 0.64);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.stat-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.stat-ribbon div,
.detail-stats div {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 252, 248, 0.62);
  box-shadow: inset 0 0 0 1px rgba(67, 41, 26, 0.08);
}

.stat-ribbon span,
.detail-stats strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
}

.stat-ribbon small,
.detail-stats small,
.meta-inline,
.results-copy,
.footer-meta,
.category-count {
  color: var(--muted);
}

.hero-notes {
  align-content: start;
}

.note-card {
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(67, 41, 26, 0.08);
  box-shadow: var(--shadow-soft);
}

.note-card--warm {
  background: var(--surface-warm);
}

.note-card--olive {
  background: var(--surface-olive);
}

.note-card--paper {
  background: rgba(255, 252, 247, 0.9);
}

.note-label {
  font-weight: 800;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.section-block,
.directory-panel,
.page-hero {
  margin-top: 1.5rem;
  padding: 1.7rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 245, 0.8);
}

.section-heading h2,
.recipe-card h3,
.category-card h2,
.category-card h3,
.workflow-card h3,
.paper-panel h2 {
  font-size: clamp(1.55rem, 2vw, 2.2rem);
}

.recipe-grid,
.category-grid,
.workflow-grid {
  display: grid;
  gap: 1.15rem;
}

.recipe-grid {
  margin-top: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-grid {
  margin-top: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-grid {
  margin-top: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recipe-card,
.category-card,
.workflow-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.recipe-card {
  display: flex;
  flex-direction: column;
}

.recipe-card__image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(251, 221, 194, 0.8), rgba(86, 99, 70, 0.18));
}

.recipe-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-card__fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  color: var(--muted);
}

.recipe-card__body {
  padding: 1.2rem;
}

.eyebrow-row,
.card-meta-row {
  justify-content: space-between;
}

.pill,
.tag,
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
}

.pill {
  background: rgba(166, 67, 42, 0.12);
  color: var(--accent-deep);
  font-weight: 700;
}

.meta-inline {
  font-size: 0.92rem;
}

.tag-row {
  gap: 0.45rem;
}

.tag {
  background: rgba(87, 99, 71, 0.1);
  color: var(--olive);
  font-size: 0.88rem;
}

.category-card,
.workflow-card {
  padding: 1.2rem;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-preview span {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(87, 99, 71, 0.08);
  color: var(--olive);
  font-size: 0.88rem;
}

.workflow-step {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(166, 67, 42, 0.14);
  color: var(--accent-deep);
  font-weight: 800;
}

.directory-controls {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.chip-row {
  margin-bottom: 1rem;
}

.filter-chip {
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.72);
  color: var(--muted);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.filter-chip.is-active {
  background: rgba(166, 67, 42, 0.12);
  border-color: rgba(166, 67, 42, 0.24);
  color: var(--accent-deep);
}

.results-copy {
  margin-bottom: 0.5rem;
  font-size: 0.98rem;
}

.empty-state {
  margin-top: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 241, 0.88);
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-hero--compact {
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent-deep);
  font-weight: 700;
}

.back-link::before {
  content: "\2190";
}

.recipe-detail {
  display: grid;
  gap: 1.25rem;
}

.recipe-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
  padding: 1.7rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 246, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.recipe-hero__copy {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.recipe-hero__media {
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 10px);
  min-height: 20rem;
  background: linear-gradient(140deg, rgba(250, 224, 198, 0.9), rgba(87, 99, 71, 0.18));
}

.recipe-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.detail-stats small {
  display: block;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.byline {
  color: var(--muted);
  font-weight: 600;
}

.recipe-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.78fr);
  gap: 1.15rem;
  align-items: start;
}

.recipe-sheet,
.recipe-sidebar {
  display: grid;
  gap: 1rem;
}

.recipe-sidebar {
  position: sticky;
  top: 1rem;
}

.paper-panel {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 251, 245, 0.88);
}

.prose p + p {
  margin-top: 1rem;
}

.note-list,
.ingredient-list,
.method-list {
  margin: 0;
  padding: 0;
}

.note-list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.note-list li {
  padding-left: 1rem;
  border-left: 3px solid rgba(166, 67, 42, 0.2);
}

.ingredient-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.ingredient-list li {
  position: relative;
  padding-left: 1.4rem;
}

.ingredient-list li::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 0;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--accent);
}

.method-list {
  counter-reset: method-steps;
  list-style: none;
  display: grid;
  gap: 0.95rem;
}

.method-list li {
  position: relative;
  padding-left: 3rem;
}

.method-list li::before {
  counter-increment: method-steps;
  content: counter(method-steps);
  position: absolute;
  top: -0.05rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(87, 99, 71, 0.12);
  color: var(--olive);
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 252, 247, 0.78);
  box-shadow: var(--shadow-soft);
}

.footer-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent-deep);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 650ms ease,
    transform 650ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 1040px) {
  .hero-panel,
  .recipe-hero,
  .recipe-layout {
    grid-template-columns: 1fr;
  }

  .recipe-sidebar {
    position: static;
  }

  .recipe-grid,
  .category-grid,
  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    width: min(100%, calc(100% - 1.2rem));
    border-radius: 28px;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-main {
    width: min(100%, calc(100% - 1.2rem));
    margin-bottom: 2.5rem;
  }

  .hero-panel,
  .page-hero,
  .section-block,
  .directory-panel,
  .recipe-hero,
  .paper-panel {
    padding: 1.2rem;
    border-radius: 28px;
  }

  .stat-ribbon,
  .detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-grid,
  .category-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel h1,
  .page-hero h1,
  .recipe-detail h1 {
    font-size: clamp(2.15rem, 11vw, 3.25rem);
  }

  .brand-copy small {
    display: none;
  }

  .directory-controls {
    align-items: stretch;
  }

  .search-field,
  .search-field--wide,
  .button {
    width: 100%;
  }
}
