/* Johnell Family Recipes — photography-forward cookbook design.
   Mobile-first; system fonts only; light + dark; print-friendly. */

:root {
  --paper: #f8f3e9;
  --paper-2: #f1e9d8;
  --card: #fffdf7;
  --ink: #2b2118;
  --ink-soft: #71614f;
  --accent: #a8451f;
  --accent-soft: #c4552d;
  --olive: #5f6b3c;
  --rule: #ddd0b8;
  --shadow: 0 1px 2px rgb(43 33 24 / 0.08), 0 6px 24px -12px rgb(43 33 24 / 0.25);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1613;
    --paper-2: #251e18;
    --card: #241d17;
    --ink: #ece2d0;
    --ink-soft: #b5a58e;
    --accent: #e0764a;
    --accent-soft: #e0764a;
    --olive: #a3b06a;
    --rule: #3f342a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 28px -12px rgb(0 0 0 / 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-soft); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip {
  position: absolute; left: -999px; top: 0; z-index: 99;
  background: var(--card); padding: 0.5rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- chrome ---------- */
.site-head {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.site-head nav {
  max-width: 1100px; margin: 0 auto; padding: 0.65rem 1rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  font-family: var(--sans); font-size: 0.82rem;
}
.brand {
  font-family: var(--serif); font-size: 1rem; font-weight: 700;
  text-decoration: none; color: var(--ink); letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: 1rem; white-space: nowrap; }
.nav-links a {
  text-decoration: none; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
}
.nav-links a:hover { color: var(--accent); }

main { display: block; }

.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: 4rem; padding: 2rem 1rem 3rem;
  text-align: center; color: var(--ink-soft);
  font-size: 0.92rem;
}
.site-foot .colophon { font-style: italic; max-width: 44ch; margin: 0 auto 0.75rem; }
.foot-links a { color: var(--ink-soft); }

/* ---------- photo credits ---------- */
.photo-credit, .photo-credit a { color: var(--ink-soft); }
.photo-credit {
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.02em;
}
.hero-credit {
  position: absolute; right: 0.75rem; bottom: 0.5rem;
  color: rgb(255 255 255 / 0.85); text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
}
.hero-credit a { color: rgb(255 255 255 / 0.85); }

/* ---------- home ---------- */
.hero { position: relative; }
.hero-img {
  width: 100%; height: min(72vh, 620px); object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(20 12 6 / 0.25) 0%, rgb(20 12 6 / 0) 35%, rgb(20 12 6 / 0.72) 100%);
  pointer-events: none;
}
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 1.5rem; z-index: 1;
  text-align: center; color: #fff; padding: 0 1rem;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.55);
}
.hero-kicker, .kicker {
  font-family: var(--sans); text-transform: uppercase;
  letter-spacing: 0.32em; font-size: 0.78rem; margin: 0 0 0.25rem;
}
.hero-text h1 {
  font-size: clamp(3rem, 10vw, 5.5rem); line-height: 1;
  margin: 0; font-weight: 700; letter-spacing: 0.01em;
}
.hero-tagline { font-style: italic; font-size: clamp(1.05rem, 3vw, 1.35rem); margin: 0.5rem 0 0; }
.hero-date {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.22em;
  text-transform: uppercase; margin: 0.4rem 0 0; opacity: 0.85;
}

.home-intro { max-width: 620px; margin: 2.25rem auto 0; padding: 0 1rem; text-align: center; }
.home-intro p:first-child { font-size: 1.1rem; font-style: italic; color: var(--ink-soft); }
#filter {
  width: 100%; max-width: 420px;
  font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.6rem 1.2rem; margin-top: 0.75rem;
}
#filter:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.recipe-section { max-width: 1100px; margin: 3.5rem auto 0; padding: 0 1rem; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 1.5rem; }
.section-head h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.3rem); margin: 0;
  border-top: 3px double var(--rule); padding-top: 1.25rem;
}
.section-greek { color: var(--olive); font-style: italic; margin: 0.15rem 0 0.6rem; }
.section-blurb { color: var(--ink-soft); margin: 0; }
.section-extra { text-align: center; margin: 0 0 1rem; }
.menu-link { font-style: italic; }

.cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.card:hover { transform: translateY(-2px); color: var(--ink); }
.card-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.card-title { font-size: 1.18rem; font-weight: 700; line-height: 1.25; }
.card-subtitle { font-style: italic; color: var(--ink-soft); font-size: 0.95rem; }
.card-tagline {
  color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-attr {
  margin-top: 0.35rem; font-family: var(--sans); font-size: 0.68rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
}
.card-lost { border-style: dashed; background: transparent; box-shadow: none; justify-content: center; }
.card-lost .card-tagline { font-style: italic; }
.card-lost .card-attr { color: var(--ink-soft); }
.card[hidden], .card-lost[hidden] { display: none; }

/* ---------- recipe page ---------- */
.recipe-hero { position: relative; max-width: 1100px; margin: 0 auto; }
.recipe-hero-img {
  width: 100%; height: clamp(220px, 42vh, 460px); object-fit: cover;
}
@media (min-width: 1100px) {
  .recipe-hero { margin-top: 1.25rem; }
  .recipe-hero-img { border-radius: 12px; }
}

.recipe-head { max-width: 720px; margin: 2rem auto 0; padding: 0 1rem; text-align: center; }
.kicker a { color: var(--olive); text-decoration: none; }
.recipe-head h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; margin: 0.2rem 0; }
.recipe-subtitle { font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin: 0; }
.recipe-meta {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0.9rem 0 0;
}
.recipe-meta .dot { margin: 0 0.5rem; color: var(--rule); }
.recipe-meta .attr { color: var(--accent); }
.dedication {
  font-style: italic; font-size: 1.2rem; color: var(--accent);
  margin: 1rem 0 0;
}
.dedication::before { content: "— "; }
.recipe-intro {
  color: var(--ink-soft); font-style: italic; margin: 1.1rem auto 0; max-width: 56ch;
}

.recipe-grid {
  max-width: 1100px; margin: 2.5rem auto 0; padding: 0 1rem;
  display: grid; gap: 2.5rem;
}
@media (min-width: 900px) {
  .recipe-grid { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .pane-ings { position: sticky; top: 4rem; }
}

.pane-ings {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1.25rem 1.25rem 1.5rem;
}
.pane-ings h2, .steps-toolbar h2 {
  font-size: 0.85rem; font-family: var(--sans); letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.75rem;
}
.ing-group {
  font-size: 0.78rem; font-family: var(--sans); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 1.1rem 0 0.3rem;
}
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing { border-bottom: 1px dotted var(--rule); }
.ing:last-child { border-bottom: 0; }
.ing label {
  display: flex; gap: 0.6rem; align-items: baseline;
  padding: 0.45rem 0.1rem; cursor: pointer; min-height: 44px; align-items: center;
}
.ing input {
  accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none;
  margin: 0;
}
.ing input:checked + span { text-decoration: line-through; color: var(--ink-soft); }
.reset-ings {
  margin-top: 1rem; font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.08em; color: var(--ink-soft);
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.35rem 0.9rem; cursor: pointer;
}
.reset-ings:hover { color: var(--accent); border-color: var(--accent); }

.steps-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
#wake {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em;
  color: var(--ink-soft); background: none;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.35rem 0.9rem; cursor: pointer; min-height: 34px;
}
#wake[aria-pressed="true"] { color: var(--paper); background: var(--olive); border-color: var(--olive); }

.steps { list-style: none; margin: 0.5rem 0 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; margin: 0 0 1.6rem; }
.step-body { display: flex; gap: 1rem; align-items: baseline; position: relative; }
.step-body::before {
  content: counter(step);
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; align-self: flex-start;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  transform: translateY(0.15rem);
}
.step.done .step-body::before { background: var(--olive); border-color: var(--olive); color: var(--paper); content: "✓"; }
.step.done p { color: var(--ink-soft); }
.step p { margin: 0; max-width: 62ch; }
.step-anchor {
  opacity: 0; font-family: var(--sans); text-decoration: none; font-size: 0.9rem;
  position: absolute; right: 0; top: 0.15rem; padding: 0.25rem;
}
.step:hover .step-anchor, .step-anchor:focus { opacity: 0.7; }
.step:target { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 8px; padding: 0.5rem; margin-left: -0.5rem; }
.step-group {
  font-size: 0.8rem; font-family: var(--sans); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--olive); margin: 2rem 0 0.9rem;
  border-bottom: 1px solid var(--rule); padding-bottom: 0.3rem;
}

