/* ================================================
   Holland Family Recipes — Global Styles
   Palette: #FAF7F2 bg · #3B2F20 dark · #8B5E3C brown · #5A7A4A green
   ================================================ */

/* ── Fonts loaded via <link> in Layout.astro ── */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #FAF7F2;
  color: #3B2F20;
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.25;
  color: #3B2F20;
}

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── Site Header ── */
.site-header {
  background: #3B2F20;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  color: #FAF7F2;
  letter-spacing: 0.2px;
}
.site-header-sub {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(250,247,242,0.45);
  margin-top: 2px;
}
.site-header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header-nav a {
  font-size: 12px;
  color: rgba(250,247,242,0.65);
  letter-spacing: 0.5px;
  transition: color 0.15s;
}
.site-header-nav a:hover { color: #FAF7F2; }

/* ── Home Page Layout ── */
.home-toolbar {
  background: #EDE3D4;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(59,47,32,0.1);
  position: sticky;
  top: 52px;
  z-index: 90;
}
.filter-toggle-btn {
  font-size: 12px;
  color: #8B5E3C;
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid rgba(139,94,60,0.35);
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.filter-toggle-btn:hover { background: rgba(139,94,60,0.08); }
.home-status {
  font-size: 12px;
  color: #8B5E3C;
  font-weight: 500;
  flex: 1;
}
.saved-indicator {
  font-size: 11px;
  color: #5A7A4A;
  font-style: italic;
  opacity: 0;
  transition: opacity 0.3s;
}
.saved-indicator.visible { opacity: 1; }

.home-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - 104px);
}
.home-body.sidebar-hidden { grid-template-columns: 1fr; }

/* ── Filter Sidebar ── */
.filter-sidebar {
  background: #EDE3D4;
  border-right: 1px solid rgba(59,47,32,0.12);
  padding: 14px 12px;
  overflow-y: auto;
  height: calc(100vh - 104px);
  position: sticky;
  top: 104px;
}
.sidebar-hint {
  font-size: 11px;
  color: #8B5E3C;
  margin-bottom: 8px;
  line-height: 1.4;
}
.reset-btn {
  font-size: 11px;
  color: #8B5E3C;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(139,94,60,0.3);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 12px;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.reset-btn:hover { background: rgba(139,94,60,0.08); }

/* Category accordion */
.cat-block { margin-bottom: 2px; }
.cat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 3px;
  cursor: pointer;
  border-radius: 5px;
  user-select: none;
}
.cat-header:hover { background: rgba(139,94,60,0.08); }
.cat-arrow {
  font-size: 10px;
  color: #8B5E3C;
  width: 12px;
  flex-shrink: 0;
  display: inline-block;
  transition: transform 0.15s;
}
.cat-arrow.open { transform: rotate(90deg); }
.cat-check-all {
  accent-color: #8B5E3C;
  cursor: pointer;
  margin: 0;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.cat-name {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #3B2F20;
  font-weight: 500;
  flex: 1;
}
.cat-count {
  font-size: 9px;
  color: #8B5E3C;
  opacity: 0.65;
}
.cat-items { padding: 2px 0 4px 22px; }
.cat-items.collapsed { display: none; }
.ing-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
}
.ing-row input[type="checkbox"] {
  accent-color: #8B5E3C;
  cursor: pointer;
  margin: 0;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.ing-row label {
  cursor: pointer;
  font-size: 12px;
  color: #3B2F20;
  line-height: 1.3;
}

/* ── Recipe Grid ── */
.recipe-main { padding: 16px; }
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.recipe-card {
  background: #fff;
  border: 1px solid rgba(59,47,32,0.1);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.recipe-card:hover {
  border-color: #8B5E3C;
  box-shadow: 0 2px 8px rgba(59,47,32,0.08);
}
.recipe-card.can-make {
  border-color: rgba(90,122,74,0.45);
  background: #FDFCF9;
}
.recipe-card.cannot-make { opacity: 0.42; }
.recipe-type {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #5A7A4A;
  font-weight: 500;
  margin-bottom: 5px;
}
.recipe-type.family { color: #8B5E3C; }
.recipe-category {
  opacity: 0.7;
  letter-spacing: 1.5px;
  font-weight: 400;
}
.recipe-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  line-height: 1.3;
  color: #3B2F20;
  margin-bottom: 8px;
}
.recipe-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.meta-chip {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #EDE3D4;
  color: #8B5E3C;
}
.recipe-match {
  font-size: 11px;
  font-weight: 500;
}
.recipe-match.yes { color: #5A7A4A; }
.recipe-match.partial { color: #aaa; }

/* ── Recipe Detail Page ── */
.recipe-page { max-width: 860px; margin: 0 auto; padding: 36px 20px 60px; }

.recipe-eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8B5E3C;
  opacity: 0.7;
  text-align: center;
  margin-bottom: 8px;
}
.recipe-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 38px;
  text-align: center;
  color: #3B2F20;
  margin-bottom: 6px;
  line-height: 1.15;
}
.recipe-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  text-align: center;
  color: #8B5E3C;
  font-size: 16px;
  margin-bottom: 20px;
}
.recipe-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.stat-pill {
  border: 1px solid rgba(139,94,60,0.35);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  color: #3B2F20;
}
.stat-pill b {
  color: #8B5E3C;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  font-weight: 500;
}

/* Serving scaler */
.serving-scaler {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 20px;
}
.scaler-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8B5E3C;
}
.scaler-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(139,94,60,0.4);
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  color: #8B5E3C;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}
.scaler-btn:hover { background: rgba(139,94,60,0.1); }
.scaler-value {
  font-size: 20px;
  font-weight: 500;
  min-width: 24px;
  text-align: center;
  color: #3B2F20;
}
.scaler-note {
  font-size: 10px;
  color: #8B5E3C;
  opacity: 0.55;
  font-style: italic;
}

