:root {
  --bg: #f6f1ea;
  --surface: #fffaf3;
  --text: #2c2a25;
  --muted: #6b655a;
  --accent: #5d6246;
  --accent-text: #fffaf3;
  --rust: #a4502f;
  --line: #e2d8c9;
  --focus: #a4502f;
  --wrap: 960px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1b18;
    --surface: #25231f;
    --text: #efe9df;
    --muted: #b3ab9d;
    --accent: #a9b08a;
    --accent-text: #1c1b18;
    --rust: #d98a66;
    --line: #3a3731;
    --focus: #e9a07e;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .tile, .site-nav a { transition: filter .15s, background-color .15s, border-color .15s; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 56px;
  font: 17px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Skip link */
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 20;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
}
.skip:focus { top: 12px; }

.ai-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-text);
  text-align: center;
  font-size: 14px;
  padding: 8px 16px;
}

/* Header navigation */
.site-head { border-bottom: 1px solid var(--line); }
.site-nav {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
}
.wordmark {
  font: 600 20px/1.2 ui-serif, Georgia, "Times New Roman", serif;
  text-decoration: none;
  letter-spacing: .01em;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; font-weight: 600; }
.site-nav ul a { text-decoration: none; padding: 4px 0; border-bottom: 1.5px solid transparent; }
.site-nav ul a:hover, .site-nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* Home: nav floats over the stage on wide screens */
@media (min-width: 721px) {
  .site-head--overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    border-bottom: 0;
    color: #f6f1ea;
    background: linear-gradient(180deg, rgba(20,18,15,.72) 0%, rgba(20,18,15,.35) 60%, rgba(20,18,15,0) 100%);
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
    --focus: #e9a07e;
  }
  .site-head--overlay .site-nav { padding-top: 20px; padding-bottom: 32px; }
}

/* Stage */
.stage {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #14120f;
  height: calc(100vh - 40px);
  height: calc(100svh - 40px);
  min-height: 520px;
  max-height: 1000px;
}
.stage-grid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.row { display: flex; gap: 4px; min-height: 0; }
.row-top { flex: 612 1 0; }
.row-bottom { flex: 525 1 0; }
.row picture { display: block; flex-basis: 0; flex-shrink: 1; min-width: 0; height: 100%; }
.row img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(1);
}
.row img.color { filter: none; }
.row-top img { object-position: center 8%; }
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,18,15,.82) 0%, rgba(20,18,15,.55) 38%, rgba(20,18,15,0) 70%);
  pointer-events: none;
}
.stage-text {
  position: absolute;
  z-index: 1;
  left: max(16px, calc((100vw - var(--wrap)) / 2 + 16px));
  top: 56%;
  transform: translateY(-50%);
  max-width: 460px;
  color: #f6f1ea;
  --focus: #e9a07e;
}
.stage-text .lead { color: rgba(246,241,234,.88); }
.stage-text .eyebrow { color: #e9a07e; }
.stage-text .btn { background: #a9b08a; color: #1c1b18; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--rust);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 16px;
  font: 600 clamp(36px, 6vw, 56px)/1.1 ui-serif, Georgia, "Times New Roman", serif;
}
h2 { margin: 0 0 12px; font: 600 32px/1.2 ui-serif, Georgia, serif; }
h3 { margin: 0 0 4px; font: 600 19px/1.3 ui-serif, Georgia, serif; }
.lead { margin: 0 0 28px; color: var(--muted); font-size: 19px; max-width: 34ch; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent !important; color: #f6f1ea !important; border: 1.5px solid rgba(246,241,234,.7); margin-left: 8px; padding: 10.5px 20px; }

/* Cards */
.cards {
  max-width: var(--wrap);
  margin: 56px auto 72px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  scroll-margin-top: 24px;
}
.card-wide { grid-column: 1 / -1; }
.card > p:last-child { margin-bottom: 0; }
.card ul { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
.about p { max-width: 62ch; }
.price { font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.pick { margin: 20px 0 8px; }
.pick-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.pick a, .gear a { color: var(--text); font-weight: 600; }
.paid {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--rust);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 8px;
  margin-left: 4px;
  vertical-align: 2px;
}
.fine { font-size: 14px; color: var(--muted); }
.fine a { color: inherit; }

/* Follow tiles */
.card ul.tiles, .card ul.recipes {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 16px;
  color: inherit;
}
.tiles { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) and (min-width: 721px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile {
  display: block;
  height: 100%;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: var(--bg);
}
.tile:hover { border-color: var(--accent); }
.tile-name { display: block; font: 600 19px/1.3 ui-serif, Georgia, serif; margin-bottom: 4px; }
.tile-name::after { content: " \2192"; color: var(--rust); }
.tile-line { display: block; font-size: 15px; color: var(--muted); }

/* Inside the book */
.recipes { grid-template-columns: repeat(3, 1fr); }
.recipes li { border-top: 1px solid var(--line); padding-top: 14px; }
.recipes .meta { margin: 0; font-size: 14px; color: var(--muted); }

/* Legal / content pages */
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; font-size: 15px; }
.gear { list-style: none; padding-left: 0; }
.gear li { position: relative; padding-left: 64px; min-height: 52px; margin-bottom: 18px; }
.thumb { position: absolute; left: 0; top: 2px; width: 50px; height: 50px; display: grid; place-items: center;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.gear-note { display: block; font-size: 14px; color: var(--muted); }
.legal { max-width: 720px; margin: 0 auto; padding: 56px 16px 72px; }
.legal h1 { font-size: 40px; }
.legal h2 { font-size: 22px; margin-top: 32px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

footer {
  border-top: 1px solid var(--line);
  padding: 24px 16px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .recipes { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .stage { height: auto; min-height: 0; max-height: none; background: transparent; }
  .stage-grid { position: static; aspect-ratio: 1534 / 1148; gap: 2px; }
  .row { gap: 2px; }
  .stage::after { display: none; }
  .stage-text { position: static; transform: none; max-width: none; padding: 28px 16px 8px; color: var(--text); --focus: var(--rust); }
  .stage-text .lead { color: var(--muted); }
  .stage-text .eyebrow { color: var(--rust); }
  .stage-text .btn { background: var(--accent); color: var(--accent-text); }
  .btn-ghost { color: var(--text) !important; border-color: var(--line); }
  .cards { grid-template-columns: 1fr; margin-top: 40px; }
  .card { padding: 24px; }
  h2 { font-size: 28px; }
  .tiles { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .recipes { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .site-nav ul { gap: 4px 16px; }
}
.legal .btn { color: var(--accent-text); text-decoration: none; }
