:root {
  color-scheme: light;
  --paper: #f4efe5;
  --paper-light: #fbf8f1;
  --ink: #242724;
  --muted: #63645e;
  --mustard: #b4862b;
  --mustard-light: #ddc77e;
  --rust: #884734;
  --rust-dark: #5f3028;
  --sage: #4f6962;
  --line: rgba(36, 39, 36, 0.22);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  font-size: 100%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: white;
}
.skip-link:focus { transform: translateY(0); }

.reading-progress {
  position: fixed;
  z-index: 15;
  inset: 0 0 auto;
  height: 4px;
  background: transparent;
}
.reading-progress span {
  display: block;
  height: 100%;
  background: var(--mustard);
  transform: scaleX(0);
  transform-origin: left;
}

.hero {
  min-height: 100svh;
  display: grid;
  background: var(--rust-dark);
  color: var(--paper-light);
  padding: clamp(1.25rem, 5vw, 3rem);
}
.hero__inner {
  width: min(100%, 52rem);
  min-height: calc(100svh - clamp(2.5rem, 10vw, 6rem));
  margin: auto;
  border: 1px solid rgba(244, 239, 229, 0.45);
  padding: clamp(1.2rem, 6vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.place,
.eyebrow,
.kicker {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
.place { color: var(--mustard-light); }
.kicker { margin-bottom: 0.75rem; color: var(--mustard-light); }
h1, h2, h3, blockquote { font-family: var(--serif); }
h1 {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(4rem, 18vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.055em;
  font-weight: 700;
}
.subtitle {
  margin: 1.35rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  line-height: 1.25;
}
.opening-combination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  font-family: var(--serif);
}
.opening-combination b { color: var(--mustard-light); font-family: var(--sans); font-weight: 400; }
.hero__intro { max-width: 31rem; margin: 0; color: rgba(255,255,255,0.78); }
.scroll-cue {
  width: fit-content;
  color: var(--paper-light);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.5);
}
.scroll-cue span { color: var(--mustard-light); margin-left: 0.4rem; }

main, footer { overflow: clip; }
.scene,
.finale,
footer {
  position: relative;
  padding: clamp(5.5rem, 18vw, 9rem) max(1.25rem, calc((100vw - 46rem) / 2));
}
.scene { border-top: 1px solid var(--line); }
.scene__number {
  position: absolute;
  top: 1.6rem;
  right: max(1.25rem, calc((100vw - 46rem) / 2));
  font-family: var(--serif);
  color: rgba(36,39,36,0.24);
  font-size: 3.8rem;
  line-height: 1;
}
.scene .eyebrow,
.finale .eyebrow { color: var(--rust); margin-bottom: 1rem; padding-right: 4rem; }
.scene h2,
.finale h2 {
  margin: 0 0 1.5rem;
  max-width: 13ch;
  font-size: clamp(2.35rem, 11vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.scene p { max-width: 39rem; }
.lead { font-family: var(--serif); font-size: clamp(1.35rem, 5vw, 1.75rem); line-height: 1.42; }
.ingredient-line { display: grid; height: 0.7rem; grid-template-columns: 1.2fr 0.35fr 1fr; margin: 3rem 0; }
.ingredient-line__meat { background: var(--rust); }
.ingredient-line__mustard { background: var(--mustard); }
.ingredient-line__bread { background: #c9ad7b; }
.context-note {
  margin-top: 2.5rem;
  padding: 1rem 0 0 1rem;
  border-left: 2px solid var(--mustard);
  color: var(--muted);
  font-size: 0.94rem;
}
.context-note span {
  display: block;
  color: var(--rust);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
blockquote {
  margin: 3.5rem 0 1rem;
  padding: 2rem 0;
  border-block: 1px solid var(--line);
  color: var(--rust);
  font-size: clamp(2.5rem, 12vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.scene--dark { background: var(--ink); color: var(--paper-light); }
.scene--dark .scene__number { color: rgba(255,255,255,0.16); }
.scene--dark .eyebrow { color: var(--mustard-light); }
.method { list-style: none; counter-reset: method; margin: 3rem 0 0; padding: 0; }
.method li {
  counter-increment: method;
  position: relative;
  min-height: 4.5rem;
  padding: 1rem 0 1rem 3.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.method li::before {
  content: counter(method, decimal-leading-zero);
  position: absolute;
  top: 0.85rem;
  left: 0;
  color: var(--mustard-light);
  font-family: var(--serif);
  font-size: 1.25rem;
}
.method-note { color: rgba(255,255,255,0.7); font-size: 0.94rem; }

.sandwich {
  margin-top: 4rem;
  padding: 1.25rem;
  background: var(--paper-light);
  border: 1px solid var(--line);
}
.sandwich__heading h3 {
  margin: 0 0 2rem;
  font-size: clamp(1.9rem, 7vw, 2.8rem);
  line-height: 1;
}
.sandwich__layers { display: flex; flex-direction: column; gap: 0.42rem; }
.layer {
  appearance: none;
  width: 100%;
  min-height: 4.5rem;
  border: 2px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}
.layer:hover { transform: translateX(0.25rem); }
.layer.is-active { border-color: var(--ink); }
.layer span { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.layer small { display: block; margin-top: 0.1rem; font: 0.8rem/1.3 var(--sans); }
.layer--mustard { width: 83%; align-self: center; background: var(--mustard-light); }
.layer--meat { width: 94%; align-self: center; background: #b77861; }
.layer--bread { background: #d6bd8f; border-radius: 1.5rem 1.5rem 0.2rem 0.2rem; }
.ingredient-detail { min-height: 8.5rem; padding: 1.35rem 0 0; }
.ingredient-detail strong { font-family: var(--serif); font-size: 1.2rem; }
.ingredient-detail p { margin: 0.3rem 0 0; }
.sandwich__sum { margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.15rem; }

.scene--mustard { background: #d6bd79; }
.scene--mustard .scene__number { color: rgba(36,39,36,0.2); }
.scene--mustard .eyebrow,
.scene--mustard .context-note span { color: var(--rust-dark); }
.scene--mustard .context-note { color: var(--ink); border-left-color: var(--rust-dark); }
.equation { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 3rem 0 2rem; font-family: var(--serif); font-size: clamp(1.4rem, 6vw, 2rem); }
.equation b { color: var(--rust-dark); font-family: var(--sans); font-weight: 400; }
.big-line { font-family: var(--serif); font-size: clamp(1.65rem, 7vw, 2.6rem); line-height: 1.18; }

.house-grid figure { margin: 2.5rem 0 0; }
.house-grid img { width: 100%; max-height: 42rem; object-fit: cover; object-position: 50% 50%; }
figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.today-list { margin-top: 4rem; border-top: 1px solid var(--line); }
.today-list > div { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.today-list h3 { margin: 0; font-size: 1.25rem; }
.today-list p { margin: 0.2rem 0 0; color: var(--muted); }
.important-note { margin-top: 3rem; padding: 1.4rem; background: var(--rust-dark); color: var(--paper-light); }
.important-note .eyebrow { color: var(--mustard-light); padding: 0; }
.important-note p:last-child { margin-bottom: 0; }

.finale { background: var(--sage); color: white; min-height: 78svh; display: flex; flex-direction: column; justify-content: center; }
.finale .eyebrow { color: var(--mustard-light); }
.finale__line { margin: 0 0 2.5rem; font-family: var(--serif); font-size: clamp(2.7rem, 12vw, 5.4rem); line-height: 0.98; letter-spacing: -0.035em; }
.finale > p:last-child { max-width: 34rem; color: rgba(255,255,255,0.78); }

footer { background: #e8e0d2; padding-top: 4rem; padding-bottom: 2rem; }
.sources h2 { margin: 0 0 0.75rem; font-size: 1.5rem; }
.sources p { color: var(--muted); }
.sources ul { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.sources li { padding: 0.65rem 0; border-top: 1px solid var(--line); font-size: 0.87rem; }
.footer-mark { margin: 4rem 0 0; color: var(--rust); font-size: 0.78rem; letter-spacing: 0.13em; text-transform: uppercase; }

.js .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 600ms ease, transform 600ms ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 48rem) {
  .hero__inner { min-height: min(50rem, calc(100svh - 6rem)); }
  .sandwich { padding: 2rem; }
  .house-grid { display: grid; grid-template-columns: 1fr 0.78fr; align-items: start; gap: 3rem; }
  .house-grid figure { margin: 0; }
  .today-list > div { display: grid; grid-template-columns: 13rem 1fr; gap: 1.5rem; }
  .today-list p { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .layer { transition: none; }
}
