/* ═══════════════════════════════════════════════════════════
   VARIABLES DE DISEÑO (DESIGN TOKENS)
   CAMBIAR COLORES: Modifica estas variables para personalizar
═══════════════════════════════════════════════════════════ */
:root {
    /* ─── Colores principales ─── */
    --clr-bg: #050510;
    --clr-bg-alt: #0a0a20;
    --clr-primary: #00d4ff;
    --clr-secondary: #a855f7;
    --clr-accent: #f472b6;
    --clr-text: #e0e6ff;
    --clr-text-dim: #7a82a6;
    --clr-glow: rgba(0, 212, 255, .35);
    --clr-glow-secondary: rgba(168, 85, 247, .3);
    --clr-surface: rgba(15, 15, 40, .6);
    --clr-border: rgba(0, 212, 255, .15);
    /* ─── Tipografías ─── */
    --ff-display: 'Orbitron', sans-serif;
    --ff-body: 'Exo 2', 'Rajdhani', sans-serif;
    /* ─── Espaciado ─── */
    --space-xs: .5rem; --space-sm: 1rem; --space-md: 2rem;
    --space-lg: 3rem; --space-xl: 5rem;
    /* ─── Transiciones ─── */
    --ease-out: cubic-bezier(.25, .46, .45, .94);
    --ease-bounce: cubic-bezier(.68, -.55, .27, 1.55);
}

/* Tema claro */
[data-theme="light"] {
    --clr-bg: #e8ecf8;
    --clr-bg-alt: #d0d8f0;
    --clr-text: #1a1a3e;
    --clr-text-dim: #555580;
    --clr-surface: rgba(200, 210, 240, .7);
    --clr-border: rgba(0, 150, 200, .25);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow: hidden;
    height: 100%;
}

body {
    font-family: var(--ff-body);
    background: var(--clr-bg);
    color: var(--clr-text);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

/* ═══════════════════════════════════════════════════════════
   LOADER INICIAL
═══════════════════════════════════════════════════════════ */
.loader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--clr-bg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity .8s var(--ease-out), visibility .8s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__ring {
    width: 80px; height: 80px;
    border: 3px solid var(--clr-border);
    border-top-color: var(--clr-primary);
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
    position: relative;
}
.loader__ring-inner {
    position: absolute; inset: 6px;
    border: 3px solid transparent;
    border-bottom-color: var(--clr-secondary);
    border-radius: 50%;
    animation: loaderSpin 1.5s linear infinite reverse;
}
@keyframes loaderSpin { to { transform: rotate(360deg); } }

.loader__text {
    margin-top: var(--space-sm);
    font-family: var(--ff-display);
    font-size: .85rem;
    letter-spacing: 4px;
    color: var(--clr-primary);
}
.loader__dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
    0% { content: ''; } 25% { content: '.'; }
    50% { content: '..'; } 75% { content: '...'; }
}

/* ═══════════════════════════════════════════════════════════
   CANVAS - FONDO DE ESTRELLAS
═══════════════════════════════════════════════════════════ */
#space-canvas {
    position: fixed; inset: 0; z-index: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at 50% 50%, #0d0d2b 0%, #050510 100%);
}

/* ═══════════════════════════════════════════════════════════
   CAPAS DE NEBULOSA
═══════════════════════════════════════════════════════════ */
.nebula-layer {
    position: fixed; inset: 0; z-index: 1;
    pointer-events: none;
    opacity: .4;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(168,85,247,.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0,212,255,.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(244,114,182,.08) 0%, transparent 50%);
    animation: nebulaFloat 30s ease-in-out infinite alternate;
}
.nebula-layer--secondary {
    opacity: .25;
    background:
        radial-gradient(ellipse at 70% 60%, rgba(0,212,255,.12) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 30%, rgba(244,114,182,.1) 0%, transparent 45%);
    animation-duration: 40s;
    animation-direction: alternate-reverse;
}
@keyframes nebulaFloat {
    0% { transform: translateX(0) translateY(0) scale(1); }
    50% { transform: translateX(30px) translateY(-20px) scale(1.05); }
    100% { transform: translateX(-20px) translateY(15px) scale(1.02); }
}

/* Línea de escaneo sutil */
body::after {
    content: '';
    position: fixed; inset: 0; z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0,212,255,.015) 2px, rgba(0,212,255,.015) 4px
    );
}

/* ═══════════════════════════════════════════════════════════
   BARRA SUPERIOR
═══════════════════════════════════════════════════════════ */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(180deg, rgba(5,5,16,.8) 0%, transparent 100%);
}

