/* =========================================================
   Hero V5 — Video-Hintergrund · Layout wie Index
   Links Text · rechts Gerät · abgedunkelter Gradient gegen unten
   ========================================================= */

/* Dunkler Body-Hintergrund: verhindert weissen Blitz unter transparenter Nav */
body {
  background-color: #04080e;
}

/* ── Section ── */
.hero-v5 {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Oberer Abstand berücksichtigt die fixe, transparente Nav */
  padding: clamp(120px, 16vh, 180px) 0 var(--s-4);
}

/* ── Video-Hintergrund ── */
.hero-v5__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: 0;
}

/* ── Overlay: oben Video sichtbar, gegen unten abgedunkelt ── */
.hero-v5__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(4, 8, 20, 0.50) 0%,
    rgba(4, 8, 20, 0.38) 28%,
    rgba(4, 8, 20, 0.55) 58%,
    rgba(4, 8, 20, 0.88) 82%,
    rgba(4, 8, 20, 1.00) 100%
  );
}

/* ── Dampf-/Nebelschwaden ── */
.hero-v5__steam {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-v5__steam span {
  position: absolute;
  bottom: 25%;
  width: 50vw;
  height: 50vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.18) 36%,
    rgba(255, 255, 255, 0) 64%
  );
  filter: blur(32px);
  opacity: 0;
  will-change: transform, opacity;
  animation: v5-steam 16s ease-in infinite;
}

.hero-v5__steam span:nth-child(1) { left: 4%;  animation-duration: 17s; animation-delay: 0s; }
.hero-v5__steam span:nth-child(2) { left: 34%; animation-duration: 21s; animation-delay: -6s; }
.hero-v5__steam span:nth-child(3) { left: 60%; animation-duration: 19s; animation-delay: -11s; }
.hero-v5__steam span:nth-child(4) { left: 78%; animation-duration: 23s; animation-delay: -3s; }

