/* ==========================================================================
   SummitPeak „Höhenlinie Navy“ – Basis für alle vier Seiten:
   Reset, Typografie, Glas, Buttons, Kopf- und Fußzeile, Formularfelder, Dialog.
   Werte kommen aus theme.css. Reines CSS, keine externen Ressourcen.
   ========================================================================== */

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--navy-deep);
  color-scheme: dark;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(255, 255, 255, .9); color: var(--navy); }

[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; border-radius: 4px; }
#inhalt:focus { outline: none; }

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: #FFFFFF; color: var(--navy); font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Typografie ---------- */
/* Überschriften: Inter in Stärke 600 mit enger Laufweite (eine Schriftfamilie für die ganze Seite) */
.display, .h2, .lx-step__title, .person__name, .rt-head__num, .rt-head__t, .ucp__title, .qt__quote, .qt__num, .person__mono {
  font-family: var(--sans); font-weight: var(--heading-weight); color: var(--heading);
  letter-spacing: var(--heading-tracking); -webkit-hyphens: manual; hyphens: manual;
}
.display { font-size: var(--fs-display); line-height: 1.08; letter-spacing: var(--display-tracking); text-wrap: balance; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; text-wrap: balance; }
/* Schlüsselwort: gleiche Schrift, nur Farbe (helles Sekundärblau) */
.display em, .h2 em, .lx-step__title em, .qt__quote em { font-style: normal; color: var(--accent-text); }
/* hervorgehobene Wortgruppen bleiben beim Umbruch zusammen („Der Mensch“, „nicht belasten“) */
.h2 em, .qt__quote em { white-space: nowrap; }
/* Kicker, Etiketten, Positionen, Formel: Ziffern gleich breit */
.eyebrow, .lx-step__kicker, .pnl__pos, .rt-head__k, .rt__labels span, .ucp__k, .calc__formula, .calc__assume-k, .src__k, .chat__tag, .lx-tab {
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: var(--fs-xs); font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: rgba(255, 255, 255, .5); }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.125rem, 1.02rem + .45vw, 1.375rem); line-height: 1.55; color: var(--text); max-width: 34em; }
.note { font-size: var(--fs-small); color: var(--muted); }
p a, dd a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .45); }
p a:hover, dd a:hover { text-decoration-color: #FFFFFF; }

/* ---------- Glas ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-edge), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn__icon { width: 18px; height: 18px; flex: none; transition: transform 200ms var(--ease); }
.btn--primary { background: #FFFFFF; color: var(--navy-deep); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55); }
.btn--glass {
  background: rgba(255, 255, 255, .08); color: #FFFFFF; border-color: rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .9375rem; }
.btn[disabled] { opacity: .72; cursor: progress; transform: none; }
.btn__spinner { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #E6EDF6; }
  .btn--glass:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .34); }
  .btn:hover .btn__icon { transform: translateX(3px); }
}

/* ---------- Kopfzeile (V3.1): schwebt ganz oben ohne Fläche; Glas blendet beim Scrollen weich ein ----------
   --hp (0…1) setzt site.js aus dem Scrollweg (0 bei 0 px, 1 ab 48 px, per rAF gedrosselt).
   Keine Linie, kein Schatten: das Glas ist 28 px höher als die Kopfzeile und läuft über eine Maske aus.
   Logo und Kopfzeilen-Höhe schrumpfen mit --hp; der Inhalt darunter springt nicht (Kopfzeile ist fixiert). */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--hh-cur);
}
/* Glas auf eigener Ebene: so bleibt das mobile Menü kein Kind eines Backdrop-Roots */
.site-header::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: -1;
  height: calc(var(--hh-cur) + var(--glass-fade));
  background: rgba(10, 34, 71, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--glass-fade)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--glass-fade)), transparent);
  opacity: var(--hp);
  pointer-events: none;
}
.menu-open .site-header::before { opacity: 1; }
/* Ohne JavaScript gibt es kein --hp: dann steht das Glas immer, damit Text unter der Kopfzeile lesbar bleibt */
html:not(.js) .site-header::before { opacity: 1; }
/* Firefox (geprüft mit 161): mit mask-image entfällt dort der Blur des backdrop-filter. Damit Text unter der
   Kopfzeile nicht scharf durchscheint, ist das Glas dort fast deckend. (-moz-appearance kennt nur Firefox.) */