.lang-switcher { display: flex; align-items: center; gap: .5rem; }
.lang-btn {
    background: none; border: 1px solid var(--clr-border);
    color: var(--clr-text-dim); cursor: pointer;
    font-family: var(--ff-display); font-size: .7rem;
    padding: .35rem .7rem; border-radius: 4px;
    letter-spacing: 2px; transition: all .3s var(--ease-out);
}
.lang-btn:hover, .lang-btn.active {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    box-shadow: 0 0 12px var(--clr-glow);
}
.lang-divider { color: var(--clr-text-dim); font-size: .7rem; opacity: .3; }

.theme-toggle {
    background: none; border: 1px solid var(--clr-border);
    color: var(--clr-text-dim); cursor: pointer;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all .3s var(--ease-out);
}
.theme-toggle:hover {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    box-shadow: 0 0 15px var(--clr-glow);
}
.theme-icon { width: 18px; height: 18px; }
.theme-icon--sun { display: none; }
[data-theme="light"] .theme-icon--moon { display: none; }
[data-theme="light"] .theme-icon--sun { display: block; }

/* ═══════════════════════════════════════════════════════════
   HERO - CONTENIDO PRINCIPAL
═══════════════════════════════════════════════════════════ */
.hero {
    position: relative; z-index: 10;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: var(--space-md);
    min-height: 100vh;
    animation: heroFadeIn 1.5s var(--ease-out) .5s both;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Anillos orbitales decorativos ─── */
.orbital-ring {
    position: absolute; border-radius: 50%;
    border: 1px solid; pointer-events: none;
    animation: orbitalSpin linear infinite;
}
.orbital-ring--1 {
    width: 500px; height: 500px;
    border-color: rgba(0,212,255,.06);
    animation-duration: 60s;
}
.orbital-ring--2 {
    width: 650px; height: 650px;
    border-color: rgba(168,85,247,.05);
    animation-duration: 80s;
    animation-direction: reverse;
}
.orbital-ring--3 {
    width: 800px; height: 800px;
    border-color: rgba(244,114,182,.03);
    animation-duration: 100s;
}
@keyframes orbitalSpin { to { transform: rotate(360deg); } }

/* ─── Título ─── */
.hero__title {
    font-family: var(--ff-display);
    line-height: 1;
    margin-bottom: var(--space-sm);
    position: relative;
}
.hero__title-line {
    display: block;
    animation: titleGlitch .1s linear infinite alternate;
}
.hero__title-line--top {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 400;
    color: var(--clr-text-dim);
    letter-spacing: 1.5rem;
    text-shadow: 0 0 30px var(--clr-glow-secondary);
}
.hero__title-line--bottom {
    font-size: clamp(3rem, 10vw, 7.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-secondary) 50%, var(--clr-accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px var(--clr-glow));
    letter-spacing: .3rem;
}
@keyframes titleGlitch {
    0%, 98% { opacity: 1; }
    99% { opacity: .8; transform: translateX(1px); }
}

/* ─── Subtítulo ─── */
.hero__subtitle {
    font-family: var(--ff-body);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: var(--clr-text-dim);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    animation: subtitlePulse 4s ease-in-out infinite;
}
@keyframes subtitlePulse {
    0%, 100% { opacity: .7; } 50% { opacity: 1; }
}

/* ─── Divisor ─── */
.hero__divider {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: var(--space-lg);
}
.hero__divider-line {
    width: 60px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--clr-primary), transparent);
}
.hero__divider-dot {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--clr-primary);
    box-shadow: 0 0 8px var(--clr-glow);
}
.hero__divider-diamond {
    width: 8px; height: 8px;
    background: var(--clr-primary);
    transform: rotate(45deg);
    box-shadow: 0 0 12px var(--clr-glow);
}

/* ═══════════════════════════════════════════════════════════
   CONTADOR REGRESIVO
═══════════════════════════════════════════════════════════ */
.countdown {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap; justify-content: center;
}
.countdown__block {
    display: flex; flex-direction: column; align-items: center;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: 12px;
    padding: var(--space-sm) var(--space-md);
    min-width: 90px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .3s var(--ease-out), box-shadow .3s;
}
.countdown__block:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--clr-glow);
}
.countdown__number {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--clr-primary);
    text-shadow: 0 0 20px var(--clr-glow);
    line-height: 1;
}
.countdown__label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--clr-text-dim);
    margin-top: .3rem;
}
.countdown__separator {
    font-family: var(--ff-display);
    font-size: 2rem;
    color: var(--clr-secondary);
    animation: separatorPulse 1s ease-in-out infinite;
    padding-bottom: 1rem;
}
@keyframes separatorPulse {
    0%, 100% { opacity: 1; } 50% { opacity: .3; }
}

