/* recipe-md: the kitchen table. Rosemary green and a gingham cloth, saffron
   for the one bright thing, a sage-white page. Instrument Serif for display,
   Instrument Sans for text, Plex Mono for amounts and code. */
:root {
  --page: #f2f3ee;
  --panel: #e7eae1;
  --ink: #15211b;
  --muted: #4b5a51;
  --line: #cfd5c8;
  --rosemary: #1f3d31;
  --rosemary-2: #2a5141;
  --saffron: #f0b429;
  --saffron-ink: #1b1607;
  --tomato: #c8402a;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gingham: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 14px, transparent 14px 28px),
             repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 14px, transparent 14px 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.6 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rosemary-2); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(36px, 4.6vw, 56px); letter-spacing: -.01em; }
h3 { font-family: var(--text); font-weight: 600; font-size: 18px; line-height: 1.3; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: .86em; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--saffron); color: var(--saffron-ink); padding: 8px 14px; z-index: 10; font-weight: 600; }
.skip:focus { top: 12px; }

/* Top bar sits on the green, like the hero. */
.top { background: var(--rosemary); color: #fff; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 500; font-size: 16px; color: inherit; text-decoration: none; }
.wordmark img { border-radius: 6px; }
.nav { display: flex; gap: 6px 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: #e4ece6; text-decoration: none; font-size: 15px; }
.nav a:hover { color: #fff; text-decoration: underline; }

section { padding: clamp(64px, 9vw, 112px) 0; }
.band { background: var(--panel); }
.section-lede { color: var(--muted); margin-top: 14px; max-width: 62ch; font-size: 18px; }

/* Hero: a green gingham cloth with real cards tossed on it. */
.hero { background: var(--gingham), var(--rosemary); color: #fff; padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--saffron); }
.hero h1 { font-size: clamp(42px, 5.6vw, 76px); letter-spacing: -.015em; margin-top: 18px; line-height: 1.02; }
.hero h1 em { color: var(--saffron); }
.lede { font-size: 19px; margin-top: 24px; max-width: 50ch; color: #d9e4dc; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn { display: inline-block; background: var(--saffron); color: var(--saffron-ink); text-decoration: none; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 16px; border: 2px solid var(--saffron); }
.btn:hover { background: #ffd166; border-color: #ffd166; }
.btn-quiet { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-quiet:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.one-liner { margin-top: 24px; }
.one-liner code { display: inline-block; background: rgba(0,0,0,.22); color: #f4f7f2; padding: 8px 12px; border-radius: 8px; overflow-wrap: anywhere; }

.hero-art { position: relative; aspect-ratio: 1 / 1.02; }
.card { position: absolute; width: 58%; box-shadow: 0 2px 4px rgba(0,0,0,.18), 0 30px 60px rgba(0,0,0,.35); transition: transform .3s ease; }
.card img { width: 100%; }
.c1 { left: 0; top: 6%; transform: rotate(-8deg); }
.c2 { right: 0; top: 0; transform: rotate(7deg); }
.c3 { left: 21%; top: 13%; transform: rotate(-1.5deg); z-index: 1; }
.card:hover, .card:focus-visible { z-index: 2; transform: rotate(0) translateY(-8px); }

/* The pitch: one sentence, big. */
.pitch { padding: clamp(56px, 7vw, 88px) 0; border-bottom: 1px solid var(--line); }
.pitch p { font-family: var(--display); font-size: clamp(30px, 3.8vw, 48px); line-height: 1.15; max-width: 26em; }
.pitch span { color: var(--muted); font-style: italic; }

/* How it works: three recipe-card steps. */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--rosemary); border-radius: 4px; padding: 28px 26px 30px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.step-n { font-family: var(--display); font-size: 64px; line-height: .8; color: var(--saffron); -webkit-text-stroke: 1px #b9851a; }
.steps p { color: var(--muted); font-size: 16px; }
.ask { margin: 6px 0 0; font-family: var(--display); font-style: italic; font-size: 22px; line-height: 1.3; color: var(--ink); border-left: 3px solid var(--saffron); padding-left: 14px; }
.math { font-family: var(--mono); font-size: 18px !important; color: var(--ink) !important; background: var(--page); border-radius: 6px; padding: 10px 14px; margin-top: auto; }
.math b { color: var(--tomato); font-weight: 500; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.sizes span { font-family: var(--mono); font-size: 13px; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 10px; }

.facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 36px; }
.facts li { border-top: 2px solid var(--rosemary); padding-top: 14px; color: var(--muted); font-size: 16px; }
.facts b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }

/* Themes gallery. */
.themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; margin-top: 44px; }
.themes figure { margin: 0; }
.themes a { display: block; transition: transform .25s ease; }
.themes a:hover { transform: translateY(-6px) rotate(-.6deg); }
.themes img { box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 14px 30px rgba(21,33,27,.18); }
.themes figcaption { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.themes figcaption b { display: block; font-family: var(--mono); font-weight: 500; color: var(--ink); font-size: 15px; }

/* Card and cookbook. */
.format-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; margin-top: 40px; }
.format p { color: var(--muted); margin-top: 8px; max-width: 46ch; }
.card-pair { display: grid; gap: 18px; margin-top: 28px; }
.card-pair img { box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 14px 30px rgba(21,33,27,.18); }
.card-pair img:nth-child(1) { transform: rotate(-1.2deg); }
.card-pair img:nth-child(2) { transform: rotate(.9deg); width: 92%; margin-left: 8%; }
.book { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; max-width: 520px; }
.book img { box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 14px 30px rgba(21,33,27,.18); }

/* Examples: recipe-box index tabs. */
.examples { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.examples a { display: flex; flex-direction: column; gap: 4px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px 20px; text-decoration: none; color: var(--ink); position: relative; transition: border-color .2s, transform .2s; }
.examples a::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 4px; background: var(--saffron); border-radius: 0 0 3px 3px; }
.examples a:hover { border-color: var(--rosemary); transform: translateY(-3px); }
.examples b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; }
.examples span { color: var(--muted); font-size: 15px; }
.examples .ex-lang { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--rosemary-2); }
.ex-book a { background: var(--rosemary); border-color: var(--rosemary); color: #fff; }
.ex-book a span { color: #cfdcd3; }
.ex-book a .ex-lang { color: var(--saffron); }

/* Install on the green cloth again. */
.install-band { background: var(--gingham), var(--rosemary); color: #fff; }
.install { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.install h3 { color: #fff; }
.install pre { margin: 12px 0 0; background: #0f1d17; color: #eef3ee; padding: 18px; border-radius: 8px; overflow-x: auto; line-height: 1.6; border: 1px solid rgba(255,255,255,.12); white-space: pre-wrap; overflow-wrap: anywhere; }
.install-band .note { color: #cfdcd3; margin-top: 22px; font-size: 15px; }

.foot { padding: 44px 0 60px; font-size: 15px; color: var(--muted); }
.foot-row { display: grid; gap: 10px; }
.foot .wordmark { color: var(--ink); }

.lost { min-height: 62vh; display: flex; align-items: center; background: var(--gingham), var(--rosemary); color: #fff; }
.lost h1 { font-size: clamp(44px, 6vw, 76px); margin-top: 12px; }
.lost .lede { color: #d9e4dc; }

@media (max-width: 1100px) {
  .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero-grid, .format-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-art { max-width: 520px; width: 100%; margin: 0 auto; }
  .steps, .install { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .nav { gap: 4px 14px; }
  .nav a { font-size: 14px; }
  .hero-art { width: 86%; }
  .card { width: 56%; }
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .themes figcaption { font-size: 14px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .book { gap: 10px; }
}
