/* =============================================================
   animations.css — Teuller Pimenta Moraes
   Estados iniciais da splash screen e classes de reveal.
   Apenas consome variáveis de tokens.css.
   ============================================================= */

/* ── Splash screen ───────────────────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: var(--z-splash);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-1);
  padding: var(--space-8);
}

/* Saída da splash */
#splash.dismissing {
  pointer-events: none;
}

/* Stage central */
.splash-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

/* Wrapper do SVG inline do ícone */
.splash-icon-wrap {
  line-height: 0;
}

/* SVG do ícone — tamanho responsivo */
#si-svg {
  width: clamp(200px, 36vw, 300px);
  height: auto;
  overflow: visible;
}

/* Estados iniciais controlados pelo GSAP (opacity via JS) */
#si-bar-white,
#si-bar-gold-top,
#si-bar-gold-bot,
#si-swoosh {
  opacity: 0;
}

/* SVG transform-box para scaleY a partir do centro do path */
#si-bar-white,
#si-bar-gold-top,
#si-bar-gold-bot {
  transform-box: fill-box;
  transform-origin: center;
}

/* Nome: clip reveal — div esconde o texto que sobe */
.splash-name-clip {
  overflow: hidden;
}

.splash-name-text {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.2vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
}

/* Tagline */
.splash-tagline-text {
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 1.4vw, 0.8rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  opacity: 0;
}

/* ── Hero — estado inicial (travado até splash terminar) ─────── */
body.splash-active #site-content {
  visibility: hidden;
}

/* ── Classes utilitárias de reveal (usadas pelo GSAP) ────────── */
.reveal-from-bottom {
  opacity: 0;
  transform: translateY(32px);
}

.reveal-from-left {
  opacity: 0;
  transform: translateX(-32px);
}

.reveal-from-right {
  opacity: 0;
  transform: translateX(32px);
}

.reveal-fade {
  opacity: 0;
}

/* ── Transição de tema (suaviza troca de data-theme) ─────────── */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color var(--duration-medium) var(--ease-out-smooth),
    color var(--duration-medium) var(--ease-out-smooth),
    border-color var(--duration-medium) var(--ease-out-smooth),
    box-shadow var(--duration-medium) var(--ease-out-smooth) !important;
}

/* ── prefers-reduced-motion já tratado no reset.css ───────────── */
/* Splash com motion reduzida: GSAP lida no JS com early-return.
   Aqui garantimos visibilidade imediata dos elementos. */
@media (prefers-reduced-motion: reduce) {
  #si-bar-white,
  #si-bar-gold-top,
  #si-bar-gold-bot,
  #si-swoosh {
    opacity: 1 !important;
    transform: none !important;
  }
  #si-swoosh {
    fill: url(#si-gold) !important;
    stroke: none !important;
  }
  .splash-name-text {
    transform: none !important;
  }
  .splash-tagline-text {
    opacity: 1 !important;
  }
}
