/* ==========================================================
   Drew's Dishes — Global Design System
   Palette and tokens per design brief (drewsdishes.com)
   ========================================================== */

:root {
  /* Brand palette — from brief */
  --forest:   #1B4D3E;
  --olive:    #5A7D57;
  --gold:     #D9A95B;
  --beige:    #F5E9DC;
  --white:    #FFFFFF;
  --charcoal: #2E2E2E;

  /* Derived tints (kept minimal) */
  --forest-deep: #143B30;
  --olive-tint:  #EBF0EA;
  --gold-tint:   #F8EEDD;
  --line:        #E6E0D6;
  --muted:       #6B6B66;

  /* Type */
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;

  /* Layout */
  --max: 1160px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 6px rgba(27, 77, 62, 0.06), 0 10px 28px rgba(27, 77, 62, 0.08);
  --shadow-lift: 0 4px 10px rgba(27, 77, 62, 0.10), 0 18px 40px rgba(27, 77, 62, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--forest); }

.wrap {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--forest);
  letter-spacing: -0.01em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.6rem;
}

.lede { font-size: 1.12rem; color: var(--muted); max-width: 56ch; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-gold {
  background: var(--gold);
  color: var(--forest-deep);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(217, 169, 91, 0.45); }

.btn-outline {
  background: transparent;
  border-color: var(--forest);
  color: var(--forest);
}
.btn-outline:hover { background: var(--forest); color: #fff; }

.btn-ghost-light {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.22); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--forest);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}
.logo svg { flex: none; }

.nav { display: none; gap: 1.6rem; align-items: center; }
.nav a {
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.97rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--forest);
  border-bottom-color: var(--gold);
}
.menu-toggle {
  display: inline-flex;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  color: var(--forest);
}
@media (min-width: 820px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.5rem 0 1rem;
  border-top: 1px solid var(--line);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 500;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- Hero (home) ---------- */

.hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(90,125,87,0.55), transparent 60%),
    var(--forest);
  color: #fff;
  padding: 3.2rem 0 3.6rem;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; max-width: 17ch; }
.hero p { color: rgba(255,255,255,0.82); max-width: 52ch; font-size: 1.1rem; }

.hero-search {
  display: flex;
  gap: 0.5rem;
  margin: 1.6rem 0 1rem;
  max-width: 560px;
}
.hero-search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: var(--charcoal);
}
.hero-search input:focus-visible { outline: 3px solid var(--gold); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.chip-row .chip-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  width: 100%;
  margin-bottom: 0.1rem;
}
.chip {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.chip:hover { background: var(--gold); border-color: var(--gold); color: var(--forest-deep); }

/* ---------- Sections ---------- */

.section { padding: 3.4rem 0; }
.section-beige { background: var(--beige); }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }

/* ---------- Category tiles ---------- */

.tile-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .tile-grid { grid-template-columns: repeat(6, 1fr); } }

.tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1rem 1rem;
  text-decoration: none;
  color: var(--charcoal);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--olive); }
.tile .t-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--olive-tint);
  color: var(--forest);
  display: grid;
  place-items: center;
}
.tile strong { font-family: var(--display); font-weight: 600; color: var(--forest); font-size: 1.02rem; }
.tile span { font-size: 0.82rem; color: var(--muted); }

/* ---------- Recipe cards ---------- */

