/* ==========================================================================
   Stroomvast — energie-animaties
   Geladen na stroomvast.css. Beweging gebruikt transform/opacity, scènes
   draaien alleen in beeld (main.js zet .is-live) en vallen weg bij
   prefers-reduced-motion.
   ========================================================================== */

@property --sv-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --sv-ease: cubic-bezier(.22, 1, .36, 1);
  --sv-glow: rgba(231, 171, 62, .55);
}

/* --------------------------------------------------------------------
   Logo en badge: de bliksem "slaat aan"
   -------------------------------------------------------------------- */
.logo-mark {
  position: relative;
  overflow: hidden;
}

.logo-mark i {
  display: inline-block;
  animation: sv-power-on 1.1s steps(1, end) .3s both, sv-zap 7s ease-in-out 3s infinite;
}

/* A short charge glow fills the tile from the bottom every few seconds. */
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(231, 171, 62, .55), transparent 70%);
  transform: translateY(100%);
  animation: sv-charge 7s var(--sv-ease) 3s infinite;
}

.logo:hover .logo-mark i {
  animation: sv-zap .6s ease-in-out;
}

@keyframes sv-power-on {
  0%, 20%, 45% {
    opacity: .25;
  }
  10%, 35%, 60%, 100% {
    opacity: 1;
  }
}

@keyframes sv-zap {
  0%, 8%, 100% {
    transform: none;
    color: inherit;
  }
  3% {
    transform: scale(1.25) rotate(-8deg);
    color: #ffe2a3;
  }
  5% {
    transform: scale(.95) rotate(4deg);
  }
}

@keyframes sv-charge {
  0%, 2% {
    transform: translateY(100%);
  }
  8% {
    transform: translateY(0);
  }
  14%, 100% {
    transform: translateY(-100%);
  }
}

.hero .company-badge i {
  display: inline-block;
  color: var(--sv-sun);
  animation: sv-power-on 1.1s steps(1, end) .6s both, sv-zap 6s ease-in-out 2.4s infinite;
}

/* --------------------------------------------------------------------
   Leesvoortgang: stroom loopt door de draad onder het menu
   -------------------------------------------------------------------- */
.header .header-container {
  position: relative;
}

.sv-current {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  transition: opacity .4s;
}

.scrolled .sv-current {
  opacity: 1;
}

.sv-current::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sv-green), var(--sv-green-light), var(--sv-sun));
  transform: scaleX(var(--scroll, 0));
  transform-origin: left;
}

/* Spark at the head of the current. */
.sv-current-spark {
  position: absolute;
  top: 50%;
  left: calc(var(--scroll, 0) * 100%);
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff6dc;
  box-shadow: 0 0 0 2px var(--sv-sun), 0 0 12px 4px var(--sv-glow);
  animation: sv-flicker 1.4s ease-in-out infinite;
}

@keyframes sv-flicker {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  40% {
    opacity: .7;
    transform: scale(.8);
  }
  55% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* --------------------------------------------------------------------
   Hero: stroom rond de foto en energieroutes die errond zweven
   -------------------------------------------------------------------- */
/* A pulse of current circles the photo frame. */
.sv-hero-visual::before,
.sv-page-hero-image::after {
  content: "";
  position: absolute;
  /* Drawn just inside the photo edge so it never widens the layout. */
  inset: 0;
  z-index: 2;
  padding: 3px;
  border-radius: var(--sv-radius-md);
  background: conic-gradient(from var(--sv-angle), transparent 0 72%, rgba(231, 171, 62, .15) 78%, var(--sv-sun) 86%, #fff3cf 88%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  animation: sv-orbit 5s linear infinite;
}

@keyframes sv-orbit {
  to {
    --sv-angle: 360deg;
  }
}

.sv-hero-photo img,
.sv-page-hero-image img {
  animation: sv-photo-in 1.4s var(--sv-ease) .2s both;
}

@keyframes sv-photo-in {
  from {
    transform: scale(1.08);
    filter: brightness(.75) saturate(.8);
  }
}

.sv-energy-nodes {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.sv-energy-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--sv-line);
  box-shadow: 0 14px 28px -14px rgba(16, 36, 31, .45);
  font-size: 1.45rem;
  animation: sv-node-in .9s var(--sv-ease) both, sv-float 5s ease-in-out infinite;
}

/* Soft pulse ring, like a status LED. */
.sv-energy-node::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid currentColor;
  opacity: 0;
  animation: sv-ping 3s ease-out infinite;
}

