/* =============================
   Kante & Kelle Innenausbau
   style.css — Vintage/Retro theme
   Mobile-first, Flexbox-only
   ============================= */

/* ========== RESET & NORMALIZE ========== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding-left: 1.2rem; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; background: none; border: none; }
input, select, textarea { font: inherit; }

/* ========== THEME VARIABLES (with fallbacks) ========== */
:root {
  --color-primary: #1F2937; /* deep slate */
  --color-secondary: #BF6D3A; /* rustic terracotta */
  --color-accent: #F5F7FA; /* soft light */
  --color-cream: #F8F3E7; /* vintage paper */
  --color-paper: #FBF7EF; /* lighter paper */
  --color-ink: #1F2937; /* dark text */
  --color-ink-soft: #374151; /* softer text */
  --color-brown: #7A4B2E; /* warm brown for trims */
  --color-olive: #6C7461; /* muted olive accent */
  --shadow-soft: 0 2px 6px rgba(31, 41, 55, 0.12);
  --shadow-card: 0 6px 16px rgba(31, 41, 55, 0.15);
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
  --maxw: 1120px;
}

/* ========== BASE TYPOGRAPHY & BODY ========== */
body {
  font-family: Verdana, Tahoma, Arial, sans-serif; /* brand body */
  color: var(--color-ink);
  background-color: var(--color-paper);
  line-height: 1.6;
  letter-spacing: 0.1px;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; /* brand display */
  color: var(--color-primary);
}

h1 { font-size: 36px; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 28px; line-height: 1.3; margin-bottom: 16px; }
h3 { font-size: 20px; line-height: 1.35; margin: 16px 0 8px; }

p { font-size: 16px; color: var(--color-ink-soft); }
.small { font-size: 14px; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-brown);
}

.subheadline { font-size: 18px; color: var(--color-ink-soft); margin-top: 8px; }

/* Retro link styling */
a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 2px; transition: color 0.2s ease, background-color 0.2s ease; }
a:hover { color: #9f582f; }

/* ========== LAYOUT HELPERS (FLEX-ONLY) ========== */
.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: var(--maxw);
  padding: 0 20px;
  margin: 0 auto;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 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 minimum spacing between elements */
section + section { margin-top: 20px; }

/* ========== VINTAGE/RETRO SURFACES ========== */
.pattern-paper {
  background-color: var(--color-cream);
  background-image:
    radial-gradient(rgba(31,41,55,0.05) 1px, transparent 1px),
    repeating-linear-gradient(90deg, rgba(191,109,58,0.06), rgba(191,109,58,0.06) 2px, transparent 2px, transparent 6px);
  background-size: 6px 6px, 8px 8px;
}

.striped-top {
  background-image: repeating-linear-gradient(45deg, rgba(191,109,58,0.12) 0, rgba(191,109,58,0.12) 8px, transparent 8px, transparent 16px);
}

/* ========== HEADER & NAVIGATION ========== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-cream);
  box-shadow: 0 2px 0 rgba(191,109,58,0.15);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo img { height: 36px; width: auto; }

.main-nav { display: none; gap: 16px; align-items: center; }
.main-nav a {
  color: var(--color-primary);
  font-size: 15px;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover { background: rgba(191,109,58,0.12); color: var(--color-brown); }

.button.cta { display: none; }

/* Mobile hamburger */
.mobile-menu-toggle {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--color-primary);
  border: 2px solid rgba(31,41,55,0.2);
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #e9eef6; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-cream);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 120;
  padding: 20px;
  box-shadow: -10px 0 20px rgba(31,41,55,0.2);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-primary);
  border: 2px solid rgba(31,41,55,0.2);
  border-radius: 50%;
  background: var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  background: #fff7ed; /* warm retro list */
  border: 1px solid rgba(191,109,58,0.35);
  border-radius: var(--radius-m);
  color: var(--color-primary);
  font-size: 18px;
  box-shadow: var(--shadow-soft);
}
.mobile-nav a:hover { background: #fff1dc; }

/* ========== HERO ========== */
.hero {
  background-color: var(--color-cream);
  background-image:
    radial-gradient(rgba(31,41,55,0.045) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(191,109,58,0.08), rgba(191,109,58,0.08) 1px, transparent 1px, transparent 10px);
  background-size: 6px 6px, 100% 12px;
  border-bottom: 3px solid rgba(191,109,58,0.25);
}
.hero .container { padding-top: 40px; padding-bottom: 40px; }
.hero .content-wrapper { max-width: 820px; }
.hero h1 { font-size: 32px; }
.hero .subheadline { font-size: 18px; }

/* ========== TEXT BLOCKS & LISTS ========== */
.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; }
.text-section ul li::marker { color: var(--color-secondary); }
.text-section ol { padding-left: 1.3rem; }
.text-section a { font-weight: 600; }

