:root {
  --bg: #FAF5EB;
  --card: #FFFFFF;
  --ink: #33201A;
  --muted: #7A6A5F;
  --accent: #C0492B;
  --accent-soft: #F3E1D8;
  --saffron: #E39B2D;
  --green: #4C7A4F;
  --dark: #2E1A14;
  --line: #EADFCF;
  --shadow: 0 2px 10px rgba(51,32,26,.08);
  --shadow-lift: 0 10px 28px rgba(51,32,26,.16);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
h1,h2,h3,h4 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,245,235,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 24px;
}
.brand { font-family: Georgia, serif; font-size: 21px; font-style: italic; font-weight: 700; color: var(--dark); white-space: nowrap; }
.brand .flame { font-style: normal; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { font-size: 14.5px; font-weight: 600; color: var(--muted); padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--accent); border-bottom-color: var(--saffron); }
.saved-link { font-size: 13.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 560px;
  background: url("../assets/hero.jpg") center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,26,20,.62) 0%, rgba(46,26,20,.48) 55%, rgba(46,26,20,.78) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 780px; padding: 70px 20px; color: #fff; }
.hero .kicker { letter-spacing: .22em; text-transform: uppercase; font-size: 13px; font-weight: 700; color: var(--saffron); margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); font-style: italic; margin-bottom: 16px; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero p.sub { font-size: 18px; color: #F3E9DC; max-width: 620px; margin: 0 auto 30px; }
.hero-search {
  display: flex; gap: 0; max-width: 560px; margin: 0 auto 34px;
  background: #fff; border-radius: 999px; padding: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
}
.hero-search input {
  flex: 1; border: 0; outline: 0; padding: 12px 18px; font-size: 15.5px;
  border-radius: 999px; background: transparent; color: var(--ink); min-width: 0;
}
.hero-search button {
  border: 0; cursor: pointer; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 15px; padding: 12px 26px; border-radius: 999px;
}
.hero-search button:hover { background: #a53a20; }
.hero-stats { display: flex; gap: 36px; justify-content: center; flex-wrap: wrap; }
.hero-stats div { color: #F3E9DC; font-size: 14px; }
.hero-stats b { display: block; font-family: Georgia, serif; font-size: 30px; color: #fff; }

/* ---------- Sections ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: 56px 20px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: 34px; font-style: italic; }
.section-head p { color: var(--muted); margin-top: 8px; }
.rule { width: 64px; height: 4px; border-radius: 4px; background: var(--saffron); margin: 14px auto 0; }

/* ---------- Cuisine cards ---------- */
.cuisine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.cuisine-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 14px; text-align: center; transition: .2s;
  box-shadow: var(--shadow);
}
.cuisine-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--saffron); }
.cuisine-card .emoji { font-size: 34px; }
.cuisine-card h3 { font-size: 17px; margin: 8px 0 2px; }
.cuisine-card span { color: var(--muted); font-size: 13px; }

/* ---------- Filter bar ---------- */
.filterbar {
  position: sticky; top: 61px; z-index: 40;
  background: rgba(250,245,235,.96); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 26px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.filterbar input[type=search] {
  flex: 1; min-width: 180px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 10px 16px; font-size: 14.5px; outline: none;
}
.filterbar input[type=search]:focus { border-color: var(--saffron); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--saffron); color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filterbar select {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--ink); outline: none; cursor: pointer;
}
.result-count { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.result-count b { color: var(--ink); }

/* ---------- Recipe grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow); transition: .22s; display: block;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.card-img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--accent-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.05); }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(46,26,20,.85); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; padding: 4px 11px; border-radius: 999px;
}
.badge-cat {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(255,255,255,.92); color: var(--dark); font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 17.5px; margin-bottom: 6px; }
.card-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.diff { font-weight: 700; }
.diff.Easy { color: var(--green); }
.diff.Medium { color: var(--saffron); }
.diff.Advanced { color: var(--accent); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big { font-size: 44px; margin-bottom: 10px; }

/* ---------- Recipe page ---------- */
.recipe-hero { position: relative; height: 430px; background: var(--accent-soft); }
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.crumb { max-width: 980px; margin: 0 auto; padding: 18px 20px 0; font-size: 13.5px; color: var(--muted); }
.crumb a { color: var(--accent); font-weight: 600; }
.recipe-head { max-width: 980px; margin: 0 auto; padding: 20px 20px 0; }
.recipe-head h1 { font-size: clamp(30px, 4.6vw, 44px); font-style: italic; }
.recipe-head .desc { color: var(--muted); font-size: 16.5px; margin-top: 10px; max-width: 820px; }
.meta-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 8px; }
.mchip {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow);
}
.mchip b { color: var(--accent); }
.fav-row { margin: 14px 0 6px; }
.fav-btn {
  border: 1.5px solid var(--accent); background: #fff; color: var(--accent);
  border-radius: 999px; padding: 9px 20px; font-size: 14px; font-weight: 700; cursor: pointer; transition: .15s;
}
.fav-btn.on { background: var(--accent); color: #fff; }
.fav-btn:hover { transform: translateY(-1px); }
.recipe-cols {
  max-width: 980px; margin: 30px auto 0; padding: 0 20px 60px;
  display: grid; grid-template-columns: 320px 1fr; gap: 34px; align-items: start;
}
.ing-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 22px; position: sticky; top: 84px;
}
.ing-card h2, .steps h2 { font-size: 22px; margin-bottom: 14px; }
.ing-card ul { list-style: none; }
.ing-card li {
  padding: 8px 0 8px 24px; position: relative; font-size: 14.5px;
  border-bottom: 1px dashed var(--line);
}
.ing-card li:last-child { border-bottom: 0; }
.ing-card li::before {
  content: ""; position: absolute; left: 2px; top: 15px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--saffron);
}
.steps ol { list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; padding: 0 0 20px 52px; font-size: 15.5px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif;
}
.steps li + li::before { top: 2px; }
.tagrow { margin: 8px 0 26px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 12.5px; font-weight: 700; padding: 5px 13px; }
.related { max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }
.pn-nav { max-width: 980px; margin: 0 auto; padding: 0 20px 56px; display: flex; gap: 16px; }
.pn-nav a {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow); transition: .2s; font-size: 14.5px;
}
.pn-nav a:hover { border-color: var(--saffron); transform: translateY(-2px); }
.pn-nav span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.pn-nav .next { text-align: right; }

