
/* -------------------------------------------------------
   Globale Grundeinstellungen
------------------------------------------------------- */

:root {
  --background: #09090b;
  --foreground: #ffffff;
  --accent: #dc2626;
  --accent-hover: #ef4444;
  --border: #27272a;
  --muted: #a1a1aa;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
  color-scheme: dark;
  scroll-padding-top: calc(5rem - 1px);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--foreground);
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
label,
select,
input[type="checkbox"],
input[type="radio"] {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
a,
label,
select,
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

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

::selection {
  background: rgba(220, 38, 38, 0.85);
  color: #ffffff;
}

/* -------------------------------------------------------
   Fokusdarstellung und Bedienbarkeit
------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
}

input,
textarea,
select {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

select option {
  background: #09090b;
  color: #ffffff;
}

/* -------------------------------------------------------
   Scrollbar
------------------------------------------------------- */

* {
  scrollbar-width: thin;
  scrollbar-color: #52525b #09090b;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #09090b;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #09090b;
  border-radius: 999px;
  background: #3f3f46;
}

::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}

/* -------------------------------------------------------
   Ankerziele unter der fixierten Navigation
------------------------------------------------------- */

section[id],
form[id] {
  /* Fallback ohne JavaScript: oberer Zieltrenner liegt direkt auf der
     unteren 1-px-Linie des 5-rem-Headers. main.js korrigiert zusätzlich
     anhand der tatsächlich gemessenen Headerhöhe. */
  scroll-margin-top: calc(5rem - 1px) !important;
}

/* -------------------------------------------------------
   Preisrechner: sanfte Einblendung neuer Schritte
------------------------------------------------------- */

@keyframes calculatorStepIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(3px);
  }

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

.calculator-step-in {
  animation: calculatorStepIn 500ms
    cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* -------------------------------------------------------
   Preisrechner: Preisänderung
------------------------------------------------------- */

@keyframes calculatorPricePulse {
  0% {
    opacity: 0.45;
    transform: translateY(5px) scale(0.97);
  }

  60% {
    opacity: 1;
    transform: translateY(0) scale(1.035);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.calculator-price-pulse {
  animation: calculatorPricePulse 420ms
    cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* -------------------------------------------------------
   Allgemeine sanfte Einblendung
------------------------------------------------------- */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

.animate-fade-in {
  animation: fadeIn 450ms ease-out both;
}

.animate-fade-up {
  animation: fadeUp 550ms
    cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* -------------------------------------------------------
   Bewegung für Nutzer reduzieren
------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
