/* =============================
   Pulsing Roam - style.css
   Soft Pastel UI with brand personality
   Mobile-first, Flexbox-only layouts
   ============================= */

/* -----------------------------
   0) Reset & Base Normalization
   ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.2rem; }
p { margin: 0; }
button { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(215,38,61,0.45); outline-offset: 2px; }

/* -----------------------------
   1) Design Tokens (CSS Vars)
   ----------------------------- */
:root {
  /* Brand */
  --color-primary: #1F2933; /* dark slate */
  --color-secondary: #D7263D; /* brand red */
  --color-accent: #F5F7FA; /* light gray */

  /* Soft Pastels */
  --pastel-rose: #FCE7EF;
  --pastel-mint: #E7F8F2;
  --pastel-sky:  #EAF4FF;
  --pastel-lav:  #F2ECFF;
  --pastel-butter:#FFF6DB;
  --pastel-peach: #FFF1E6;
  --white: #FFFFFF;
  --ink: #1F2933;
  --text: #2B2F36;
  --muted: #5C6470;

  /* Shadows & Radius */
  --shadow-soft: 0 6px 18px rgba(31,41,51,0.06), 0 2px 6px rgba(31,41,51,0.05);
  --shadow-elev: 0 10px 30px rgba(31,41,51,0.10), 0 4px 12px rgba(31,41,51,0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  /* 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 */
  --t-fast: 160ms;
  --t-mid: 260ms;
  --t-slow: 420ms;
}

/* -----------------------------
   2) Base Typography & Body
   ----------------------------- */
body {
  font-family: Verdana, Geneva, sans-serif;
  color: var(--text);
  background: var(--pastel-peach);
  line-height: 1.65;
}

h1, h2, h3, h4 { font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; color: var(--ink); letter-spacing: 0.3px; margin: 0; }

h1 { font-size: 40px; line-height: 1.1; }
h2 { font-size: 32px; line-height: 1.2; }
h3 { font-size: 24px; line-height: 1.3; }

p, li { font-size: 16px; color: var(--text); }
small { font-size: 14px; color: var(--muted); }

strong { color: var(--ink); }

/* Links */
a { color: var(--color-primary); text-decoration-thickness: 1px; transition: color var(--t-mid) ease, background-color var(--t-mid) ease, border-color var(--t-mid) ease; }
a:hover { color: var(--color-secondary); }

/* -----------------------------
   3) Global Layout Helpers (Flex-only)
   ----------------------------- */
main { display: flex; flex-direction: column; gap: var(--s-40); }

.container {
  display: flex; flex-direction: column; gap: var(--s-20);
  width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px;
}

.content-wrapper { display: flex; flex-direction: column; gap: var(--s-20); }

section { margin-bottom: var(--s-60); padding: var(--s-40) 20px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }

/* Alternating dreamy pastel wash for sections */
section:nth-of-type(2n) { background: var(--pastel-sky); }
section:nth-of-type(3n) { background: var(--pastel-lav); }
section.hero { background: var(--pastel-rose); box-shadow: var(--shadow-elev); }

/* Mandatory spacing & 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 gaps between all content blocks inside sections */
section .text-section { display: flex; flex-direction: column; gap: var(--s-12); padding: var(--s-16); background: rgba(255,255,255,0.6); border: 1px solid rgba(31,41,51,0.06); border-radius: var(--radius-sm); }

/* -----------------------------
   4) Header & Navigation
   ----------------------------- */
header { position: relative; z-index: 50; background: var(--pastel-mint); box-shadow: var(--shadow-soft); }
header .container { padding-top: var(--s-12); padding-bottom: var(--s-12); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s-20); }
.brand { display: flex; align-items: center; gap: var(--s-12); }
.brand img { height: 42px; width: auto; filter: drop-shadow(0 2px 4px rgba(31,41,51,0.08)); }

.main-nav { display: none; align-items: center; gap: var(--s-16); }
.main-nav a { padding: 10px 14px; border-radius: 12px; color: var(--ink); background: rgba(255,255,255,0.6); border: 1px solid rgba(31,41,51,0.06); }
.main-nav a:hover { background: var(--white); border-color: rgba(31,41,51,0.18); color: var(--color-secondary); }

