/* ============================================================================
   BASIS – Reset, Typografie, Utilities
============================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  padding-top: var(--nav-h);
}

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

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

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

ul,
ol {
  list-style: none;
  padding: 0;
}

/* --- Überschriften ---
   Display-Schrift, straffe Zeilenhöhe, leicht negative Laufweite. Enge
   Headlines wirken gesetzt und ruhig; luftige Headlines wirken beliebig.
   `text-wrap: balance` verhindert die typische Ein-Wort-Schlusszeile, die
   jede Headline unprofessionell aussehen lässt. */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-3xl);
  font-weight: 700;
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
}

h4 {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 650;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* --- Fokus ---
   Zwei Ringe: außen die Textfarbe (garantiert Kontrast auf Weiß, Schwarz UND
   auf gelben Buttons), innen der gelbe Marken-Halo. Ein rein gelber Fokusring
   wäre auf Weiß praktisch unsichtbar – Tastaturnutzer würden verloren gehen. */
:focus-visible {
  outline: 2.5px solid var(--text);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--accent-soft);
  border-radius: var(--radius-sm);
}

.btn-primary:focus-visible {
  outline-color: var(--accent-ink);
  box-shadow: 0 0 0 6px rgba(20, 20, 20, 0.18);
}

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

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

/* ============================================================================
   Layout-Utilities
============================================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* Sperrt den Hintergrund-Scroll, solange das Anfrage-Modal offen ist. */
body.modal-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: 2000;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: top var(--dur-base) var(--ease-standard);
}

.skip-link:focus {
  top: var(--space-4);
}

/* --- Sektionsrhythmus ---
   96–128px Luft zwischen den Sektionen. Weißraum ist hier kein Stilmittel,
   sondern Preisargument: eng gesetzte Seiten wirken wie Baukasten-Templates,
   großzügige Seiten wirken kuratiert. Wer 2.500 € für eine Website verlangt,
   darf nicht aussehen wie ein 29-€-Theme. Zusätzlich senkt Weißraum die
   kognitive Last – Entscheider scannen, statt zu lesen. */
.section {
  padding-block: var(--space-10);
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

.section-tight {
  padding-block: var(--space-9);
}

/* Abwechselnde Flächenfarbe erzeugt Sektionsgrenzen ohne zusätzliche Farbe.
   Im Hellmodus ein Hauch Grau, im Dunkelmodus ein Hauch heller als Schwarz. */
.section-alt {
  background: var(--surface-2);
}

@media (max-width: 720px) {
  .section {
    padding-block: var(--space-8);
  }

  .section-tight {
    padding-block: var(--space-7);
  }
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-8);
}

.section-head.is-centered {
  margin-inline: auto;
  text-align: center;
}

.section-head > .eyebrow {
  margin-bottom: var(--space-4);
}

.section-head > p {
  margin-top: var(--space-4);
  font-size: var(--fs-md);
  color: var(--text-muted);
}

/* --- Eyebrow (Sektions-Label) --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text);
}

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

.text-balance {
  text-wrap: balance;
}

.text-center {
  text-align: center;
}

.lead {
  font-size: var(--fs-md);
  color: var(--text-muted);
}

/* --- Gelb-Marker ---
   Ersetzt "farbiger Text" als Hervorhebung. Der Text bleibt schwarz bzw. weiß
   (voller Kontrast, AA erfüllt), das Gelb liegt als Balken darunter. Wirkung:
   wie mit dem Textmarker gesetzt – das Auge springt zuerst dorthin, ohne dass
   Lesbarkeit geopfert wird. Genau ein Marker pro Sektion. */
.mark {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 0.3em;
  background-position: 0 92%;
  padding-inline: 0.08em;
  border-radius: 2px;
}

/* Im Hero fährt der Marker beim Laden einmal auf – ein einziger, kurzer
   Moment Bewegung als Blickführung auf das Kernversprechen. */
.mark-animate {
  background-size: 0% 0.3em;
  animation: mark-in 620ms var(--ease-standard) 320ms forwards;
}

@keyframes mark-in {
  to {
    background-size: 100% 0.3em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark-animate {
    background-size: 100% 0.3em;
    animation: none;
  }
}

/* --- Preis-Highlight ---
   Der Einstiegspreis ist das eine Detail im Hero, das sofort auffallen soll.
   Ein wanderndes Gelb-Glanzlicht plus ein einmaliges Einfedern beim Laden
   ziehen den Blick, ohne wie ein Rabatt-Sticker zu wirken. */
.price-highlight {
  position: relative;
  display: inline-block;
  padding: 0.02em 0.3em;
  border-radius: 4px;
  color: var(--accent-ink);
  font-weight: 700;
  background-image: linear-gradient(100deg, var(--accent) 40%, #fff2b8 50%, var(--accent) 60%);
  background-size: 260% 100%;
  background-position: 100% 0;
  animation: price-pop 480ms var(--ease-standard) 260ms both,
    price-shine 7s ease-in-out 900ms infinite;
}

@keyframes price-pop {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Wisch selbst bleibt ca. 1,8s lang (37–63% von 7s), die Pausen davor/danach
   sind auf je ca. 2,6s gewachsen (0–37% und 63–100%) – längerer Abstand
   zwischen den Durchläufen, gleiches Wisch-Tempo wie vorher. */
@keyframes price-shine {
  0%,
  37% {
    background-position: 100% 0;
  }
  63%,
  100% {
    background-position: -160% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .price-highlight {
    animation: none;
    background-position: -160% 0;
  }
}

/* --- Chat-Cursor --- */
@keyframes chat-cursor-blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

/* --- Scroll-Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-reveal) var(--ease-standard), transform var(--dur-reveal) var(--ease-standard);
  transition-delay: calc(var(--reveal-index, 0) * 130ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Ohne JS (oder bei Fehler) darf nichts unsichtbar bleiben. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}
