/* =========================================================
   Herd & Heimat – style.css (Soft Pastel + Brand Aesthetic)
   Mobile-first, ONLY Flexbox layouts, no CSS Grid/Columns
   Includes: Reset, Typography, Layout, Components, Mobile Menu,
   Cookie Banner & Modal, Animations, Accessibility
   ========================================================= */

/* -------------------------------
   1) Reset & Base Normalize
---------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; }
h1,h2,h3,h4,h5,h6,p,ul,ol,li,figure,blockquote,dl,dd { margin: 0; padding: 0; }
ul,ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img,svg,video { display: block; max-width: 100%; height: auto; }
button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
input,select,textarea,button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px dashed rgba(46,58,35,0.6); outline-offset: 3px; }

/* -------------------------------
   2) Design Tokens (CSS Variables)
---------------------------------- */
:root {
  /* Brand core */
  --color-primary: #2E3A23; /* deep green */
  --color-secondary: #C35A3A; /* warm rust */
  --color-accent: #F7F3E9; /* warm paper */

  /* Soft pastel supporting palette */
  --pastel-rose: #F7DDE1;
  --pastel-mint: #DFF4EA;
  --pastel-sky:  #E5F1FA;
  --pastel-lav:  #EDE7F6;
  --pastel-peach:#FFE8D9;

  /* Neutral & text */
  --ink: #2E3A23; /* main text */
  --ink-soft: #46523A;
  --muted: #6E7765;
  --line: #E8E5DF;
  --white: #FFFFFF;
  --bg: #FBFAF7; /* site background */

  /* Shadows & radius */
  --shadow-sm: 0 2px 8px rgba(46,58,35,0.06);
  --shadow-md: 0 6px 20px rgba(46,58,35,0.08);
  --shadow-lg: 0 12px 32px rgba(46,58,35,0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Spacing scale */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;
  --s-30: 30px;
  --s-32: 32px;
  --s-40: 40px;
  --s-48: 48px;
  --s-60: 60px;

  /* Transitions */
  --fast: 150ms;
  --normal: 220ms;
  --slow: 360ms;
}

/* -------------------------------
   3) Base Typography
---------------------------------- */
body {
  font-family: Verdana, Geneva, sans-serif; /* brand body */
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
h1,h2,h3 { font-family: Georgia, 'Times New Roman', serif; /* brand display */ }

h1 { font-size: 32px; line-height: 1.2; letter-spacing: 0.2px; }
h2 { font-size: 24px; line-height: 1.25; margin-bottom: var(--s-16); }
h3 { font-size: 18px; line-height: 1.3; }
p, li { font-size: 16px; }
small { font-size: 14px; color: var(--muted); }
strong { font-weight: 700; }

/* Responsive type bumps */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* Links */
a { color: var(--color-secondary); transition: color var(--normal) ease; }
a:hover { color: #a4452a; }
.text-link { text-decoration: underline; text-underline-offset: 2px; }

/* -------------------------------
   4) Layout Utilities (Flex-only)
---------------------------------- */
.container {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start;
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px;
}
.content-wrapper {
  display: flex; flex-direction: column; gap: var(--s-20);
}
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Generic section spacing for semantic sections without .section */
main > section { margin-bottom: var(--s-60); }

/* -------------------------------
   5) Header & Navigation
---------------------------------- */
header { position: relative; background: var(--white); box-shadow: var(--shadow-sm); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s-16); padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: var(--s-12); }
.brand img { height: 40px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--s-16); }
.main-nav a { padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); }
.main-nav a[aria-current="page"], .main-nav a:hover { background: var(--pastel-mint); color: var(--ink); transition: background var(--normal) ease; }

.header-cta { display: flex; align-items: center; gap: var(--s-12); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; right: 12px; top: 12px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--pastel-rose); color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform var(--fast) ease, background var(--normal) ease;
}
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #f3d1d6; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 9998; background: var(--white);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--s-24);
  padding: 20px; transform: translateX(100%); transition: transform var(--slow) ease;
}
.mobile-menu[aria-hidden="false"] { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; width: 42px; height: 42px; border-radius: 50%;
  background: var(--pastel-sky); color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.mobile-nav a {
  display: flex; align-items: center; padding: 14px 12px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--ink);
}
.mobile-nav a[aria-current="page"], .mobile-nav a:hover { background: var(--pastel-mint); }
header{flex-direction: row;}
/* Desktop nav breakpoint */
@media (min-width: 992px) {
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
}

/* -------------------------------
   6) Hero Section (soft pastel blocks)
---------------------------------- */
.hero { background: var(--pastel-sky); border-bottom: 1px solid var(--line); }
.hero .container { padding-top: 28px; padding-bottom: 28px; }
.hero .content-wrapper { gap: var(--s-16); }
.hero h1 { color: var(--ink); }
.hero p { color: var(--ink-soft); }

