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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-5xl); font-weight: 800; letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--text-4xl); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: var(--text-xl);  font-weight: 600; }
h5 { font-size: var(--text-lg);  font-weight: 500; }
h6 { font-size: var(--text-base); font-weight: 500; }

p {
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

/* Utilitários */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.text-glow {
  background: linear-gradient(135deg, var(--color-neon) 0%, #FFFFFF 60%, var(--color-cyan-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.section-noise {
  position: relative;
}

.section-noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none !important;
}

/* Animações */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes glowPulse {
  0%, 100% { box-shadow: var(--shadow-neon-sm); }
  50%       { box-shadow: var(--shadow-neon-md); }
}

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

@keyframes scanLine {
  0%   { transform: translateY(-100%); opacity: 0.3; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

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

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

.animate-float      { animation: float 4s ease-in-out infinite; }
.animate-glow-pulse { animation: glowPulse 2.5s ease-in-out infinite; }
.animate-scan       { animation: scanLine 3s linear infinite; }

/* ── Stagger de entrada ── */
.stagger > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.13s; }
.stagger > *:nth-child(3) { animation-delay: 0.21s; }
.stagger > *:nth-child(4) { animation-delay: 0.29s; }
.stagger > *:nth-child(5) { animation-delay: 0.37s; }
.stagger > *:nth-child(6) { animation-delay: 0.45s; }
.stagger > *:nth-child(n+7) { animation-delay: 0.50s; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Page transition ── */
.page-transition {
  animation: pageEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* ── Empty states ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
}
.empty-state-icon  { font-size: 3rem; margin-bottom: var(--space-4); }
.empty-state-title { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.empty-state-desc  { font-size: var(--text-base); color: var(--color-text-muted); max-width: 340px; }

/* ── Renewal screen ── */
.renewal-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.renewal-card { max-width: 400px; width: 100%; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