.card-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.recipe-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--charcoal);
  display: flex;
  flex-direction: column;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.recipe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.card-img {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  position: relative;
  color: rgba(255,255,255,0.92);
}
.card-img svg { opacity: 0.9; }
.card-img .ph-label {
  position: absolute;
  bottom: 0.6rem;
  left: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
/* Placeholder gradients stand in for featured photos */
.ph-smoke  { background: linear-gradient(135deg, #2E2E2E, #1B4D3E); }
.ph-viet   { background: linear-gradient(135deg, #5A7D57, #1B4D3E); }
.ph-asian  { background: linear-gradient(135deg, #7B8F5E, #3E5C45); }
.ph-italy  { background: linear-gradient(135deg, #8C5A3C, #5A4632); }
.ph-gold   { background: linear-gradient(135deg, #D9A95B, #A87A35); }

.card-body { padding: 1.05rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--olive-tint);
  color: var(--forest);
}
.tag-gold { background: var(--gold-tint); color: #8C6420; }
.recipe-card h3 { margin: 0; font-size: 1.18rem; }
.recipe-card p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.card-meta {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
}
.card-meta b { color: var(--forest); font-weight: 600; }

/* ---------- Library page: filters ---------- */

.library-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 920px) {
  .library-layout { grid-template-columns: 260px 1fr; }
}

.filters {
  background: var(--beige);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.5rem;
  position: sticky;
  top: 84px;
}
.filters h2 { font-size: 1.15rem; margin-bottom: 0.2rem; }
.filters .clear-btn {
  background: none;
  border: none;
  color: var(--olive);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.filter-search {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  margin: 0.7rem 0 0.4rem;
  background: #fff;
}
.filter-search:focus-visible { outline: 3px solid var(--gold); border-color: var(--gold); }
.filter-hint { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.6rem; }

.filter-group { margin-top: 1rem; }
.filter-group h3 {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 0.5rem;
}
.fchips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fchip {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.3rem 0.78rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
}
.fchip:hover { border-color: var(--olive); }
.fchip.active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.results-bar b { color: var(--forest); }
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  background: var(--beige);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state h3 { color: var(--forest); }

/* ---------- Single recipe page ---------- */

.recipe-hero {
  aspect-ratio: 21 / 9;
  min-height: 260px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.9);
  margin-top: 1.6rem;
}
.recipe-intro { max-width: 720px; margin: 0 auto; padding: 2.2rem 0 0.5rem; }
.recipe-intro .card-tags { margin-bottom: 0.9rem; }
.recipe-meta-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 1.4rem 0;
  padding: 1.1rem 1.2rem;
  background: var(--beige);
  border-radius: var(--radius);
}
@media (min-width: 640px) { .recipe-meta-strip { grid-template-columns: repeat(4, 1fr); } }
.recipe-meta-strip div span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
}
.recipe-meta-strip div b { font-family: var(--display); font-weight: 600; color: var(--forest); font-size: 1.05rem; }

/* WPRM-style recipe card */
.wprm-card {
  max-width: 720px;
  margin: 2rem auto;
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  overflow: hidden;
}
.wprm-card-head {
  background: var(--forest);
  color: #fff;
  padding: 1.3rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  flex-wrap: wrap;
}
.wprm-card-head h2 { color: #fff; margin: 0; font-size: 1.5rem; }
.wprm-card-head p { margin: 0.3rem 0 0; color: rgba(255,255,255,0.8); font-size: 0.92rem; }
.wprm-card-body { padding: 1.5rem; }
.wprm-cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 680px) { .wprm-cols { grid-template-columns: 5fr 7fr; } }
.wprm-card h3 {
  font-size: 1.05rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.35rem;
  margin-bottom: 0.8rem;
}
.wprm-card ul, .wprm-card ol { margin: 0; padding-left: 1.2rem; }
.wprm-card li { margin-bottom: 0.55rem; font-size: 0.97rem; }
.wprm-card ol li::marker { font-weight: 700; color: var(--olive); }
.servings-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  font-size: 0.92rem;
}
.servings-row button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--forest);
  background: #fff;
  color: var(--forest);
  font-weight: 700;
  cursor: pointer;
}
.servings-row button:hover { background: var(--forest); color: #fff; }

.notes-box {
  max-width: 720px;
  margin: 0 auto 2rem;
  background: var(--gold-tint);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.4rem;
}
.notes-box h3 { margin-top: 0; }
.notes-box ul { padding-left: 1.1rem; margin: 0; }
.notes-box li { margin-bottom: 0.5rem; font-size: 0.95rem; }

.step-images {
  max-width: 720px;
  margin: 0 auto 3rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .step-images { grid-template-columns: repeat(3, 1fr); } }
.step-images .card-img { border-radius: var(--radius-sm); aspect-ratio: 1; font-size: 0.8rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest);
  color: rgba(255,255,255,0.85);
  padding: 2.6rem 0 2rem;
  margin-top: 3rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.4rem;
  align-items: center;
}
.site-footer .logo { color: #fff; }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: var(--gold); }
.site-footer small { width: 100%; color: rgba(255,255,255,0.5); }

/* ---------- Real photo support (editable version) ---------- */
.card-img img, .recipe-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.recipe-hero { overflow: hidden; }