.sv-node-sun {
  top: 16%;
  left: 0;
  color: #b57a12;
  animation-delay: .9s, 1.8s;
}

.sv-node-sun i {
  display: inline-block;
  animation: sv-spin 18s linear infinite;
}

.sv-node-plug {
  top: 38%;
  left: calc(100% - 34px);
  color: var(--sv-green);
  animation-delay: 1.05s, 2.6s;
}

.sv-node-plug::after {
  animation-delay: 1s;
}

.sv-node-battery {
  top: 62%;
  left: 0;
  color: #1f6b78;
  animation-delay: 1.2s, 3.2s;
}

.sv-node-battery::after {
  animation-delay: 2s;
}

@keyframes sv-node-in {
  from {
    opacity: 0;
    transform: scale(.4);
  }
}

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

@keyframes sv-ping {
  0% {
    opacity: .7;
    transform: scale(1);
  }
  60%, 100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes sv-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 991px) {
  .sv-energy-node {
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 13px;
    font-size: 1.15rem;
  }

  .sv-node-sun,
  .sv-node-battery {
    left: 28px;
  }

  .sv-node-plug {
    left: calc(100% - 28px);
  }
}

/* --------------------------------------------------------------------
   Sectiekoppen: een vonk loopt over de zonnelijn
   -------------------------------------------------------------------- */
.sv-section-kicker::before {
  background:
    linear-gradient(90deg, transparent, #fff6dc, transparent) no-repeat,
    var(--sv-sun);
  background-size: 10px 100%, 100% 100%;
  background-position: -10px 0, 0 0;
  animation: sv-kicker-spark 4s ease-in-out infinite;
}

@keyframes sv-kicker-spark {
  0%, 55% {
    background-position: -10px 0, 0 0;
  }
  85%, 100% {
    background-position: 32px 0, 0 0;
  }
}

/* --------------------------------------------------------------------
   Vertrouwensbalk: iconen gaan één voor één aan
   -------------------------------------------------------------------- */
.sv-trust-item i {
  position: relative;
  transition: background-color .3s, color .3s, box-shadow .3s;
}

.sv-trust-bar.is-live .sv-trust-item i {
  animation: sv-led 1s ease both;
}

.sv-trust-bar.is-live .sv-trust-item:nth-child(2) i { animation-delay: .25s; }
.sv-trust-bar.is-live .sv-trust-item:nth-child(3) i { animation-delay: .5s; }
.sv-trust-bar.is-live .sv-trust-item:nth-child(4) i { animation-delay: .75s; }

@keyframes sv-led {
  0% {
    filter: grayscale(1) brightness(1.1);
    box-shadow: none;
  }
  35% {
    filter: none;
    box-shadow: 0 0 0 4px rgba(231, 171, 62, .25), 0 0 18px rgba(231, 171, 62, .55);
  }
  100% {
    box-shadow: none;
  }
}

.sv-trust-item:hover i {
  box-shadow: 0 0 0 4px rgba(20, 122, 103, .12);
}

/* --------------------------------------------------------------------
   Energieroutes: een stroompuls rond de kaart bij hover
   -------------------------------------------------------------------- */
.sv-product-card {
  position: relative;
}

.sv-product-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  border-radius: calc(var(--sv-radius-md) + 1px);
  background: conic-gradient(from var(--sv-angle), transparent 0 60%, var(--sv-green-light) 80%, var(--sv-sun) 90%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.sv-product-card:hover::after {
  opacity: 1;
  animation: sv-orbit 2.2s linear infinite;
}

.sv-product-image img {
  transition: transform .8s var(--sv-ease);
}

.sv-product-card:hover .sv-product-image img {
  transform: scale(1.06);
}

.sv-product-card:hover .sv-product-icon {
  animation: sv-charge-icon .9s var(--sv-ease);
}

@keyframes sv-charge-icon {
  30% {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(231, 171, 62, .2), 0 0 18px rgba(231, 171, 62, .45);
  }
}

.sv-info-card .sv-icon-soft {
  transition: transform .4s var(--sv-ease), box-shadow .4s;
}

.sv-info-card:hover .sv-icon-soft {
  transform: translateY(-3px);
  box-shadow: 0 0 0 5px rgba(20, 122, 103, .1);
}

/* --------------------------------------------------------------------
   Werkwijze: de stappen laden één na één op, als stroom van 1 naar 3
   -------------------------------------------------------------------- */
.sv-step-card {
  overflow: hidden;
  transition: transform .4s var(--sv-ease), box-shadow .4s;
}

/* Charge bar along the top edge of each step. */
.sv-step-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sv-green), var(--sv-green-light), var(--sv-sun));
  transform: scaleX(0);
  transform-origin: left;
}