.step-photo { margin: 1.1rem 0 0 3.1rem; }
.step-photo img { border-radius: 8px; box-shadow: var(--shadow); }
.step-photo figcaption {
  font-size: 0.85rem; font-style: italic; color: var(--ink-soft);
  margin-top: 0.45rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.step-photo .photo-credit { font-style: normal; }

.recipe-note { font-style: italic; color: var(--accent); }
.signoff {
  font-style: italic; font-size: 1.25rem; color: var(--accent);
  text-align: right; margin: 2.5rem 0 0;
}
.signoff::after { content: " ❦"; color: var(--olive); }

.editors-note {
  margin-top: 2.5rem; border: 1px solid var(--rule); border-left: 3px solid var(--olive);
  border-radius: 6px; padding: 0.9rem 1.1rem; background: var(--paper-2);
}
.editors-note h3 {
  margin: 0 0 0.3rem; font-family: var(--sans); font-size: 0.72rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--olive);
}
.editors-note p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

.recipe-nav {
  max-width: 1100px; margin: 3.5rem auto 0; padding: 1.5rem 1rem 0;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 1rem;
}
.recipe-nav a {
  text-decoration: none; color: var(--ink); max-width: 45%;
  font-size: 1.05rem; line-height: 1.3;
}
.recipe-nav a span {
  display: block; font-family: var(--sans); font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 0.2rem;
}
.nav-next { text-align: right; margin-left: auto; }
.recipe-nav a:hover { color: var(--accent); }

/* ---------- thanksgiving menu ---------- */
.menu-hero .recipe-hero-img { height: clamp(200px, 36vh, 400px); }
.menu-card {
  max-width: 560px; margin: -3rem auto 0; position: relative; z-index: 2;
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem) 2.75rem; text-align: center;
}
.menu-head h1 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); line-height: 1.15; margin: 0.2rem 0 0.6rem; }
.menu-note { font-style: italic; color: var(--ink-soft); margin: 0 0 1rem; }
.course { margin-top: 1.75rem; }
.course h2 {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 0.6rem;
}
.course-items { list-style: none; margin: 0; padding: 0; }
.course-items li { padding: 0.22rem 0; font-size: 1.08rem; }
.course-items a { text-decoration-style: dotted; color: var(--ink); }
.course-items a:hover { color: var(--accent); }
.menu-flourish { color: var(--olive); font-size: 1.2rem; margin: 1.5rem 0 0; }
.menu-foot { margin-top: 2.25rem; font-size: 0.9rem; font-style: italic; color: var(--ink-soft); }

/* ---------- credits & 404 ---------- */
.credits, .notfound { max-width: 760px; margin: 0 auto; padding: 2.5rem 1rem 0; }
.notfound { text-align: center; padding-top: 5rem; min-height: 40vh; }
.credit-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.credit {
  display: flex; gap: 1rem; align-items: center;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--card); padding: 0.6rem;
}
.credit img { width: 96px; height: 72px; object-fit: cover; border-radius: 5px; flex: none; }
.credit-text { font-size: 0.9rem; line-height: 1.5; word-break: break-word; }

/* ---------- print ---------- */
@media print {
  .site-head, .site-foot, .recipe-nav, .step-anchor, #wake, .reset-ings,
  .step-photo, .hero-credit, .editors-note { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .recipe-hero-img { height: 2.2in; border-radius: 0; }
  .recipe-grid { display: block; }
  .pane-ings { border: 1px solid #999; background: #fff; margin-bottom: 1rem; }
  .ing input { display: none; }
  .step { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