/* ========== CTA GROUP ========== */
.cta-group {
  display: flex; flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ========== BUTTONS ========== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px; /* retro pill */
  border: 2px solid var(--color-brown);
  background: #fff;
  color: var(--color-brown);
  box-shadow: 0 2px 0 rgba(122,75,46,0.45);
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.button:hover { transform: translateY(-1px); background: #fff7ed; }
.button:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(122,75,46,0.35); }

.button.primary {
  background: var(--color-secondary);
  color: #fff;
  border-color: #9f582f;
}
.button.primary:hover { background: #a85f34; }

.button.secondary {
  background: #fff7ed;
  color: var(--color-brown);
}

.button.cta { /* desktop-only prominent */ }

/* ========== CARDS (GENERIC) ========== */
.card {
  background: #fff;
  border: 1px solid rgba(31,41,55,0.12);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

/* ========== TESTIMONIALS (high contrast, light BG) ========== */
.testimonial-card {
  background: var(--color-cream);
  border: 1px solid rgba(31,41,55,0.15);
  border-left: 6px solid var(--color-secondary);
  border-radius: var(--radius-m);
  color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}
.testimonial-card p { color: var(--color-primary); }

/* ========== FOOTER ========== */
footer {
  background: var(--color-cream);
  border-top: 3px solid rgba(191,109,58,0.25);
  margin-top: 40px;
}
footer .container { padding-top: 24px; padding-bottom: 24px; }
footer .content-wrapper {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
}
.footer-nav, .footer-legal {
  display: flex; flex-direction: column; gap: 8px;
}
.footer-nav a, .footer-legal a {
  color: var(--color-primary);
  padding: 6px 0;
  border-bottom: 1px dotted rgba(31,41,55,0.2);
}
.footer-nav a:hover, .footer-legal a:hover { color: var(--color-brown); }

/* ========== MEDIA & ICON ALIGNMENT ========== */
.text-section img { display: inline-block; vertical-align: middle; margin-right: 8px; height: 16px; width: 16px; }

/* ========== RESPONSIVE (Mobile-first) ========== */
@media (min-width: 600px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
}

@media (min-width: 768px) {
  .hero h1 { font-size: 44px; }
  .text-image-section { flex-direction: row; }
}

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .button.cta { display: inline-flex; }
  .mobile-menu-toggle { display: none; }
  header .container { gap: 24px; }
  .content-wrapper { flex-direction: column; }
  footer .content-wrapper { justify-content: space-between; }
}

/* ========== ACCESSIBILITY FOCUS ========== */
:focus-visible {
  outline: 3px dashed var(--color-secondary);
  outline-offset: 2px;
}

/* ========== COOKIE CONSENT BANNER ========== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  background: #fff7ed;
  color: var(--color-primary);
  border-top: 3px solid rgba(191,109,58,0.35);
  box-shadow: 0 -8px 24px rgba(31,41,55,0.2);
  padding: 16px 20px;
  z-index: 130;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; border: 2px solid var(--color-brown); background: #fff; color: var(--color-brown); }
.cookie-btn.accept { background: var(--color-secondary); color: #fff; border-color: #9f582f; }
.cookie-btn.reject { background: #fff; }
.cookie-btn.settings { background: #fff7ed; }

/* Cookie preferences modal */
.cookie-modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(31,41,55,0.6);
  z-index: 140;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .modal-content {
  display: flex; flex-direction: column; gap: 14px;
  width: 92%; max-width: 560px;
  background: var(--color-cream);
  border: 1px solid rgba(31,41,55,0.2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 10px; }
.cookie-modal .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dotted rgba(31,41,55,0.2); }
.cookie-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ========== MISC FLEX UTILITIES ========== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

/* ========== PAGE-SPECIFIC TOUCHES ========== */
/* Why/Features lists as retro feature items */
.feature-item h3 { color: var(--color-brown); }

/* Price & Ablauf ordered list spacing */
ol li { padding-left: 4px; }

/* Contact text accents */
.text-section strong { color: var(--color-primary); }

/* ========== FORM-LIKE ELEMENTS (for toggles in cookie modal) ========== */
.switch {
  position: relative; width: 46px; height: 26px; display: inline-flex; align-items: center;
  border-radius: 999px; background: #e8e1d7; border: 1px solid rgba(31,41,55,0.2);
}
.switch::after {
  content: ""; width: 20px; height: 20px; background: #fff; border: 1px solid rgba(31,41,55,0.25);
  border-radius: 50%; transform: translateX(2px); transition: transform 0.2s ease, background-color 0.2s ease;
}
.switch.on { background: rgba(191,109,58,0.35); }
.switch.on::after { transform: translateX(22px); background: #fff7ed; }

/* ========== PRINT BASICS ========== */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; color: #000; }
}

/* ========== SAFETY SPACING ========== */
section .container .content-wrapper > * + * { margin-top: 8px; }

/* ========== HOVER MICRO-ANIMATIONS ========== */
.card:hover { transform: translateY(-2px); transition: transform 0.2s ease; }

/* ========== DARK TEXT IN TESTIMONIALS (contrast requirement) ========== */
.testimonial-card strong { color: var(--color-primary); }

/* ========== ADDITIONAL LAYOUT REINFORCEMENT (FLEX-ONLY) ========== */
nav, footer, header, main, section { display: block; }

/* Ensure all key layout wrappers use flex */
footer .content-wrapper, .hero .container, .cta-group, .text-section, .card-container, .content-grid, .text-image-section, .feature-item, .testimonial-card { display: flex; }

/* Maintain directions explicitly for above to guarantee flex usage */
footer .content-wrapper { flex-wrap: wrap; }
.hero .container { flex-direction: column; }
.cta-group { flex-wrap: wrap; }
.text-section { flex-direction: column; }
.content-grid { flex-wrap: wrap; }
.text-image-section { flex-wrap: wrap; align-items: center; }
.feature-item { flex-direction: column; align-items: flex-start; }
.testimonial-card { align-items: center; }

/* ========== DESKTOP LAYOUT POLISH ========== */
@media (min-width: 992px) {
  .hero .container { flex-direction: row; }
}
