/* elements with the hidden attribute must stay hidden, even when a class sets display */
[hidden] { display: none !important; }
/* =========================================================
   Simmer & Salt — minimal, modern recipe blog
   Edit the colours and fonts in :root to re-theme the site.
   ========================================================= */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1c1b19;
  --muted: #6b6760;
  --line: #e7e2da;
  --accent: #c4532d;
  --accent-ink: #ffffff;
  --accent-soft: #f6e7e0;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .6em; display: inline-block; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted); padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 68px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav a { display: block; padding: 12px 0; font-size: 1.05rem; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--accent); }
}

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid var(--ink); cursor: pointer; font-family: inherit; transition: background .2s, color .2s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.chip { display: inline-block; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; font-weight: 500; text-decoration: none; color: var(--ink); cursor: pointer; font-family: inherit; transition: all .2s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 30em; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 5 / 4; background: var(--line); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-card { position: absolute; left: 16px; bottom: 16px; right: 16px; max-width: 360px; background: var(--surface); border-radius: var(--radius-sm); padding: 14px 18px; text-decoration: none; box-shadow: 0 10px 30px rgb(0 0 0 / .12); }
.hero-card strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; line-height: 1.25; }
.hero-card small { color: var(--muted); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-media { order: -1; } }

/* ---------- Sections ---------- */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: .95rem; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }
.bordered { border-top: 1px solid var(--line); }

/* ---------- Recipe cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(20px, 3vw, 36px) clamp(16px, 2.5vw, 28px); }
.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card-media { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--line); margin-bottom: 14px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card h3 { margin: 6px 0 6px; font-size: 1.3rem; }
.card:hover h3 { color: var(--accent); }
.card p { color: var(--muted); font-size: .95rem; margin: 0 0 8px; }
.card-meta { display: flex; gap: 14px; font-size: .85rem; color: var(--muted); }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 15px; height: 15px; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.cat { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: #fff; background: var(--ink); }
.cat img { width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: opacity .3s, transform .5s; }
.cat:hover img { opacity: .55; transform: scale(1.05); }
.cat span { position: absolute; left: 16px; bottom: 14px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.cat:hover { color: #fff; }

/* ---------- Newsletter / CTA band ---------- */
.band { background: var(--accent-soft); border-radius: var(--radius); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.band h2 { margin-bottom: .3em; }
.band p { margin: 0; color: var(--muted); }
.band-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } .band-actions { justify-content: flex-start; } }

/* ---------- Ads ----------
   Reserved space stops the page jumping when an ad loads (good for SEO). */
.ad { margin: 40px auto; text-align: center; max-width: 100%; }
.ad-label { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad ins.adsbygoogle { display: block; min-height: 120px; }
.ad-inline ins.adsbygoogle { min-height: 250px; }
.ad-sidebar ins.adsbygoogle { min-height: 250px; }
/* Hide the empty box while no ad has been served (e.g. before approval) */
.ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* ---------- Recipes index ---------- */
.page-head { padding: clamp(36px, 6vw, 64px) 0 12px; }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 36em; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 8px; }
.search { flex: 1 1 240px; max-width: 340px; margin-left: auto; position: relative; }
.search input { width: 100%; padding: 10px 16px 10px 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: .95rem; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--ink); }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--muted); }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }
@media (max-width: 640px) { .search { margin-left: 0; max-width: none; } }

