/* ═══════════════════════════════════════════════════════════════
   GLOBAL STYLES — Thayany | Beleza Lucrativa
   Reset, scrollbar, utilities, animations
   ═══════════════════════════════════════════════════════════════ */

@import url('./tokens.css');

/* RESET */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg-base);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
  min-height: 100vh;
}

img, video {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover {
  color: var(--color-accent-deeper);
}

/* SCROLLBAR — warm & subtle */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent-pale);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg-surface);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-light);
}

/* SELECTION */
::selection {
  background: var(--color-accent-pale);
  color: var(--color-accent-deepest);
}

/* HEADINGS — Fraunces serif elegance */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
}

/* GLASS UTILITIES */
.glass {
  background: var(--color-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--color-glass-border);
}
.glass:hover {
  background: var(--color-glass-heavy);
  border-color: var(--color-glass-border-hover);
}
.glass-light {
  background: var(--color-glass-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-glass-border);
}

/* GLOW UTILITIES */
.glow-accent {
  box-shadow: var(--shadow-accent);
}
.glow-soft {
  box-shadow: var(--shadow-glow);
}
.glow-strong {
  box-shadow: var(--shadow-glow-lg);
}

/* TEXT GRADIENT — signature look */
.text-gradient {
  background: var(--gradient-text-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--gradient-divider);
  border: 0;
  margin: var(--space-8) 0;
}

/* ═══════════════════════════════════════════════════════════════
   KEYFRAMES — Animacoes
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(176, 136, 98, 0.18); }
  50%      { box-shadow: 0 0 60px rgba(176, 136, 98, 0.32); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50%      { transform: translateY(-12px); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

@keyframes tilt {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-1deg); }
  75%      { transform: rotate(1deg); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(8px, -4px); }
  66%      { transform: translate(-4px, 6px); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(40px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(40px) rotate(-360deg); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes textReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes scrollReveal {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATION UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.animate-fade-in       { animation: fadeIn 600ms var(--transition-expo) both; }
.animate-fade-up       { animation: fadeInUp 700ms var(--transition-expo) both; }
.animate-fade-down     { animation: fadeInDown 700ms var(--transition-expo) both; }
.animate-fade-left     { animation: fadeInLeft 700ms var(--transition-expo) both; }
.animate-fade-right    { animation: fadeInRight 700ms var(--transition-expo) both; }
.animate-scale-in      { animation: scaleIn 500ms var(--transition-spring) both; }
.animate-glow          { animation: glowPulse 3s ease-in-out infinite; }
.animate-float         { animation: float 4s ease-in-out infinite; }
.animate-shimmer       { background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%); background-size: 200% 100%; animation: shimmer 2.5s linear infinite; }
.animate-spin          { animation: spin 1.2s linear infinite; }
.animate-pulse         { animation: pulse 2.4s ease-in-out infinite; }
.animate-tilt          { animation: tilt 6s ease-in-out infinite; }
.animate-drift         { animation: drift 8s ease-in-out infinite; }

/* STAGGERED DELAYS — pra usar com .ani [style="--i:0"] */
.stagger { animation-delay: calc(var(--i, 0) * 80ms); }

/* SCROLL REVEAL — JS-driven */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 800ms var(--transition-expo), transform 800ms var(--transition-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* HOVER UTILITIES */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-tilt {
  transition: transform var(--transition-spring);
}
.hover-tilt:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
}

.hover-glow {
  transition: box-shadow var(--transition-slow);
}
.hover-glow:hover {
  box-shadow: var(--shadow-glow);
}

/* SHINE EFFECT — pra botoes/cards premium */
.shine {
  position: relative;
  overflow: hidden;
}
.shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-shine);
  transition: left 800ms var(--transition-expo);
  pointer-events: none;
}
.shine:hover::after {
  left: 100%;
}

/* RESPECT REDUCED MOTION */
@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;
  }
}

/* ─────────────────────────────────────
   Keyframes — Microinterações Thay
───────────────────────────────────── */

@keyframes cifra-pulse {
  0%   { text-shadow: 0 0 0 rgba(91, 142, 90, 0); }
  40%  { text-shadow: 0 0 14px rgba(91, 142, 90, 0.55); }
  100% { text-shadow: 0 0 0 rgba(91, 142, 90, 0); }
}

@keyframes money-fall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: translateY(120px) rotate(180deg); opacity: 0; }
}

@keyframes counter-tick {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* CTA shine idle reforçado: 2 passes a cada 3s */
@keyframes cta-shine-idle {
  0%, 70%, 100% { background-position: -200% 0; }
  35%, 50%      { background-position: 200% 0; }
}

/* CLASSES utilitárias das microinterações */
.cifra-pulse-on-view {
  animation: cifra-pulse 800ms ease-in-out 1;
}

.animate-money-fall {
  animation: money-fall 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Reduced motion overrides para microinterações signature */
@media (prefers-reduced-motion: reduce) {
  .cifra-pulse-on-view,
  [data-rain-particle] {
    animation: none !important;
  }
}

/* PRINT */
@media print {
  body {
    background: white;
    color: black;
  }
}
