/* =========================================
   WARM ARTISAN KITCHEN - Food Bricks
   Shared stylesheet for all subpages
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600;700&family=Caveat:wght@500;600&display=swap');

:root {
  --espresso: #2c1810;
  --walnut: #4a3228;
  --terracotta: #c4603a;
  --terracotta-light: #d4775a;
  --burnt-sienna: #a0522d;
  --saffron: #e8a435;
  --saffron-pale: #f5d89a;
  --olive: #6b7c3f;
  --olive-light: #8a9e5a;
  --linen: #f5efe6;
  --parchment: #faf6ef;
  --cream: #fffcf5;
  --warm-gray: #8c7e72;
  --warm-gray-light: #b5a99b;
  --divider: #e6ddd1;

  /* Legacy aliases for old markup */
  --warm-white: var(--cream);
  --clay: var(--terracotta);
  --sage: var(--olive);
  --charcoal: var(--espresso);
  --muted: var(--warm-gray);
  --line: var(--divider);
  --shadow: 0 8px 30px rgba(44, 24, 16, 0.1);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--espresso);
  background: var(--parchment);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 12px; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 8px; }
p { max-width: 65ch; line-height: 1.7; }

/* ===== LAYOUT ===== */

.container {
  width: min(1140px, 90vw);
  margin: 0 auto;
}

/* ===== HEADER ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.97);
  border-bottom: 1px solid var(--divider);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--espresso);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--walnut);
}

.main-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a:hover { color: var(--terracotta); }

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

.main-nav a.active {
  color: var(--espresso);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--terracotta);
  color: white;
  box-shadow: 0 4px 16px rgba(196, 96, 58, 0.25);
}

.btn-primary:hover {
  background: var(--terracotta-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 96, 58, 0.3);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--espresso);
  color: var(--espresso);
}

.btn-ghost:hover {
  background: var(--espresso);
  color: var(--cream);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn:hover {
  transform: translateY(-2px);
}

/* ===== PAGE HERO ===== */

.page-hero {
  padding: 80px 0 48px;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.eyebrow {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: var(--terracotta);
  margin-bottom: 8px;
  display: block;
}

.lead {
  font-size: 1.1rem;
  color: var(--warm-gray);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ===== SECTIONS ===== */

.section {
  padding: 64px 0;
}

.section.tint {
  background: var(--cream);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.section-title {
  margin-bottom: 32px;
}

.section-title h2 {
  margin: 0 0 10px;
}

.section-cta {
  margin-top: 28px;
}

/* ===== GRID ===== */

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== CARDS ===== */

.card {
  background: var(--cream);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 20px rgba(44, 24, 16, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(44, 24, 16, 0.1);
}

.card h2 {
  font-size: 1.25rem;
}

.card.featured {
  border-color: var(--terracotta);
  box-shadow: 0 12px 40px rgba(196, 96, 58, 0.12);
}

.brick-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
  display: block;
}

.card.locked {
  opacity: 0.7;
}

.card.locked .brick-select {
  pointer-events: none;
  opacity: 0.6;
}

.card.locked .brick-actions {
  opacity: 0.4;
  pointer-events: none;
}

/* ===== HERO (old landing page style) ===== */

.hero {
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  margin: 10px 0 14px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}

.note {
  color: var(--warm-gray);
  font-size: 0.92rem;
}

.hero-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow);
}

/* ===== BRICK STACK ===== */

.brick-stack {
  display: grid;
  gap: 10px;
}

.brick {
  display: block;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.92rem;
}

.brick-protein { background: rgba(196, 96, 58, 0.15); }
.brick-veg { background: rgba(107, 124, 63, 0.15); }
.brick-carb { background: rgba(232, 164, 53, 0.2); }
.brick-sauce { background: rgba(160, 82, 45, 0.15); }
.brick-crunch { background: rgba(44, 24, 16, 0.08); }

.mini-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(44, 24, 16, 0.03);
}

.mini-card ul {
  padding-left: 18px;
  margin: 8px 0 0;
  list-style: disc;
}