/* Mobile burger */
.mobile-menu-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 70; height: 48px; width: 52px; border-radius: 14px; color: var(--white); background: var(--color-secondary); box-shadow: var(--shadow-elev); display: flex; align-items: center; justify-content: center; transition: transform var(--t-mid) ease, background-color var(--t-mid) ease; }
.mobile-menu-toggle:hover { transform: translateY(-2px); background: #c21f33; }

/* Mobile Menu Overlay */
.mobile-menu { position: fixed; inset: 0; background: rgba(31,41,51,0.15); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 90; display: flex; flex-direction: row; justify-content: flex-end; align-items: stretch; opacity: 0; pointer-events: none; transition: opacity var(--t-mid) ease; }
.mobile-menu .mobile-nav { display: flex; flex-direction: column; gap: 10px; width: 82%; max-width: 340px; background: var(--pastel-lav); box-shadow: var(--shadow-elev); padding: 20px; border-top-left-radius: 18px; border-bottom-left-radius: 18px; transform: translateX(100%); transition: transform var(--t-slow) ease; }
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu.open .mobile-nav { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; align-items: center; justify-content: center; display: flex; height: 40px; width: 40px; border-radius: 10px; color: var(--ink); background: rgba(255,255,255,0.7); margin-left: auto; margin-bottom: 10px; }
.mobile-nav a { padding: 14px 16px; border-radius: 12px; background: var(--white); color: var(--ink); border: 1px solid rgba(31,41,51,0.08); }
.mobile-nav a:hover { background: var(--pastel-sky); color: var(--color-secondary); }

/* Desktop up */
@media (min-width: 992px) {
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
}

/* -----------------------------
   5) Hero & Key Elements
   ----------------------------- */
.hero { display: flex; }
.hero .container { gap: var(--s-20); }
.hero .content-wrapper { gap: var(--s-16); }
.hero h1 { color: var(--ink); text-shadow: 0 2px 0 rgba(255,255,255,0.4); }
.hero .subheadline { font-size: 18px; color: var(--muted); max-width: 70ch; }

/* CTA Buttons */
.cta-group { display: flex; flex-wrap: wrap; gap: var(--s-12); }
.cta-group a { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 14px; border: 1px solid rgba(31,41,51,0.12); background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); font-weight: 700; transition: transform var(--t-mid) ease, background-color var(--t-mid) ease, color var(--t-mid) ease, border-color var(--t-mid) ease; }
.cta-group a:hover { transform: translateY(-2px); border-color: rgba(31,41,51,0.25); }
.cta-group a:first-child { background: var(--color-secondary); color: var(--white); border-color: transparent; }
.cta-group a:first-child:hover { background: #c21f33; }

/* Trust badges & quick contact */
.trust-badges { display: flex; }
.trust-badges ul { display: flex; flex-direction: column; gap: 10px; padding: 0 0 0 18px; margin: 0; }
.trust-badges li { background: rgba(255,255,255,0.6); border: 1px solid rgba(31,41,51,0.06); border-radius: 12px; padding: 10px 12px; list-style: disc; }

.quick-contact-bar { display: flex; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 12px; background: var(--pastel-butter); color: var(--ink); box-shadow: var(--shadow-soft); }
.quick-contact-bar p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.quick-contact-bar img { height: 18px; width: 18px; }

/* Stats / Certifications / Warranty as soft pastel chips */
.stats, .certifications, .warranty { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--pastel-mint); border: 1px solid rgba(31,41,51,0.06); }
.stats strong { color: var(--color-secondary); }

/* -----------------------------
   6) Lists, Text Blocks, Content Sections
   ----------------------------- */
section h2 + ul,
section h2 + ol { margin-top: var(--s-12); }

ul li, ol li { margin-bottom: 10px; }

/* Ordered lists with soft counters */
ol { counter-reset: pastel-counter; list-style: none; padding-left: 0; }
ol li { counter-increment: pastel-counter; display: flex; align-items: flex-start; gap: 12px; }
ol li::before { content: counter(pastel-counter) "."; min-width: 26px; height: 26px; border-radius: 8px; background: var(--pastel-sky); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 1px solid rgba(31,41,51,0.06); }

/* Links inside paragraphs */
section p a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 2px; }
section p a:hover { background: rgba(215,38,61,0.08); }

/* Distinct testimonial cards - dark text on light background for accessibility */
.testimonial-card { background: var(--white); border: 1px solid rgba(31,41,51,0.10); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); color: var(--ink); }
.testimonial-card p { margin: 0; }
.testimonial-card p strong { display: block; margin-top: 2px; }

/* -----------------------------
   7) Footer
   ----------------------------- */
footer { background: var(--pastel-sky); padding: var(--s-40) 0; border-top: 1px solid rgba(31,41,51,0.08); }
footer .content-wrapper { gap: var(--s-20); }
footer nav { display: flex; flex-wrap: wrap; gap: 10px; }
footer nav a { padding: 8px 12px; border-radius: 10px; background: var(--white); border: 1px solid rgba(31,41,51,0.06); color: var(--ink); }
footer nav a:hover { color: var(--color-secondary); border-color: rgba(31,41,51,0.18); }
footer .text-section { display: flex; flex-direction: column; gap: 6px; }

