/* =========================
   NAV
   ========================= */
nav{
  position: fixed; top:0; left:0; right:0; height:72px;
  padding: 12px 28px;
  display:flex; align-items:center;
  background: var(--nav-bg);
  z-index: 10000; /* oberste Ebene: über allem */
}
.nav-right{ margin-left:auto; display:flex; align-items:center; gap:16px; }
nav ul{ list-style:none; margin:0; padding:0; display:flex; gap:20px; }
nav a{ color:#fff; text-decoration:none; font-weight:bold; }

/* =========================
   HERO (Desktop: echtes Parallax)
   ========================= */
header.hero{
  height: 100vh;
  background-color: #0b1220;
  background-image: url('/Bilder/hero.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display:flex; align-items:center; justify-content:center;
  position:relative; text-align: center;
  z-index: 1; /* unter Logo, unter Nav */
}
.hero::after{
  content:""; position:absolute; inset:0;
  background:rgba(0,0,0,.45);
  z-index: 0; /* Overlay unter hero-content */
}
.hero-content{
  position:relative; z-index:1; padding:16px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  max-width: 420px; margin: 0 auto;
}
#hero-text{
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  margin-bottom: 10px;
  white-space: nowrap; display:inline-block; transform-origin: left center;
  transition: opacity .25s ease;
}
#slogan{
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: normal; color: #fff;
  text-shadow: 0 0 8px rgba(0,0,0,0.6);
  letter-spacing: 0.12em; white-space: nowrap; text-align: center;
  transition: opacity .25s ease;
}

/* Logo: fixiert im Viewport, unter Nav, unter Content */
#hero-logo{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: 85vw;
  height: auto;
  display: block;
  transition: opacity .25s ease;
  z-index: 2;        /* über Hero/Overlay, unter main/footer und Nav */
  pointer-events: auto;
}

/* =========================
   SERVICES
   ========================= */
#services{ background:var(--bg); padding:80px 24px }
#services-title{ text-align:center; margin:0 0 8px 0; font-size: clamp(1.6rem, 3vw, 2rem); }
#services-intro{ text-align:center; max-width:900px; margin:0 auto 24px; color:#ddd }
.services-grid{
  margin: 32px auto 0;
  max-width: 860px;
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
@media (min-width: 900px){
  .services-grid{ grid-template-columns: repeat(3, 1fr); }
}

/* =========================
   CONTACT
   ========================= */
#contact{ padding:80px 24px; background:var(--bg) }
#contact-title{ text-align:center; margin:0 0 14px 0; font-size: clamp(1.6rem, 3vw, 2rem); }
#contact-intro{ text-align:center; max-width:900px; margin:0 auto 28px; color:#ddd }
.contact-grid{
  max-width: 1000px; margin: 0 auto; display:grid; gap:24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* =========================
   FOOTER
   ========================= */
footer{ background:#0a3a78; color:#fff; padding:28px 20px; text-align:center }
footer a{ color:#d9efff; text-decoration:none; margin: 0 8px; }
footer a:hover{ text-decoration:underline; }

/* =========================
   Responsive
   ========================= */
@media (max-width: 720px){
  nav{ height:64px; padding:10px 14px; }
  nav ul{ gap:12px; }
  #hero-logo{ max-width: 90vw; }
}

/* =========================
   Generische Inhaltsseite
   ========================= */
.page{
  max-width: 900px;
  margin: 120px auto 60px;
  padding: 0 20px;
  line-height: 1.6;
}
.page h1{
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 24px;
  text-align: center;
}
.page h2{
  font-size: 1.3rem;
  color: var(--accent);
  margin-top: 36px;
  margin-bottom: 12px;
}
.page p, .page li{ color: var(--text); }

#services h2,
#contact h2,
#services .p-intro,
#contact .p-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
#services .p-intro,
#contact .p-intro { max-width: 800px; }

/* =========================
   Mobile-Fallback für Parallax
   ========================= */
.hero-bg-fixed{
  display: none;
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(120% 80% at 50% 20%, rgba(0,0,0,0) 0%, rgba(0,0,0,.45) 70%),
    linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.65) 100%),
    url('/Bilder/hero.jpg');
  background-position: center;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  z-index: 0;       /* unter allem */
  pointer-events: none;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .hero-bg-fixed{ display: block; }
  header.hero{
    height: 100svh;
    background-image: none;
    background-attachment: scroll;
    background-position: center center;
    background-size: cover;
    background-color: transparent;
  }
}

/* =========================
   Stacking: Content über Logo, unter Nav
   ========================= */
main, footer{
  position: relative;
  z-index: 3; /* über #hero-logo (2), unter nav (10000) */
}

/* =========================
   Page Hero (Unterseiten-Parallax, konsistente Z-Reihenfolge)
   ========================= */
.page-hero{
  position: relative;
  width: 100vw;
  left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
  min-height: 65vh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  border-radius: 0; overflow: hidden;
  isolation: isolate;
  z-index: 1; /* unter Nav */

  background-image: var(--hero, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.page-hero::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(8,12,22,.85) 100%);
  z-index: 0;
}
.page-hero > *{ position: relative; z-index: 1; }

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .page-hero{
    min-height: 65svh;
    background-attachment: scroll;
    background-position: center center;
    background-size: cover;
  }
}
