/* --- CSS RESET (Normalize, minimal) --- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  line-height: 1.5;
  background: #FAFAF6;
  color: #2A2A2A;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 16px;
  min-height: 100vh;
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; border: 0; }
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  background: none;
  border: none;
  outline: none;
}
:focus { outline: 2px solid #315B2E; outline-offset: 2px; }

/* --- VARIABLES (with fallbacks) --- */
:root {
  --brand-primary: #315B2E;
  --brand-secondary: #D9B86A;
  --brand-accent: #FFFFFF;
  --brand-background: #FAFAF6;
  --brand-muted: #F3EDE1;
  --brand-dark: #26321B;
  --brand-link: #315B2E;
  --brand-link-hover: #476b49;
  --brand-shadow: 0 2px 16px rgba(49,91,46,0.06);
  --border-radius: 14px;
  --transition: 0.25s cubic-bezier(.44,.13,.48,.87);
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto Slab', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  line-height: 1.2;
}
h1 { font-size: 2.5rem; margin-bottom: 20px; }
h2 { font-size: 2rem;  margin-bottom: 18px; }
h3 { font-size: 1.3rem; margin-bottom: 12px; }
h4 { font-size: 1.1rem;  }
p, li, address {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: #2A2A2A;
  margin-bottom: 12px;
}
strong { font-weight: 700; }
.text-section p:not(:last-child) { margin-bottom: 16px; }

/* Typography link styling */
a { color: var(--brand-link); transition: color var(--transition); }
a:hover, a:focus { color: var(--brand-link-hover); text-decoration: underline; }

/* ---- LAYOUT CONTAINER CLASSES ---- */
.container {
  width: 100%;
  max-width: 1080px;
  padding: 0 16px;
  margin: 0 auto;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
  justify-content: flex-start;
}
/* Spacing rules for main sections */
section { margin-bottom: 60px; padding: 40px 20px; background: none; }
section:last-child { margin-bottom: 0; }
.hero { background: var(--brand-muted); border-radius: var(--border-radius); margin-top: 28px; margin-bottom: 60px; }
.cta { background: var(--brand-secondary); border-radius: var(--border-radius); }
.cta .text-section, .cta .content-wrapper.text-section {
  color: #2A2A2A;
}

/* Feature grid with flexbox */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.feature-grid > div {
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 270px;
  background: var(--brand-accent);
  border-radius: var(--border-radius);
  box-shadow: var(--brand-shadow);
  padding: 28px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-grid > div:hover  {
  box-shadow: 0 8px 32px rgba(49,91,46,0.07);
  transform: translateY(-6px) scale(1.03);
}

/* --- MAIN NAVIGATION --- */
header {
  background: var(--brand-accent);
  box-shadow: 0 2px 14px rgba(49,91,46,0.05);
  margin-bottom: 0;
  position: sticky;
  top: 0; z-index: 100;
}
header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 70px;
  padding: 15px 16px;
}
.logo img { height: 46px; width: auto; display: block; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.05rem;
}
.main-nav a {
  padding: 6px 2px;
  border-radius: 3px;
  color: var(--brand-primary);
  background: none;
  transition: background var(--transition), color var(--transition);
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--brand-secondary);
  color: var(--brand-dark);
}

