/* ===================================================================
   KernKost – Creative Artistic UI Theme (Flexbox-only)
   One stylesheet for all pages. Mobile-first, vibrant, artistic.
   =================================================================== */

/* -----------------------------
   0) RESET & NORMALIZE
   ----------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; line-height: 1.6; color: #1a1a1a; background: #F4F7F3; }
img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: transparent; border: 0; }
a { color: #215A3A; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #9C6B3F; outline-offset: 2px; }

/* Color variables with fallbacks */
:root {
  --primary: #215A3A; /* deep green */
  --secondary: #9C6B3F; /* warm spice */
  --accent: #F4F7F3; /* light herb */
  --ink: #0f172a; /* dark text */
  --muted: #65737e; /* muted text */
  --paper: #ffffff; /* cards */
  --highlight: #E85D3E; /* artistic pop accent */
  --shadow: 0 10px 25px rgba(33,90,58,0.12), 0 2px 8px rgba(33,90,58,0.08);
}

/* -----------------------------
   1) TYPOGRAPHY SCALE
   ----------------------------- */
h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, sans-serif; color: var(--ink, #0f172a); line-height: 1.25; }
h1 { font-size: 32px; letter-spacing: -0.5px; }
h2 { font-size: 26px; letter-spacing: -0.2px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
p, li { font-size: 16px; color: #27323a; }
.small-print { font-size: 14px; color: var(--muted, #65737e); }
.subheadline { font-size: 18px; color: #2f3b45; max-width: 60ch; }

/* Artistic heading accent */
h1, h2 { position: relative; display: inline-flex; align-items: center; gap: 10px; }
h1::after, h2::after { content: ""; width: 40px; height: 8px; background: var(--highlight, #E85D3E); border-radius: 8px; transform: skewX(-18deg); }

/* -----------------------------
   2) GLOBAL LAYOUT (Flex-only)
   ----------------------------- */
.container { display: flex; width: 100%; padding: 0 16px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1160px; margin: 0 auto; align-items: flex-start; }

main { display: flex; flex-direction: column; gap: 20px; }
section { display: flex; }
footer, header { display: flex; }

/* MANDATORY spacing patterns */
.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; }

/* Ensure breathing room between all cards */
article, .recipe-card, .principle, .plan-card, .collection-card, .testimonial-card { margin-bottom: 20px; }

/* -----------------------------
   3) HEADER & NAVIGATION
   ----------------------------- */
header { background: var(--paper, #ffffff); border-bottom: 4px solid var(--primary, #215A3A); position: relative; z-index: 50; }
header .container { align-items: center; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo img { height: 34px; }

/* Desktop nav (hidden on mobile) */
.main-nav { display: none; align-items: center; gap: 14px; flex-wrap: wrap; }
.main-nav a { padding: 8px 12px; border-radius: 24px; color: var(--ink, #0f172a); background: transparent; transition: all .25s ease; font-weight: 600; }
.main-nav a:hover { background: var(--accent, #F4F7F3); transform: translateY(-1px); }
.main-nav a[aria-current="page"] { background: var(--primary, #215A3A); color: #fff; }

/* Mobile burger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid var(--primary, #215A3A); border-radius: 12px; color: var(--primary, #215A3A); font-size: 20px; transition: all .2s ease; }
.mobile-menu-toggle:hover { background: var(--primary, #215A3A); color: #fff; }

/* Mobile menu overlay */
.mobile-menu { display: flex; position: fixed; inset: 0; background: #ffffff; transform: translateX(100%); transition: transform .35s ease; z-index: 9999; padding: 24px; align-items: flex-start; justify-content: flex-start; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid var(--primary, #215A3A); border-radius: 12px; color: var(--primary, #215A3A); font-size: 18px; margin-bottom: 16px; }
.mobile-nav { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.mobile-nav a { display: flex; padding: 14px 16px; border-radius: 14px; background: var(--accent, #F4F7F3); color: var(--ink, #0f172a); font-weight: 600; }
.mobile-nav a:hover { background: var(--primary, #215A3A); color: #fff; }

/* -----------------------------
   4) BUTTONS & LINKS
   ----------------------------- */
.btn-primary, .btn-secondary, .btn-tertiary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 20px; font-weight: 700; transition: all .25s ease; text-decoration: none; }
.btn-primary { background: var(--primary, #215A3A); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(33,90,58,0.18), 0 4px 12px rgba(33,90,58,0.12); }
.btn-secondary { color: var(--primary, #215A3A); background: #ffffff; border: 2px solid var(--primary, #215A3A); }
.btn-secondary:hover { background: var(--primary, #215A3A); color: #fff; transform: translateY(-2px); }
.btn-tertiary { background: transparent; color: var(--secondary, #9C6B3F); border: 2px solid var(--secondary, #9C6B3F); }
.btn-tertiary:hover { background: var(--secondary, #9C6B3F); color: #fff; transform: translateY(-2px); }

.link-more { display: inline-flex; align-items: center; gap: 8px; color: var(--secondary, #9C6B3F); font-weight: 700; position: relative; }
.link-more::after { content: "→"; transition: transform .2s ease; }
.link-more:hover::after { transform: translateX(4px); }

/* -----------------------------
   5) HERO & COMMON BLOCKS
   ----------------------------- */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }
.supporting-bullets, .value-bullets { display: flex; flex-direction: column; gap: 10px; padding-left: 0; list-style: none; }
.supporting-bullets li, .value-bullets li { display: flex; align-items: flex-start; gap: 10px; background: #ffffff; padding: 10px 12px; border-radius: 12px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.supporting-bullets img, .contact-buttons img { width: 18px; height: 18px; }

.searchbox { display: flex; flex-direction: column; gap: 10px; background: #ffffff; border-left: 6px solid var(--highlight, #E85D3E); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }

.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-badges p { display: flex; align-items: center; gap: 8px; background: var(--accent, #F4F7F3); padding: 8px 12px; border-radius: 20px; font-weight: 600; }
.trust-badges img { width: 16px; height: 16px; }

.badge, .badges { display: inline-flex; align-items: center; gap: 8px; background: #fff2e9; color: #B04A20; border: 1px solid #FFB089; border-radius: 999px; padding: 6px 10px; font-weight: 700; font-size: 14px; }

/* -----------------------------
   6) FEATURED/GRID SECTIONS (Flex-only)
   ----------------------------- */
.feature-grid, .principles-grid, .recipe-teasers, .recipe-grid, .pricing-table, .collections, .stories, .pricing-mini { display: flex; flex-wrap: wrap; gap: 20px; }

.feature-item, .principle, .recipe-card, .plan-card, .collection-card { background: var(--paper, #ffffff); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); position: relative; }

/* Decorative top stripe for artistic flair */
.feature-item::before, .principle::before, .plan-card::before, .collection-card::before, .recipe-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--primary, #215A3A); border-top-left-radius: 16px; border-top-right-radius: 16px; }
.plan-card .badge { position: relative; top: -2px; }

/* Flexible sizing */
.feature-item, .principle, .collection-card { flex: 1 1 260px; }
.recipe-card { flex: 1 1 280px; }
.plan-card { flex: 1 1 280px; }

/* Cards interactions */
.feature-item:hover, .principle:hover, .recipe-card:hover, .plan-card:hover, .collection-card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(33,90,58,0.18), 0 6px 14px rgba(33,90,58,0.12); transition: all .25s ease; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 14px; padding-left: 0; list-style: none; }
.steps li { background: #ffffff; border-left: 6px solid var(--secondary, #9C6B3F); padding: 14px 16px; border-radius: 12px; box-shadow: var(--shadow); }

/* Testimonial area – light background for strong contrast */
.testimonial-slider { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.testimonial-card { background: #ffffff; color: #1a1a1a; border: 1px solid rgba(0,0,0,.06); border-radius: 16px; box-shadow: var(--shadow); min-width: 280px; scroll-snap-align: start; }
.testimonial-card p { margin: 0; }

/* Ratings & pagination */
.ratings-overview { display: flex; align-items: center; background: #ffffff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.pagination { display: flex; align-items: center; }
.pagination p, .pagination a { font-size: 14px; }

/* Pricing highlights */
.pricing-table .plan-card h3 { display: inline-flex; align-items: center; gap: 8px; }

/* Text sections */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; }

/* Contact blocks */
.contact-buttons { display: flex; flex-direction: column; gap: 8px; }
.contact-buttons p { display: flex; align-items: center; gap: 8px; background: #ffffff; padding: 10px 12px; border-radius: 12px; }

/* -----------------------------
   7) FOOTER
   ----------------------------- */
footer { background: #0d2418; color: #e9f2ed; padding: 28px 0; }
footer .content-wrapper { gap: 20px; }
.footer-brand img { height: 34px; filter: brightness(0) invert(1); }
.footer-nav { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.footer-main-links, .footer-legal-links { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-nav a { color: #e9f2ed; background: rgba(255,255,255,0.06); padding: 6px 10px; border-radius: 14px; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-style: normal; }
.social-links { display: flex; gap: 10px; }
.social-links a { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); }
.social-links img { width: 18px; height: 18px; filter: brightness(0) invert(1); }

/* -----------------------------
   8) ACCESSIBILITY & MICRO-INTERACTIONS
   ----------------------------- */
::selection { background: #ffd7cc; color: #1a1a1a; }
[data-animate="rise"] { transform: translateY(6px); opacity: .001; transition: all .4s ease; }
[data-animate="rise"].in-view { transform: translateY(0); opacity: 1; }

/* -----------------------------
   9) COOKIE CONSENT BANNER & MODAL
   ----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998; background: #ffffff; color: #1a1a1a; border-top: 4px solid var(--secondary, #9C6B3F); box-shadow: 0 -8px 28px rgba(0,0,0,0.12); display: flex; }
.cookie-banner .container { align-items: center; }
.cookie-banner .content-wrapper { gap: 12px; padding: 12px 0; }
.cookie-banner p { margin: 0; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .accept { composes: btn-primary; }
.cookie-buttons .reject { composes: btn-secondary; }
.cookie-buttons .settings { composes: btn-tertiary; }
/* Fallback since "composes" is not standard – re-apply styles */
.cookie-buttons .accept { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 10px 16px; background: var(--primary, #215A3A); color: #fff; font-weight: 700; }
.cookie-buttons .reject { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 10px 16px; border: 2px solid var(--primary, #215A3A); color: var(--primary, #215A3A); font-weight: 700; background: #fff; }
.cookie-buttons .settings { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 10px 16px; border: 2px solid var(--secondary, #9C6B3F); color: var(--secondary, #9C6B3F); font-weight: 700; background: #fff; }

/* Cookie modal overlay */
.cookie-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal.open { display: flex; }
.cookie-modal-content { background: #ffffff; color: #1a1a1a; border-radius: 16px; box-shadow: var(--shadow); width: 100%; max-width: 640px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; background: var(--accent, #F4F7F3); border-radius: 12px; padding: 10px 12px; }
.cookie-option .label { display: flex; flex-direction: column; }
/* Simple toggle */
.toggle { width: 44px; height: 26px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .2s ease; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #ffffff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .2s ease; }
.toggle.on { background: var(--primary, #215A3A); }
.toggle.on::after { left: 21px; }

/* -----------------------------
   10) PAGE-SPECIFIC NUANCES
   ----------------------------- */
/* Recipe badges and macro rows */
.recipe-card p strong { color: var(--primary, #215A3A); }

/* Evidence note */
.evidence-note { font-size: 14px; color: var(--muted, #65737e); background: #ffffff; padding: 8px 12px; border-left: 4px solid var(--primary, #215A3A); border-radius: 8px; }

/* Mini pricing section */
.pricing-mini .plan-card { border: 1px solid rgba(0,0,0,.06); }

/* Contact info snippets */
address a, .contact-buttons a { color: #e9f2ed; }
footer address a { color: #c8f1de; }

/* Artistic separators for sections */
section > .container > .content-wrapper::before { content: ""; display: none; }

/* -----------------------------
   11) RESPONSIVE BEHAVIOR
   ----------------------------- */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
}

@media (min-width: 768px) {
  .text-image-section { flex-direction: row; }
  .content-wrapper { gap: 24px; }
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  .supporting-bullets, .value-bullets { flex-direction: row; flex-wrap: wrap; }
  .searchbox { flex-direction: row; align-items: center; justify-content: space-between; }
  h1 { font-size: 42px; }
}

@media (min-width: 1024px) {
  .content-wrapper { flex-direction: column; }
  header .content-wrapper { flex-direction: row; }
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* -----------------------------
   12) UTILITIES & HELPER CLASSES
   ----------------------------- */
.hide { display: none !important; }
.mt-20 { margin-top: 20px !important; }
.mb-20 { margin-bottom: 20px !important; }

/* -----------------------------
   13) ENSURE FLEX USAGE FOR ALL LISTED CONTAINERS
   ----------------------------- */
/* Additional containers found in HTML */
.footer-nav, .footer-main-links, .footer-legal-links, .review-list, .ratings-overview, .pagination, .contact-buttons, .trust-badges, .cta-group, .steps, .value-bullets, .supporting-bullets, .recipe-teasers, .recipe-grid, .principles-grid, .feature-grid, .collections, .stories, .pricing-table, .pricing-mini { display: flex; }

/* Explicit alignment to prevent overlapping */
.footer-main-links, .footer-legal-links, .review-list, .recipe-grid, .feature-grid, .principles-grid, .collections, .stories, .pricing-table, .pricing-mini { flex-wrap: wrap; gap: 20px; }

/* -----------------------------
   14) FORMS & MISC (if present)
   ----------------------------- */
input[type="text"], input[type="email"], textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #cfd8dc; background: #fff; transition: border .2s ease, box-shadow .2s ease; }
input[type="text"]:focus, input[type="email"]:focus, textarea:focus { border-color: var(--primary, #215A3A); box-shadow: 0 0 0 4px rgba(33,90,58,.12); outline: none; }

/* -----------------------------
   15) PRINT & MISC ACCESSIBILITY
   ----------------------------- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; color: #000; }
}

/* -----------------------------
   16) PAGE TOP/BOTTOM SPACING
   ----------------------------- */
main section { padding: 28px 0; }

/* -----------------------------
   17) ARIA-CURRENT NAV IN MOBILE & FOOTER
   ----------------------------- */
.mobile-nav a[aria-current="page"], .footer-legal-links a[aria-current="page"], .footer-main-links a[aria-current="page"] { background: var(--primary, #215A3A); color: #fff; }

/* -----------------------------
   18) SAFETY: No grid/columns used – flexbox only
   ----------------------------- */
/* Confirmed: No usage of display:grid, grid-*, column-* properties. */
