/* ═══════════════════════════════════════════════════════
   NexCode — Coming Soon / En Desarrollo
   ═══════════════════════════════════════════════════════ */

:root {
    --primary: #0d233c;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --surface: #0a1628;
    --surface-light: #111d33;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: rgba(59, 130, 246, 0.12);
    --radius: 16px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--surface);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ── Fondo animado ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.bg-glow--1 {
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
    animation: float-glow 12s ease-in-out infinite;
}

.bg-glow--2 {
    bottom: -250px;
    left: -150px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 70%);
    animation: float-glow 15s ease-in-out infinite reverse;
}

@keyframes float-glow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Contenedor principal ── */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    padding: 2rem;
    text-align: center;
}

/* ── Logo ── */
.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fade-down 0.8s ease-out both;
}

.logo__img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 24px rgba(59, 130, 246, 0.25));
    transition: transform 0.3s ease;
}

.logo__img:hover {
    transform: scale(1.04);
}

/* ── Badge de estado ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--accent-glow);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    animation: fade-down 0.8s ease-out 0.15s both;
}

.badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* ── Título principal ── */
.title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
    animation: fade-down 0.8s ease-out 0.3s both;
}

.title span {
    background: linear-gradient(135deg, var(--accent), var(--accent-light), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Descripción ── */
.description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    animation: fade-down 0.8s ease-out 0.45s both;
}

/* ── Barra de progreso ── */
.progress-section {
    margin-bottom: 2.5rem;
    animation: fade-down 0.8s ease-out 0.6s both;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: var(--surface-light);
    border-radius: 100px;
    margin: 0 auto 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar__fill {
    height: 100%;
    width: 72%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    position: relative;
    animation: progress-load 1.8s ease-out 1s both;
}

.progress-bar__fill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes progress-load {
    from { width: 0; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-label {
    font-size: 0.90rem;
    color: var(--text-muted);
}

.progress-label strong {
    color: var(--accent-light);
    font-weight: 700;
}

/* ── Features / Stats ── */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
    animation: fade-down 0.8s ease-out 0.75s both;
}

.feature {
    padding: 1.25rem 0.75rem;
    background: linear-gradient(135deg, var(--surface-light), rgba(17, 29, 51, 0.6));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.3s, transform 0.3s;
}

.feature:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.feature__icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
}

/* ── Formulario de notificación ── */
.notify {
    display: flex;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto 2rem;
    animation: fade-down 0.8s ease-out 0.9s both;
}

.notify__input {
    flex: 1;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-light);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.notify__input::placeholder {
    color: var(--text-muted);
}

.notify__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.notify__btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.3s, transform 0.15s;
}

.notify__btn:hover {
    opacity: 0.9;
}

.notify__btn:active {
    transform: scale(0.97);
}

/* ── Footer ── */
.footer {
    animation: fade-down 0.8s ease-out 1s both;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer__link:hover {
    color: var(--accent-light);
}

.footer__copy {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.5);
}

/* ── Animaciones base ── */
@keyframes fade-down {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Toast de notificación ── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(12px);
}

.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast--success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.toast--warn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.toast--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ── Responsive: Tablets ── */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        max-width: 100%;
    }

    .title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        letter-spacing: -0.5px;
    }

    .description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .feature {
        padding: 1rem 0.5rem;
    }

    .feature__label {
        font-size: 0.72rem;
    }

    .logo {
        margin-bottom: 2rem;
    }

    .bg-glow {
        width: 350px;
        height: 350px;
        filter: blur(80px);
        opacity: 0.3;
    }
}

/* ── Responsive: Móviles ── */
@media (max-width: 500px) {
    body {
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .container {
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1.5rem;
    }

    .logo__img {
        max-height: 50px;
    }

    .badge {
        font-size: 0.7rem;
        padding: 5px 12px;
        margin-bottom: 1.5rem;
    }

    .title {
        font-size: clamp(1.5rem, 7vw, 2rem);
        margin-bottom: 1rem;
    }

    .description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        padding: 0 0.25rem;
    }

    .progress-section {
        margin-bottom: 1.5rem;
    }

    .progress-bar {
        max-width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin-bottom: 1.5rem;
    }

    .feature {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0.85rem 1rem;
        text-align: left;
    }

    .feature__icon {
        margin-bottom: 0;
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .feature__label {
        font-size: 0.8rem;
    }

    .notify {
        flex-direction: column;
        max-width: 100%;
    }

    .notify__input {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .notify__btn {
        padding: 14px;
        font-size: 1rem;
    }

    .footer__links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .footer__copy {
        font-size: 0.7rem;
    }

    /* Reducir glow pesado en móvil para evitar crashes */
    .bg-glow {
        width: 250px;
        height: 250px;
        filter: blur(60px);
        opacity: 0.25;
    }

    .bg-glow--1 {
        top: -100px;
        right: -80px;
    }

    .bg-glow--2 {
        bottom: -100px;
        left: -80px;
    }

    /* Reducir animaciones en móvil para rendimiento */
    .bg-glow {
        animation-duration: 20s;
    }

    .toast {
        bottom: 1rem;
        padding: 12px 20px;
        font-size: 0.85rem;
        max-width: 92%;
    }
}

/* ── iOS Safari: reducir blur si prefiere-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
    .bg-glow {
        animation: none;
        filter: blur(60px);
        opacity: 0.2;
    }

    .progress-bar__fill::after {
        animation: none;
    }

    .badge__dot {
        animation: none;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