/* Call-to-action button in header */
.btn.primary {
  background: var(--brand-primary);
  color: var(--brand-accent);
  padding: 12px 28px;
  border-radius: 29px;
  font-family: 'Roboto Slab', serif;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 2px 16px rgba(49,91,46,0.09);
  cursor: pointer;
  border: 1px solid var(--brand-primary);
  letter-spacing: .01em;
  margin-left: 18px;
  display: inline-block;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn.primary:hover, .btn.primary:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  transform: translateY(-2px) scale(1.04);
  border-color: var(--brand-secondary);
}
.btn {
  display: inline-block;
  border: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

/* ------- FLEXBOX MANDATORY LAYOUT CLASSES -------- */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--brand-accent);
  border-radius: var(--border-radius);
  box-shadow: var(--brand-shadow);
  padding: 22px 20px;
  min-width: 180px;
  max-width: 350px;
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.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;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: #fffdfa;
  box-shadow: 0 2px 12px rgba(49,91,46,0.07);
  border-radius: var(--border-radius);
  padding: 20px;
  flex: 1 1 300px;
  max-width: 400px;
  margin-bottom: 20px;
  min-width: 220px;
  color: #262626;
  z-index: 1;
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial-card:hover {
  box-shadow: 0 4px 22px rgba(49,91,46,0.12);
  transform: scale(1.03);
  background: #f6f2ec;
}
.testimonial-card p {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.1rem;
  color: #2A2A2A;
  text-align: left;
  font-style: italic;
}
.testimonial-card .author {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.98em;
  color: var(--brand-primary);
  text-align: right;
  width: 100%;
  margin-top: 8px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* DISTINCTIVE CLASSES FOR BLOG, LEGAL, RECIPE, ETC. */
.legal, .howto, .recipe-filter {
  background: #f7f6f2;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 8px rgba(49,91,46,0.04);
}
.legal h1, .howto h2, .recipe-filter h2 {
  margin-bottom: 16px;
}
.legal ul, .howto ul, .recipe-filter ul {
  padding-left: 25px;
  margin-bottom: 20px;
}
.legal ul li, .howto ul li, .recipe-filter ul li {
  text-indent: -16px;
  padding-left: 16px;
  margin-bottom: 8px;
  line-height: 1.55;
}

/* Categories & Tags */
.category-list, .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.category, .tag {
  display: inline-block;
  font-family: 'Roboto Slab', serif;
  font-size: 0.98rem;
  background: var(--brand-secondary);
  color: #2a2412;
  padding: 7px 18px;
  border-radius: 17px;
  cursor: pointer;
  border: 1px solid #ffe7b3;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}
.tag { background: #ede0ba; border-color: #f8ecc7; }
.category:hover, .tag:hover {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(49,91,46,0.09);
}

.category-list {
  margin-top: 12px;
}

.recipe-filter input[type="text"] {
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #ddd5b4;
  border-radius: var(--border-radius);
  background: #f7f2e9;
  margin-bottom: 12px;
  color: #3d3d3d;
  width: 100%;
  max-width: 360px;
  transition: border var(--transition);
}
.recipe-filter input[type="text"]:focus {
  border-color: var(--brand-primary);
}

/* ---- FOOTER ---- */
footer {
  background: #ece7db;
  padding: 40px 0 18px 0;
  border-top: 1.5px solid #e2decf;
  color: #44412d;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: 'Roboto Slab', Georgia, serif;
}
.footer-nav a {
  color: var(--brand-primary);
  font-size: 0.97rem;
}
.footer-nav a:hover, .footer-nav a:focus {
  text-decoration: underline;
  background: var(--brand-secondary);
  color: var(--brand-dark);
}
address {
  font-style: normal;
  font-size: 0.96em;
  margin-top: 0;
  color: #3a3a22;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
address img {
  vertical-align: middle;
  width: 17px;
  height: 17px;
  margin-right: 5px;
  opacity: 0.77;
}

/* ---- MOBILE MENU ---- */
.mobile-menu-toggle {
  background: var(--brand-primary);
  color: var(--brand-accent);
  font-size: 2.1rem;
  border-radius: 8px;
  border: none;
  padding: 6px 16px 7px 16px;
  cursor: pointer;
  margin-left: 24px;
  display: none;
  z-index: 150;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  transform: scale(1.05);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(236,231,219,0.97);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateX(-100vw);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(.42,0,.26,1.21), opacity 0.32s;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: var(--brand-primary);
  color: var(--brand-accent);
  border-radius: 50%;
  font-size: 2.5rem;
  border: none;
  margin: 22px 0 18px 22px;
  align-self: flex-start;
  cursor: pointer;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: 'Roboto Slab', Georgia, serif;
  width: 100vw;
  align-items: flex-start;
  padding: 38px 32px;
}
.mobile-nav a {
  font-size: 1.3rem;
  padding: 4px 0;
  width: 100%;
  color: var(--brand-primary);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  font-weight: bold;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--brand-secondary);
  color: var(--brand-dark);
}

/* --- COOKIE CONSENT BANNER & MODAL --- */
.cookie-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: fixed;
  left: 0;
  bottom: 0;
  background: #F3EDE1;
  color: #2a2a2a;
  width: 100vw;
  z-index: 2999;
  font-size: 1rem;
  font-family: 'Open Sans', Arial, sans-serif;
  box-shadow: 0 -2px 24px rgba(49,91,46,0.07);
  padding: 28px 24px 22px 24px;
  border-top: 2px solid #d9b86a;
  animation: slideUpB 0.4s ease;
}
@keyframes slideUpB {
  from { transform: translateY(60px); opacity: 0; }
  to {   transform: translateY(0);    opacity: 1; }
}
.cookie-banner button {
  margin-left: 10px;
}
.cookie-btn, .cookie-settings-btn {
  padding: 10px 22px;
  font-family: 'Roboto Slab', Georgia, serif;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 700;
  margin-right: 10px;
  margin-bottom: 7px;
  cursor: pointer;
  border: 1px solid;
  transition: background var(--transition), color var(--transition), border var(--transition), box-shadow var(--transition);
}
.cookie-btn.accept {
  background: var(--brand-primary);
  color: var(--brand-accent);
  border-color: var(--brand-primary);
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
}
.cookie-btn.reject {
  background: #ece7db;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #f6e2c2;
  color: #844746;
}
.cookie-settings-btn {
  background: none;
  color: var(--brand-dark);
  border: 1px solid #cfbd93;
  font-weight: 600;
}
.cookie-settings-btn:hover, .cookie-settings-btn:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
}

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed;
  z-index: 3000;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(80, 76, 60, 0.59);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.3s;
}
@keyframes fadeInModal {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  background: #fffdfa;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 40px rgba(49,91,46,0.13);
  padding: 36px 30px 32px 30px;
  min-width: 320px; max-width: 95vw;
  max-height: 90vh; overflow: auto;
  font-family: 'Open Sans', Arial, sans-serif;
  color: #26321B;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: fadeInModal .3s;
}
.cookie-modal h2 { font-size: 1.5rem; margin-bottom: 10px; }
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f3ede1;
  border-radius: 11px;
  padding: 16px 12px;
  font-size: 1rem;
  color: #3f3629;
}
.cookie-category input[type='checkbox'] {
  width: 22px; height: 22px; margin: 0 8px 0 0;
  accent-color: var(--brand-primary);
}
.cookie-category.essential input[type='checkbox'] {
  accent-color: #b8b8b8;
}
.cookie-category.essential input[type='checkbox'] {
  pointer-events: none;
}
.cookie-modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.cookie-modal-close {
  position: absolute;
  top: 20px;
  right: 18px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 100%;
  width: 35px; height: 35px;
  font-size: 1.4rem;
  cursor: pointer;
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: var(--brand-secondary); color: var(--brand-primary);
}

