/* ===============================
   Dazzle Trajectory Ernährungsmanufaktur
   Style: industrial_modern (dark, metallic, urban)
   Fonts: Trebuchet MS (display), Verdana (body)
   Only Flexbox layouts (no grid/columns)
   =============================== */

/* ========== CSS RESET & BASE ========== */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 20px; }
button { background: none; border: none; padding: 0; font: inherit; color: inherit; }
:focus { outline: 2px dashed #E07A3F; outline-offset: 2px; }

/* ========== THEME VARIABLES ========== */
:root {
  --brand-primary: #276749; /* deep green */
  --brand-secondary: #E07A3F; /* industrial orange */
  --brand-accent: #FFFFFF;

  --bg: #0f1113;            /* urban black */
  --surface: #15181b;       /* deep charcoal */
  --elev: #1d2125;          /* elevated card */
  --line: #2a2f34;          /* steel line */
  --metal: #9aa0a6;         /* brushed steel */
  --metal-hi: #c2c8cf;      /* light steel */

  --text: #e6e8ea;          /* main text */
  --muted: #a9b0b6;         /* secondary text */

  --success: #2ea44f;
  --warning: #e0b63f;
  --danger: #d9534f;

  --testimonial-bg: #f3f5f7; /* light background for testimonials */
  --testimonial-text: #111111; /* dark text for readability */

  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.03), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-2: 0 1px 0 rgba(255,255,255,0.04), 0 10px 32px rgba(0,0,0,0.45);
  --ring: 0 0 0 2px rgba(224,122,63,0.4);
}

/* ========== TYPOGRAPHY ========== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--brand-accent);
  margin: 0 0 12px 0;
  letter-spacing: 0.4px;
}

h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.3; color: #f1f3f4; }
h3 { font-size: 18px; line-height: 1.4; color: #e8eaed; }

p { margin: 0 0 14px 0; color: var(--text); }
small, .microcopy { color: var(--muted); font-size: 13px; }

.subheadline { color: var(--muted); font-size: 16px; }

/* Links */
a { color: var(--brand-secondary); transition: color 0.25s ease; }
a:hover { color: #ff8f55; }

/* ========== LAYOUT PRIMITIVES (FLEX ONLY) ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px; /* base spacing; will adjust responsively */
}

/* MANDATORY CSS SPACING AND ALIGNMENT 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 spacing between child blocks */
.content-wrapper > * { margin-bottom: 20px; }
.content-wrapper > *:last-child { margin-bottom: 0; }