/* ═══════════════════════════════════════════════════════════
   BOTÓN CTA (CONTACTO)
═══════════════════════════════════════════════════════════ */
.hero__cta {
    position: relative; display: inline-flex;
    align-items: center; gap: .75rem;
    padding: 1rem 2.5rem;
    font-family: var(--ff-display);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--clr-primary);
    border: 1px solid var(--clr-primary);
    border-radius: 50px;
    background: rgba(0,212,255,.05);
    cursor: pointer;
    overflow: hidden;
    transition: all .4s var(--ease-out);
    margin-bottom: var(--space-md);
}
.hero__cta:hover {
    background: rgba(0,212,255,.15);
    box-shadow: 0 0 30px var(--clr-glow), 0 0 60px rgba(0,212,255,.15);
    transform: translateY(-2px);
    color: #fff;
}
.hero__cta-icon svg { width: 18px; height: 18px; transition: transform .3s; }
.hero__cta:hover .hero__cta-icon svg { transform: translate(3px, -3px); }
.hero__cta-glow {
    position: absolute; inset: -2px;
    border-radius: 50px;
    background: linear-gradient(45deg, var(--clr-primary), var(--clr-secondary), var(--clr-accent));
    opacity: 0;
    z-index: -1;
    filter: blur(15px);
    transition: opacity .4s;
}
.hero__cta:hover .hero__cta-glow { opacity: .5; }

/* ═══════════════════════════════════════════════════════════
   REDES SOCIALES
═══════════════════════════════════════════════════════════ */
.social-links {
    display: flex; gap: var(--space-sm); margin-top: var(--space-sm);
}
.social-link {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--clr-border);
    border-radius: 50%;
    color: var(--clr-text-dim);
    transition: all .3s var(--ease-out);
}
.social-link svg { width: 20px; height: 20px; }
.social-link:hover {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    box-shadow: 0 0 20px var(--clr-glow);
    transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════
   CONTROLES DE AUDIO
═══════════════════════════════════════════════════════════ */
.audio-controls {
    position: fixed; bottom: var(--space-md); right: var(--space-md);
    z-index: 100;
    display: flex; align-items: center; gap: .75rem;
}
.audio-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--clr-border);
    background: var(--clr-surface);
    color: var(--clr-text-dim);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    transition: all .3s var(--ease-out);
}
.audio-btn:hover {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    box-shadow: 0 0 15px var(--clr-glow);
}
.audio-icon { width: 20px; height: 20px; }
.audio-icon--off { display: none; }
.audio-btn.muted .audio-icon--on { display: none; }
.audio-btn.muted .audio-icon--off { display: block; }

.volume-slider-wrap {
    width: 100px;
    opacity: 0; transform: scaleX(0);
    transform-origin: right;
    transition: all .3s var(--ease-out);
}
.audio-controls:hover .volume-slider-wrap {
    opacity: 1; transform: scaleX(1);
}
.volume-slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 4px;
    border-radius: 2px;
    background: var(--clr-border);
    outline: none;
    cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--clr-primary);
    box-shadow: 0 0 10px var(--clr-glow);
    cursor: pointer;
}
.volume-slider::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%; border: none;
    background: var(--clr-primary);
    box-shadow: 0 0 10px var(--clr-glow);
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.footer {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 10;
    text-align: center;
    padding: var(--space-sm);
    background: linear-gradient(0deg, rgba(5,5,16,.8) 0%, transparent 100%);
}
.footer__text {
    font-size: .75rem;
    color: var(--clr-text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero__title-line--top { letter-spacing: .5rem; }
    .hero__title-line--bottom { letter-spacing: .1rem; }
    .countdown__block { min-width: 70px; padding: .75rem 1rem; }
    .countdown__number { font-size: 1.8rem; }
    .countdown__separator { font-size: 1.5rem; }
    .orbital-ring { display: none; }
    .hero__cta { padding: .8rem 1.8rem; font-size: .75rem; }
    .audio-controls { bottom: var(--space-xl); right: var(--space-sm); }
}
@media (max-width: 480px) {
    .hero__title-line--top { font-size: 1.8rem; letter-spacing: .3rem; }
    .hero__title-line--bottom { font-size: 2.2rem; }
    .hero__subtitle { font-size: .8rem; letter-spacing: 2px; }
    .countdown { gap: .3rem; }
    .countdown__block { min-width: 60px; padding: .5rem .75rem; }
    .countdown__number { font-size: 1.4rem; }
    .countdown__separator { font-size: 1.2rem; padding-bottom: .5rem; }
    .social-link { width: 38px; height: 38px; }
}
