/* ===========================================================
   Get In My Belly — design tokens
   Direction: recipe-box / pantry-shelf, not cream+terracotta.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Work+Sans:wght@400;500;600;700&family=Caveat:wght@500;600&display=swap');

:root {
  --kraft:      #EDE3CF; /* manila card background */
  --paper:      #FAF6EC; /* lighter paper */
  --ink:        #2B2620; /* charcoal ink, near-black warm */
  --ink-soft:   #5B5346; /* softened body text */
  --brick:      #A13D2D; /* barn red accent */
  --brick-dark: #7E2E21;
  --butter:     #E8B94E; /* mustard-butter accent */
  --sage:       #6B7A5E; /* herb green */
  --sage-dark:  #4E5B44;
  --line:       #D9CBAA; /* hairline on kraft */
  --shadow:     0 6px 18px rgba(43, 38, 32, 0.12);
  --shadow-lg:  0 14px 34px rgba(43, 38, 32, 0.18);
  --radius:     4px;
  --max:        1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    linear-gradient(var(--paper), var(--paper)),
    repeating-linear-gradient(0deg, rgba(43,38,32,0.018) 0px, rgba(43,38,32,0.018) 1px, transparent 1px, transparent 3px);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------------- Header ---------------- */

.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: 1.1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--paper);
}

.brand .brand-mark {
  font-size: 1.5rem;
  transform: translateY(1px);
}

.brand .brand-sub {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: var(--butter);
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--paper);
  opacity: 0.82;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover, .site-nav a.active {
  opacity: 1;
  border-color: var(--butter);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.6rem 0; border-bottom: 1px solid rgba(250,246,236,0.12); }
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
}

.hero-eyebrow {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: var(--brick);
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: inline-block;
  transform: rotate(-2deg);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 0.98;
}

.hero h1 em {
  font-style: italic;
  color: var(--brick);
}

.hero p {
  margin-top: 1.1rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

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

.btn-primary { background: var(--brick); border-color: var(--brick); color: var(--paper); }
.btn-primary:hover { background: var(--brick-dark); border-color: var(--brick-dark); }
.btn-ghost { background: transparent; color: var(--ink); }

/* Corkboard card stack illustration in hero */
.hero-board {
  position: relative;
  height: 320px;
}

.pin-card {
  position: absolute;
  background: var(--kraft);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  width: 220px;
  font-size: 0.85rem;
}

.pin-card::before {
  content: '';
  position: absolute;
  top: -7px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--brick);
  box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

.pin-card .pin-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.pin-card .pin-emoji { font-size: 1.5rem; margin-bottom: 0.3rem; display: block; }

.pin-card.card-a { top: 0; left: 10%; transform: rotate(-6deg); z-index: 3; }
.pin-card.card-b { top: 40px; left: 42%; transform: rotate(4deg); z-index: 2; background: var(--paper); }
.pin-card.card-c { top: 130px; left: 18%; transform: rotate(-2deg); z-index: 1; background: var(--butter); }

/* ---------------- Section headings ---------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 3.5rem 0 1.5rem;
  flex-wrap: wrap;
}

.section-head h2 { font-size: 1.9rem; }

.section-head .see-all { font-weight: 600; color: var(--brick); font-size: 0.9rem; }
.section-head .see-all::after { content: ' →'; }

/* ---------------- Category grid (drawers) ---------------- */

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.drawer {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.4rem;
  position: relative;
  box-shadow: var(--shadow);
  border-bottom: 6px solid var(--brick);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.drawer:nth-child(2) { border-color: var(--butter); }
.drawer:nth-child(3) { border-color: var(--sage); }
.drawer:nth-child(4) { border-color: var(--brick); }
.drawer:nth-child(5) { border-color: var(--butter); }

.drawer:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.drawer .drawer-emoji { font-size: 2rem; }
.drawer h3 { font-size: 1.35rem; margin: 0.6rem 0 0.3rem; color: var(--paper); }
.drawer p { margin: 0; font-size: 0.88rem; color: rgba(250,246,236,0.7); }
.drawer .drawer-count {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--butter);
  font-weight: 600;
}

/* ---------------- Recipe index cards ---------------- */

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
  padding-bottom: 3rem;
}

