/* ==========================================================================
   Vinxey — Global CSS
   Variables, reset, utilidades y animaciones base
   ========================================================================== */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colores de marca - derivados del logo SVG */
  --vx-primary: #DC0000;
  --vx-primary-dark: #B30000;
  --vx-primary-light: #FF1A1A;
  --vx-primary-glow: rgba(220, 0, 0, 0.15);
  --vx-primary-glow-strong: rgba(220, 0, 0, 0.3);

  /* Neutros */
  --vx-dark: #1A1A1A;
  --vx-dark-soft: #262626; /* Ajustado para mejor neutralidad */
  --vx-dark-muted: #333333; /* Ajustado para neutralidad sin saturación */
  --vx-gray: #B0B0B8; /* Gris aclarado para asegurar contraste AA (>4.5:1) sobre fondos oscuros */
  --vx-gray-dark: #52525B; /* Nuevo gris oscuro para fondos claros */
  --vx-gray-light: #F4F4F5;
  --vx-gray-lighter: #FAFAFA;
  --vx-white: #FFFFFF;

  /* No hay acento azul. Paleta estricta de Negros, Blancos, Grises y Rojos. */

  /* Tipografía */
  --vx-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --vx-font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Espaciado */
  --vx-space-xs: 0.25rem;
  --vx-space-sm: 0.5rem;
  --vx-space-md: 1rem;
  --vx-space-lg: 1.5rem;
  --vx-space-xl: 2rem;
  --vx-space-2xl: 3rem;
  --vx-space-3xl: 4rem;
  --vx-space-4xl: 6rem;
  --vx-space-5xl: 8rem;

  /* Bordes */
  --vx-radius-sm: 4px;
  --vx-radius-md: 8px;
  --vx-radius-lg: 12px;
  --vx-radius-xl: 16px;
  --vx-radius-2xl: 24px;
  --vx-radius-full: 9999px;

  /* Sombras */
  --vx-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --vx-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --vx-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --vx-shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.15);
  --vx-shadow-red: 0 8px 25px rgba(220, 0, 0, 0.25);
  --vx-shadow-glow: 0 0 40px rgba(220, 0, 0, 0.15);

  /* Transiciones */
  --vx-transition-fast: 0.15s ease;
  --vx-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --vx-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --vx-transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --vx-container: 1140px;
  --vx-container-wide: 1320px;
}

/* --- Minimal Reset / Normalizations --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* --- Utility Classes --- */

/* Body scroll lock */
body.nav-open {
  overflow: hidden;
}

/* Container */
.vx-container {
  width: 100%;
  max-width: var(--vx-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--vx-space-lg);
  padding-right: var(--vx-space-lg);
}

.vx-container-wide {
  max-width: var(--vx-container-wide);
}

/* Text utilities */
.vx-text-center { text-align: center; }
.vx-text-left { text-align: left; }
.vx-text-right { text-align: right; }

.vx-text-primary { color: var(--vx-primary); }
.vx-text-dark { color: var(--vx-dark); }
.vx-text-gray { color: var(--vx-gray); }
.vx-text-white { color: var(--vx-white); }

.vx-text-mono {
  font-family: var(--vx-font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* Background utilities */
.vx-bg-dark { background-color: var(--vx-dark); }
.vx-bg-dark-soft { background-color: var(--vx-dark-soft); }
.vx-bg-light { background-color: var(--vx-gray-light); }
.vx-bg-white { background-color: var(--vx-white); }
.vx-bg-primary { background-color: var(--vx-primary); }

/* Section spacing */
.vx-section {
  padding-top: var(--vx-space-5xl);
  padding-bottom: var(--vx-space-5xl);
}

.vx-section-sm {
  padding-top: var(--vx-space-3xl);
  padding-bottom: var(--vx-space-3xl);
}

/* --- Glassmorphism card --- */
.vx-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--vx-radius-xl);
}

/* --- Gradient text --- */
.vx-gradient-text {
  background: linear-gradient(135deg, var(--vx-primary) 0%, var(--vx-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Divider line with glow --- */
.vx-divider {
  height: 3px;
  width: 60px;
  background: var(--vx-primary);
  border: none;
  border-radius: var(--vx-radius-full);
  box-shadow: 0 0 12px var(--vx-primary-glow-strong);
}

/* --- Badge / Tag --- */
.vx-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--vx-space-xs);
  padding: var(--vx-space-xs) var(--vx-space-md);
  background: var(--vx-primary-glow);
  color: var(--vx-primary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--vx-radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--vx-font-mono);
}

/* --- Animation base classes (used by animations.js) --- */
.vx-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--vx-transition-slow), transform var(--vx-transition-slow);
}

.vx-animate.vx-visible {
  opacity: 1;
  transform: translateY(0);
}

.vx-animate-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--vx-transition-slow), transform var(--vx-transition-slow);
}

.vx-animate-left.vx-visible {
  opacity: 1;
  transform: translateX(0);
}

.vx-animate-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--vx-transition-slow), transform var(--vx-transition-slow);
}

.vx-animate-right.vx-visible {
  opacity: 1;
  transform: translateX(0);
}

.vx-animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--vx-transition-slow), transform var(--vx-transition-spring);
}

.vx-animate-scale.vx-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children animation delays */
.vx-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.vx-stagger > *:nth-child(2) { transition-delay: 0.15s; }
.vx-stagger > *:nth-child(3) { transition-delay: 0.25s; }
.vx-stagger > *:nth-child(4) { transition-delay: 0.35s; }
.vx-stagger > *:nth-child(5) { transition-delay: 0.45s; }
.vx-stagger > *:nth-child(6) { transition-delay: 0.55s; }

/* --- Pulse animation for CTA --- */
@keyframes vx-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 0, 0, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(220, 0, 0, 0); }
}

.vx-pulse {
  animation: vx-pulse 2s infinite;
}

/* --- Float animation --- */
@keyframes vx-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.vx-float {
  animation: vx-float 3s ease-in-out infinite;
}

/* --- Grid line background decoration --- */
.vx-grid-bg {
  background-image:
    linear-gradient(rgba(220, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --vx-space-5xl: 4rem;
    --vx-space-4xl: 3rem;
    --vx-space-3xl: 2rem;
  }

  .vx-section {
    padding-top: var(--vx-space-3xl);
    padding-bottom: var(--vx-space-3xl);
  }
}

@media (max-width: 480px) {
  :root {
    --vx-space-5xl: 3rem;
    --vx-space-4xl: 2.5rem;
  }
}
