/* ==========================================================================
   MUNTEC — Animaciones
   ========================================================================== */

@keyframes spin{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }
@keyframes floaty{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(30px); } }
@keyframes pulse{ 0%,100%{ box-shadow: 0 12px 30px rgba(31,179,92,0.45); } 50%{ box-shadow: 0 12px 40px rgba(31,179,92,0.7); } }
@keyframes scrollcue{ 0%{ transform: scaleY(0); transform-origin:top; } 50%{ transform: scaleY(1); transform-origin:top; } 51%{ transform-origin:bottom; } 100%{ transform: scaleY(0); transform-origin:bottom; } }

@keyframes fadeUp{
  from{ opacity:0; transform: translateY(28px); }
  to{ opacity:1; transform: translateY(0); }
}
@keyframes fadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

.hero-copy .eyebrow, .hero-copy h1, .hero-copy p.lead, .hero-actions, .hero-stats{
  opacity:0;
  animation: fadeUp .8s ease forwards;
}
.hero-copy .eyebrow{ animation-delay: .05s; }
.hero-copy h1{ animation-delay: .15s; }
.hero-copy p.lead{ animation-delay: .3s; }
.hero-actions{ animation-delay: .45s; }
.hero-stats{ animation-delay: .58s; }
.hero-visual{ opacity:0; animation: fadeIn 1s ease forwards; animation-delay: .35s; }

/* Reveal on scroll */
.reveal{
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in-view{ opacity:1; transform: translateY(0); }
.reveal-stagger .reveal:nth-child(1){ transition-delay: 0s; }
.reveal-stagger .reveal:nth-child(2){ transition-delay: .08s; }
.reveal-stagger .reveal:nth-child(3){ transition-delay: .16s; }
.reveal-stagger .reveal:nth-child(4){ transition-delay: .24s; }
.reveal-stagger .reveal:nth-child(5){ transition-delay: .32s; }
.reveal-stagger .reveal:nth-child(6){ transition-delay: .4s; }
.reveal-stagger .reveal:nth-child(7){ transition-delay: .48s; }
.reveal-stagger .reveal:nth-child(8){ transition-delay: .56s; }

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
  .hero-copy .eyebrow, .hero-copy h1, .hero-copy p.lead, .hero-actions, .hero-stats, .hero-visual{
    opacity:1 !important; animation:none !important;
  }
}

/* ============================ PAGE TRANSITIONS ============================ */
.page-transition-overlay{
  position:fixed; inset:0; z-index:9999;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--blue-corp) 100%);
  display:flex; align-items:center; justify-content:center;
  transform: translateY(0);
  pointer-events:none;
}
.page-transition-overlay::after{
  content:""; width:44px; height:44px; border-radius:50%;
  border: 3px solid rgba(255,255,255,0.18); border-top-color: var(--blue-electric-2);
  opacity:0;
}
.page-transition-overlay.is-out::after{ animation: overlaySpin .7s linear infinite, overlayMarkFade .2s ease .15s forwards; }

@keyframes overlaySpin{ to{ transform: rotate(360deg); } }
@keyframes overlayMarkFade{ to{ opacity:1; } }

@keyframes overlaySlideIn{ from{ transform: translateY(-100%); } to{ transform: translateY(0); } }
@keyframes overlaySlideOut{ from{ transform: translateY(0); } to{ transform: translateY(-100%); } }

.page-transition-overlay.is-in{ animation: overlaySlideIn .5s cubic-bezier(.76,0,.24,1) forwards; }
.page-transition-overlay.is-out{ animation: overlaySlideOut .5s cubic-bezier(.76,0,.24,1) forwards .15s; }

@media (prefers-reduced-motion: reduce){
  .page-transition-overlay{ display:none !important; }
}
