/**
 * AION DESIGN SYSTEM — ANIMAÇÕES & INTERAÇÕES REFINADAS (2026)
 * AION Action — Imersão Prática ao Vivo
 * 
 * Efeitos inspirados nas melhores referências globais de fintech & tech
 * (Linear, Apple, Vercel, Genesis, Stripe, Bloomberg Terminal).
 */

/* ==========================================================================
   1. SCROLL REVEAL BASE & STAGGER
   ========================================================================== */
[data-scroll-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-scroll-reveal].is-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Children Reveal */
[data-scroll-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-scroll-reveal-stagger].is-in-view > *:nth-child(1) { transition-delay: 0.04s; }
[data-scroll-reveal-stagger].is-in-view > *:nth-child(2) { transition-delay: 0.08s; }
[data-scroll-reveal-stagger].is-in-view > *:nth-child(3) { transition-delay: 0.12s; }
[data-scroll-reveal-stagger].is-in-view > *:nth-child(4) { transition-delay: 0.16s; }
[data-scroll-reveal-stagger].is-in-view > *:nth-child(5) { transition-delay: 0.20s; }
[data-scroll-reveal-stagger].is-in-view > *:nth-child(6) { transition-delay: 0.24s; }
[data-scroll-reveal-stagger].is-in-view > *:nth-child(7) { transition-delay: 0.28s; }

[data-scroll-reveal-stagger].is-in-view > * {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   2. HERO SCROLL DOWN MICRO-CUE (ROLE PARA EXPLORAR)
   ========================================================================== */
.hero-scroll-cue {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: clamp(28px, 4vw, 48px);
  position: relative;
  z-index: 10;
}

.hero-scroll-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(10, 16, 32, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-base);
}

.hero-scroll-link:hover {
  background: rgba(0, 48, 153, 0.35);
  border-color: rgba(0, 140, 255, 0.45);
  transform: translateY(2px);
  box-shadow: 0 0 25px rgba(0, 80, 255, 0.3);
}

.hero-scroll-mouse {
  width: 20px;
  height: 32px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  position: relative;
  transition: border-color var(--transition-fast);
}

.hero-scroll-link:hover .hero-scroll-mouse {
  border-color: #38BDF8;
}

.hero-scroll-wheel {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #38BDF8;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseWheelTravel 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  box-shadow: 0 0 6px #38BDF8;
}

@keyframes mouseWheelTravel {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  20% {
    opacity: 1;
  }
  70% {
    opacity: 1;
    transform: translate(-50%, 12px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
}

.hero-scroll-text {
  font-family: var(--font-family-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aion-light-300);
  transition: color var(--transition-fast);
}

.hero-scroll-link:hover .hero-scroll-text {
  color: #FFFFFF;
}

.hero-scroll-chevron {
  color: #60A5FA;
  animation: chevronBounce 2s ease-in-out infinite;
}

@keyframes chevronBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ==========================================================================
   3. FINANCIAL LIVE TICKER MARQUEE (FAIXA CONTÍNUA DE ALTA VELOCIDADE)
   ========================================================================== */
.financial-ticker-ribbon {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  contain: paint;
  clip-path: inset(0);
  background: rgba(4, 8, 20, 0.95);
  border-top: 1px solid rgba(0, 80, 255, 0.3);
  border-bottom: 1px solid rgba(0, 80, 255, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0;
  position: relative;
  z-index: 5;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  user-select: none;
}

/* Máscara de suavização nas bordas laterais */
.financial-ticker-ribbon::before,
.financial-ticker-ribbon::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  z-index: 2;
}

.financial-ticker-ribbon::before {
  left: 0;
  background: linear-gradient(90deg, #020612 0%, transparent 100%);
}

.financial-ticker-ribbon::after {
  right: 0;
  background: linear-gradient(270deg, #020612 0%, transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: tickerScroll 36s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
  .financial-ticker-ribbon:hover .ticker-track {
    animation-play-state: paused;
  }
}

@keyframes tickerScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-right: var(--space-lg);
  flex-shrink: 0;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family-mono);
  font-size: 0.78125rem;
  letter-spacing: 0.04em;
  color: var(--aion-light-300);
  white-space: nowrap;
}

.ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.65625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ticker-pill--live {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34D399;
}

.ticker-pill--live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}

.ticker-pill--accent {
  background: rgba(0, 80, 255, 0.25);
  border: 1px solid rgba(0, 100, 255, 0.5);
  color: #60A5FA;
}

.ticker-pill--neutral {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
}

.ticker-val {
  color: #FFFFFF;
  font-weight: var(--font-weight-semibold);
}

.ticker-val--zero {
  color: #34D399;
}

.ticker-change.up {
  color: #34D399;
  font-weight: var(--font-weight-medium);
}

.ticker-sep {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
}

/* ==========================================================================
   4. SCROLL-DRIVEN WORD ILLUMINATION (GENESIS / APPLE EDITORIAL EFFECT)
   ========================================================================== */
.scroll-word {
  display: inline-block;
  opacity: 0.22;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.2s ease, 
              text-shadow 0.2s ease,
              filter 0.2s ease;
  will-change: opacity, color;
}

.scroll-word.is-illuminated {
  opacity: 1 !important;
  color: #FFFFFF !important;
}

.scroll-word.is-highlight-word {
  color: #60A5FA !important;
  text-shadow: 0 0 14px rgba(96, 165, 250, 0.5);
}

/* ==========================================================================
   5. INTERACTIVE LASER BEAM TIMELINE (DOBRA 6 — 7 PASSOS)
   ========================================================================== */
.steps-interactive-wrapper {
  position: relative;
  max-width: 880px;
  margin: 0 auto var(--space-3xl) auto;
}

.steps-laser-rail {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 45px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}

.steps-laser-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #0050FF 0%, #00D2FF 100%);
  border-radius: 2px;
  box-shadow: 0 0 12px #00D2FF, 0 0 24px rgba(0, 80, 255, 0.6);
  transition: height 0.08s linear;
  will-change: height;
}

.steps-laser-beam::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 12px #00D2FF, 0 0 24px #0050FF;
}

/* Estado Ativo do Card do Passo */
.step-card.is-step-active {
  border-color: rgba(0, 140, 255, 0.45);
  background: rgba(18, 28, 56, 0.85);
  transform: translateX(6px);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 80, 255, 0.25);
}

.step-card.is-step-active .step-number {
  border-color: #00D2FF;
  background: rgba(0, 80, 255, 0.45);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.5);
  transform: scale(1.06);
}

@media (max-width: 680px) {
  .steps-laser-rail {
    display: none;
  }
}

/* ==========================================================================
   6. METRIC COUNTER ANIMATIONS
   ========================================================================== */
.metric-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  will-change: contents;
}

/* ==========================================================================
   7. PULSO SUTIL & EFEITOS ESPECULARES
   ========================================================================== */
@keyframes bluePulseGlow {
  0%, 100% {
    box-shadow: 0 0 25px rgba(0, 80, 255, 0.25);
  }
  50% {
    box-shadow: 0 0 50px rgba(0, 80, 255, 0.5);
  }
}

.glow-pulse {
  animation: bluePulseGlow 3.5s infinite ease-in-out;
}

/* Especular Reativo aprimorado para qualquer elemento com data-mouse-specular */
[data-mouse-specular] {
  position: relative;
  overflow: hidden;
}

[data-mouse-specular]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 45%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

[data-mouse-specular]:hover::after {
  opacity: 1;
}

/* Respeito à Preferência de Movimento Reduzido (Acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track {
    animation: none !important;
  }
  .scroll-word {
    opacity: 1 !important;
  }
}
