:root {
  --paper: #f5ead6;
  --paper-soft: #fbf5ea;
  --paper-deep: #e8d8b8;
  --ink: #27402f;
  --ink-soft: #5a4e3e;
  --accent: #bc6436;
  --accent-deep: #924721;
  --gold: #b89a5d;
  --line: rgba(184, 154, 93, 0.45);
  --shadow: 0 20px 55px rgba(80, 55, 23, 0.12);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Inter", system-ui, sans-serif;
  background: linear-gradient(180deg, #f8f1e3 0%, #efe1c5 100%);
}
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.9) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 30%, rgba(255,255,255,0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 35% 75%, rgba(0,0,0,0.03) 0 1px, transparent 1px);
  background-size: 18px 18px, 24px 24px, 22px 22px;
}

.site-shell {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero-frame,
.controls-panel,
.recipe-card,
.recipe-sheet,
.empty-state {
  position: relative;
  background: linear-gradient(180deg, rgba(251,245,234,0.97), rgba(245,234,214,0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-frame {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 2rem;
  padding: 2.2rem;
  margin-bottom: 2rem;
}

.hero-frame::before,
.recipe-sheet::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(184, 154, 93, 0.28);
  border-radius: calc(var(--radius) - 10px);
  pointer-events: none;
}

.hero-copy,
.hero-aside,
.botanical-block,
.recipe-card-body,
.recipe-notes-panel {
  position: relative;
  z-index: 1;
}

.ornament,
.section-ornament,
.botanical-mark {
  color: var(--gold);
  letter-spacing: 0.35em;
}

.eyebrow,
.section-label,
.recipe-overline {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.hero h1,
.section-heading h2,
.recipe-card h3,
.recipe-sheet h2,
.recipe-section-title,
.empty-state h3,
.hero-side-title {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.95;
  margin: 0.75rem 0 1rem;
}

.hero-text {
  max-width: 52rem;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button,
.back-link,
.category-chip {
  border-radius: 999px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button,
.back-link {
  padding: 0.9rem 1.35rem;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.back-link:hover,
.category-chip:hover { transform: translateY(-1px); }
.button.primary {
  background: var(--ink);
  color: #fff9ef;
}
.button.secondary,
.back-link {
  background: transparent;
  border: 1px solid rgba(39,64,47,0.18);
  color: var(--ink);
}

.hero-aside {
  display: flex;
  align-items: center;
}

.botanical-block {
  padding: 1.8rem;
  border: 1px solid rgba(184, 154, 93, 0.25);
  border-radius: 22px;
  background: rgba(255,255,255,0.35);
}

.hero-side-title {
  font-size: 2rem;
  margin: 0.4rem 0 0.75rem;
}

.controls-panel {
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-size: clamp(2.3rem, 4vw, 3.4rem);
}

.search-block {
  margin: 0 auto 1.25rem;
  width: min(640px, 100%);
}

.search-block input {
  width: 100%;
  border: 1px solid rgba(39,64,47,0.14);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.72);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.category-chip {
  border: 1px solid rgba(184,154,93,0.4);
  background: rgba(255,251,240,0.92);
  color: var(--ink);
  padding: 0.72rem 1rem;
  cursor: pointer;
}

.category-chip.active {
  background: var(--accent-deep);
  color: #fffaf0;
}

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

.recipe-card {
  overflow: hidden;
  cursor: pointer;
}

.recipe-card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.recipe-card-plate {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 260px;
  padding: 1.5rem 1.5rem 0.5rem;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.6) 0 20%, rgba(232,216,184,0.24) 20% 52%, transparent 52%),
    linear-gradient(180deg, rgba(255,248,238,0.75), transparent);
}

.recipe-card-plate img {
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(90, 60, 18, 0.22));
}

.recipe-card-body {
  padding: 0.6rem 1.4rem 1.8rem;
}

.recipe-card h3 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

.recipe-card .subtitle {
  text-align: center;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.recipe-card p {
  line-height: 1.75;
}

.recipe-meta,
.recipe-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
  font-size: 0.95rem;
}

.recipe-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.recipe-tag {
  background: rgba(188,100,54,0.12);
  color: var(--accent-deep);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.empty-state,
.recipe-detail {
  margin-top: 2rem;
}

.empty-state { padding: 3rem; text-align: center; }
.recipe-detail.hidden,
.empty-state.hidden { display: none; }

.recipe-sheet {
  padding: 2.1rem;
}

.recipe-sheet-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.recipe-sheet h2 {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 0.92;
}

.detail-subtitle {
  margin-top: 0.4rem;
  color: var(--accent);
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.recipe-description,
.recipe-notes {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  line-height: 1.45;
}

.recipe-illustration {
  margin: 1rem 0 1.25rem;
  color: var(--accent-deep);
  font-style: italic;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
}

.recipe-hero-plate {
  min-height: 340px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.72) 0 18%, rgba(232,216,184,0.28) 18% 48%, transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
}

.recipe-hero-plate img {
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 20px 22px rgba(79, 53, 18, 0.24));
}

.recipe-content-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  margin-top: 1.3rem;
}

.recipe-section {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.recipe-section-title {
  font-size: 2.35rem;
  margin-bottom: 0.9rem;
}

.recipe-list,
.instruction-list {
  margin: 0;
  padding-left: 1.3rem;
  line-height: 1.9;
}

.recipe-notes-panel {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

@media (max-width: 980px) {
  .hero-frame,
  .recipe-sheet-top,
  .recipe-content-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 1rem, 1080px);
    padding-top: 1rem;
  }

  .hero-frame,
  .controls-panel,
  .recipe-sheet,
  .empty-state {
    padding: 1.3rem;
  }

  .recipes-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .recipe-sheet h2 {
    font-size: 3.2rem;
  }

  .recipe-description,
  .recipe-notes {
    font-size: 1.28rem;
  }

  .recipe-card h3 {
    font-size: 2rem;
  }
}
