/**
 * AION DESIGN SYSTEM — LIQUID GLASS & GLASSMORPHISM 2026
 * AION Class — Do Zero a Operação (Site Principal)
 *
 * Estética de Alta Finança e Gestão Patrimonial (Classe A/A+)
 */

/* ==========================================================================
   1. MALHAS LÍQUIDAS AMBIENTAIS DE FUNDO (AMBIENT LIQUID MESH)
   ========================================================================== */
.liquid-mesh-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: var(--z-index-mesh);
  overflow: hidden;
}

.liquid-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  mix-blend-mode: screen;
  will-change: transform;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-orb--1 {
  top: -120px;
  right: 12%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(0, 80, 255, 0.75) 0%, rgba(0, 36, 115, 0.35) 60%, transparent 80%);
  animation: orb-drift-1 24s ease-in-out infinite alternate;
}

.liquid-orb--2 {
  top: 38%;
  left: -100px;
  width: 740px;
  height: 740px;
  background: radial-gradient(circle, rgba(0, 67, 224, 0.6) 0%, rgba(0, 24, 77, 0.35) 55%, transparent 75%);
  animation: orb-drift-2 30s ease-in-out infinite alternate;
}

.liquid-orb--3 {
  bottom: -150px;
  right: 18%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(41, 121, 255, 0.5) 0%, rgba(0, 31, 102, 0.25) 55%, transparent 75%);
  animation: orb-drift-3 26s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 80px) scale(1.08); }
  100% { transform: translate(-40px, 50px) scale(0.95); }
}

@keyframes orb-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-50px, -70px) scale(1.12); }
  100% { transform: translate(70px, 40px) scale(0.92); }
}

@keyframes orb-drift-3 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-80px, 60px) scale(1.05); }
  100% { transform: translate(50px, -50px) scale(1.1); }
}

/* ==========================================================================
   2. SUPERFÍCIES DE VIDRO LÍQUIDO (LIQUID GLASS CARDS)
   ========================================================================== */
.liquid-glass-card {
  position: relative;
  background: var(--glass-surface-card);
  backdrop-filter: blur(var(--glass-blur-liquid)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur-liquid)) saturate(var(--glass-saturate));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow-ambient), var(--glass-shadow-inset);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  overflow: hidden;
}

/* Brilho Especular Superior Refinado */
.liquid-glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.6) 25%, 
    rgba(255, 255, 255, 0.85) 50%, 
    rgba(255, 255, 255, 0.6) 75%, 
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

/* Superfície Elevada de Maior Densidade */
.liquid-glass-card--elevated {
  background: var(--glass-surface-elevated);
  backdrop-filter: blur(var(--glass-blur-dense)) saturate(210%);
  -webkit-backdrop-filter: blur(var(--glass-blur-dense)) saturate(210%);
  border-color: rgba(255, 255, 255, 0.14);
  border-top-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 28px 64px -12px rgba(0, 0, 0, 0.75), var(--glass-shadow-inset);
}

/* Card em Destaque Especial (flagship Liquid Glass com Luminescência Azul) */
.liquid-glass-card--featured {
  background: linear-gradient(145deg, rgba(0, 36, 115, 0.55) 0%, rgba(13, 18, 30, 0.85) 60%, rgba(8, 10, 16, 0.95) 100%);
  backdrop-filter: blur(var(--glass-blur-dense)) saturate(220%);
  -webkit-backdrop-filter: blur(var(--glass-blur-dense)) saturate(220%);
  border: 1px solid rgba(0, 80, 255, 0.5);
  border-top: 1px solid rgba(160, 205, 255, 0.85);
  box-shadow: 
    0 25px 60px -10px rgba(0, 67, 224, 0.4),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.4),
    0 0 45px rgba(0, 80, 255, 0.28);
}

.liquid-glass-card--featured:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 80, 255, 0.7);
  box-shadow: 
    0 32px 75px -10px rgba(0, 80, 255, 0.5),
    inset 0 2px 2px 0 rgba(255, 255, 255, 0.6),
    0 0 60px rgba(0, 80, 255, 0.38);
}

/* Superfície Sutil (Figue Minimalist) */
.liquid-glass-card--subtle {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(var(--glass-blur-base));
  -webkit-backdrop-filter: blur(var(--glass-blur-base));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.liquid-glass-card--subtle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 80, 255, 0.35);
  transform: translateY(-3px);
}

/* ==========================================================================
   3. BOTÕES E PÍLULAS EM VIDRO LÍQUIDO
   ========================================================================== */
.aion-btn--liquid-primary {
  background: linear-gradient(135deg, rgba(0, 80, 255, 0.88) 0%, rgba(0, 36, 115, 0.95) 100%);
  color: #FFFFFF;
  border: 1px solid rgba(120, 180, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 16px 32px;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.01em;
  box-shadow: 0 10px 28px -6px rgba(0, 80, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

@media (hover: hover) and (pointer: fine) {
  .aion-btn--liquid-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.95) 0%, rgba(0, 50, 160, 1) 100%);
    box-shadow: 0 16px 36px -6px rgba(0, 80, 255, 0.65), 0 0 25px rgba(0, 80, 255, 0.4);
    border-color: rgba(180, 220, 255, 0.7);
  }
}

