/* ==========================================
           1. DESIGN TOKENS & DESIGN SYSTEM
           ========================================== */
:root {
  /* Farbpalette */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-elevated: #f1f5f9;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #64748b;

  --color-primary: #0f172a;
  --color-accent: #a02d18;
  --color-accent-hover: #a02d18;
  --color-sage: #10b981;
  --color-sage-soft: #d1fae5;
  --color-gold: #7a4006;
  --color-gold-soft: #fef3c7;

  --color-border: #cbd5e1;
  --color-focus: #2563eb;

  /* Typografie Stack */
  --font-heading:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Fluide Schriftgrößen */
  --fs-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-xl: clamp(1.35rem, 1.2rem + 0.75vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --fs-3xl: clamp(2.25rem, 1.8rem + 2.2vw, 3.5rem);

  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 32px -8px rgba(15, 23, 42, 0.16);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b1120;
    --color-surface: #1e293b;
    --color-surface-elevated: #334155;
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-border: #334155;
    --color-sage-soft: rgba(16, 185, 129, 0.2);
    --color-gold-soft: rgba(245, 158, 11, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================
           2. BASE RESET & ACCESSIBILITY
           ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100vh;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Body Scroll Lock Klasse */
body.menu-is-open {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-accent);
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  z-index: 99999999;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--transition-fast);
  box-shadow: var(--shadow-lg);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: 3px !important;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-text-main);
  line-height: 1.25;
  font-weight: 700;
}

p {
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================
           3. HEADER & HAMBURGER TRIGGER BUTTON
           ========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--color-border);
  transition: opacity var(--transition-fast);
}

@media (prefers-color-scheme: dark) {
  .header {
    background-color: rgba(15, 23, 42, 0.98);
  }
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text-main);
}

.logo-badge {
  background-color: var(--color-sage-soft);
  color: #047857;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hamburger Button (Hoher Kontrast & 100% Sichtbar) */
.hamburger-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 2.85rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-accent);
  color: #ffffff;
  border: 2px solid var(--color-accent-hover);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(224, 90, 71, 0.35);
  transition: all var(--transition-fast);
  font-weight: 800;
}

.hamburger-trigger:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.hamburger-trigger-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}

.hamburger-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 1.2rem;
}

.hamburger-bar {
  height: 2.5px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 2px;
}

/* Desktop Nav Inline */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 900px) {
  .hamburger-trigger {
    display: none !important;
  }

  .desktop-nav {
    display: flex;
  }
}

/* ==========================================
           4. ALLERVORDERSTES DRAWER OVERLAY (z-index: 999998/999999)
           ========================================== */
/* Dunkles Backdrop mit High Blur */
.backdrop-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
}

.backdrop-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Menü-Panel Drawer */
.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 88%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-surface);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}

.drawer-panel.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Gut sichtbarer Schließen Button (X) */
.drawer-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent-hover);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-link {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-main);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface-elevated);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent-hover);
}

.drawer-info-box {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

/* ==========================================
           5. HERO BEREICH (50% Bild / 50% SVG Desktop)
           ========================================== */
.hero-section {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    var(--color-surface) 100%
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    /* 50% / 50% Desktop Split */
    gap: 3.5rem;
  }
}

/* Links: 50% Bild */
.hero-media-box {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
  width: 100%;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-media-box:hover .hero-img {
  transform: scale(1.03);
}

.hero-badge-overlay {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  padding: 1.5rem;
  background: linear-gradient(
    0deg,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(15, 23, 42, 0) 100%
  );
}

/* Rechts: 50% SVG Vektorgrafik + Text */
.hero-content-box {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-svg-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.animated-pulse {
  animation: pulseGlow 3s ease-in-out infinite;
}

.animated-float {
  animation: floatElem 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes floatElem {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* ==========================================
           6. BUTTONS & UI COMPONENTS
           ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.85rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  gap: 0.6rem;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(224, 90, 71, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(8, 3, 3, 0.51);
}

.btn-secondary {
  background-color: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-main);
}

.btn-secondary:hover {
  background-color: var(--color-surface-elevated);
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================
           7. SEKTIONS SWITCHER & SECTIONS
           ========================================== */
.page-section {
  display: none;
  padding-top: 4rem;
  padding-bottom: 6rem;
  animation: fadeInSection 0.35s ease-out;
}

.page-section.active {
  display: block;
}

@keyframes fadeInSection {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-title h2 {
  font-size: var(--fs-2xl);
  margin-bottom: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.process-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.process-number {
  width: 3rem;
  height: 3rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

/* Formular & Rechner */
.form-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.95rem 1.15rem;
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-main);
}

.slider-box {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--color-border);
  outline: none;
  margin: 1.25rem 0;
  cursor: pointer;
}

/* ==========================================
           8. FOOTER & TOAST
           ========================================== */
.footer {
  margin-top: auto;
  background-color: var(--color-primary);
  color: #f8fafc;
  padding-top: 4rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.footer p {
  color: #94a3b8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  font-size: 0.875rem;
  color: #64748b;
}

.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-sage);
  color: #ffffff;
  padding: 1.25rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: none;
  z-index: 900;
  font-weight: 600;
}
/* --- Screenreader-Klasse für Barrierefreiheit --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Scroll-to-Top Button --- */
.scroll-to-top {
  position: fixed;
  bottom: 12rem;
  right: 2rem;
  background-color: #5c83745d; /* Salbeigrün */
  color: #ffffff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(92, 131, 116, 0.3);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease-in-out;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: #4c6c5f;
  transform: translateY(-3px);
}
/* --- Footer Gesamtlayout --- */
.site-footer {
  display: block;
  background-color: #142952; /* Tiefblau */
  color: #ffffff;
  padding: 2.5rem 1.5rem;
  position: relative;
  z-index: 10;
  border-top: 2px solid rgba(217, 119, 87, 0.3); /* Terrakotta Akzentlinie */
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-text {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.footer-text a.dom {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
}

.footer-text a.dom:hover {
  color: #d97757;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  padding: 0;
  margin: 0;
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.footer-icon-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Macht schwarze SVGs weiß */
  display: block;
}

.footer-icon-link:hover,
.footer-icon-link:focus-visible {
  background-color: #d97757; /* Terrakotta */
  border-color: #d97757;
  transform: translateY(-3px);
  outline: none;
}

/* --- Screenreader-Klasse für Barrierefreiheit --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  border: 2px solid #555555 !important; /* Ein kräftiger Rand sorgt für klare Abgrenzung */
  border-radius: 4px;
  padding: 8px;
}
input:focus,
select,
textarea {
  outline: none;
  border-color: #005fcc !important; /* Eine kräftige Akzentfarbe */
  box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.3) !important; /* Zusätzlicher Fokus-Ring */
}
input[type="checkbox"] {
  width: 40px;
  height: 40px;
  cursor: pointer;
  vertical-align: middle;
  accent-color: #d97757;
}
