:root {
  --navy: #24408f;
  --gold: #fba72d;
  --ink: #231f20;
  --rule: #e2e0dc;
  --paper: #fff;
  --sidebar: 17rem;
  --serif: "Crimson Text", Georgia, serif;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.45;
}

/* ---------- sidebar ---------- */

#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 2.2rem 1.4rem 2rem;
  border-right: 1px solid var(--rule);
  overflow-y: auto;
}

.brand {
  display: block;
  text-decoration: none;
  color: var(--navy);
  line-height: 1.05;
  margin-bottom: 2rem;
}
.brand span { display: block; letter-spacing: .06em; font-weight: 600; }
.brand-1 { font-size: 1.15rem; }
.brand-2 { font-size: 1.5rem; }
.brand-3 { font-size: 1.15rem; color: var(--gold); font-style: italic; letter-spacing: .1em; }

#nav-list h2 {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
  margin: 1.5rem 0 .45rem;
}
#nav-list a {
  display: block;
  padding: .16rem 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
}
#nav-list a:hover { color: var(--navy); }
#nav-list a.active { color: var(--navy); font-weight: 700; }

.colophon { margin-top: 2.5rem; font-size: .85rem; color: #8a8681; font-style: italic; }

/* ---------- main ---------- */

#main { margin-left: var(--sidebar); padding: 3rem 3rem 6rem; }

.recipe { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; align-items: start; max-width: 70rem; }
.recipe > .body { min-width: 0; }
.recipe.no-photos { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }

.eyebrow {
  font-style: italic;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0;
}
h1 {
  font-weight: 600;
  font-size: 2.6rem;
  line-height: 1.05;
  color: var(--navy);
  margin: .1rem 0 1.6rem 1.1rem;
  text-transform: uppercase;
}
.intro { max-width: 34rem; text-align: justify; margin: 0 0 1.1rem; }
.yield { font-weight: 700; margin: 0 0 1.6rem; }

h2.section {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 2.2rem 0 .8rem;
}

/* ingredient / step alignment grid */
.steps.no-ing { grid-template-columns: minmax(0, 1fr); }
.steps.no-ing > .ing { display: none; }
.steps.no-ing > .step { border-top: 1px solid var(--rule); }
.steps.no-ing > .step:first-of-type { border-top: none; }
.steps { display: grid; grid-template-columns: 13rem minmax(0, 1fr); column-gap: 2rem; }
.steps > .ing, .steps > .step { padding: .5rem 0 .9rem; border-top: 1px solid var(--rule); }
.steps > .ing:first-child, .steps > .step:nth-child(2) { border-top: none; }
.ing ul { margin: 0; padding: 0; list-style: none; }
.ing li { font-weight: 700; margin-bottom: .35rem; }
.step { display: flex; gap: .6rem; }
.step .n { color: var(--navy); font-weight: 700; min-width: 1.2rem; }
.pantry { margin: 0 0 1rem; padding: 0; list-style: none; }
.pantry li { font-weight: 700; margin-bottom: .35rem; }
.ing li.group, .pantry li.group {
  font-weight: 400; font-style: italic; color: var(--navy); margin-top: .4rem;
}
.ing li:first-child.group, .pantry li:first-child.group { margin-top: 0; }
.pantry-label { font-style: italic; color: #8a8681; font-weight: 400; }

/* photos */
.photos { display: grid; gap: .9rem; position: sticky; top: 3rem; }
.photos img { width: 100%; display: block; cursor: zoom-in; }

/* landing */
.landing { max-width: 46rem; }
.landing h1 { margin-left: 0; }
.landing .tagline { font-style: italic; color: var(--gold); font-size: 1.2rem; margin: 0; }
.chapter { position: relative; margin: 3rem 0; }
.chapter img.hero { width: 100%; display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.chapter-name {
  position: absolute; top: .6rem; left: 1rem; margin: 0;
  color: #fff; font-style: italic; font-weight: 600; font-size: 1.6rem;
  text-shadow: 0 1px 6px rgba(35, 31, 32, .45);
}
.chapter-list { list-style: none; margin: .8rem 0 0; padding: 0; columns: 2; }
.chapter-list a { color: var(--ink); text-decoration: none; font-weight: 700; }
.chapter-list a:hover { color: var(--navy); }

/* lightbox */
#lightbox { position: fixed; inset: 0; background: rgba(35, 31, 32, .94); display: none; place-items: center; z-index: 20; }
#lightbox.open { display: grid; }
#lightbox img { max-width: 94vw; max-height: 94vh; }

#menu { display: none; }

@media (max-width: 1100px) {
  .recipe { grid-template-columns: minmax(0, 1fr); }
  .photos { position: static; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
}

@media (max-width: 780px) {
  #menu {
    display: block; position: fixed; top: .7rem; left: .7rem; z-index: 12;
    font-size: 1.2rem; background: var(--paper); color: var(--navy);
    border: 1px solid var(--rule); border-radius: .2rem; padding: .25rem .55rem;
  }
  #sidebar { transform: translateX(-100%); transition: transform .2s; background: var(--paper); z-index: 11; }
  body.nav-open #sidebar { transform: none; }
  #main { margin-left: 0; padding: 3.4rem 1.2rem 4rem; }
  h1 { font-size: 2rem; margin-left: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps > .ing { border-top: 1px solid var(--rule); padding-bottom: 0; }
  .steps > .step:nth-child(2) { border-top: 1px solid var(--rule); }
  .steps > .step { border-top: none; }
}