.aion-btn--liquid-primary:active {
  transform: scale(0.97);
  opacity: 0.94;
}

.aion-btn--liquid-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 14px 28px;
  font-weight: var(--font-weight-regular);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .aion-btn--liquid-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

.aion-btn--liquid-secondary:active {
  transform: scale(0.97);
  opacity: 0.94;
}

/* Badges e Pílulas Translúcidas (Vault AI / Figue) */
.liquid-glass-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 16px;
  background: rgba(12, 16, 26, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em;
  color: #DDE5F5;
  text-transform: uppercase;
}

.liquid-glass-pill--blue {
  background: rgba(0, 40, 140, 0.25);
  border-color: rgba(0, 80, 255, 0.35);
  border-top-color: rgba(140, 190, 255, 0.6);
  color: #8EB4FF;
}

.liquid-glass-pill--credit {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.38);
  border-top-color: rgba(52, 211, 153, 0.7);
  color: #34D399;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.credit-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981, 0 0 18px #34D399;
  display: inline-block;
  animation: pulse-emerald 2.2s infinite ease-in-out;
  margin-right: 2px;
}

@keyframes pulse-emerald {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.85;
    box-shadow: 0 0 6px #10B981;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
    box-shadow: 0 0 14px #34D399, 0 0 22px rgba(16, 185, 129, 0.5);
  }
}

/* Reflexo Especular Reativo ao Cursor */
[data-mouse-specular] {
  position: relative;
}

[data-mouse-specular]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(
    450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.08) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

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

/* ==========================================================================
   5. FIGUE.AI PROGRESSIVE BLUR SYSTEM (ENGENHARIA REVERSA MULTI-CAMADA)
   ========================================================================== */

/* Dock Fixo de Borda Inferior da Tela (Screen Edge Progressive Blur) */
.progressive-blur-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(80px, 12vh, 130px);
  pointer-events: none;
  z-index: 42;
  overflow: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.progressive-blur-dock.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Camada Genérica de Blur Progressivo com Máscaras Parciais */
.progressive-blur-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(var(--blur-radius));
  -webkit-backdrop-filter: blur(var(--blur-radius));
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) var(--mask-start),
    rgba(0, 0, 0, 1) var(--mask-peak-1),
    rgba(0, 0, 0, 1) var(--mask-peak-2),
    rgba(0, 0, 0, 0) var(--mask-end)
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) var(--mask-start),
    rgba(0, 0, 0, 1) var(--mask-peak-1),
    rgba(0, 0, 0, 1) var(--mask-peak-2),
    rgba(0, 0, 0, 0) var(--mask-end)
  );
}

/* Véu de Tinta Aveludada em Gradiente */
.progressive-blur-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(4, 6, 12, 0.12) 35%,
    rgba(4, 6, 12, 0.45) 70%,
    rgba(4, 6, 12, 0.85) 100%
  );
}

/* Progressive Blur para Rodapés de Cards (Inspirado no Card Backlog Figue.ai) */
.card-progressive-blur {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(60px, 9vh, 90px);
  pointer-events: none;
  border-radius: 0 0 inherit inherit;
  overflow: hidden;
  z-index: 10;
}

.card-progressive-blur .progressive-blur-layer {
  position: absolute;
  inset: 0;
}

.card-progressive-blur .progressive-blur-tint {
  position: absolute;
  inset: 0;
}

/* ==========================================================================
   6. SCROLLYTELLING SUITE — TRILHA NARRATIVA & MARCADORES INTERATIVOS
   ========================================================================== */
.scrollytelling-rail {
  position: fixed;
  right: clamp(14px, 2.5vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 48;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 8px;
  background: rgba(10, 14, 24, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 1100px) {
  .scrollytelling-rail {
    display: none;
  }
}

.scrolly-milestone {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  padding: 0;
  outline: none;
}

.scrolly-milestone:hover,
.scrolly-milestone.is-active {
  background: #00E5FF;
  box-shadow: 0 0 12px #00E5FF, 0 0 20px rgba(0, 229, 255, 0.6);
  transform: scale(1.4);
}

.scrolly-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  padding: 5px 12px;
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: var(--font-family-base);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.scrolly-milestone:hover .scrolly-tooltip,
.scrolly-milestone.is-active .scrolly-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Efeito de Iluminação Sequencial na Jornada de 8 Passos (Dobra 7) */
.step-row {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-row.is-scrolled-active {
  background: rgba(0, 60, 200, 0.14) !important;
  border-color: rgba(0, 110, 255, 0.5) !important;
  transform: translateX(8px);
  box-shadow: 0 4px 25px rgba(0, 80, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.step-row.is-scrolled-active .step-num {
  background: #0050FF !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(0, 80, 255, 0.85);
}