/* ---------- Single recipe ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 28px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.recipe-head { padding: 20px 0 28px; }
.recipe-head h1 { margin: 8px 0 14px; }
.recipe-head .lead { font-size: 1.15rem; color: var(--muted); }
.recipe-stats { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0; }
.recipe-stats div { flex: 1 1 120px; padding: 14px 16px; border-right: 1px solid var(--line); }
.recipe-stats div:last-child { border-right: 0; }
.recipe-stats dt { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.recipe-stats dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.2rem; }
.recipe-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.recipe-hero { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); margin: 8px 0 8px; }
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.credit { font-size: .78rem; color: var(--muted); margin-bottom: 32px; }
.prose p { font-size: 1.05rem; }

.recipe-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); margin: 40px 0; scroll-margin-top: 90px; }
.recipe-card > h2 { margin-bottom: 4px; }
.recipe-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(24px, 4vw, 48px); margin-top: 24px; }
@media (max-width: 760px) { .recipe-body { grid-template-columns: 1fr; } }
.recipe-body h3 { font-size: 1.35rem; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.servings { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: .9rem; color: var(--muted); }
.servings button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink); font-family: inherit; }
.servings button:hover { border-color: var(--ink); }
.servings output { font-weight: 600; color: var(--ink); min-width: 1.5em; text-align: center; }
.ingredients { list-style: none; margin: 0; padding: 0; }
.ingredients li { border-bottom: 1px dashed var(--line); }
.ingredients label { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; cursor: pointer; }
.ingredients input { accent-color: var(--accent); width: 17px; height: 17px; flex-shrink: 0; translate: 0 3px; }
.ingredients input:checked + span { text-decoration: line-through; color: var(--muted); }
.ingredients .qty { font-weight: 600; }
.method { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.method li { counter-increment: step; position: relative; padding: 0 0 20px 48px; }
.method li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
.notes { margin-top: 12px; padding: 16px 20px; background: var(--bg); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .95rem; }
.notes strong { display: block; margin-bottom: 4px; }

/* ---------- Gallery ---------- */
.masonry { columns: 3 280px; column-gap: 18px; }
.masonry button { display: block; width: 100%; margin: 0 0 18px; padding: 0; border: 0; background: var(--line); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; break-inside: avoid; }
.masonry img { width: 100%; transition: transform .5s, opacity .3s; }
.masonry button:hover img { transform: scale(1.03); opacity: .92; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgb(20 18 16 / .88); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox p { color: #eee; text-align: center; font-size: .9rem; margin: 12px 0 0; }
.lightbox-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 1.5rem; cursor: pointer; }
.lightbox-close:hover { background: rgb(255 255 255 / .28); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding-bottom: 40px; }
.about-grid img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 12px; }
.values div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.values h3 { font-size: 1.15rem; margin-bottom: .3em; }
.values p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Legal pages ---------- */
.legal h2 { font-size: 1.5rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 48px 0 32px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-grid h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .85rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Print: just the recipe ---------- */
@media print {
  body { background: #fff; font-size: 12pt; }
  .site-header, .site-footer, .ad, .crumbs, .recipe-actions, .recipe-hero, .credit, .prose, .related, .servings button, .no-print { display: none !important; }
  .recipe-card { border: 0; padding: 0; margin: 0; }
  .ingredients input { display: none; }
  a { text-decoration: none; }
}

/* Recipe history / source credit */
.source-note { font-size: .92rem; color: var(--muted); border-left: 3px solid var(--line); padding: 2px 0 2px 14px; font-style: italic; }

/* ---------- recipe filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 16px; }
.filter-search { display: flex; margin-top: 18px; }
.filter-search .search { flex: 1 1 auto; max-width: 520px; margin: 0; }
.fsel { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b6560); }
.fsel select { font: inherit; font-size: .95rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink, #1f1b16); background: #fff; border: 1px solid var(--line, #e6e0d8); border-radius: 999px; padding: 9px 34px 9px 14px; min-width: 150px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6560' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; cursor: pointer; }
.fsel select:focus-visible { outline: 2px solid var(--accent, #b4532a); outline-offset: 2px; }
.reset { font: inherit; font-size: .9rem; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 10px 4px; color: var(--ink, #1f1b16); }
.result-count { margin: 14px 0 0; font-size: .9rem; color: var(--muted, #6b6560); }
.more-wrap { text-align: center; margin: 32px 0 8px; }
.card .diet-badge { align-self: flex-start; margin: 0 0 6px; }
.diet-badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #2f6b3f; background: #e6f1e8; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-link { display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; border: 1px solid var(--line, #e6e0d8); border-radius: 999px; text-decoration: none; color: var(--ink, #1f1b16); font-size: .92rem; background: #fff; }
.tag-link span { color: var(--muted, #6b6560); font-size: .8rem; }
.tag-link:hover { border-color: var(--ink, #1f1b16); }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0; }
.recipe-tags > span { font-weight: 600; margin-right: 4px; }
@media (max-width: 640px) { .fsel { flex: 1 1 calc(50% - 6px); } .fsel select { min-width: 0; width: 100%; } }
@media print { .recipe-tags { display: none; } }

/* ---- legal pages & privacy controls ---- */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.linkish:hover { color: var(--ink); }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; margin: 1.4em 0; }
.legal .toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
.legal .toc li { margin: 0 0 .3em; break-inside: avoid; }
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; background: var(--surface); }
.choice-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-btns .btn[hidden] { display: none !important; }
.contact-email { margin: 0 0 1em; }
.recipe-disclaimer { font-size: .85rem; color: var(--muted, #6b6b6b); margin-top: 14px; }
@media (max-width: 640px) { .legal .toc ol { columns: 1; } }
