/* ==========================================================================
   aarecom AG – Animationen v2
   Glasfaser-Hero, Marquee, Reveals
   ========================================================================== */

/* ---------- Schweiz-Karte: Punktraster ---------- */
.sm-dots circle { opacity: .5; }
.sm-dots .sm-tw { animation: smTwinkle 7s ease-in-out infinite; }
@keyframes smTwinkle {
  0%, 100% { opacity: .3; }
  50%      { opacity: .95; }
}

/* Karten-Labels einblenden */
.sm-label {
  opacity: 0;
  animation: smFade .8s ease-out forwards;
  animation-delay: 1.4s;
}
@keyframes smFade { to { opacity: 1; } }

/* ---------- Glasfaser-Verbindungen (Karte) ---------- */
.sm-links path {
  stroke-width: 1.4;
  opacity: 0;
  stroke-linecap: round;
  animation: smLinkIn 1.2s ease-out forwards;
  animation-delay: .9s;
}
@keyframes smLinkIn { to { opacity: .38; } }

.sm-pulse {
  opacity: 0;
  animation: smPulseIn .5s ease-out forwards;
  animation-delay: 1.6s;
}
@keyframes smPulseIn { to { opacity: 1; } }

/* ---------- Stadt-Knoten ---------- */
.sm-node .sm-core { fill: #2563EB; }
.sm-node .sm-ring {
  fill: none;
  stroke: #2563EB;
  stroke-width: 1.5;
  opacity: .65;
  transform-box: fill-box;
  transform-origin: center;
  animation: smPing 3.2s cubic-bezier(0, 0, .35, 1) infinite;
}
.sm-node-hq .sm-core { fill: #7C3AED; }
.sm-node-hq .sm-ring { stroke: #7C3AED; animation-duration: 2.4s; }
@keyframes smPing {
  0%   { transform: scale(.6); opacity: .75; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- Hero: Glasfaser-Stränge zeichnen sich ein ---------- */
.strand-lines path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: strandDraw 1.5s cubic-bezier(.3, 0, .2, 1) forwards, strandFade 1.5s ease forwards;
}
.strand-lines path:nth-child(1) { animation-delay: .3s; }
.strand-lines path:nth-child(2) { animation-delay: .45s; }
.strand-lines path:nth-child(3) { animation-delay: .65s; }

@keyframes strandDraw { to { stroke-dashoffset: 0; } }
@keyframes strandFade { 0% { opacity: 0; } 100% { opacity: .34; } }

.strand-pulses circle {
  opacity: 0;
  animation: smPulseIn .6s ease-out forwards;
  animation-delay: 1.4s;
}

/* ---------- Hero-Entrance ---------- */
.hero-map {
  opacity: 0;
  transform: translateY(14px) scale(.985);
  animation: heroRise .9s cubic-bezier(.2, .65, .3, 1) forwards;
  animation-delay: .25s;
}
.hero-copy > * {
  opacity: 0;
  transform: translateY(18px);
  animation: heroRise .8s cubic-bezier(.2, .65, .3, 1) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .25s; }
.hero-copy > *:nth-child(4) { animation-delay: .35s; }
.hero-copy > *:nth-child(5) { animation-delay: .5s; }
@keyframes heroRise {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Scroll-Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .65, .3, 1), transform .7s cubic-bezier(.2, .65, .3, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s cubic-bezier(.2, .65, .3, 1), transform .6s cubic-bezier(.2, .65, .3, 1);
}
.reveal-stagger.in-view > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: .03s; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: .09s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: .15s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: .21s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: .27s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: .33s; }
.reveal-stagger.in-view > *:nth-child(7) { transition-delay: .39s; }
.reveal-stagger.in-view > *:nth-child(8) { transition-delay: .45s; }

/* ---------- Live-Punkt ---------- */
.dot-live { animation: liveBlink 1.8s ease-in-out infinite; }
@keyframes liveBlink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  50%      { opacity: .6; box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .hero-map { animation: none; opacity: 1; transform: none; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .sm-dots .sm-tw, .sm-node .sm-ring, .dot-live { animation: none; }
  .sm-links path { animation: none; opacity: .38; }
  .sm-label { animation: none; opacity: 1; }
  .sm-pulses, .strand-pulses { display: none; }
  .strand-lines path { animation: none; stroke-dashoffset: 0; opacity: .3; }
  .service-card:hover, .btn:hover, .team-tile:hover img { transform: none; }
}

/* ==========================================================================
   Hero «Die Signatur» – Logo entsteht aus Licht (includes/logo-hero.php)
   ========================================================================== */
.sig-stage { position: relative; z-index: 2; min-width: 0; }
.sig-logo { width: 100%; height: auto; overflow: visible; --sig-t0: .85s; }

.sig-dot {
  opacity: 0;
  transform: scale(.2);
  transform-box: fill-box;
  transform-origin: center;
  animation: sigDot .5s cubic-bezier(.2, .65, .3, 1) forwards;
}
@keyframes sigDot {
  55%  { opacity: 1; transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

.sig-word {
  opacity: 0;
  transform: translateY(12px);
  transform-box: view-box;
  animation: sigWord .9s cubic-bezier(.2, .65, .3, 1) forwards;
  animation-delay: calc(var(--sig-t0) + 1.05s);
}
@keyframes sigWord {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .sig-dot, .sig-word { animation: none; opacity: 1; transform: none; }
}


