/* Brand: Terracotta #C24932, Cream #FFF1D6, Warm Brown #7A3E14, Herb Green #5F9E3E (small accents), Wood Tan #B07A45. */
@font-face { font-family: 'Baloo 2'; src: url('/fonts/baloo2-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-var.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --red: #C24932; --red-dark: #A63A26; --cream: #FFF1D6; --cream-2: #FFF8EA; --brown: #7A3E14; --green: #5F9E3E; --tan: #B07A45;
  --ink: #4A2A12;
  --head: 'Baloo 2', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.08; color: var(--brown); margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h3 { font-size: 1.35rem; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brown); color: var(--cream); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; }

/* Header */
.site-header { background: var(--cream); border-bottom: 3px solid var(--red); position: relative; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.wordmark { font-family: var(--head); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--brown); text-decoration: none; }
.wordmark-light { color: var(--cream); margin: 0 0 .3em; }
.menu summary { list-style: none; cursor: pointer; font-weight: 800; color: var(--cream); background: var(--red); padding: 8px 16px; border-radius: 999px; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 16px; left: 16px; top: 62px; background: var(--cream-2); border: 2px solid var(--tan); border-radius: var(--r); padding: 8px; box-shadow: 0 12px 30px rgba(122, 62, 20, .18); }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 12px 14px; color: var(--brown); font-weight: 700; text-decoration: none; border-radius: 10px; }
.menu a:hover, .menu a[aria-current] { background: var(--cream); color: var(--red-dark); }
.nav-desktop { display: none; }
.nav-desktop ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav-desktop a { display: block; padding: 8px 12px; font-size: .95rem; color: var(--brown); font-weight: 700; text-decoration: none; border-radius: 10px; }
.nav-desktop a:hover, .nav-desktop a[aria-current] { background: var(--cream-2); color: var(--red-dark); }
@media (min-width: 900px) { .menu { display: none; } .nav-desktop { display: block; } }

/* Buttons */
.btn { display: inline-block; font-family: var(--body); font-weight: 800; font-size: 1rem; padding: 13px 24px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; }
.btn-cream { background: var(--cream); color: var(--red-dark); }
.btn-cream:hover { background: #fff; }
.btn-red { background: var(--red); color: var(--cream); }
.btn-red:hover { background: var(--red-dark); }

/* Hero + page heads: cream on terracotta */
.hero, .page-head, .recipe-head { background: var(--red); color: var(--cream); }
.hero { padding: 56px 0 64px; }
.hero h1, .page-head h1, .recipe-head h1 { color: var(--cream); }
.hero h1 { font-size: clamp(2.4rem, 9vw, 4.4rem); max-width: 14ch; }
.eyebrow { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin: 0 0 12px; }
.eyebrow::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--green); margin-right: 8px; box-shadow: 0 0 0 2px var(--cream); }
.lead { font-size: 1.15rem; max-width: 44ch; margin: 0 0 24px; }
.page-head { padding: 40px 0 36px; }
.page-head h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
.page-head p { margin: 0; max-width: 52ch; }

.section { padding-top: 44px; padding-bottom: 12px; }

/* Categories */
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cats a { display: flex; flex-direction: column; justify-content: space-between; min-height: 104px; padding: 16px; border-radius: var(--r); background: var(--cream-2); border: 2px solid var(--tan); text-decoration: none; }
.cats a:hover { border-color: var(--red); }
.cat-name { font-family: var(--head); font-weight: 800; font-size: 1.3rem; line-height: 1.1; color: var(--brown); }
.cat-count { font-size: .9rem; color: var(--ink); }
@media (min-width: 900px) { .cats { grid-template-columns: repeat(4, 1fr); } }

/* Recipe cards: tall 2:3 like pins */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 24px 20px; } }
.card a { display: block; text-decoration: none; color: var(--ink); }
.card img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; border-radius: var(--r); background: var(--tan); }
.card-body { display: block; padding: 10px 2px 0; }
.card-cat { display: block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--tan); }
.card-title { display: block; font-family: var(--head); font-weight: 800; font-size: 1.2rem; line-height: 1.12; color: var(--brown); margin: 2px 0 4px; }
.card a:hover .card-title { color: var(--red-dark); }
.card-time { font-size: .9rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--brown); color: var(--cream); padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }
.empty { font-style: italic; }

