/* ===== BADROH MODELLE — VOLLBILD-ABSCHNITTE =====
   Bewusst OHNE Scroll-Uebernahme: der Besucher scrollt normal, nichts haelt fest.
   Die Optik bleibt cineastisch (Vollbild-Foto, grosse Typo, schwebende Hexagone),
   nur die Kamerafahrt am Scrollbalken ist entfallen - fixierte Abschnitte werden
   von Besuchern regelmaessig fuer einen Fehler gehalten. */

.bw3d {
  position: relative;
  background: var(--ink);
}

.bw3d-viewport {
  position: relative;
}

/* --- Glühende Hexagon-Partikel ---
   Klebt oben fest und bleibt dadurch ueber alle vier Abschnitte sichtbar,
   ohne eigene Hoehe zu beanspruchen (negativer Rand). */
.bw3d-particles {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  margin-bottom: -100vh;
  z-index: 1;
  pointer-events: none;
}

/* --- Ein Modell --- */
.bw3d-scene {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 90px 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.bw3d-scene.is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .bw3d-scene { opacity: 1; transform: none; transition: none; }
  .bw3d-particles { display: none; }
}

/* Bildebene */
.bw3d-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.bw3d-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 26, 48, 0.30) 0%, rgba(8, 26, 48, 0.55) 45%, rgba(8, 26, 48, 0.92) 100%),
    linear-gradient(0deg, rgba(8, 26, 48, 0.75) 0%, transparent 55%);
}

/* Szene ohne Foto (m²-Rechner) — Hexagon-Raster statt Bild */
.bw3d-photo.is-pattern {
  background-image: var(--hex-pattern-dim);
  background-size: 196px 170px;
  background-color: var(--ink);
}

.bw3d-photo.is-pattern::after {
  background: radial-gradient(ellipse at 30% 50%, rgba(47, 159, 208, 0.16) 0%, transparent 60%);
}

/* Textebene */
.bw3d-copy {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  margin-right: clamp(24px, 7vw, 110px);
  padding: 0 4px;
}

/* Die Klasse ist die Kaufentscheidung - sie steht groesser als alles ausser der Headline */
.bw3d-num {
  color: var(--champagne);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 12px;
}

.bw3d-num b {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--paper);
  line-height: 1;
}

.bw3d-num em {
  font-style: normal;
  color: rgba(247, 244, 239, 0.5);
  letter-spacing: 2px;
  font-size: 0.75rem;
  flex-basis: 100%;
  margin-top: 6px;
}

/* Voraussichtliche Bauzeit - aus den Arbeitsstunden gerechnet */
.bw3d-zeit {
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(247, 244, 239, 0.8);
}

.bw3d-zeit span {
  font-weight: 400;
  color: rgba(247, 244, 239, 0.45);
}

.bw3d-copy h2 {
  color: var(--paper);
  margin-bottom: 14px;
  line-height: 1.05;
}

.bw3d-desc {
  color: rgba(247, 244, 239, 0.72);
  margin-bottom: 24px;
}

.bw3d-list {
  list-style: none;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bw3d-list li {
  color: rgba(247, 244, 239, 0.72);
  font-size: 0.92rem;
  padding-left: 26px;
  position: relative;
}

/* Drei Zustaende, damit der Kunde sofort sieht, was er bekommt und was extra kostet.
   Voreinstellung ist "im Paket enthalten". */
.bw3d-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--champagne);
  font-weight: 700;
}

/* Gegen Aufpreis */
.bw3d-list li.is-plus { color: rgba(247, 244, 239, 0.58); }
.bw3d-list li.is-plus::before { content: '+'; color: #e3b04b; }

/* Nur bei passenden baulichen Voraussetzungen */
.bw3d-list li.is-cond { color: rgba(247, 244, 239, 0.52); }
.bw3d-list li.is-cond::before { content: '\25C7'; color: rgba(247, 244, 239, 0.45); font-weight: 400; }

.bw3d-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: -14px 0 26px;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  color: rgba(247, 244, 239, 0.45);
}

