/* Recipes & Cooking — shared stylesheet.
   P1: base tokens, typography, nav, section cards.
   P2: recipe component set (meta strip, ingredient checklist, method
       steps, boxes), small-screen and print behaviour.
   One accent color, warm neutral palette, system font stack, readable
   measure. No frameworks, no external assets. */

:root {
  --bg: #faf7f1;
  --card: #ffffff;
  --ink: #2b2622;
  --muted: #6f665c;
  --line: #e5ded3;
  --accent: #b3562e;
  --accent-ink: #8a3f20;
}

* { box-sizing: border-box; }

html {
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

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

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 650;
}

h1 { font-size: 1.9rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.35rem; margin: 1.75rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }

p { margin: 0 0 1rem; max-width: 65ch; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

/* ---- Site nav ---- */

.site-nav {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.site-nav .nav-bar {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.site-nav .brand {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-right: 0.5rem;
}

.site-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem 0.875rem;
}

.site-nav nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.125rem 0;
}

.site-nav nav a:hover { color: var(--accent); }

.site-nav nav a[aria-current="page"] {
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ---- Intro / section header pattern ---- */

.lede {
  font-size: 1.05rem;
  color: var(--muted);
}

/* ---- Section cards (home page) ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--ink);
  text-decoration: none;
}

.card:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.card h3 {
  margin: 0 0 0.375rem;
  font-size: 1.05rem;
  color: var(--accent-ink);
}

.card p {
  margin: 0;
  font-size: 0.925rem;
  color: var(--muted);
}

/* ---- Back-link ---- */

.back-link {
  display: inline-block;
  margin: 0 0 1.25rem;
  font-size: 0.925rem;
}

/* ---- Ingredient amounts (recipe pages) ----
   Metric primary, imperial in .alt inside:
   <span class="amt">15 ml <span class="alt">(1 tbsp)</span></span>
   .alt is the hook a future metric⇄imperial toggle would switch. */
.amt { white-space: nowrap; }
.amt .alt { color: var(--muted); }

/* ---- Recipe page components (P2) ---- */

/* Recipe head: native-script name above or inside the title, one-line
   description in .recipe-desc. Plain typography, nothing extra. */
.recipe-title .native {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.recipe-desc { max-width: 65ch; font-size: 1.05rem; color: var(--muted); }

/* (a) Meta strip: Origin · Difficulty · Servings · Prep · Cook · Total.
   A definition-list band. Auto-fit keeps it to one row on wide screens
   and wraps 2-up at narrow widths without horizontal overflow. */
.meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.625rem 1.25rem;
  margin: 1.25rem 0 1.75rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-strip > div { min-width: 0; }
.meta-strip dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.meta-strip dd {
  margin: 0.125rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* (b) Ingredients as a checklist: empty squares, generous spacing. */
.ingredients {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.ingredients li {
  position: relative;
  padding-left: 1.875rem;
  margin-bottom: 0.5rem;
}
.ingredients li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.42em;
  width: 0.8rem;
  height: 0.8rem;
  border: 1.5px solid var(--muted);
  border-radius: 2px;
  background: var(--card);
}

/* (c) Method: numbered steps, one action each, comfortable line-height. */
.method {
  padding-left: 1.5rem;
  line-height: 1.7;
}
.method li { margin-bottom: 0.75rem; padding-left: 0.25rem; }
.method li::marker {
  color: var(--accent-ink);
  font-weight: 650;
  padding-right: 0.375rem;
}

/* (d) Box: Common failures, Variations & substitutions, Technique notes.
   One accent rule on the left edge keeps it distinct from .card. */
.box {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 0.875rem 1.125rem;
  margin: 1.5rem 0;
}
.box h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.box > *:last-child { margin-bottom: 0; }
.box ul, .box ol { margin: 0.375rem 0 0; padding-left: 1.25rem; }
.box li { margin-bottom: 0.375rem; }

/* .coming-soon: links to a recipe/article that P3+ will build (P1
   convention). Muted, dashed underline, until it resolves. */
a.coming-soon {
  color: var(--muted);
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
}

/* Equipment: a small list — kept inline so it stays light. */
.equipment { font-size: 0.95rem; }

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

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---- Small screens (down to 360 px) ---- */

/* The layout is single-column everywhere; nothing here may introduce a
   fixed width. */
@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  .cards { grid-template-columns: 1fr; }
  .meta-strip { gap: 0.5rem 1rem; }
}

/* ---- Print: hide navigation chrome, keep content clean ---- */

@media print {
  .site-nav, .site-footer, .back-link { display: none; }
  body { background: #fff; }
  a { color: var(--ink); text-decoration: none; }
  .box { border-radius: 0; break-inside: avoid; }
  .method li, .ingredients li { break-inside: avoid; }
  .amt .alt { color: var(--ink); }
}