/* ========== HEADER ========== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  position: relative;
  z-index: 50;
}

.site-header .container { padding-top: 10px; padding-bottom: 10px; }

.site-header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.logo img { height: 34px; filter: contrast(1.05) saturate(0.9); }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.main-nav a:hover { color: #ffffff; border-color: var(--line); background: #111418; }

.header-ctas { display: none; align-items: center; gap: 10px; }

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 6px;
  color: #fff;
  background: #121518;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #0f1215; }

/* ========== MOBILE MENU OVERLAY ========== */
.mobile-menu {
  position: fixed;
  right: 0; top: 0; bottom: 0; left: 0;
  background: rgba(12,14,16,0.92);
  display: flex;
  flex-direction: column;
  padding: 18px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 9997;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin-bottom: 10px;
  border-radius: 6px;
  color: #fff;
  background: #1a1d21;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  border-radius: 8px;
  background: #13161a;
  border: 1px solid var(--line);
  color: #e9ecef;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.mobile-nav a:hover { background: #0e1114; border-color: #3a4046; }

/* ========== HERO ========== */
.hero {
  background: var(--elev);
  border-bottom: 1px solid var(--line);
}
.hero .container { padding-top: 30px; padding-bottom: 30px; }
.hero h1 { color: #ffffff; }
.hero .subheadline { color: var(--muted); }

.trust-badges ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}
.trust-badges li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #121518;
  border: 1px solid var(--line);
  color: #d9dde1;
}
.trust-badges img { width: 18px; height: 18px; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: #1d4d38;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: #2e7b56; }

.btn-secondary {
  background: transparent;
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
}
.btn-secondary:hover { background: rgba(224,122,63,0.12); }

.success-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e6f6ea;
  color: #0f5132;
  border: 1px solid #b7e4c7;
  font-weight: 700;
}

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* ========== LISTS & TEXT BLOCKS ========== */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; }
li { color: var(--text); }
strong { color: #f5f7f8; }
em { color: #dfe3e6; }

/* ========== CARDS & ELEVATED SURFACES ========== */
.card {
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 16px;
}

/* Testimonials: light background with dark text for accessibility */
.testimonial-card {
  background: var(--testimonial-bg);
  color: var(--testimonial-text);
  border: 1px solid #d9dee2;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6), 0 10px 24px rgba(0,0,0,0.08);
}
.testimonial-card p { color: var(--testimonial-text); margin: 0; }

.testimonial-list { display: flex; flex-wrap: wrap; gap: 16px; }
.testimonial-list .testimonial-card { flex: 1 1 260px; }

/* ========== BADGES (menue-abo) ========== */
.badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dee2e6;
  background: #121518;
}
.badges img { width: 16px; height: 16px; }

/* ========== SECTIONS ========== */
section { border-top: 1px solid var(--line); }
section:nth-of-type(even) { background: #121418; }
section:nth-of-type(odd) { background: var(--surface); }
section .container { padding-top: 24px; padding-bottom: 24px; }

/* Ensure minimum spacing between any content cards inside wrapper */
.content-grid > *,
.card-container > * { margin-bottom: 0; }

/* ========== FOOTER ========== */
.site-footer { background: #0d0f12; border-top: 1px solid var(--line); }
.site-footer .container { padding-top: 28px; padding-bottom: 28px; }
.site-footer .content-wrapper { gap: 22px; }
.site-footer h3 { color: #dde1e5; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: #ffffff; }
.site-footer p { color: #c8ccd0; display: flex; align-items: center; gap: 8px; }
.site-footer img { width: 16px; height: 16px; }

.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { height: 36px; }

/* ========== ACCESSIBILITY HIGHLIGHTS ========== */
:focus-visible { box-shadow: var(--ring); outline: none; }

/* ========== RESPONSIVE MEDIA ========== */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .content-wrapper { gap: 20px; }
}

@media (min-width: 768px) {
  .text-image-section { flex-direction: row; }
  .hero .container { padding-top: 44px; padding-bottom: 44px; }
}

@media (min-width: 992px) {
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
  .site-footer .content-wrapper { flex-direction: row; flex-wrap: wrap; }
  .site-footer .content-wrapper > div { flex: 1 1 220px; }
}

/* ========== COOKIES: BANNER & MODAL ========== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #0f1317;
  color: #e9ecef;
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  transform: translateY(110%);
  transition: transform 0.35s ease;
  z-index: 9998;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { margin: 0; color: #d5d9dd; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .btn { flex: 0 0 auto; }
.cookie-buttons .btn-accept { background: var(--brand-primary); color: #fff; border-color: #1d4d38; }
.cookie-buttons .btn-reject { background: #1a1f24; color: #e7eaee; border-color: #31363b; }
.cookie-buttons .btn-settings { background: transparent; color: var(--brand-secondary); border-color: var(--brand-secondary); }
.cookie-buttons .btn-reject:hover { background: #14181c; }

.cookie-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 9999;
}
.cookie-overlay.show { opacity: 1; pointer-events: auto; }

.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.98);
  width: 92%; max-width: 640px;
  background: #11151a;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  padding: 18px;
  opacity: 0; pointer-events: none; transition: transform 0.25s ease, opacity 0.25s ease; z-index: 10000;
}
.cookie-modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.cookie-modal h3 { margin-bottom: 6px; }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.cookie-category { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #0e1216; }
.cookie-category small { color: var(--muted); }
.cookie-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 10px; }

/* Simple switch style (for optional toggles) */
.switch { position: relative; width: 44px; height: 24px; background: #2a2f34; border-radius: 999px; border: 1px solid #3a4046; display: inline-flex; align-items: center; padding: 2px; }
.switch::after { content: ""; width: 18px; height: 18px; background: #cfd6dd; border-radius: 50%; transition: transform 0.2s ease; }
.switch.on { background: #1f6b4b; border-color: #1d4d38; }
.switch.on::after { transform: translateX(20px); background: #ffffff; }

/* ========== UTILITIES & HELPERS ========== */
.hr { height: 1px; background: var(--line); width: 100%; }
.muted { color: var(--muted); }
.center { display: flex; align-items: center; justify-content: center; }

/* ========== PAGE-SPECIFIC POLISH ========== */
/* Hero CTAs tighter on index/menue-abo/thank-you */
.hero .cta-group .btn { min-width: 180px; }

/* Index: Trust text block spacing */
.hero .text-section ul { gap: 6px; }

/* Gesunde Rezepte */
.text-section h3 { color: #f0f2f4; }

/* Menue-Abo price blocks */
.text-section p strong { color: #ffffff; }

/* Contact info rows */
.content-wrapper p img { width: 16px; height: 16px; }

/* Thank You */
.hero .success-badge { border: 1px solid #a7d3b3; }

/* ========== FLEX LAYOUT ENHANCEMENTS ========== */
/* Example responsive two-column on wider screens without grid */
@media (min-width: 992px) {
  .content-grid { justify-content: flex-start; }
  .content-grid > * { flex: 0 1 calc(50% - 10px); }
  .card-container > * { flex: 1 1 calc(33.333% - 16px); }
}

/* ========== HOVER STATES & MICRO-INTERACTIONS ========== */
.btn:hover { box-shadow: 0 0 0 0 rgba(0,0,0,0), 0 12px 28px rgba(0,0,0,0.35); transform: translateY(-1px); }

/* List inline actions */
.text-section a { text-decoration: underline; text-decoration-color: rgba(224,122,63,0.6); text-underline-offset: 3px; }
.text-section a:hover { text-decoration-color: rgba(224,122,63,1); }

/* ========== PRINT BASE (optional safe) ========== */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-overlay, .cookie-modal { display: none !important; }
  body { background: #ffffff; color: #000000; }
}

/* ========== SAFETY: ENSURE NO OVERLAP & MIN SPACING ========== */
section + section { margin-top: 0; }
section .content-wrapper > .testimonial-card + .testimonial-card { margin-top: 12px; }

/* ========== ALIGNMENT RULES PER SPEC ========== */
/* Already handled by display:flex and align-items on sections */
.text-image-section { align-items: center; }
.card-content { display: flex; flex-direction: column; justify-content: center; }

/* ========== EDGE STATES ========== */
/* When JS adds body.nav-open, prevent scroll */
body.nav-open { overflow: hidden; }

/* Readability in testimonial areas regardless of parent color */
.testimonial-card strong { color: #0b0c0d; }

/* ========== END ========== */