.recipe-card {
  background: var(--kraft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.recipe-card .card-media {
  height: 150px;
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.recipe-card .card-media img {
  width: 100%; height: 100%; object-fit: cover;
}

.recipe-card .card-tag {
  position: absolute;
  top: 0.6rem; left: 0.6rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 2px;
}

.recipe-card .card-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recipe-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.recipe-card .card-tagline {
  font-size: 0.85rem;
  color: var(--ink-soft);
  flex: 1;
}

.recipe-card .card-meta {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.9rem;
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: var(--brick);
  font-weight: 600;
}

/* ---------------- Page header (category / misc pages) ---------------- */

.page-header {
  padding: 3rem 0 1rem;
}

.page-header .crumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.page-header .crumb a { color: var(--brick); font-weight: 600; }

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.page-header p { color: var(--ink-soft); margin-top: 0.6rem; max-width: 60ch; }

/* ---------------- Search ---------------- */

.search-wrap {
  margin-top: 1.6rem;
  max-width: 420px;
}

.search-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-family: 'Work Sans', sans-serif;
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
}

.search-wrap input:focus { outline: 3px solid var(--brick); outline-offset: 1px; }

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.4rem 0 0.5rem;
}

.chip {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip.active, .chip:hover {
  background: var(--ink);
  color: var(--paper);
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
}

/* ---------------- Recipe detail ---------------- */

.recipe-hero {
  padding: 2.5rem 0 1rem;
}

.recipe-hero .crumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.recipe-hero .crumb a { color: var(--brick); font-weight: 600; }

.recipe-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.recipe-title-row h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.source-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--sage-dark);
  background: rgba(107,122,94,0.14);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.recipe-tagline {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  color: var(--brick);
  margin-top: 0.5rem;
}

.recipe-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 1.6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.recipe-meta-bar .meta-item {
  padding: 0.9rem 1.6rem 0.9rem 0;
  margin-right: 1.6rem;
}
.recipe-meta-bar .meta-item:not(:last-child) { border-right: 1px solid var(--line); }

.recipe-meta-bar .meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  display: block;
}
.recipe-meta-bar .meta-value {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.1rem;
}

.recipe-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

@media (max-width: 800px) {
  .recipe-body { grid-template-columns: 1fr; }
}

.ingredients-card {
  background: var(--kraft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
  clip-path: polygon(0 0, calc(50% - 14px) 0, 50% 12px, calc(50% + 14px) 0, 100% 0, 100% 100%, 0 100%);
  padding-top: 2.2rem;
}

@media (max-width: 800px) { .ingredients-card { position: static; } }

.ingredients-card h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.ing-group { margin-bottom: 1.1rem; }
.ing-group:last-child { margin-bottom: 0; }

.ing-group-heading {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--brick);
  margin-bottom: 0.4rem;
}

.ing-group ul { list-style: none; margin: 0; padding: 0; }

.ing-group li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
  cursor: pointer;
}
.ing-group li:last-child { border-bottom: none; }

.ing-group li input {
  margin-top: 0.2rem;
  accent-color: var(--brick);
  width: 16px; height: 16px;
  flex-shrink: 0;
}

.ing-group li.checked span { text-decoration: line-through; color: var(--ink-soft); opacity: 0.6; }

.instructions h2 { font-size: 1.3rem; margin-bottom: 1.2rem; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 1rem;
  padding: 0 0 1.4rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.1rem;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: var(--brick);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.2rem; top: 2.4rem; bottom: 0;
  width: 2px;
  background: var(--line);
}

.steps li p { margin: 0.35rem 0 0; color: var(--ink); }

.recipe-notes {
  margin-top: 2.2rem;
  background: var(--paper);
  border-left: 4px solid var(--butter);
  padding: 1.1rem 1.3rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.recipe-notes h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

.recipe-notes ul { margin: 0; padding-left: 1.2rem; }
.recipe-notes li { margin-bottom: 0.4rem; font-size: 0.92rem; }

.recipe-nutrition {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.recipe-nutrition strong { color: var(--ink); }

.recipe-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  flex-wrap: wrap;
}

.recipe-footer-nav a {
  font-weight: 600;
  color: var(--brick);
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--ink);
  color: rgba(250,246,236,0.65);
  padding: 2.5rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer .foot-brand {
  font-family: 'Fraunces', serif;
  color: var(--paper);
  font-weight: 600;
}

.site-footer a:hover { color: var(--butter); }