@supports (-moz-appearance: none) {
  .site-header::before { background: rgba(10, 34, 71, .94); }
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.brand { display: inline-flex; align-items: center; border-radius: 6px; }
/* Höhe statt Breite: 72 px oben (≈ 331 px breit), per Skalierung auf 48 px gescrollt (Ursprung links Mitte) */
.brand__logo {
  height: var(--logo-top); width: auto; max-width: none;
  transform: scale(calc(1 - (1 - var(--logo-k)) * var(--hp))); transform-origin: 0 50%;
}
.site-nav { display: flex; align-items: center; gap: var(--s4); }
.site-nav__list { display: flex; align-items: center; gap: 4px; }
.site-nav__list a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px;
  font-size: .9375rem; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease;
}
@media (max-width: 1180px) and (min-width: 961px) {
  :root { --logo-top: 60px; --logo-k: .8; }        /* 60 → 48 px */
  .site-nav { gap: var(--s2); }
  .site-nav__list a { padding: 0 10px; }
}
/* 961–1100 px: Logo, Menü und CTA passen sonst nicht nebeneinander */
@media (max-width: 1100px) and (min-width: 961px) {
  :root { --logo-top: 48px; --logo-k: .9167; }     /* 48 → 44 px */
  .site-nav { gap: 12px; }
  .site-nav__list a { padding: 0 8px; }
  .site-nav__cta { padding: 0 14px; }
}
.site-nav__list a[aria-current] { color: #FFFFFF; background: rgba(255, 255, 255, .08); }
@media (hover: hover) and (pointer: fine) { .site-nav__list a:hover { color: #FFFFFF; } }
.menu-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  color: #FFFFFF; font-size: .9375rem; font-weight: 500; cursor: pointer;
  transition: transform var(--dur-press) var(--ease), background-color var(--dur-ui) ease;
}
.menu-toggle__icon { position: relative; width: 16px; height: 10px; }
.menu-toggle__icon i {
  position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 1px;
  top: 4.25px;
  transition: transform 200ms var(--ease);
}
/* beide Striche liegen in der Mitte und werden nur per transform versetzt bzw. gedreht */
.menu-toggle__icon i:first-child { transform: translateY(-3.25px); }
.menu-toggle__icon i:last-child { transform: translateY(3.25px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon i:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon i:last-child { transform: rotate(-45deg); }
.menu-toggle:active { transform: scale(.97); }

@media (max-width: 960px) {
  :root { --hh-top: 72px; --hh-min: 60px; --logo-top: 48px; --logo-k: .8333; }   /* Logo 48 → 40 px */
  .menu-toggle { display: inline-flex; }
  /* Menü schließt direkt an die aktuelle Kopfzeile an (oben 72 px, gescrollt 60 px) */
  .site-nav {
    position: fixed; left: 0; right: 0; top: var(--hh-cur);
    height: calc(100vh - var(--hh-cur)); height: calc(100dvh - var(--hh-cur));
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: var(--s4);
    padding: var(--s4) var(--gutter) var(--s6);
    background: rgba(10, 34, 71, .74);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    backdrop-filter: saturate(180%) blur(28px);
    overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s linear 220ms;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__list li { border-bottom: 1px solid var(--line); }
  .site-nav__list a {
    width: 100%; min-height: 60px; padding: 0 4px; border-radius: 0;
    font-family: var(--sans); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; color: #FFFFFF;
  }
  .site-nav__list a[aria-current] { background: none; }
  .site-nav__cta { align-self: flex-start; min-height: 52px; padding: 0 26px; font-size: 1rem; }
}
/* Sehr schmale Handys: Logo 36 → 32 px, damit Logo und Menü-Knopf nebeneinander passen */
@media (max-width: 374px) {
  :root { --logo-top: 36px; --logo-k: .8889; }
  .site-header__inner { gap: 12px; }
  .menu-toggle { padding: 0 12px; gap: 8px; }
}

/* ---------- Abschnitte allgemein ---------- */
.section { position: relative; padding-block: var(--section-y); overflow: clip; }
.section__light { position: absolute; pointer-events: none; }

.field { display: grid; gap: 8px; }
.field label { font-size: var(--fs-small); font-weight: 500; color: #FFFFFF; }
.req { color: #FFFFFF; }
.field__opt { margin-left: 6px; font-size: .8125rem; font-weight: 400; color: var(--text-glass); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border-radius: 12px;
  background: var(--field-bg);
  border: 1px solid var(--field-line);
  color: #FFFFFF; font-size: 1rem; line-height: 1.5;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: #FFFFFF; background: rgba(7, 26, 56, .7); box-shadow: 0 0 0 3px rgba(255, 255, 255, .28); }
.field [aria-invalid="true"] { border-color: var(--error-line); }
.field__err { font-size: .875rem; color: var(--error); }
.form__legend { font-size: .8125rem; color: var(--text-glass); }
.form__submit { justify-self: start; }
.form__status:empty { display: none; }
.form__status.is-error { border-color: var(--error-line); color: var(--error); }
.form__status { padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #FFFFFF; font-size: var(--fs-small); }
.form__privacy { font-size: .8125rem; line-height: 1.55; color: var(--text-glass); }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--navy-deepest); color: var(--text); padding: var(--s10) 0 var(--s5); border-top: 1px solid rgba(255, 255, 255, .06); font-size: var(--fs-small); }
.site-footer__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.site-footer__logo { width: 168px; height: auto; }
.site-footer__up { font-size: .875rem; text-decoration: none; color: var(--text); padding: 10px 0; }
.site-footer__up:hover { color: #FFFFFF; }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding: var(--s5) 0; }
.site-footer__k { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.site-footer__col p:not(.site-footer__k) { line-height: 1.7; }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.site-footer__bottom nav { display: flex; gap: var(--s3); }
.site-footer__bottom nav a { color: var(--text); text-decoration: none; padding: 8px 0; }
.site-footer__bottom nav a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Fallback ohne backdrop-filter: deckendere Flächen ---------- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header::before { background: rgba(10, 34, 71, .96); }   /* Deckkraft weiter über --hp: oben transparent */
  .site-nav { background: rgba(10, 34, 71, .98); }
  .glass, .chat, .pnl, .lx.is-pinned .lx-navwrap, .modal__card { background: var(--glass-solid); }
  .review { background: #1A3C6B; }
  .btn--glass { background: rgba(255, 255, 255, .12); }
}

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

/* Zahlenfelder ohne Pfeile (Feinschliff) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ---------- Dialog nach dem Senden ---------- */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(7, 26, 56, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.modal.is-open { display: flex; }
.modal__card {
  width: min(100%, 520px);
  display: grid; gap: var(--s2); justify-items: start;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #1D4074, #153460);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 40px 80px -30px rgba(2, 10, 26, .8);
  color: var(--text-glass);
  animation: modal-in 260ms var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal__icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #FFFFFF; color: var(--navy-deep); }
.modal__icon svg { width: 22px; height: 22px; }
.modal__title { font-weight: var(--heading-weight); font-size: var(--fs-h3); line-height: 1.2; letter-spacing: var(--heading-tracking); color: var(--heading); }
.modal__note { font-weight: 600; color: #FFFFFF; }
.modal__card .btn { margin-top: var(--s1); }

/* Hinweis im Vorschau-Modus (nur auf localhost; setzt site.js) */
.preview-flag {
  /* oben links unter der Kopfzeile: dort verdeckt er weder die Leiste der Bühne noch den Pause-Knopf */
  position: fixed; left: 12px; top: calc(var(--hh-top) + 8px); z-index: 90;
  padding: 4px 10px; border-radius: 999px;
  background: var(--navy-deepest); border: 1px solid var(--line-strong);
  color: var(--text); font-size: var(--fs-xs); font-weight: 500;
  pointer-events: none;
}
/* Mobil steht die H1 direkt unter der Kopfzeile: Hinweis dort unten links, damit er nichts verdeckt */
@media (max-width: 960px) { .preview-flag { top: auto; bottom: 12px; } }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 720px) {
  .site-footer { padding-top: var(--s6); }
  .site-footer__cols { grid-template-columns: 1fr; gap: var(--s3); padding: var(--s4) 0; }
}