.bw3d-legend b { font-weight: 700; margin-right: 5px; }
.bw3d-legend .l-inkl b { color: var(--champagne); }
.bw3d-legend .l-plus b { color: #e3b04b; }
.bw3d-legend .l-cond b { color: rgba(247, 244, 239, 0.6); }

/* --- Vorher/Nachher-Einblendung (aktiv, sobald data-vorher gesetzt ist) --- */
.bw3d-ba {
  position: absolute;
  left: clamp(24px, 6vw, 90px);
  bottom: clamp(60px, 12vh, 120px);
  z-index: 2;
  width: min(320px, 34vw);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(91, 187, 230, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.bw3d-ba img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.bw3d-ba-after {
  position: absolute;
  inset: 0;
}

.bw3d-ba-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(8, 26, 48, 0.72);
  padding: 4px 9px;
  border-radius: 3px;
}

/* --- m²-Rechner --- */
.bw3d-calc {
  margin-bottom: 26px;
}

.bw3d-calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bw3d-calc-label {
  color: rgba(247, 244, 239, 0.6);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.bw3d-calc-qm {
  color: var(--paper);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Netto/Brutto-Umschalter (per JS erzeugt) */
.bw3d-tax {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 16px;
  padding: 3px;
  border: 1px solid rgba(247, 244, 239, 0.16);
  border-radius: 30px;
  background: rgba(8, 26, 48, 0.5);
}

.bw3d-tax button {
  border: none;
  background: none;
  padding: 6px 16px;
  border-radius: 30px;
  cursor: pointer;
  color: rgba(247, 244, 239, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.bw3d-tax button.is-active {
  background: var(--champagne);
  color: var(--ink);
}

.bw3d-calc input[type='range'] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(247, 244, 239, 0.18);
  outline: none;
}

.bw3d-calc input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--champagne);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 1px var(--champagne), 0 0 18px rgba(47, 159, 208, 0.7);
  cursor: pointer;
}

.bw3d-calc input[type='range']::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--champagne);
  border: 3px solid var(--ink);
  cursor: pointer;
}

.bw3d-calc-out {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(247, 244, 239, 0.12);
}

.bw3d-calc-sum {
  color: var(--champagne-light);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.bw3d-calc-rate {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(91, 187, 230, 0.85);
  font-variant-numeric: tabular-nums;
}

.bw3d-calc-material {
  margin-top: 8px;
  font-size: 0.82rem;
  color: rgba(247, 244, 239, 0.75);
  border-left: 2px solid var(--champagne);
  padding-left: 10px;
}

.bw3d-calc-note {
  margin-top: 6px;
  font-size: 0.78rem;
  color: rgba(247, 244, 239, 0.45);
}

/* --- Schmale Viewports --- */
@media (max-width: 900px) {
  /* Am Handy steht das Foto als eigenes Band OBEN, der Text darunter.
     Als Hintergrund war es praktisch unsichtbar: die Verdunkelung verlaeuft
     waagrecht (rechts 92 %) und deckt auf schmalen Schirmen fast alles zu. */
  .bw3d-scene {
    display: block;
    min-height: auto;
    padding: 0 0 72px;
  }
  .bw3d-photo {
    position: relative;
    inset: auto;
    height: 52vw;
    min-height: 210px;
    max-height: 320px;
    margin-bottom: 30px;
  }
  .bw3d-photo::after {
    background: linear-gradient(0deg, rgba(8, 26, 48, 0.75) 0%, rgba(8, 26, 48, 0.05) 55%);
  }
  .bw3d-photo.is-pattern { height: auto; min-height: 0; margin-bottom: 0; }
  /* width:min(560px,100%) plus Seitenabstand ergaebe 100%+48px -> Text liefe rechts raus */
  .bw3d-copy { width: auto; margin: 0 24px; }
  .bw3d-ba { position: relative; left: auto; bottom: auto; width: auto; margin: 24px 24px 0; }
  /* Platz fuer den fixierten WhatsApp-Button, damit er die Preisangabe nicht verdeckt */
  .bw3d-calc-note { padding-bottom: 56px; }
  .bw3d-particles { display: none; }
}