/* Variations (optional via body classes or page flow) */
body[data-hero="mint"] .hero { background: var(--pastel-mint); }
body[data-hero="rose"] .hero { background: var(--pastel-rose); }
body[data-hero="peach"] .hero { background: var(--pastel-peach); }

/* -------------------------------
   7) Breadcrumb
---------------------------------- */
.breadcrumb { background: var(--accent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.breadcrumb .container { padding-top: 10px; padding-bottom: 10px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb li { display: flex; align-items: center; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.breadcrumb a { color: var(--color-secondary); }

/* -------------------------------
   8) Features, Badges, Grids
---------------------------------- */
.feature-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.feature-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--s-20); box-shadow: var(--shadow-sm);
  flex: 1 1 260px; min-width: 240px; max-width: 100%;
}
.feature-item h3 { color: var(--ink); }
.feature-item p { color: var(--ink-soft); }

.trust-badges, .badge-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust-badges span, .badge-row span {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 12px; color: var(--ink);
}
.trust-badges img, .badge-row img { width: 18px; height: 18px; }

/* -------------------------------
   9) Recipe Lists (card-like items)
---------------------------------- */
.recipe-list { display: flex; flex-direction: column; gap: var(--s-16); }
.recipe-list li {
  display: flex; flex-direction: column; gap: 8px; padding: 16px 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); transition: transform var(--normal) ease, box-shadow var(--normal) ease;
}
.recipe-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.recipe-list h3 { color: var(--ink); }
.recipe-list p { color: var(--muted); }

/* -------------------------------
   10) Text sections, lists, map placeholder
---------------------------------- */
.text-section { display: flex; flex-direction: column; gap: var(--s-16); }
.text-section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }
.text-section li { position: relative; padding-left: 22px; }
.text-section li::before { content: "•"; position: absolute; left: 0; color: var(--color-secondary); }

.map-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--pastel-lav); color: var(--ink);
  border: 1px dashed #cdc7e6; border-radius: var(--radius-md);
  padding: var(--s-20);
}

.contact-snippet { display: flex; flex-direction: column; gap: 8px; }
.contact-snippet p { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.contact-snippet img { width: 18px; height: 18px; }

/* -------------------------------
   11) Testimonials (contrast-safe)
---------------------------------- */
.testimonial-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.testimonial-card p { color: var(--ink); }
.testimonial-card strong { color: var(--ink); }

/* -------------------------------
   12) Buttons & CTAs
---------------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; line-height: 1.1;
  transition: background var(--normal) ease, color var(--normal) ease, transform var(--fast) ease, box-shadow var(--normal) ease;
  box-shadow: var(--shadow-sm);
}
.button.primary { background: var(--color-primary); color: var(--white); }
.button.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.button.secondary { background: var(--pastel-peach); color: var(--ink); border: 1px solid #ffd8bf; }
.button.secondary:hover { background: #ffdccc; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-12); }

/* -------------------------------
   13) Footer
---------------------------------- */
footer { background: var(--accent); border-top: 1px solid var(--line); }
footer .container { padding-top: 24px; padding-bottom: 24px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: var(--s-16); }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand img { width: 36px; height: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: var(--ink); padding: 6px 10px; border-radius: var(--radius-sm); }
.footer-nav a[aria-current="page"], .footer-nav a:hover { background: var(--pastel-mint); }

/* -------------------------------
   14) Accessibility helpers
---------------------------------- */
[aria-current="page"] { font-weight: 700; }

/* -------------------------------
   15) Cookie Consent (banner + modal)
---------------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: flex; flex-direction: column; gap: var(--s-12);
  background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(46,58,35,0.08);
  padding: 16px 16px; transform: translateY(100%);
  transition: transform var(--slow) ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 8px; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .button { padding: 10px 14px; }
.cookie-buttons .accept { background: var(--color-primary); color: var(--white); }
.cookie-buttons .reject { background: var(--pastel-rose); color: var(--ink); border: 1px solid #f0c4cb; }
.cookie-buttons .settings { background: var(--pastel-mint); color: var(--ink); border: 1px solid #cfeadf; }

/* Cookie modal overlay */
.cookie-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 10000;
  opacity: 0; pointer-events: none; transition: opacity var(--normal) ease;
}
.cookie-backdrop.show { opacity: 1; pointer-events: auto; }
.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0.98);
  width: calc(100% - 32px); max-width: 640px; background: var(--white);
  border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  z-index: 10001; padding: 20px; opacity: 0; pointer-events: none; transition: transform var(--normal) ease, opacity var(--normal) ease;
  display: flex; flex-direction: column; gap: var(--s-16);
}
.cookie-modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.cookie-modal .cookie-rows { display: flex; flex-direction: column; gap: 12px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--accent); }
.cookie-row .label { display: flex; flex-direction: column; gap: 4px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle switch (for cookie categories) */
.switch { position: relative; width: 46px; height: 26px; display: inline-flex; align-items: center; }
.switch input { appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #d7d7d7; outline: none; transition: background var(--normal) ease; }
.switch input:checked { background: var(--pastel-mint); }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: transform var(--normal) ease; }
.switch input:checked::after { transform: translateX(20px); }

/* -------------------------------
   16) Responsive alignments
---------------------------------- */
/* Text-image: stack on mobile, row on desktop */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 769px) {
  .text-image-section { flex-direction: row; }
}