/* ===== SPLIT LAYOUT ===== */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.split-panel {
  border-radius: var(--radius);
  background: var(--cream);
  padding: 24px;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow);
}

.panel-header {
  font-weight: 700;
  margin-bottom: 12px;
  font-family: 'DM Serif Display', Georgia, serif;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--divider);
  font-size: 0.92rem;
}

.panel-chip {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(107, 124, 63, 0.15);
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.panel-list {
  display: grid;
  gap: 10px;
}

.video-panel { min-height: 220px; }

.video-placeholder {
  height: 200px;
  border-radius: 12px;
  border: 1px dashed var(--divider);
  display: grid;
  place-items: center;
  color: var(--warm-gray);
}

/* ===== TAGS & FILTERS ===== */

.tag {
  display: inline-block;
  background: rgba(107, 124, 63, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(196, 96, 58, 0.1);
  font-size: 0.85rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  user-select: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-chip:hover { transform: translateY(-1px); }

.filter-chip.active {
  border-color: var(--terracotta);
  background: rgba(196, 96, 58, 0.2);
}

.filter-chip.tier-locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.filter-chip[data-filter="freezer"] { background: rgba(118, 165, 175, 0.15); }
.filter-chip[data-filter="macro"] { background: rgba(107, 124, 63, 0.15); }
.filter-chip[data-filter="budget"] { background: rgba(232, 164, 53, 0.18); }
.filter-chip[data-filter="high-protein"] { background: rgba(196, 96, 58, 0.15); }
.filter-chip[data-filter="quick"] { background: rgba(160, 82, 45, 0.15); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-pill {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(44, 24, 16, 0.05);
  color: var(--warm-gray);
  font-weight: 600;
}

.tag-pill[data-tag="freezer"] { background: rgba(118, 165, 175, 0.18); color: #2f4b55; }
.tag-pill[data-tag="macro"] { background: rgba(107, 124, 63, 0.18); color: #3f5a35; }
.tag-pill[data-tag="budget"] { background: rgba(232, 164, 53, 0.22); color: #6a4b13; }
.tag-pill[data-tag="high-protein"] { background: rgba(196, 96, 58, 0.18); color: #6f2f1f; }
.tag-pill[data-tag="quick"] { background: rgba(160, 82, 45, 0.18); color: #5c3b1f; }

.tag-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--warm-gray);
  font-size: 0.85rem;
}

.tag-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: rgba(44, 24, 16, 0.15);
}

.tag-dot.freezer { background: rgba(118, 165, 175, 0.6); }
.tag-dot.macro { background: rgba(107, 124, 63, 0.6); }
.tag-dot.budget { background: rgba(232, 164, 53, 0.6); }
.tag-dot.protein { background: rgba(196, 96, 58, 0.6); }
.tag-dot.quick { background: rgba(160, 82, 45, 0.6); }

/* ===== DETAIL PAGES (brick recipes) ===== */

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.detail-meta span {
  background: rgba(196, 96, 58, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.detail-grid {
  display: grid;
  gap: 20px;
}

.detail-grid ul,
.detail-grid ol {
  padding-left: 20px;
  list-style: disc;
}

.detail-grid ol {
  list-style: decimal;
}

.detail-grid li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.recipe-meta {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.recipe-meta span {
  background: rgba(107, 124, 63, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  width: fit-content;
  font-weight: 500;
}

/* ===== BUILDER ===== */

.builder-grid {
  display: grid;
  gap: 20px;
}

.builder-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.builder-panel {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--divider);
  box-shadow: 0 4px 20px rgba(44, 24, 16, 0.06);
}

.builder-form {
  display: grid;
  gap: 14px;
}

.builder-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--warm-gray);
}

.builder-form input,
.builder-form select,
.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--divider);
  background: var(--parchment);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--espresso);
  transition: border-color 0.2s ease;
}

.builder-form input:focus,
.builder-form select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--terracotta);
}

.builder-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(196, 96, 58, 0.08);
  border: 1px dashed rgba(196, 96, 58, 0.3);
  font-size: 0.9rem;
}

.brick-actions { margin: 12px 0 8px; }

.brick-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--warm-gray);
}

