@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --cream: #faf6ef;
  --parchment: #f2ead8;
  --warm-brown: #5c3d1e;
  --rust: #8b3a1a;
  --gold: #c4922a;
  --dark-ink: #2a1a0e;
  --light-gold: #e8d5a3;
  --olive: #6b7c3e;
  --muted: #8a7560;
  --shadow: rgba(92,61,30,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--cream);
  color: var(--dark-ink);
  font-family: 'Lora', Georgia, serif;
  line-height: 1.75;
  min-height: 100vh;
}

/* ── SHARED NAV BAR ── */
.site-nav {
  background: var(--dark-ink);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-nav .nav-brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--light-gold);
  text-decoration: none;
  font-size: 1.05rem;
  margin-right: auto;
  white-space: nowrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--light-gold); }

/* ── SHARED FOOTER ── */
footer {
  background: var(--dark-ink);
  color: var(--muted);
  text-align: center;
  padding: 40px 24px;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 80px;
}
footer .footer-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--light-gold);
  margin-bottom: 8px;
  font-style: normal;
}
footer .footer-links { margin-top: 16px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
footer .footer-links a { color: var(--muted); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
footer .footer-links a:hover { color: var(--light-gold); }

/* ── DECORATIVE DIVIDER ── */
.ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.4rem;
  margin: 36px 0;
  letter-spacing: 0.5em;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--rust);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--warm-brown);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}
.btn-outline {
  background: transparent;
  color: var(--rust);
  border: 2px solid var(--rust);
}
.btn-outline:hover {
  background: var(--rust);
  color: var(--cream);
  transform: translateY(-2px);
}

/* ── RECIPE CARD (shared across section pages) ── */
.recipe-card {
  background: #fff;
  border: 1px solid var(--light-gold);
  border-radius: 3px;
  margin-bottom: 48px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(92,61,30,0.07);
  scroll-margin-top: 30px;
}
.recipe-card-header {
  background: linear-gradient(135deg, var(--warm-brown), var(--rust));
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.recipe-card-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--cream);
  font-weight: 700;
}
.print-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--cream);
  font-family: 'Lora', serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 7px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.print-btn:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.6);
}
.print-btn svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── PRINT STYLES ── */
@media print {
  /* Hide everything by default */
  body > * { display: none !important; }

  /* Show only the targeted recipe card */
  .recipe-card.printing {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .recipe-card.printing .recipe-card-header {
    background: none !important;
    border-bottom: 2px solid #5c3d1e;
    padding: 0 0 12px 0;
    margin-bottom: 20px;
  }
  .recipe-card.printing .recipe-card-header h3 {
    color: #2a1a0e !important;
    font-size: 1.6rem;
  }
  .recipe-card.printing .print-btn { display: none !important; }
  .recipe-card.printing .recipe-body { padding: 0; }
  .recipe-card.printing .note-box,
  .recipe-card.printing .variation-box {
    border-left-width: 3px;
    margin-top: 16px;
  }
  .recipe-card.printing .ingredients-list li::before { color: #c4922a; }
  /* Print header with cookbook name */
  .recipe-card.printing::before {
    content: "Grey's Cook Book";
    display: block;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: #8a7560;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
  }
}
.recipe-body { padding: 32px; }
.recipe-body h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.recipe-body h4::after { content: ''; flex: 1; height: 1px; background: var(--light-gold); }
.recipe-body h4:first-child { margin-top: 0; }

.ingredients-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 20px;
}
.ingredients-list li {
  font-size: 0.92rem;
  padding: 5px 0 5px 18px;
  border-bottom: 1px dotted var(--light-gold);
  position: relative;
}
.ingredients-list li::before {
  content: '·';
  position: absolute; left: 4px;
  color: var(--gold);
  font-size: 1.3rem;
  line-height: 1;
  top: 4px;
}

.instructions { font-size: 0.94rem; line-height: 1.85; }
.instructions p { margin-bottom: 14px; }
.instructions p:last-child { margin-bottom: 0; }

.note-box {
  background: var(--parchment);
  border-left: 4px solid var(--gold);
  padding: 18px 22px;
  margin-top: 24px;
  border-radius: 0 2px 2px 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
}
.note-box strong { color: var(--rust); font-style: normal; }

.variation-box {
  background: #f0f5e8;
  border-left: 4px solid var(--olive);
  padding: 14px 20px;
  margin-top: 16px;
  border-radius: 0 2px 2px 0;
  font-size: 0.9rem;
  color: #3d4a25;
}
.variation-box strong { color: var(--olive); }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--warm-brown);
  color: var(--cream);
  text-align: center;
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.025) 20px, rgba(255,255,255,0.025) 40px);
  pointer-events: none;
}
.page-hero .rule {
  width: 80%; max-width: 500px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto;
}
.page-hero .rule-top { margin-bottom: 22px; }
.page-hero .rule-bot { margin-top: 22px; }
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
}
.page-hero .hero-sub {
  font-style: italic;
  color: var(--light-gold);
  font-size: 1rem;
  margin-top: 8px;
  letter-spacing: 0.1em;
}

/* ── MAIN CONTAINER ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 56px 0 40px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--light-gold);
}
.section-icon {
  width: 52px; height: 52px;
  background: var(--rust);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  color: var(--warm-brown);
}

@media (max-width: 600px) {
  .recipe-body { padding: 20px 16px; }
  .ingredients-list { grid-template-columns: 1fr; }
  .site-nav { padding: 12px 16px; gap: 14px; }
}

@media print {
  .site-nav, .page-hero, .chapter-nav, .jump-links, footer,
  .print-btn, .recipe-card:not(.printing) { display: none !important; }
  body { background: white; }
  .recipe-card.printing { border: none !important; box-shadow: none !important; }
  .recipe-card.printing .recipe-card-header {
    background: none !important;
    border-bottom: 2px solid #5c3d1e;
    padding: 0 0 10px;
    margin-bottom: 16px;
    display: block !important;
  }
  .recipe-card.printing .recipe-card-header h3 { color: #2a1a0e !important; font-size: 1.5rem; }
}
