/* ============================================================
   HNG Pro Select – Basis: Reset, Typografie, Layout, Motion
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-text);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
  color: var(--text-dunkel);
  background: var(--weiss);
}

img, svg, video { display: block; max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; padding: 0; }

a { color: inherit; }

ul[class] { list-style: none; padding: 0; }

/* ---- Fokus sichtbar (Barrierefreiheit) ---- */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Skip-Link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--hng-blau);
  color: var(--weiss);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-m) 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---- Nur fuer Screenreader ----
   Nachgetragen 16.07.: .sr-only wurde auf 5 freigegebenen Seiten bereits benutzt
   (label[for=interesse] im Erstgespraech-Formular), war aber nie definiert. Dort
   greift zusaetzlich das hidden-Attribut, deshalb war der Fehler unsichtbar.
   Die Regel aendert an den Bestandsseiten optisch nichts. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Typografie ---- */
.display,
.h2, .h3 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: var(--lh-headline);
  text-wrap: balance;
  color: var(--hng-blau);
}

.display { font-size: var(--fs-display); }
.h2      { font-size: var(--fs-h2); }
.h3      { font-size: var(--fs-h3); }

.display em, .h2 em {
  font-style: italic;
  font-weight: 400;
  color: inherit; /* helle Hintergründe: Italic-Zeile bleibt HNG-Blau */
}

/* Bild-Banner (Hero, Events): erste Zeile Weiß, Italic-Zeile Sand #C8BBA8 */
.text-invers { color: var(--weiss); }
.text-invers em { color: var(--sand); }
/* Dunkelblaue Sektionen (Slider, CTA, ImmoNews): komplette Headline Beige #F5F0E8 */
.headline-invers { color: var(--beige); }

.eyebrow {
  display: block;
  font-family: var(--font-text);
  font-size: var(--fs-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin-bottom: 14px;
}



/* ---- Layout ---- */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 96px; }
.section--dunkel { background: var(--hng-blau); }

/* 17.07.: Scroll-Anchoring aus. Der Sticky Header aendert beim Schrumpfen
   die Dokumenthoehe; das Anchoring "korrigierte" die Scrollposition dagegen
   und erzeugte eine Endlos-Oszillation (Header vibrierte dauerhaft). */
html { overflow-anchor: none; }

/* ---- Scroll-Reveal (IntersectionObserver setzt .is-visible) ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slide) var(--ease),
              transform var(--dur-slide) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Reduced Motion: alle Animationen deaktivieren ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;    /* 17.07.: sonst blieben gestaffelte
                                          Elemente fuer die Delay-Dauer unsichtbar */
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---- Responsive Grundraster (abgeleitet – keine Mobile-Frames in Figma) ---- */
@media (max-width: 1100px) {
  :root {
    --fs-display: 44px;
    --fs-h2: 36px;
    --page-pad: 48px;
  }
  .section { padding-block: 72px; }
}

@media (max-width: 720px) {
  :root {
    --fs-display: 34px;
    --fs-h2: 28px;
    --fs-h3: 22px;
    --fs-accordion: 18px;
    --fs-zahl: 30px;
  }
  .section { padding-block: 56px; }
}