/* --- RESPONSIVE DESIGN (mobile first) --- */
@media (max-width: 1200px) {
  .container { max-width: 980px; }
  .feature-grid > div { max-width: 240px; }
}
@media (max-width: 900px) {
  .container { max-width: 750px; }
  .feature-grid { gap: 18px; }
  .feature-grid > div { min-width: 180px; max-width: 200px; padding: 18px 10px; }
}
@media (max-width: 768px) {
  .container { max-width: 99vw; padding: 0 7px; }
  section { padding: 30px 5px; }
  .feature-grid { gap: 14px; }
  .feature-grid > div { flex: 1 1 100%; min-width: 85vw; max-width: 99vw; }
  .content-wrapper, .content-grid { gap: 11px; }
  .content-grid { gap: 8px; }
  .testimonial-card { min-width: 85vw; max-width: 98vw; }
  .main-nav { gap: 10px; font-size: 1rem; }
  .footer-nav { gap: 10px; font-size: 0.9rem; }
  .btn.primary { padding: 12px 19px; font-size: 1rem; margin-left: 0; }
  .mobile-menu-toggle {
    display: block;
  }
  .main-nav, header .btn.primary {
    display: none !important;
  }
  address { flex-direction: column; gap: 2px; }
}
@media (max-width: 550px) {
  html { font-size: 15px; }
  .hero h1, h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.08rem; }
  .feature-grid > div, .testimonial-card, .card {
    min-width: 90vw;
    max-width: 99vw;
    padding: 15px 5vw;
  }
  .mobile-menu {
    padding: 0px;
  }
  .mobile-nav { padding: 28px 10px; }
  .cookie-modal { padding: 26px 5vw 18px 5vw; }
}
/* Flex orientation for text-image sections and cta on mobile */
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .card-container, .content-grid, .feature-item, .feature-grid, .content-wrapper {
    flex-direction: column;
    gap: 14px;
  }
}

/* --- MICRO-INTERACTIONS & FOCUS/ACTIVE STATES --- */
section, .card, .feature-grid > div, .testimonial-card, .btn.primary, .cookie-btn {
  transition: box-shadow var(--transition), background var(--transition), color var(--transition), transform var(--transition), border var(--transition);
}
button:active, .btn:active, .cookie-btn:active, .cookie-settings-btn:active {
  transform: scale(0.98);
}

/* --- UTILITY CLASSES --- */
.muted {
  color: #92875a;
  font-style: italic;
}
.text-section {
  max-width: 650px;
  margin: 0 auto;
}

/* --- CLARITY OVERLAY FOR ANY MODAL (for stacking) --- */
.modal-overlay {
  position: fixed;
  z-index: 2100;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(49,91,46,0.10);
  pointer-events: none;
}

/* --- REMOVE AUTOFILL BG IN INPUTS (for recipe-filter, forms) --- */
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fffdfa inset; }
input, textarea {
  border: 1px solid #e0d6c1;
  padding: 11px 15px;
  border-radius: 10px;
  background: #fffdfa;
}
input:focus, textarea:focus {
  border-color: var(--brand-primary);
  background: #f7f6f2;
}

/* --- PRINT STYLES --- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  body, main, .container { background: #fff !important; color: #2a2a2a !important; }
}