@keyframes v5-steam {
  0% {
    transform: translate3d(0, 15%, 0) scale(0.8);
    opacity: 0;
  }
  18% { opacity: 0.45; }
  60% { opacity: 0.25; }
  100% {
    transform: translate3d(8%, -70%, 0) scale(1.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v5__steam { display: none; }
}

/* ── Inner Grid: zwei Spalten ── */
.hero-v5__inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  align-items: center;
}

/* ── Text links ── */
.hero-v5__text {
  animation: v5-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-v5__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 var(--s-3);
  color: #ffffff;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero-v5__title-accent {
  display: block;
  white-space: nowrap;
  background: linear-gradient(135deg, #9fdcff 0%, #4db8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-v5__sub {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  max-width: 52ch;
  margin: 0 0 var(--s-4);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-v5__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}

/* ── Stats ── */
.hero-v5__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 540px;
}

.hero-v5__stats .stat__num {
  display: block;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.hero-v5__stats .stat__lbl {
  display: block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* ── Produkt rechts ── */
.hero-v5__product {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  animation: v5-fade-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.hero-v5__product-glow {
  position: absolute;
  width: 110%;
  height: 110%;
  background: radial-gradient(circle, rgba(45, 155, 234, 0.28) 0%, transparent 60%);
  filter: blur(40px);
  z-index: 0;
}

.hero-v5__product-img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 580px;
  filter:
    drop-shadow(0 32px 70px rgba(0, 0, 0, 0.6))
    drop-shadow(0 10px 24px rgba(0, 0, 0, 0.4));
  animation: v5-float 8s ease-in-out infinite;
}

@keyframes v5-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ── Callouts ums Gerät ── */
.hero-v5__tags {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.v5-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(18, 24, 38, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  pointer-events: auto;
  opacity: 0;
  animation: v5-tag-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.v5-tag--top { top: 16%;    right: 2%;   animation-delay: 0.6s; }
.v5-tag--mid { top: 42%;    left: -10%;  animation-delay: 0.75s; }
.v5-tag--bot { bottom: 14%; right: -4%;  animation-delay: 0.9s; }

.v5-tag__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue, #3b82f6);
  box-shadow: 0 0 10px currentColor;
}

.v5-tag--mid .v5-tag__dot { background: var(--lime, #84cc16); }
.v5-tag--bot .v5-tag__dot { background: var(--warm, #f59e0b); }

/* ── Featured (Im Einsatz bei) ── */
.hero-v5__featured {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: var(--s-5) auto 0;
  padding: var(--s-3) var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.hero-v5__featured-label {
  font-family: var(--mono, monospace);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.hero-v5__featured-logos {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.hero-v5__featured-logos .dot {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}

/* ── Raumgrösse / Projektierung ── */
.raumgroesse {
  padding: var(--s-6) 0;
  background: var(--bg-soft);
}

.raumgroesse__card {
  max-width: 1180px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 56px);
}

.raumgroesse__head .h2 {
  margin-top: 6px;
}

.raumgroesse__head .lead {
  margin-bottom: 0;
}

.raumgroesse__list {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}

.raumgroesse__list li {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius, 16px);
}

.raumgroesse__list strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}

.raumgroesse__list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-7, var(--gray-5));
}

.raumgroesse__note {
  margin: var(--s-4) 0 0;
  font-size: 15.5px;
  color: var(--ink-2, var(--ink));
}

.raumgroesse__note a {
  display: inline-block;
  margin-left: 6px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

.raumgroesse__note a:hover {
  color: var(--blue-dark, var(--blue));
}

@media (max-width: 760px) {
  .raumgroesse__list {
    grid-template-columns: 1fr;
  }
}

/* ── Energieeffizienz ── */
.effizienz {
  padding: var(--s-7) 0;
  background: var(--bg-soft);
}

.effizienz__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--s-6);
  align-items: center;
}

.effizienz__visual {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 2;
}

.effizienz__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.effizienz__benefits {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.effizienz__benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2, var(--ink));
}

.effizienz__check {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(177, 210, 52, 0.18);
  color: var(--lime-dark, #6f8f1a);
  font-size: 14px;
  font-weight: 700;
  margin-top: 1px;
}

@media (max-width: 900px) {
  .effizienz__grid {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .effizienz__visual { order: -1; }
}

/* ── Prinzip: Tech-Werte rechtsbündig ── */
.prinzip .techspec__row dd {
  text-align: right;
}

/* ── Installation: Infografik statt Schritt-Liste ── */
.install__infographic {
  margin: var(--s-5) auto 0;
  max-width: 1040px;
  text-align: center;
}

.install__infographic img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius, 16px);
}

/* ── Preis (Was Sie für Ihre Investition erhalten): Mobile schlanker ── */
@media (max-width: 760px) {
  /* Überlauf verhindern: Grid-Kinder dürfen schrumpfen */
  .preis__grid > * { min-width: 0; }

  /* Preis-Karte zentriert und nicht über volle Breite */
  .preis__card {
    max-width: 420px;
    margin: 0 auto;
    padding: var(--s-3);
  }

  /* Preiszahl kleiner, damit sie nie überläuft */
  .preis__big { font-size: clamp(46px, 13vw, 64px); }
  .preis__currency { font-size: 14px; margin-top: 8px; }
  .preis__sub { font-size: 26px; }

  /* Vorteilsliste etwas kompakter */
  .preis__list li {
    font-size: 15px;
    padding-left: 30px;
  }
  .preis__list li:before {
    width: 18px;
    height: 18px;
    background-size: 13px;
  }
}

/* ── Mobile: offenes Menü → dunkle Nav-Leiste, weisse Schrift ── */
@media (max-width: 960px) {
  .nav:has(.nav__links.open) {
    background: rgba(6, 8, 16, 0.95) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  /* "by Apitec" auch auf Mobile zeigen */
  .nav .nav__by {
    display: inline !important;
    color: rgba(255, 255, 255, 0.6) !important;
  }

  /* Menü bündig an die Nav-Unterkante (kein Video-Spalt) */
  .nav .nav__links {
    position: fixed !important;
    top: 54px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    box-sizing: border-box;
    align-items: stretch;
    max-height: calc(100dvh - 54px);
    overflow-y: auto;
    z-index: 999;
  }

  .nav .nav__links .nav__item,
  .nav .nav__links .nav__top,
  .nav .nav__links .nav__drop,
  .nav .nav__links .nav__drop a {
    width: 100%;
    box-sizing: border-box;
  }

  .nav .nav__links .nav__item {
    display: block;
  }

  .nav .nav__links .nav__top {
    display: flex;
  }

  .nav .nav__links .nav__drop {
    left: auto;
    transform: none;
    flex-direction: column;
  }

  .nav .nav__links .nav__drop a {
    display: block;
    color: #fff !important;
    white-space: normal;
  }
}

/* ── Top-Nav Brand: X-One fetter, "by Apitec" auf gleicher Grundlinie ── */
.nav .nav__brand {
  align-items: baseline;
}

.nav .nav__name {
  font-weight: 800;
}

/* ── Footer-Logo (Apitec) ── */
.footer__logo {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: var(--s-2);
}

.footer__logo img {
  display: block;
  height: 34px;
  width: auto;
}

/* ── Nav: fixed (kein Platzhalter im Flow), transparent über Video ── */
.nav {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: transparent !important;
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    backdrop-filter 0.4s ease;
}

.nav .nav__name,
.nav .nav__by,
.nav .nav__links a {
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.3s ease;
}

.nav .nav__links a:hover {
  color: #ffffff;
}

.nav .nav__cta {
  border-color: rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
}

.nav .nav__cta:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
  color: white;
}

.nav--scrolled {
  background: rgba(6, 8, 16, 0.80) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ── Animationen ── */
@keyframes v5-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes v5-tag-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  /* Einspaltig · Reihenfolge: Titel → Text → Buttons → Gerät → Stats */
  .hero-v5__inner {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    text-align: center;
  }

  /* Text-Wrapper auflösen, damit das Gerät zwischen Buttons und Stats passt */
  .hero-v5__text {
    display: contents;
  }

  .hero-v5__title   { order: 1; margin-bottom: 0; }
  .hero-v5__sub     { order: 2; margin: 0 auto; }
  .hero-v5__actions { order: 3; justify-content: center; margin-bottom: 0; }
  .hero-v5__product { order: 4; }
  .hero-v5__stats   { order: 5; max-width: none; }

  .hero-v5__product {
    min-height: 340px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-v5__product-img { max-width: 440px; }

  .v5-tag { font-size: 12px; padding: 8px 13px; }
  .v5-tag--top { top: 12%;   right: -2%; }
  .v5-tag--mid { top: 44%;   left: -4%; }
  .v5-tag--bot { bottom: 8%; right: 0; }

  /* ── Mobile Nav Overrides ── */
  .nav .nav__burger span {
    background: white !important;
  }
  .nav .nav__links {
    background: rgba(6, 8, 16, 0.95) !important;
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .nav .nav__links a {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.82) !important;
  }
}

@media (max-width: 600px) {
  .hero-v5 {
    padding-top: 110px;
  }

  /* Video kleiner skalieren: flachere Box → weniger Zoom/Crop,
     Szene wirkt kleiner. Unterkante läuft in den dunklen Grund. */
  .hero-v5__video {
    top: -8%;
    height: 78%;
    object-position: center 30%;
  }

  /* Gradient dunkelt früher ab — weniger Video beim Gerät */
  .hero-v5__overlay {
    background: linear-gradient(
      to bottom,
      rgba(4, 8, 20, 0.35) 0%,
      rgba(4, 8, 20, 0.45) 16%,
      rgba(4, 8, 20, 0.80) 44%,
      rgba(4, 8, 20, 0.97) 55%,
      rgba(4, 8, 20, 1.00) 72%
    );
  }

  .hero-v5__product {
    min-height: 300px;
  }

  .hero-v5__product-img { max-width: min(360px, 84vw); }

  .hero-v5__stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--s-2);
  }

  /* Callouts enger ans Gerät rücken (schmaler Viewport) */
  .v5-tag { font-size: 11px; padding: 7px 11px; gap: 7px; }
  .v5-tag--top { top: 18%;   right: 2%; }
  .v5-tag--mid { top: 54%;   left: 0; }
  .v5-tag--bot { bottom: 6%; right: 2%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v5__text,
  .hero-v5__product,
  .hero-v5__product-img,
  .v5-tag {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
