/* ============================================================
   SITE HEADER  —  V2
   Dreispaltig: Logo | Nav zentriert | Actions rechts
   Transparent über Hero → Off-White beim Scroll
   Mobile: Burger + Vollbild-Overlay
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: 24px;
  transition:
    background-color var(--transition-slow),
    box-shadow       var(--transition-slow),
    padding-block    var(--transition-slow);
}

.site-header.header-scrolled {
  background-color: var(--background-primary); /* Off-White #FAF9F6 */
  box-shadow: 0 1px 0 var(--border-subtle), 0 4px 20px rgba(0, 0, 0, 0.05);
  padding-block: 16px;
}

/* ── Dreispaltiges Grid auf Desktop ── */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

@media (min-width: 1024px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
  }
}

/* ── Logo ── */
.header-logo-wrap {
  display: flex;
  align-items: center;
}

.header-logo {
  width: 92px;
  height: auto;
  display: block;
  transition: opacity var(--transition-base);
}

@media (min-width: 1024px) {
  .header-logo {
    width: 136px;
  }
  .site-header {
    padding-block: 34px;
  }
  .site-header.header-scrolled {
    padding-block: 20px;
  }
}

.header-logo--white { display: block; }
.header-logo--black { display: none;  }

.site-header.header-scrolled .header-logo--white { display: none;  }
.site-header.header-scrolled .header-logo--black { display: block; }

/* ── Mittlere Navigation (Desktop only) ── */
.header-nav {
  display: none;
  align-items: center;
  gap: 32px;
  justify-content: center;
}

@media (min-width: 1024px) {
  .header-nav {
    display: flex;
  }
}

.header-nav a {
  font-size: 0.9375rem; /* 15px */
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  transition: color var(--transition-base);
  white-space: nowrap;
}

.header-nav a:hover {
  color: #ffffff;
}

.site-header.header-scrolled .header-nav a {
  color: var(--text-secondary);
}

.site-header.header-scrolled .header-nav a:hover {
  color: var(--text-primary);
}

.header-nav a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ── Rechte Actions (Desktop only) ── */
.header-actions {
  display: none;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
}

@media (min-width: 1024px) {
  .header-actions {
    display: flex;
  }
}

.header-booklet-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #ffffff;
  transition: color var(--transition-base);
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.header-booklet-link:hover {
  color: #ffffff;
}

.site-header.header-scrolled .header-booklet-link {
  color: var(--text-secondary);
}

.site-header.header-scrolled .header-booklet-link:hover {
  color: var(--text-primary);
}

/* ── Language Switcher ── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.lang-switch-btn {
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 6px;
  border-radius: 4px;
  transition: color var(--transition-base), background-color var(--transition-base);
  line-height: 1;
}

.lang-switch-btn:hover {
  color: #ffffff;
}

.lang-switch-btn.is-active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.14);
}

.lang-switch-sep {
  color: rgba(255, 255, 255, 0.22);
  font-size: 0.6875rem;
  user-select: none;
  padding: 0 1px;
}

.site-header.header-scrolled .lang-switch-btn {
  color: var(--text-secondary);
}

.site-header.header-scrolled .lang-switch-btn:hover {
  color: var(--text-primary);
}

.site-header.header-scrolled .lang-switch-btn.is-active {
  color: var(--text-primary);
  background-color: var(--background-secondary);
}

.site-header.header-scrolled .lang-switch-sep {
  color: var(--border-subtle);
}

/* Mobile overlay lang switch */
.lang-switch--overlay {
  margin-top: 24px;
  gap: 6px;
  font-size: 0.875rem;
}

.lang-switch--overlay .lang-switch-btn {
  color: var(--text-secondary);
  padding: 6px 10px;
}

.lang-switch--overlay .lang-switch-btn.is-active {
  color: var(--text-primary);
  background-color: var(--background-secondary);
}

.lang-switch--overlay .lang-switch-sep {
  color: var(--border-subtle);
}

/* Header-CTA: kompakteres Padding als Standard-Button, Pill-Form */
.header-cta {
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  white-space: nowrap;
  border-radius: 50px !important;
}

/* ── Burger-Button (Mobile only) ── */
.header-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 1024px) {
  .header-burger {
    display: none;
  }
}

.burger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform  var(--transition-base),
    opacity    var(--transition-base),
    background-color var(--transition-base);
}

.site-header.header-scrolled .burger-line {
  background-color: var(--text-primary);
}

/* Burger → X Animation */
.site-header.menu-open .burger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.site-header.menu-open .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-header.menu-open .burger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.header-burger:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
}


/* ============================================================
   MOBILE OVERLAY
   Vollbild-Menü, unter dem Header, über dem Page-Content.
   ============================================================ */

.header-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--background-primary);
  z-index: 98;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: var(--container-padding-x);
  padding-top: 80px; /* Header-Höhe */
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.header-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.header-overlay-nav {
  display: flex;
  flex-direction: column;
  margin-bottom: 40px;
}