/* -----------------------------
   8) Buttons & Chips (Utility)
   ----------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; padding: 12px 18px; border: 1px solid rgba(31,41,51,0.12); background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); transition: transform var(--t-mid) ease, background-color var(--t-mid) ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--color-secondary); color: var(--white); border-color: transparent; }
.btn-outline { background: var(--white); color: var(--ink); }
.btn-ghost { background: rgba(255,255,255,0.6); }

.chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--pastel-rose); border: 1px solid rgba(31,41,51,0.06); }

/* -----------------------------
   9) Cards (generic helper)
   ----------------------------- */
.card { display: flex; flex-direction: column; gap: 12px; background: var(--white); border: 1px solid rgba(31,41,51,0.08); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: 16px; }
.card-container { justify-content: flex-start; }

/* -----------------------------
   10) Cookie Consent (Banner + Modal)
   ----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; background: var(--pastel-butter); color: var(--ink); border-top: 1px solid rgba(31,41,51,0.10); box-shadow: 0 -10px 30px rgba(31,41,51,0.08); transform: translateY(100%); transition: transform var(--t-slow) ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .cookie-actions .btn-accept { background: var(--color-secondary); color: var(--white); border-color: transparent; }
.cookie-banner .cookie-actions .btn-reject { background: var(--white); color: var(--ink); }
.cookie-banner .cookie-actions .btn-settings { background: var(--pastel-rose); }

/* Modal */
.cookie-modal { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; background: rgba(31,41,51,0.28); opacity: 0; pointer-events: none; transition: opacity var(--t-mid) ease; }
.cookie-modal.show { opacity: 1; pointer-events: auto; }
.cookie-modal-content { display: flex; flex-direction: column; gap: 14px; width: 92%; max-width: 640px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-elev); padding: 20px; }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; padding: 10px; border: 1px solid rgba(31,41,51,0.08); border-radius: 12px; background: var(--pastel-sky); }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 10px; background: var(--white); }
.cookie-category .label { display: flex; flex-direction: column; gap: 4px; }
.cookie-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle switch (for analytics/marketing) */
.toggle { display: inline-flex; align-items: center; gap: 8px; }
.toggle input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #D9DEE5; position: relative; outline: none; transition: background-color var(--t-mid) ease; border: 1px solid rgba(31,41,51,0.18); }
.toggle input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(31,41,51,0.25); transition: transform var(--t-mid) ease; }
.toggle input[type="checkbox"]:checked { background: rgba(215,38,61,0.8); border-color: rgba(215,38,61,0.8); }
.toggle input[type="checkbox"]:checked::after { transform: translateX(18px); }

/* -----------------------------
   11) Responsive Rules
   ----------------------------- */
/* Text-image sections should stack on mobile */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* Wider layouts */
@media (min-width: 768px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }

  .container { gap: var(--s-24); }
  .content-wrapper { gap: var(--s-24); }

  .quick-contact-bar { justify-content: center; }

  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .hero .content-wrapper { flex-direction: column; max-width: 900px; }
}

/* -----------------------------
   12) Accessibility & Micro-interactions
   ----------------------------- */
/* Subtle hover lifts for cards and testimonial */
.card:hover, .testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elev); transition: transform var(--t-mid) ease, box-shadow var(--t-mid) ease; }

/* Ensure readable testimonials on colored sections */
section .testimonial-card { background: var(--white); color: var(--ink); }

/* -----------------------------
   13) Page-specific small enhancements
   ----------------------------- */
/* Index: badges & stats spacing */
.hero .trust-badges { margin-top: 6px; }
.stats p, .certifications p, .warranty p { margin: 0; }

/* Legal pages hero toned softer */
body:has(main) section.hero h1 { letter-spacing: 0.5px; }

/* -----------------------------
   14) Misc Layout Assurances (Flex-only)
   ----------------------------- */
/* All navigation wrappers and groups are flex */
nav, .mobile-nav, .cta-group, .trust-badges, .stats, .certifications, .warranty, .quick-contact-bar, footer nav { display: flex; }

/* Avoid overlapping content by consistent gaps */
.container > * + * { margin-top: 0; }

/* -----------------------------
   15) Enhanced Contrast for review lines under testimonial sections
   ----------------------------- */
section p img[alt^="Bewertung"] { vertical-align: middle; margin-right: 6px; }
section p img[alt^="Bewertung"] + * { color: var(--ink); font-weight: 700; }

/* -----------------------------
   16) Print basics
   ----------------------------- */
@media print {
  .mobile-menu-toggle, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  header, footer, section { box-shadow: none; background: #fff; }
}
