:root {
  --bg-cream: #f8f3eb;
  --bg-paper: #fffdf9;
  --bg-sand: #efe6d8;
  --ink-dark: #2f241d;
  --ink-muted: #6b584c;
  --accent-terracotta: #9c5236;
  --accent-terracotta-dark: #7d3e26;
  --accent-olive: #5e6b4d;
  --border-warm: #dfd2c0;
  --shadow-soft: 0 10px 30px rgba(47, 36, 29, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Heebo', sans-serif;
  background-color: var(--bg-cream);
  color: var(--ink-dark);
  line-height: 1.65;
  background-image: radial-gradient(#e6dac8 0.75px, transparent 0.75px);
  background-size: 22px 22px;
}

html[lang="en"] body {
  font-family: 'Heebo', sans-serif;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] .subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

h1, h2, h3, .serif {
  font-family: 'Frank Ruhl Libre', serif;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top bar & language switcher */
.top-bar {
  background: #2f241d;
  color: #f6ede2;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 900;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.lang-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
  background: transparent;
  color: #e8dac8;
  border: none;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--accent-terracotta);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fdf8f0;
  padding: 76px 0 68px;
  text-align: center;
  border-bottom: 4px solid var(--accent-terracotta);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58, 40, 28, 0.9) 0%, rgba(92, 62, 42, 0.86) 55%, rgba(125, 78, 49, 0.84) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.botanical-badge {
  display: inline-block;
  background: rgba(255, 253, 249, 0.14);
  border: 1px solid rgba(255, 253, 249, 0.32);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero .subtitle {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  color: #f3dcc4;
  margin-bottom: 14px;
}

.hero-desc {
  max-width: 660px;
  margin: 0 auto 28px;
  color: #efe2d3;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-terracotta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-terracotta-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 253, 249, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 253, 249, 0.45);
}

.btn-secondary:hover {
  background: rgba(255, 253, 249, 0.25);
}

/* Controls */
.main-section {
  padding: 44px 24px 72px;
}

.controls-bar {
  background: var(--bg-paper);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-box input {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-warm);
  background: var(--bg-cream);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink-dark);
}

.search-box input:focus {
  outline: 2px solid var(--accent-terracotta);
  background: #fff;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: var(--bg-sand);
  color: var(--ink-dark);
  border: 1px solid var(--border-warm);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.pill:hover {
  border-color: var(--accent-terracotta);
}

.pill.active {
  background: var(--accent-olive);
  color: #fff;
  border-color: var(--accent-olive);
}

/* Grid & Image Cards */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  gap: 26px;
}

.recipe-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(47, 36, 29, 0.14);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  height: 225px;
  overflow: hidden;
  background: var(--bg-sand);
  cursor: pointer;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.recipe-card:hover .card-image-wrap img {
  transform: scale(1.04);
}

.card-tag-float {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2f241d;
  background: rgba(255, 253, 249, 0.93);
  border: 1px solid var(--border-warm);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.recipe-card h3 {
  font-size: 1.55rem;
  color: var(--ink-dark);
  margin-bottom: 8px;
  line-height: 1.25;
}

.recipe-card p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  border-top: 1px dashed var(--border-warm);
  padding-top: 14px;
  margin-bottom: 16px;
}

.card-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-md);
  background: var(--bg-sand);
  color: var(--ink-dark);
  font-weight: 600;
  border: 1px solid var(--border-warm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
  transition: all 0.2s ease;
}

.card-btn:hover {
  background: var(--accent-terracotta);
  color: #fff;
  border-color: var(--accent-terracotta);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 24, 18, 0.68);
  backdrop-filter: blur(3px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-paper);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  z-index: 1001;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: sticky;
  top: 0;
  float: inline-end;
  background: var(--bg-sand);
  border: 1px solid var(--border-warm);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink-dark);
  z-index: 5;
}

.modal-hero-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-warm);
  margin-bottom: 20px;
}

.modal-header {
  border-bottom: 2px solid var(--border-warm);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.card-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-olive);
  background: #eef2e8;
  padding: 4px 12px;
  border-radius: 999px;
}

.modal-header h2 {
  font-size: 2.1rem;
  margin: 8px 0 6px;
}

.modal-subtitle {
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.recipe-section {
  margin-bottom: 28px;
  background: var(--bg-cream);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 22px;
}

.recipe-section h4 {
  font-size: 1.35rem;
  color: var(--accent-terracotta-dark);
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-warm);
  padding-bottom: 6px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 24px;
}

@media (max-width: 720px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .modal-dialog {
    padding: 22px;
  }
}

.ing-list {
  list-style: none;
}

.ing-list li {
  padding: 6px 0;
  border-bottom: 1px dotted var(--border-warm);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ing-list input[type="checkbox"] {
  margin-top: 5px;
  accent-color: var(--accent-olive);
}

.steps-list {
  padding-inline-start: 22px;
}

.steps-list li {
  margin-bottom: 10px;
}

.site-footer {
  background: #2f241d;
  color: #e6d8c7;
  text-align: center;
  padding: 32px 20px;
  border-top: 4px solid var(--accent-terracotta);
}

.footer-note {
  font-size: 0.9rem;
  color: #b8a594;
  margin-top: 6px;
}

@media print {
  .top-bar, .controls-bar, .hero-actions, .card-btn, .modal {
    display: none !important;
  }
}
