/* ============================================================
   PARDUS — Sistema de Animações
   Inspirado em hashgraphvc.com
   Stack: CSS puro + classes utilitárias para GSAP
   ============================================================ */


/* ============================================================
   ESTADO INICIAL DOS ELEMENTOS ANIMADOS
   GSAP vai alterar esses valores via JavaScript
   ============================================================ */

.anim-fade {
  opacity: 0;
}

.anim-line-oh {
  overflow: hidden;
  display: block;
}

.anim-line-inner {
  display: block;
  transform: translateY(110%);
}

.anim-word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
}

.anim-stagger > * {
  opacity: 0;
  transform: translateY(30px);
}

/* Remove estado inicial após JS inicializar (evita flash) */
.anim-initialized .anim-fade,
.anim-initialized .anim-line-inner,
.anim-initialized .anim-word,
.anim-initialized .anim-stagger > * {
  /* GSAP assume o controle a partir daqui */
}


/* ============================================================
   SHIMMER BUTTON — Brilho deslizante no botão CTA
   ============================================================ */

.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 80%
  );
  transform: rotate(19.92deg);
  animation: btn-shimmer 5s cubic-bezier(0.14, 1, 0.34, 1) infinite;
  pointer-events: none;
}

@keyframes btn-shimmer {
  0%   { left: -100%; opacity: 0; }
  10%  { opacity: 1; }
  50%  { left: 130%; }
  51%  { opacity: 0; }
  100% { left: 130%; opacity: 0; }
}


/* ============================================================
   SVG PATH DRAW — Linha se desenhando
   Aplicar em <path> ou <line> do SVG com stroke
   ============================================================ */

.svg-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dash-reveal 2s linear forwards;
}

.svg-draw-wipe {
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
  animation: dash-wipe 2s linear forwards;
}

@keyframes dash-reveal {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}

@keyframes dash-wipe {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -1000; }
}

/* Linha decorativa animada em loop (ex: botão hero) */
.btn-line-animated::before,
.btn-line-animated::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.btn-line-animated::before {
  animation: dash-wipe 2s linear infinite;
}

.btn-line-animated::after {
  animation: dash-reveal 2s linear infinite;
}


/* ============================================================
   PAGE TRANSITION — Overlay de troca de página
   ============================================================ */

.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s linear;
}

.page-transition-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}


/* ============================================================
   LOADER — Tela de entrada
   ============================================================ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  transition: opacity 0.6s linear, visibility 0.6s linear;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__logo {
  will-change: transform;
  animation: loader-logo-pulse 2s cubic-bezier(0.14, 1, 0.34, 1) infinite alternate;
}

@keyframes loader-logo-pulse {
  from { transform: scale(0.95); opacity: 0.7; }
  to   { transform: scale(1);    opacity: 1; }
}

.loader__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.14, 1, 0.34, 1);
}


/* ============================================================
   SCROLL INDICATOR — "Role para descobrir"
   ============================================================ */

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: scroll-indicator-appear 0.8s 2s cubic-bezier(0.14, 1, 0.34, 1) forwards;
}

.scroll-indicator__line {
  width: 1px;
  height: 40px;
  background: currentColor;
  transform-origin: top center;
  animation: scroll-line-pulse 1.6s cubic-bezier(0.14, 1, 0.34, 1) infinite;
}

@keyframes scroll-indicator-appear {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 0.6; transform: translateY(0); }
}

@keyframes scroll-line-pulse {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}


/* ============================================================
   COUNTER — Número que conta ao entrar na viewport
   ============================================================ */

.anim-counter {
  font-variant-numeric: tabular-nums;
}


/* ============================================================
   HEADER — Logo entrada animada
   ============================================================ */

.header-logo {
  transform: scale(0.9) rotate(-20deg);
  opacity: 0;
  transition:
    transform 1.4s cubic-bezier(0.14, 1, 0.34, 1),
    opacity 0.6s linear;
}

.header-logo.is-visible {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}


/* ============================================================
   SCROLLBAR CUSTOMIZADA
   ============================================================ */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}


/* ============================================================
   UTILITÁRIOS DE TRANSIÇÃO
   Curvas extraídas do hashgraphvc.com
   ============================================================ */

.transition-smooth {
  transition: all 0.8s cubic-bezier(0.14, 1, 0.34, 1);
}

.transition-sharp {
  transition: all 0.8s cubic-bezier(0.9, 0, 0.1, 1);
}

.transition-fade {
  transition: opacity 0.6s linear;
}