/* Header hero spacing improvements on larger screens */
@media (min-width: 992px) {
  .hero .container { padding-top: 48px; padding-bottom: 48px; }
}

/* Footer layout side-by-side on large screens */
@media (min-width: 992px) {
  footer .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* -------------------------------
   17) Additional micro-interactions
---------------------------------- */
.card, .recipe-list li, .feature-item, .testimonial-card { will-change: transform, box-shadow; }
button, .button, a { transition: color var(--normal) ease, background var(--normal) ease, transform var(--fast) ease, box-shadow var(--normal) ease; }

/* -------------------------------
   18) Page-specific subtle backgrounds (soft pastel atmosphere)
---------------------------------- */
/* Give alternating sections a dreamy pastel block look */
main > section:nth-of-type(2n) { background: var(--accent); }
main > section:nth-of-type(3n) { background: var(--pastel-mint); }
/* Keep hero already pastel; ensure inner cards stay white for contrast */
main > section { border-top: 1px solid rgba(0,0,0,0.02); border-bottom: 1px solid rgba(0,0,0,0.02); }

/* Containers inside colored sections */
main > section .container { padding-top: 24px; padding-bottom: 24px; }

/* -------------------------------
   19) Footer brand block (index)
---------------------------------- */
.footer-brand p { color: var(--ink-soft); }

/* -------------------------------
   20) Utility helpers
---------------------------------- */
.hide { display: none !important; }
.muted { color: var(--muted); }

/* -------------------------------
   21) Ensure adequate gaps everywhere (core requirement)
---------------------------------- */
header .container, .content-wrapper, .feature-grid, .recipe-list, .testimonial-card, .footer-nav, .trust-badges, .badge-row, .cta-row, .contact-snippet { gap: var(--s-16); }

/* -------------------------------
   22) Readability safeguards for testimonial/reviews (contrast)
---------------------------------- */
.testimonial-card, .testimonial-card p, .testimonial-card strong { color: var(--ink); }
.testimonial-card { background-color: var(--white); }

/* -------------------------------
   23) Print basics (optional)
---------------------------------- */
@media print {
  .mobile-menu-toggle, .mobile-menu, .cookie-banner, .cookie-backdrop, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}

/* -------------------------------
   24) Fine-tuning for specific elements present in pages
---------------------------------- */
/* Footer text blocks alignment */
footer p { color: var(--muted); }

/* Header CTA button spacing */
.header-cta .button { white-space: nowrap; }

/* Ensure no content overlap; maintain margins around cards */
.card, .recipe-list li, .feature-item, .testimonial-card { margin-bottom: 20px; }

/* -------------------------------
   25) Accessibility focus styles for nav links
---------------------------------- */
.main-nav a:focus-visible, .mobile-nav a:focus-visible, .footer-nav a:focus-visible, .button:focus-visible { outline: 2px dashed var(--color-secondary); outline-offset: 3px; border-radius: 8px; }

/* -------------------------------
   26) Tables (if any appear in policy pages)
---------------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
th { background: var(--accent); }

/* -------------------------------
   27) Breadcrumb spacing within main
---------------------------------- */
.breadcrumb { margin-bottom: var(--s-24); }

/* -------------------------------
   28) Header branding scaling on bigger screens
---------------------------------- */
@media (min-width: 1200px) {
  .brand img { height: 48px; }
}

/* -------------------------------
   29) Ensure flexbox usage for all structural containers
---------------------------------- */
header, main, footer, nav, section, .footer-brand { display: flex; flex-direction: column; }
/* Prevent unintended horizontal layouts */
main, footer, section { align-items: stretch; }
/* Re-apply intended rows where needed */
header .container, footer .content-wrapper { flex-direction: row; }
/* Keep sections internally columnar by default */
main > section .container { flex-direction: column; }
header{flex-direction: row;}
/* Note: No CSS Grid or Columns used anywhere; all layout is flexbox-based. */
