/* Whisk Me Away — shared styles
   Brand: Warm Cream #FFF6EC, Terracotta Red #E4572E,
   Sage Green #6A994E, Charcoal #2B2B2B
   Fonts: Fredoka Bold (headings), Nunito (body) via Google Fonts.
   Mobile-first. */
:root {
  --cream: #FFF6EC;
  --terracotta: #E4572E;
  --terracotta-dark: #C7431F;
  --sage: #6A994E;
  --sage-dark: #527A3B;
  --charcoal: #2B2B2B;
  --white: #FFFFFF;
  --border: #EAD9C2;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(43, 43, 43, 0.10);
  --font-head: 'Fredoka', 'Nunito', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta); }
a:hover { color: var(--terracotta-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.section { padding: 32px 0; }
.section-title { margin-bottom: 4px; }
.section-sub { color: #5a5248; margin-bottom: 20px; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--terracotta); color: #fff; padding: 8px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* Header / nav */
.site-header { background: var(--white); border-bottom: 3px solid var(--terracotta); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--charcoal); margin-right: auto; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.brand-name span { color: var(--terracotta); }
.nav-toggle { background: none; border: 2px solid var(--terracotta); color: var(--terracotta); border-radius: 8px; font-size: 1.4rem; line-height: 1; padding: 6px 12px; cursor: pointer; font-family: var(--font-body); }
.site-nav { display: none; }
.site-nav.open { display: block; background: var(--white); border-top: 1px solid var(--border); }
.site-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.site-nav a { display: block; padding: 10px 8px; text-decoration: none; color: var(--charcoal); font-weight: 700; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--cream); color: var(--terracotta); }
.nav-pinterest { color: var(--terracotta); }

/* Hero */
.hero { text-align: center; padding: 40px 16px 32px; }
.hero h1 { font-size: 2.3rem; }
.hero h1 span { color: var(--terracotta); }
.hero p.lead { font-size: 1.15rem; max-width: 560px; margin: 0 auto 20px; }
.hero-image { border-radius: var(--radius); box-shadow: var(--shadow); max-width: 860px; margin: 0 auto; width: 100%; }
.hero-banner { border-radius: var(--radius); box-shadow: var(--shadow); max-width: 1100px; margin: 0 auto; width: 100%; }

/* Buttons */
.btn { display: inline-block; background: var(--terracotta); color: #fff; text-decoration: none; font-weight: 700; font-family: var(--font-head); padding: 12px 24px; border-radius: 999px; border: none; cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--terracotta-dark); color: #fff; }
.btn-secondary { background: var(--sage); }
.btn-secondary:hover { background: var(--sage-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--terracotta); border: 2px solid var(--terracotta); }
.btn-outline:hover { background: var(--terracotta); color: #fff; }

/* Recipe / category cards */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; list-style: none; margin: 0; padding: 0; }
.recipe-card, .category-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.recipe-card img, .category-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.recipe-card-body, .category-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.recipe-card h3, .category-card h3 { margin: 0; font-size: 1.25rem; }
.recipe-card h3 a, .category-card h3 a { color: var(--charcoal); text-decoration: none; }
.recipe-card h3 a:hover, .category-card h3 a:hover { color: var(--terracotta); }
.recipe-card p, .category-card p { margin: 0; color: #5a5248; font-size: 0.95rem; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; font-weight: 700; }
.recipe-meta span { background: var(--cream); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.recipe-meta .time { background: var(--sage); color: #fff; border-color: var(--sage); }
.card-link { margin-top: auto; font-weight: 700; }
.no-results { display: none; background: var(--white); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.no-results.visible { display: block; }

/* Popular picks */
.popular-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.popular-note { font-size: 0.9rem; color: #5a5248; }

/* Filters */
.filters { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 24px; display: grid; grid-template-columns: 1fr; gap: 12px; }
.filters label { font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 4px; }
.filters input[type="search"], .filters select, .form input, .form select, .form textarea {
  width: 100%; padding: 10px 12px; border: 2px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--charcoal);
}
.filters input:focus, .filters select:focus, .form input:focus, .form textarea:focus { outline: 3px solid var(--sage); border-color: var(--sage); }
.results-count { font-weight: 700; margin-bottom: 16px; }

/* Forms */
.form { max-width: 560px; }
.form-field { margin-bottom: 16px; }
.form label { font-weight: 700; display: block; margin-bottom: 4px; }
.form textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.9rem; color: #5a5248; }
.thanks-box { background: var(--white); border: 2px solid var(--sage); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 0 0 1em; }
.thanks-box h2 { color: var(--sage-dark); }
.signup { background: var(--sage); color: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center; }
.signup h2 { color: #fff; }
.signup p { max-width: 480px; margin: 0 auto 16px; }
.signup .form { margin: 0 auto; }
.signup input[type="email"] { width: 100%; padding: 12px; border-radius: 999px; border: none; font-size: 1rem; margin-bottom: 12px; font-family: var(--font-body); }
.signup .btn { background: var(--terracotta); }

/* Recipe page helpers (used by the recipe-page builder) */
.recipe-hero { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.jump-link { margin: 16px 0; }
.servings-switch { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.servings-switch .servings-label { font-weight: 700; }
.servings-btn { border: 2px solid var(--terracotta); background: #fff; color: var(--terracotta); border-radius: 999px; padding: 6px 16px; font-weight: 700; cursor: pointer; font-family: var(--font-body); }
.servings-btn.active, .servings-btn[aria-pressed="true"] { background: var(--terracotta); color: #fff; }
.ingredient-list, .instruction-list { padding-left: 20px; }
.ingredient-list li, .instruction-list li { margin-bottom: 8px; }
.print-btn { margin: 16px 0; }
.recipe-card-print { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* Footer */
.site-footer { background: var(--charcoal); color: #f5ede0; margin-top: 40px; padding: 32px 16px 24px; }
.site-footer a { color: #ffd9c7; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 24px; }
.site-footer h3 { color: #fff; font-size: 1.1rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-disclosure { font-size: 0.85rem; color: #cfc4b4; }
.footer-copy { font-size: 0.85rem; color: #cfc4b4; margin-top: 24px; text-align: center; }

/* 404 */
.error-page { text-align: center; padding: 64px 16px; }
.error-page h1 { font-size: 3rem; }

/* Larger screens */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  h1 { font-size: 2.5rem; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; align-items: end; }
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .site-nav ul { flex-direction: row; padding: 0; gap: 4px; }
  .hero h1 { font-size: 3rem; }
}

/* Print: clean printable recipe card only */
@media print {
  .site-header, .site-footer, .signup, .nav-toggle, .print-btn, .jump-link, .hero, .no-print { display: none !important; }
  body { background: #fff; font-size: 12pt; color: #000; }
  .recipe-card-print, .recipe-card, .recipe-hero { box-shadow: none; border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .container { max-width: none; padding: 0; }
}
