/* =========================================================
   OUR RECIPE BOOK — STYLES
   Change colours in :root to give the website your own look.
   ========================================================= */

:root {
  --cream: #fbf8f2;
  --paper: #ffffff;
  --ink: #2f352d;
  --muted: #777c70;
  --green: #52664c;
  --green-dark: #344632;
  --sage: #e9eee4;
  --peach: #f4e3d7;
  --line: #e8e4db;
  --shadow: 0 12px 35px rgba(47, 53, 45, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  padding: 58px 24px 52px;
  text-align: center;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(255,255,255,.65), transparent 35%),
    linear-gradient(135deg, #e8eee2, #f5e7d9);
  border-bottom: 1px solid #e5e4d9;
}

.header-inner { max-width: 760px; margin: 0 auto; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.08;
}
h1 span { color: #a86d51; font-size: .72em; }
.subtitle { margin-bottom: 0; color: #656b5e; font-size: 1.02rem; }

.page { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.toolbar { padding: 30px 0 35px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 650px;
  margin: 0 auto 20px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(47, 53, 45, .035);
  color: var(--muted);
}
.search-box > span { font-size: 1.7rem; }
.search-box input {
  width: 100%;
  min-width: 0;
  padding: 15px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(82,102,76,.12); }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.filter {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #5e6559;
  font-size: .88rem;
  transition: background .2s, color .2s, border-color .2s;
}
.filter:hover, .filter.active { border-color: var(--green); background: var(--green); color: white; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 20px;
}
.section-heading .eyebrow { margin-bottom: 4px; }
h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -.03em;
}
.recipe-count { margin-bottom: 5px; color: var(--muted); font-size: .88rem; }

.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.recipe-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(47,53,45,.11); }
.card-art {
  display: grid;
  min-height: 160px;
  place-items: center;
  background: var(--sage);
}
.card-art span { font-size: 4.4rem; filter: drop-shadow(0 8px 6px rgba(0,0,0,.08)); }
.pasta-art { background: #f7e9c9; }
.chicken-art { background: #f2dfd2; }
.veggie-art { background: #e3eadb; }
.card-content { padding: 20px 21px 22px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .78rem; }
.category-tag { padding: 4px 9px; border-radius: 999px; background: var(--sage); color: var(--green-dark); font-weight: 700; }
.card-content h3 { margin: 13px 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; line-height: 1.2; }
.card-description { min-height: 48px; margin-bottom: 15px; color: var(--muted); font-size: .91rem; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--green); font-weight: 800; }
.text-button:hover { color: var(--green-dark); }
.text-button span { padding-left: 4px; }

.empty-state { padding: 40px 10px; text-align: center; color: var(--muted); }
.tip-box { display: flex; gap: 15px; margin: 45px 0 55px; padding: 22px; border: 1px solid #e3e7db; border-radius: 16px; background: #f0f2e9; }
.tip-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: white; color: var(--green); font-size: 1.3rem; }
.tip-box h3 { margin: 2px 0 4px; font-size: 1rem; }
.tip-box p { margin: 0; color: #656b5e; font-size: .9rem; }

.recipe-dialog {
  position: relative;
  width: min(720px, calc(100% - 28px));
  max-width: none;
  max-height: min(88vh, 900px);
  padding: 36px;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 25px 90px rgba(0,0,0,.25);
}
.recipe-dialog::backdrop { background: rgba(28, 34, 27, .58); backdrop-filter: blur(3px); }
.close-dialog { position: sticky; top: 0; float: right; display: grid; width: 38px; height: 38px; margin: -18px -18px 0 12px; place-items: center; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); font-size: 1.7rem; line-height: 1; }
.detail-category { color: var(--green); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.recipe-dialog h2 { margin: 8px 0 12px; font-size: clamp(2rem, 5vw, 2.8rem); }
.detail-intro { color: var(--muted); }
.detail-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.detail-stats span { padding: 7px 11px; border-radius: 9px; background: var(--sage); font-size: .86rem; }
.detail-columns { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; }
.recipe-dialog h3 { margin-bottom: 10px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; }
.ingredient-list { padding-left: 20px; }
.ingredient-list li { padding: 3px 0; }
.method-list { padding-left: 22px; }
.method-list li { padding: 0 0 12px 4px; }
.site-footer { padding: 24px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .86rem; }
.site-footer span { color: #a86d51; }

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

@media (max-width: 850px) {
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-art { min-height: 145px; }
}
@media (max-width: 560px) {
  .site-header { padding: 43px 18px 38px; }
  .page { width: min(100% - 28px, 1120px); }
  .recipe-grid { grid-template-columns: 1fr; gap: 15px; }
  .card-art { min-height: 135px; }
  .card-description { min-height: 0; }
  .section-heading { align-items: start; }
  .recipe-dialog { padding: 27px 22px; }
  .detail-columns { grid-template-columns: 1fr; gap: 18px; }
  .close-dialog { margin: -12px -10px 0 8px; }
}
