/* ═══════════════════════════════════════════════════════════════════════════
   COOKBOOK THEME
   A warm, editorial recipe site. Playfair Display + system sans-serif.
   Three-color palette: cream / warm charcoal / terracotta accent.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  /* palette */
  --cream:          #faf8f4;
  --cream-dark:     #f0ece4;
  --white:          #ffffff;
  --charcoal:       #1a1a1a;
  --charcoal-light: #3d3d3d;
  --muted:          #7a7672;
  --muted-light:    #a8a29e;
  --border:         #e7e1d8;
  --border-light:   #f0ece4;
  --accent:         #c2552a;
  --accent-hover:   #a8441f;
  --accent-pale:    #fdf0eb;
  --accent-subtle:  #f5ddd3;
  --green:          #3d6b4f;
  --green-pale:     #eef5f0;

  /* typography */
  --font-display:  'Playfair Display', 'Georgia', serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* sizing */
  --max-width:     820px;
  --max-width-wide: 1080px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-xs:     6px;

  /* transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.75;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

/* ── Layout ────────────────────────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.wide-layout main {
  max-width: var(--max-width-wide);
}

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--charcoal);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted-light);
  text-align: center;
  letter-spacing: 0.02em;
}

.site-footer a {
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.home-hero {
  text-align: center;
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.home-hero .site-description {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.home-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECIPE GRID / CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.recipe-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 6px -1px rgba(0,0,0,0.04),
    0 12px 24px -4px rgba(0,0,0,0.06);
}

.recipe-card a {
  display: block;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
}

.recipe-card-category {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.recipe-card h2,
.recipe-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.recipe-card .recipe-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.recipe-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.recipe-meta-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-light);
  flex-shrink: 0;
}

.recipe-card p {
  font-size: 0.9rem;
  color: var(--charcoal-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Tags ──────────────────────────────────────────────────────────────── */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--cream);
  color: var(--muted);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  transition: all 0.15s var(--ease);
}

.recipe-card:hover .tag {
  background: var(--accent-pale);
  color: var(--accent);
  border-color: var(--accent-subtle);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECIPE LIST PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.recipe-list h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.recipe-list-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE RECIPE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.recipe-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.recipe-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.recipe-description {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* ── Info pills ────────────────────────────────────────────────────────── */

.recipe-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.info-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.85rem;
}

.info-pill-label {
  font-weight: 500;
  color: var(--charcoal);
}

.info-pill-value {
  color: var(--muted);
}

/* ── Unit toggle ───────────────────────────────────────────────────────── */

.unit-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.unit-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.25rem;
}

.unit-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.unit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-pale);
}

.unit-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════════════════════════
   "WHAT YOU'LL NEED" — ingredients + cookware section
   ═══════════════════════════════════════════════════════════════════════════ */

.recipe-needs {
  margin-bottom: 3rem;
}

.recipe-needs > h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

.needs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ── Ingredients ───────────────────────────────────────────────────────── */

.recipe-ingredients h3,
.recipe-cookware h3 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.ingredient-list {
  list-style: none;
}

.ingredient-item {
  padding: 0.6rem 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  transition: background 0.15s var(--ease);
}

.ingredient-item:last-child {
  border-bottom: none;
}

.ingredient-item:hover {
  background: var(--accent-pale);
}

.ingredient-qty {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--accent);
  min-width: 2.5rem;
  text-align: right;
  flex-shrink: 0;
}

.ingredient-unit {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 2rem;
  flex-shrink: 0;
}

.ingredient-name {
  flex: 1;
  color: var(--charcoal);
}

/* ── Cookware ──────────────────────────────────────────────────────────── */

.cookware-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookware-list li {
  background: var(--green-pale);
  color: var(--green);
  border: 1px solid transparent;
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INSTRUCTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.recipe-steps {
  margin-bottom: 2rem;
}

.recipe-steps > h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

.step-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  color: var(--charcoal);
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.4rem;
}

.step-section:first-child h3 {
  margin-top: 0;
}

.step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s var(--ease);
}

.step:hover {
  background: var(--white);
}

.step-number {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--white);
  background: var(--accent);
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.step p {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--charcoal-light);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  html { font-size: 16px; }

  .needs-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .recipe-info {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .unit-toggle {
    flex-wrap: wrap;
  }

  .home-hero {
    padding: 2rem 0 2.5rem;
  }
}

@media (max-width: 480px) {
  main { padding: 2rem 1rem 3rem; }
  .site-header nav { padding: 0.75rem 1rem; }
  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
  .site-header, .site-footer, .unit-toggle { display: none; }
  .needs-grid { display: block; }
  .recipe-cookware { margin-top: 1.5rem; }
  body { font-size: 12pt; background: white; }
}