.header-overlay-nav a {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  padding-block: 14px;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-base);
}

.header-overlay-nav a:first-child {
  border-top: 1px solid var(--border-subtle);
}

.header-overlay-nav a:hover {
  color: var(--accent-primary);
}

.header-overlay-secondary {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
  transition: color var(--transition-base);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-align: left;
}

.header-overlay-secondary:hover {
  color: var(--text-primary);
}

.header-overlay-cta {
  align-self: flex-start;
}


/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  height: 100svh;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
}

/* ── Hintergrundbild ── */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
  transform-origin: center center;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-bg img {
    animation: kenBurns 30s ease-in-out infinite alternate;
  }
}

@keyframes kenBurns {
  from { transform: scale(1.00); }
  to   { transform: scale(1.05); }
}

/* ── Gradient-Overlay: diagonal von links unten nach rechts oben ── */
.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top right,
    rgba(0, 0, 0, 0.55) 0%,
    transparent         60%
  );
}

/* ── Bottom-Wrapper: gleicher Container wie Header (max-width + margin:auto) ── */
.hero-bottom {
  position: absolute;
  z-index: 2;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-max-width);
  padding-inline: var(--container-padding-x);
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

/* ── Content-Block (Headline, Subline, CTAs) ── */
.hero-content {
  max-width: 560px;
  flex-shrink: 1;
  min-width: 0;
}

/* ── Headline ── */
.hero-headline {
  font-size: var(--font-hero-headline); /* clamp(2.5rem, 5.5vw, 4.5rem) */
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 16px;
}

.hero-headline em {
  font-style: italic;
  font-weight: 700;
  color: #BC83D7;
}

/* ── Subline ── */
.hero-subline {
  font-size: clamp(1.125rem, 1.4vw, 1.375rem); /* 18px → 22px */
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.005em;
  color: #FAF9F6;
  margin-bottom: 20px;
}

/* ── CTAs ── */
.hero-ctas {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.hero-ctas .btn {
  padding: 10px 18px;
  font-size: 0.9375rem; /* 15px */
}

.hero-ctas .btn-primary {
  font-weight: 700;
}

.hero-ctas .btn-secondary {
  border-width: 1px;
  border-color: #ffffff;
  color: #ffffff;
  font-weight: 500;
}

.hero-ctas .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.85);
  color: #ffffff;
  transform: translateY(-1px);
}

.hero-ctas .btn-secondary:active {
  transform: translateY(0);
}

/* ── WHY-Tagline ── */
.hero-why-tagline {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(250, 249, 246, 0.60);
  margin-top: 16px;
  letter-spacing: 0.01em;
}

/* ── Stat-Trio (rechts, Desktop) ── */
.hero-stats {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.hero-stat {
  padding-inline: 14px;
}

.hero-stat:first-child {
  padding-left: 0;
}

.hero-stat-sep {
  width: 1px;
  background-color: rgba(255, 255, 255, 0.30);
  align-self: stretch;
  min-height: 36px;
  flex-shrink: 0;
}

.hero-stat-value {
  font-size: 1.5rem; /* 24px */
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 4px;
}

.hero-stat-desc {
  font-size: 0.9375rem; /* 15px */
  font-weight: 400;
  line-height: 1.45;
  color: rgba(250, 249, 246, 0.80);
  max-width: 160px;
  overflow-wrap: break-word;
}

/* ── Load-Animationen ── */
@media (prefers-reduced-motion: no-preference) {
  .hero-headline,
  .hero-subline,
  .hero-ctas,
  .hero-stats {
    opacity: 0;
    transform: translateY(16px);
    animation: heroReveal 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .hero-headline { animation-delay:   0ms; }
  .hero-subline  { animation-delay: 180ms; }
  .hero-ctas     { animation-delay: 360ms; }
  .hero-stats    { animation-delay: 520ms; }
}

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


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet (769–1023px): Stack vertikal — verhindert Überlappung */
@media (max-width: 1023px) {
  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    bottom: 56px;
    gap: 24px;
  }

}

@media (max-width: 768px) {
  .hero-bottom {
    bottom: 32px;
    gap: 20px;
  }

  .hero-bg img {
    object-position: right center;
  }

  .hero-subline {
    font-size: 1rem;
  }

  .hero-stat {
    padding-inline: 12px;
  }

  .hero-stat:first-child {
    padding-left: 0;
  }

  .hero-stat-value {
    font-size: 1rem;
  }

  .hero-stat-desc {
    font-size: 0.75rem;
    max-width: 100px;
  }
}

@media (max-width: 600px) {
  /* Hero-Stats auf kleinen Screens ausblenden — mehr Raum für CTA-Bereich */
  .hero-stats {
    display: none;
  }

  .hero-bottom {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
}