/* Recipe page */
.recipe-head { padding: 24px 0 36px; }
.recipe-head h1 { font-size: clamp(2.6rem, 11vw, 5rem); max-width: 16ch; margin-top: 8px; }
.crumbs { font-size: .9rem; }
.crumbs a { color: var(--cream); }
.sample-flag { display: inline-block; background: var(--cream); color: var(--brown); font-weight: 800; font-size: .9rem; padding: 6px 14px; border-radius: 10px; margin: 14px 0 0; }
.sample-flag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; }
.sample-flag-small { margin: 0 0 12px; background: var(--cream-2); }
.facts { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: rgba(255, 241, 214, .16); border: 2px solid rgba(255, 241, 214, .5); border-radius: 12px; padding: 6px 12px; font-weight: 700; }
.facts span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; opacity: .9; }
.jump { font-size: 1.05rem; }
.recipe-layout { display: grid; gap: 24px; padding-top: 28px; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; max-width: 560px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r); }
.intro { font-size: 1.1rem; max-width: 60ch; }
@media (min-width: 900px) { .recipe-layout { grid-template-columns: 5fr 6fr; align-items: start; } }

.recipe-card { margin-top: 36px; margin-bottom: 8px; }
.recipe-card > * { }
.recipe-card { background: var(--cream-2); border: 3px solid var(--tan); border-radius: 24px; padding: 24px 16px; max-width: calc(1120px - 32px); width: calc(100% - 32px); }
@media (min-width: 700px) { .recipe-card { padding: 32px; } }
.card-brand { font-family: var(--head); font-weight: 800; color: var(--red); margin: 0; }
.recipe-card h2 { font-size: clamp(2rem, 8vw, 3rem); }
.facts-card li { background: var(--cream); border-color: var(--tan); color: var(--brown); }
.card-cols { display: grid; gap: 28px; margin-top: 20px; }
@media (min-width: 800px) { .card-cols { grid-template-columns: 2fr 3fr; } }
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--tan); }
.ingredients input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.ingredients input:checked + label { text-decoration: line-through; opacity: .6; }
.steps { padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 18px 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: var(--cream); font-family: var(--head); font-weight: 800; display: grid; place-items: center; font-size: 1.1rem; }
.tips, .nutrition { margin-top: 12px; padding: 16px; background: var(--cream); border-radius: 14px; border: 1px dashed var(--tan); }
.tips ul, .nutrition ul { margin: 0; padding-left: 20px; }
.card-url { display: none; }
.related { padding-bottom: 32px; }

/* Prose pages */
.prose { max-width: 68ch; padding-bottom: 40px; }
.prose li { margin-bottom: 8px; }

/* Footer: cream on warm brown */
.site-footer { background: var(--brown); color: var(--cream); margin-top: 48px; padding: 36px 0 24px; }
.site-footer a { color: var(--cream); }
.footer-grid { display: grid; gap: 20px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal { font-size: .85rem; opacity: .85; margin-top: 20px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }

/* Print: only the recipe card */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .skip, .recipe-head, .recipe-layout, .related, .print-btn, .sample-flag:not(.sample-flag-small) { display: none !important; }
  .recipe-card { border: 0; padding: 0; margin: 0; width: auto; max-width: none; background: #fff; }
  .recipe-card h2, h3, .card-brand { color: #000; }
  .facts-card li { background: #fff; border-color: #999; color: #000; }
  .ingredients input { display: none; }
  .ingredients li { border-color: #ccc; padding: 4px 0; }
  .steps li::before { background: #fff; color: #000; border: 1.5px solid #000; }
  .tips, .nutrition { background: #fff; border-color: #999; }
  .card-cols { grid-template-columns: 2fr 3fr; }
  .card-url { display: block; font-size: 9pt; color: #555; margin-top: 16px; }
  .steps li, .ingredients li { break-inside: avoid; }
}