/* ---------- About / Contact ---------- */
.page { max-width: 860px; margin: 0 auto; padding: 56px 20px 70px; }
.page h1 { font-size: 40px; font-style: italic; margin-bottom: 20px; }
.page p { margin-bottom: 16px; font-size: 16px; }
.page img { border-radius: 18px; width: 100%; max-height: 420px; object-fit: cover; margin: 24px 0; box-shadow: var(--shadow); }
.quote {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0; padding: 20px 24px; margin: 24px 0;
  font-family: Georgia, serif; font-style: italic; font-size: 17px; color: var(--dark);
}
.contact-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px; margin-top: 10px; box-shadow: var(--shadow);
}
.contact-box li { list-style: none; padding: 7px 0; font-size: 15px; }

/* ---------- Footer ---------- */
footer { background: var(--dark); color: #D9C8BC; margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 46px 20px 30px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
footer h4 { color: #fff; font-size: 17px; margin-bottom: 12px; }
footer p, footer a { font-size: 13.5px; color: #C9B6A9; }
footer a { display: block; padding: 3px 0; }
footer a:hover { color: var(--saffron); }
.footer-brand { font-family: Georgia, serif; font-style: italic; font-size: 20px; color: #fff; margin-bottom: 10px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px; font-size: 12.5px; color: #A98F80; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .recipe-cols { grid-template-columns: 1fr; }
  .ing-card { position: static; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .nav { display: none; }
  .recipe-hero { height: 320px; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .filterbar, .pn-nav, .related, footer, .fav-row, .crumb { display: none !important; }
  .recipe-hero { height: auto; }
  .recipe-hero img { height: 260px; }
  body { background: #fff; }
  .steps li::before { background: #fff; border: 1.5px solid var(--ink); color: var(--ink); }
}