.brick-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--terracotta);
}

.drop-zone {
  border: 2px dashed var(--divider);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: rgba(44, 24, 16, 0.02);
  transition: all 0.2s ease;
}

.drop-zone.drag-over {
  border-color: var(--terracotta);
  background: rgba(196, 96, 58, 0.08);
}

.drop-zone.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.library-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.library-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(107, 124, 63, 0.1);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--warm-gray);
  cursor: pointer;
  font-weight: 600;
}

/* ===== TOGGLE ===== */

.subscriber-toggle {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--espresso);
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 42px;
  height: 24px;
  background: rgba(44, 24, 16, 0.15);
  border-radius: 20px;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cream);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(44, 24, 16, 0.15);
}

.toggle input:checked + .toggle-track {
  background: rgba(107, 124, 63, 0.6);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle-label { font-size: 0.92rem; }

/* ===== TEXT LINKS ===== */

.text-link {
  color: var(--terracotta);
  font-weight: 600;
  position: relative;
}

.text-link::after {
  content: ' \2192';
  transition: transform 0.2s ease;
}

/* ===== CTA CARD ===== */

.cta-card {
  text-align: center;
  padding: 40px 32px;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  box-shadow: var(--shadow);
}

.cta-card h2 { margin-bottom: 20px; }

/* ===== FAQ ===== */

.faq .question {
  font-weight: 700;
  margin-bottom: 6px;
  font-family: 'DM Serif Display', Georgia, serif;
}

/* ===== FEATURE LIST ===== */

.feature-list {
  padding-left: 20px;
  margin-bottom: 20px;
  list-style: disc;
}

.feature-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ===== NEWSLETTER ===== */

.newsletter {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.newsletter-form input {
  flex: 1 1 220px;
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid var(--divider);
  background: var(--parchment);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--espresso);
  transition: border-color 0.2s ease;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--terracotta);
}

/* ===== PRINTABLES ===== */

.printable {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--divider);
  box-shadow: 0 8px 28px rgba(44, 24, 16, 0.06);
}

.print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.checklist {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.6;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--espresso);
  border-radius: 4px;
  flex: 0 0 auto;
  margin-top: 3px;
}

.label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.label-card {
  border: 1px dashed var(--warm-gray);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== CONTACT FORM ===== */

.contact-form {
  display: grid;
  gap: 16px;
  max-width: 540px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== FOOTER ===== */

.site-footer {
  padding: 56px 0 24px;
  border-top: 1px solid var(--divider);
  background: var(--espresso);
  color: var(--warm-gray-light);
}

.site-footer h3 {
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-grid a {
  display: block;
  color: var(--warm-gray-light);
  margin-bottom: 8px;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-grid a:hover { color: var(--saffron); }

.footer-grid p {
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 14px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 252, 245, 0.08);
  font-size: 0.82rem;
}

/* ===== MODAL ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 420px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(44, 24, 16, 0.2);
  position: relative;
}

.modal h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  margin: 0 0 8px;
}

.modal input[type="email"] {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--parchment);
  color: var(--espresso);
  margin: 12px 0;
  transition: border-color 0.2s ease;
}

.modal input[type="email"]:focus {
  outline: none;
  border-color: var(--terracotta);
}

.modal .btn { width: 100%; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--warm-gray);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover { color: var(--espresso); }

/* ===== TIER GATING ===== */

[data-tier="free"] .card.locked .brick-actions {
  opacity: 0.4;
  pointer-events: none;
}

[data-tier="free"] .card.locked .brick-checkbox {
  cursor: not-allowed;
}

/* ===== ANIMATIONS ===== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: var(--d, 0s);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 860px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .main-nav { gap: 12px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-hero { padding-top: 56px; }
  .hero { padding-top: 50px; }

  .btn { width: 100%; }
  .tag-legend { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .detail-meta { gap: 6px; }
}

/* ===== PRINT ===== */

@media print {
  body { background: #fff; }

  .site-header,
  .site-footer,
  .print-actions,
  .btn {
    display: none !important;
  }

  .printable {
    box-shadow: none;
    border: none;
    padding: 0;
  }
}