.sv-step-grid.is-live .sv-step-card::after {
  animation: sv-step-charge 6s linear infinite;
}

.sv-step-grid.is-live .sv-step-card > i {
  display: inline-block;
  animation: sv-step-glow 6s ease-in-out infinite;
}

.sv-step-grid.is-live .sv-step-card:nth-child(2)::after,
.sv-step-grid.is-live .sv-step-card:nth-child(2) > i {
  animation-delay: 1.4s;
}

.sv-step-grid.is-live .sv-step-card:nth-child(3)::after,
.sv-step-grid.is-live .sv-step-card:nth-child(3) > i {
  animation-delay: 2.8s;
}

.sv-step-grid.is-live .sv-step-card:nth-child(4)::after,
.sv-step-grid.is-live .sv-step-card:nth-child(4) > i {
  animation-delay: 4.2s;
}

/* Fill in ~1.4s, stay charged for a while, then fade out before the next charge. */
@keyframes sv-step-charge {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }
  23%, 70% {
    transform: scaleX(1);
    opacity: 1;
  }
  80%, 100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

@keyframes sv-step-glow {
  0%, 18%, 100% {
    color: var(--sv-green);
    text-shadow: none;
    transform: none;
  }
  24% {
    color: #c58b1c;
    text-shadow: 0 0 14px rgba(231, 171, 62, .8);
    transform: scale(1.15);
  }
  32% {
    color: var(--sv-green);
    text-shadow: none;
    transform: none;
  }
}

.sv-step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sv-shadow-md);
}

.sv-step-number {
  transition: color .3s;
}

.sv-step-card:hover .sv-step-number {
  color: rgba(231, 171, 62, .45);
}

/* --------------------------------------------------------------------
   Afsluitende CTA: golvende stroomlijnen in de achtergrond
   -------------------------------------------------------------------- */
.sv-cta-final {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.sv-cta-final::before,
.sv-cta-final::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  height: 120px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 240px 120px;
}

.sv-cta-final::before {
  bottom: 12%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120'%3E%3Cpath d='M0 60 C 40 10, 80 10, 120 60 S 200 110, 240 60' fill='none' stroke='%23e7ab3e' stroke-opacity='.35' stroke-width='2'/%3E%3C/svg%3E");
}

.sv-cta-final::after {
  bottom: 18%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120'%3E%3Cpath d='M0 60 C 40 25, 80 25, 120 60 S 200 95, 240 60' fill='none' stroke='%23ffffff' stroke-opacity='.12' stroke-width='2'/%3E%3C/svg%3E");
}

.sv-cta-final.is-live::before {
  animation: sv-wave 6s linear infinite;
}

.sv-cta-final.is-live::after {
  animation: sv-wave 9s linear infinite reverse;
}

@keyframes sv-wave {
  to {
    background-position: 240px 0;
  }
}

/* --------------------------------------------------------------------
   Knoppen: een korte lichtflits bij hover
   -------------------------------------------------------------------- */
.sv-btn-primary,
.btn-getstarted {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.sv-btn-primary::after,
.btn-getstarted::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 236, 190, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--sv-ease);
}

.sv-btn-primary:hover::after,
.btn-getstarted:hover::after {
  transform: translateX(120%);
}

/* --------------------------------------------------------------------
   Minder beweging gewenst
   -------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .logo-mark i,
  .logo-mark::after,
  .hero .company-badge i,
  .sv-current-spark,
  .sv-hero-visual::before,
  .sv-page-hero-image::after,
  .sv-hero-photo img,
  .sv-page-hero-image img,
  .sv-energy-node,
  .sv-energy-node::after,
  .sv-node-sun i,
  .sv-section-kicker::before,
  .sv-trust-bar.is-live .sv-trust-item i,
  .sv-product-card:hover::after,
  .sv-step-grid.is-live .sv-step-card::after,
  .sv-step-grid.is-live .sv-step-card > i,
  .sv-cta-final.is-live::before,
  .sv-cta-final.is-live::after {
    animation: none !important;
  }

}