.recipe-divider {
  border: none;
  border-top: 1px solid rgba(59,47,32,0.13);
  margin: 20px 0;
}

/* Special note callout */
.recipe-note {
  background: rgba(237,227,212,0.55);
  border-left: 3px solid #8B5E3C;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.65;
  color: #3B2F20;
}
.recipe-note-title {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
  color: #8B5E3C;
  font-weight: 500;
}

/* Two-column ingredients + method */
.recipe-cols {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 28px;
}
@media (max-width: 640px) { .recipe-cols { grid-template-columns: 1fr; } }

.col-heading {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8B5E3C;
  border-bottom: 1px solid rgba(139,94,60,0.2);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.ing-group-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: #8B5E3C;
  margin: 12px 0 6px;
}
.ing-item {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(59,47,32,0.05);
  font-size: 14px;
  align-items: baseline;
}
.ing-amount {
  color: #8B5E3C;
  font-weight: 500;
  font-size: 11px;
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Steps */
.step-block { display: flex; gap: 14px; margin-bottom: 18px; }
.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #8B5E3C;
  color: #FAF7F2;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-content { flex: 1; font-size: 14px; line-height: 1.7; color: #3B2F20; }
.step-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
  color: #3B2F20;
}
.step-tip {
  font-style: italic;
  font-size: 13px;
  color: #8B5E3C;
  margin-top: 6px;
  opacity: 0.9;
}

/* Adaptations */
.adaptations-block {
  background: rgba(237,227,212,0.4);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.adaptations-title {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8B5E3C;
  margin-bottom: 12px;
}
.adapt-item {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
  color: #3B2F20;
}
.adapt-item::before { content: '→'; position: absolute; left: 0; color: #8B5E3C; }

/* Storage + Variations footer */
.recipe-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}
@media (max-width: 500px) { .recipe-footer-grid { grid-template-columns: 1fr; } }
.footer-section-title {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8B5E3C;
  margin-bottom: 10px;
}
.footer-section-body { font-size: 13px; line-height: 1.7; color: #3B2F20; }
.footer-section-body li { list-style: none; margin-bottom: 4px; }
.footer-section-body li::before { content: '• '; color: #8B5E3C; }

/* Extra notes (texture guide, broth notes, etc.) */
.extra-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}
@media (max-width: 500px) { .extra-notes-grid { grid-template-columns: 1fr; } }

/* Recipe footer tagline */
.recipe-tagline {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: #8B5E3C;
  opacity: 0.65;
  margin: 8px 0 6px;
}

/* Print button */
.print-row { display: flex; justify-content: center; margin-top: 20px; }
.print-btn {
  background: #3B2F20;
  color: #FAF7F2;
  border: none;
  padding: 10px 26px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.5px;
}
.print-btn:hover { background: #4a3a28; }

/* ── Print Styles ── */
@media print {
  .site-header,
  .home-toolbar,
  .filter-sidebar,
  .back-link,
  .print-row,
  .serving-scaler .scaler-btn { display: none !important; }

  body { background: #fff; color: #000; font-size: 12px; }
  .recipe-page { padding: 0; max-width: 100%; }
  .recipe-title { font-size: 28px; }
  .recipe-cols { gap: 20px; }
  .step-content, .ing-item { font-size: 12px; }
  .recipe-note, .adaptations-block { break-inside: avoid; }
  .recipe-cols, .recipe-footer-grid { break-inside: avoid; }

  /* Keep serving count visible but hide buttons */
  .serving-scaler { justify-content: flex-start; padding: 6px 0 14px; }
  .scaler-label, .scaler-value, .scaler-note { display: block; }
}
