/* ============================================
   SICHERES ZUHAUSE — Interaktive Scroll-Animation
   ============================================ */

.secure-home {
  position: relative;
  background: linear-gradient(180deg, #050505 0%, #0a0a0a 50%, #050505 100%);
  /* overflow: clip used instead of hidden — doesn't break position:sticky */
  overflow-x: clip;
  padding: 0;
}

.secure-home__intro {
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 2;
}

.secure-home__intro .section__label {
  color: #22c55e;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

.secure-home__intro h2 {
  font-family: 'Clash Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.05;
  margin: 0 auto 1.5rem;
  max-width: 900px;
  letter-spacing: -0.02em;
}

.secure-home__intro h2 .accent {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.secure-home__intro p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === Scroll-Pin Container === */
.secure-home__scroll {
  position: relative;
  height: 500vh; /* 5x viewport for 4 stages + intro */
}

.secure-home__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0 4rem;
  overflow: hidden;
}

/* === Linke Seite: Stage-Texte === */
.secure-home__stages {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
}

.secure-home__stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
}

.secure-home__stage.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.secure-home__stage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  font-family: 'Clash Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.2);
}

.secure-home__stage h3 {
  font-family: 'Clash Grotesk', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.secure-home__stage p {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
  margin: 0 0 1.5rem;
  max-width: 480px;
}

.secure-home__stage-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.secure-home__stage-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.secure-home__stage-features svg {
  flex-shrink: 0;
  color: #22c55e;
}

/* === Rechte Seite: 3D-Haus === */
.secure-home__house-wrap {
  position: relative;
  width: 100%;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
}

.secure-home__house {
  position: relative;
  width: 100%;
  max-width: 780px;
  height: 100%;
  filter: drop-shadow(0 30px 80px rgba(34, 197, 94, 0.15));
}

.secure-home__house svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* === Element-Aktivierung === */
.house-element {
  opacity: 0;
  transform-origin: center;
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.3);
}

.house-element.is-active {
  opacity: 1;
  transform: scale(1);
}

.house-pulse {
  transform-origin: center;
  animation: housePulse 2s ease-in-out infinite;
}

@keyframes housePulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.3); }
}

.house-glow-circle {
  fill: none;
  stroke: #22c55e;
  stroke-width: 2;
  opacity: 0;
}

.is-active .house-glow-circle {
  animation: glowExpand 2s ease-out infinite;
}

@keyframes glowExpand {
  0% { opacity: 0.8; r: 8; stroke-width: 3; }
  100% { opacity: 0; r: 30; stroke-width: 0; }
}

/* === Aufschaltzentrale-Verbindung === */
.house-monitoring-line {
  stroke: #22c55e;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 6 4;
  opacity: 0;
  stroke-dashoffset: 0;
}

.house-monitoring-line.is-active {
  opacity: 0.9;
  animation: dashFlow 1.5s linear infinite;
}

@keyframes dashFlow {
  to { stroke-dashoffset: -20; }
}

.house-monitoring-tower {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.house-monitoring-tower.is-active {
  opacity: 1;
}

/* === Stage-Indikator === */
.secure-home__indicator {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 5;
}

.secure-home__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
}

.secure-home__dot.is-active {
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6);
  transform: scale(1.5);
}

/* === Outro CTA === */
.secure-home__outro {
  text-align: center;
  padding: 6rem 2rem 8rem;
  position: relative;
  z-index: 2;
}

.secure-home__outro h3 {
  font-family: 'Clash Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  margin: 0 0 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.secure-home__outro p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.125rem;
  margin: 0 auto 2.5rem;
  max-width: 600px;
}

.secure-home__outro .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.125rem 2.25rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #000;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.0625rem;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  transition: all 0.3s ease;
}

.secure-home__outro .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(34, 197, 94, 0.5);
}

/* Hintergrund-Glow für Sektion */
.secure-home::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Stage-Inhalte folgen dem Stage-Container (nicht den globalen Reveals) */
.secure-home__stage > * {
  opacity: inherit;
  transform: none;
}

/* === Mobile === */
@media (max-width: 968px) {
  .secure-home__scroll {
    height: auto;
  }
  .secure-home__sticky {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 3rem;
  }
  .secure-home__stages {
    height: auto;
    min-height: 320px;
  }
  .secure-home__house-wrap {
    height: 50vh;
    order: -1;
  }
  .secure-home__indicator {
    right: 1rem;
  }
  .secure-home__intro {
    padding: 5rem 1.5rem 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .house-element,
  .house-monitoring-tower,
  .secure-home__stage {
    opacity: 1;
    transform: none;
  }
  .house-pulse,
  .house-glow-circle,
  .house-monitoring-line {
    animation: none;
  }
}
