:root {
  --brand-red: #ef4444;
  --brand-blue: #0ea5e9;
  --brand-green: #10b981;
  --brand-purple: #a855f7;
  --brand-orange: #f97316;
}

/* Tema Oscuro (por defecto) */
:root[data-theme="dark"],
:root:not([data-theme]) {
  --bg-primary: #000;
  --bg-secondary: rgba(15, 23, 42, 0.4);
  --bg-tertiary: rgba(255, 255, 255, 0.05);
  --text-primary: #fff;
  --text-secondary: rgba(255, 255, 255, 0.95);
  --text-tertiary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --overlay-color: rgba(15, 23, 42, 0.4);
  --video-brightness: brightness(0.4);
  --gradient-overlay: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(168, 85, 247, 0.15) 100%);
}

/* Tema Claro */
:root[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: rgba(255, 255, 255, 0.95);
  --bg-tertiary: rgba(15, 23, 42, 0.05);
  --text-primary: #0f172a;
  --text-secondary: #1e293b;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --border-color: rgba(15, 23, 42, 0.1);
  --border-hover: rgba(15, 23, 42, 0.2);
  --overlay-color: rgba(255, 255, 255, 0.7);
  --video-brightness: brightness(0.7) saturate(0.8);
  --gradient-overlay: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(59, 130, 246, 0.03) 50%, rgba(168, 85, 247, 0.05) 100%);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  display: inline-block;
  animation: rotate-icon 0.6s ease-in-out;
}

@keyframes rotate-icon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 60px 70px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 50px 50px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 90px 10px, #fff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: twinkle 5s ease-in-out infinite;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: var(--video-brightness) saturate(1.2);
  transition: filter 0.3s ease;
}

.overlay-gradient {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--gradient-overlay);
  pointer-events: none;
  transition: background 0.3s ease;
}

.hero-container {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

.particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(255,255,255,0.8), transparent);
  border-radius: 50%;
  animation: float-particle linear infinite;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.hero-inner {
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 60px 40px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
  pointer-events: none;
  transition: background 0.3s ease;
}

.logo-wrapper {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
  animation: logo-pulse 3s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(24px, 6vw, 52px);
  font-weight: 900;
  margin: 0 0 16px;
  letter-spacing: -1px;
  background: linear-gradient(
    90deg,
    #ef4444 0%,
    #f97316 40%,
    #0ea5e9 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: clamp(14px, 3.5vw, 24px);
  color: var(--text-secondary);
  margin: 0 0 32px;
  font-weight: 300;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: color 0.3s ease;
}

.cta-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 0 0 40px;
  position: relative;
  z-index: 1;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-blue));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary::before { background: linear-gradient(135deg, #ef4444, #0ea5e9); }
.btn-secondary::before { background: linear-gradient(135deg, #0ea5e9, #3b82f6); }

.btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
  border-color: var(--border-hover);
}

.btn:hover::before { opacity: 1; }

.btn span:first-child {
  font-size: 12px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn span:last-child {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
  position: relative;
  z-index: 1;
}

.info-card {
  background: var(--bg-tertiary);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.info-card:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.info-card h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0ea5e9;
  margin: 0 0 8px;
  font-weight: 700;
}

.info-card p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.info-card a {
  color: #10b981;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 600;
}

.info-card a:hover { color: #0ea5e9; }

.hero-footer {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 32px;
  transition: color 0.3s ease;
}

/* Fade-in animations */
.fade-in {
  animation: fadeInScale 800ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.fade-in-delay-1 { animation-delay: 200ms; }
.fade-in-delay-2 { animation-delay: 400ms; }
.fade-in-delay-3 { animation-delay: 600ms; }
.fade-in-delay-4 { animation-delay: 800ms; }
.fade-in-delay-5 { animation-delay: 1000ms; }

/* Keyframes */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes logo-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.6)); }
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-container {
    padding: 16px;
  }
  
  .hero-inner {
    padding: 32px 20px;
    border-radius: 16px;
  }
  
  .logo-wrapper {
    margin-bottom: 16px;
  }
  
  .hero-title {
    margin: 0 0 12px;
  }
  
  .hero-subtitle {
    margin: 0 0 24px;
  }
  
  .cta-group {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0 0 24px;
  }
  
  .btn {
    padding: 16px 20px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }
  
  .info-card {
    padding: 12px;
  }
  
  .info-card h3 {
    font-size: 12px;
  }
  
  .info-card p {
    font-size: 12px;
  }
  
  .hero-footer {
    margin-top: 16px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .hero-container {
    padding: 12px;
  }
  
  .hero-inner {
    padding: 24px 16px;
  }
  
  .logo {
    width: 100%;
    max-width: 100%;
  }
  
  .hero-title {
    font-size: clamp(20px, 5vw, 40px);
    margin: 0 0 8px;
  }
  
  .hero-subtitle {
    font-size: clamp(12px, 3vw, 18px);
    margin: 0 0 16px;
  }
  
  .cta-group {
    margin: 0 0 16px;
  }
  
  .btn {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .btn span:first-child {
    font-size: 10px;
  }
  
  .btn span:last-child {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
