/* Jorgensen Family Recipes. Self-contained: system fonts, no external
   requests, so the CSP in _headers allows nothing but this origin. */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #26221e;
  --ink-2: #6a625a;
  --line: #e7e0d6;
  --accent: #9b3d24;
  --accent-soft: #f4e6df;
  --header: #1d1b19;
  --radius: 10px;
  --wrap: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header / footer */
.site-header { background: var(--header); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand span { font-family: Georgia, serif; font-size: 1.15rem; letter-spacing: .02em; }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: #fff; text-decoration: none; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.site-header nav a:hover, .site-header nav a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 30rem) { .brand span { display: none; } }

main { padding-top: 2rem; padding-bottom: 4rem; }
.site-footer { background: var(--header); color: #cfc8bf; font-size: .875rem; }
.site-footer p { margin: 0; padding: 1.5rem 0; }

/* Home */
.hero { max-width: 46rem; }
.lede p { color: var(--ink-2); font-size: 1.05rem; }
.sub { color: var(--ink-2); font-family: inherit; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* Search */
.search { margin: 2rem 0 0; max-width: 34rem; }
.search label { display: block; font-weight: 600; margin-bottom: .35rem; }
.search input {
  width: 100%; font: inherit; padding: .7rem .9rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.count { color: var(--ink-2); font-size: .9rem; margin: .4rem 0 0; }

/* Cards */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.card a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card a:hover, .card a:focus-visible { box-shadow: 0 6px 20px rgba(38, 34, 30, .12); transform: translateY(-2px); }
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--accent-soft); }
.no-photo { display: block; }
.card-title { display: block; padding: .8rem 1rem 0; font-family: Georgia, serif; font-size: 1.1rem; line-height: 1.3; }
.card-meta { display: block; padding: .3rem 1rem 1rem; color: var(--ink-2); font-size: .85rem; }

/* Chips */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a, .tags a {
  display: inline-block; padding: .35rem .8rem; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem;
}
.chips a:hover, .tags a:hover { border-color: var(--accent); color: var(--accent); }
.chips span { color: var(--ink-2); font-size: .8rem; margin-left: .15rem; }

/* Recipe page */
.crumbs { font-size: .9rem; margin-bottom: 1rem; }
.crumbs a::before { content: "\2190\00a0"; }
.recipe-head { max-width: 48rem; }
.recipe-meta { color: var(--ink-2); margin: 0 0 .75rem; }
.recipe-meta span + span::before { content: "\00b7"; margin: 0 .5rem; }
.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags a { font-size: .8rem; padding: .25rem .65rem; }
.print {
  font: inherit; font-size: .9rem; padding: .45rem 1rem; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #fff; border: 0;
}
.hero-photo { margin: 1.5rem 0; }
.photo { width: 100%; max-height: 32rem; object-fit: cover; border-radius: var(--radius); }
.intro { max-width: 48rem; }
.recipe-body { display: grid; gap: 2rem; }
@media (min-width: 52rem) {
  .recipe-body { grid-template-columns: minmax(16rem, 1fr) 2fr; align-items: start; }
  .ingredients { position: sticky; top: 1rem; }
}
.ingredients, .method, .notes { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.5rem 1rem; }
.ingredients h2, .method h2, .notes h2 { margin-top: 1.25rem; }
.ingredients ul { padding-left: 1.1rem; }
.ingredients li { margin: .35rem 0; }
.method ol { padding-left: 1.4rem; }
.method li { margin: .75rem 0; padding-left: .25rem; }
.method li::marker { color: var(--accent); font-weight: 700; }
.notes { margin-top: 2rem; max-width: 48rem; }

/* Print: just the recipe */
@media print {
  .site-header, .site-footer, .crumbs, .tags, .print, .skip { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  main { padding: 0; }
  .hero-photo { display: none; }
  .ingredients, .method, .notes { border: 0; padding: 0; }
  .recipe-body { display: block; }
  .ingredients { position: static; }
  a { color: inherit; text-decoration: none; }
}
