﻿/* ==========================================================================
   COLEGIO CIENCIA Y TECNOLOGÍA ORINOCO (CCTO)
   Página Temporal Minimalista & Interactiva
   Dominio: elccto.com
   ========================================================================== */

:root {
    --bg-pure: #ffffff;
    
    /* Colores Institucionales */
    --ccto-blue: #002b82;
    --ccto-blue-dark: #001a4e;
    --ccto-blue-light: #0284c7;
    --ccto-cyan: #38bdf8;
    --ccto-yellow: #f59e0b;
    --ccto-red: #ef4444;

    /* Textos */
    --text-primary: #001f5c;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Tipografía */
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-outfit: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Curva de Aceleración Suave */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    background-color: var(--bg-pure);
}

body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-pure);
    color: var(--text-secondary);
    font-family: var(--font-inter);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Canvas de Partículas Interactivas de Fondo
   -------------------------------------------------------------------------- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* Los eventos de clic se capturan globalmente */
}

/* --------------------------------------------------------------------------
   Contenedor Principal (Centrado 100vh)
   -------------------------------------------------------------------------- */
.viewport-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.content-box {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --------------------------------------------------------------------------
   1. Logo Oficial Interactivo (Hover & Clic)
   -------------------------------------------------------------------------- */
.logo-wrap {
    position: relative;
    width: 175px;
    max-width: 55vw;
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.logo-halo {
    position: absolute;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.18) 0%, rgba(245, 158, 11, 0.12) 50%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    filter: blur(18px);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    pointer-events: none;
}

.school-logo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 4px 14px rgba(0, 43, 130, 0.08));
    transition: transform 0.35s var(--ease-bounce), filter 0.35s ease;
}

/* Animación Hover en Logo */
.logo-wrap:hover .school-logo {
    transform: translateY(-5px) scale(1.04);
    filter: drop-shadow(0 14px 28px rgba(0, 43, 130, 0.18));
}

.logo-wrap:hover .logo-halo {
    opacity: 1;
    transform: scale(1.15);
}

/* Animación Clic en Logo */
.logo-clicked .school-logo {
    animation: logoPop 0.45s var(--ease-bounce);
}

.logo-clicked .logo-halo {
    animation: haloFlash 0.5s ease-out;
}

@keyframes logoPop {
    0% { transform: scale(1); }
    35% { transform: scale(0.92) rotate(-1deg); }
    70% { transform: scale(1.08) translateY(-6px) rotate(1deg); }
    100% { transform: scale(1) translateY(0); }
}

@keyframes haloFlash {
    0% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.35); filter: blur(10px); }
    100% { opacity: 0; transform: scale(1.5); }
}

/* --------------------------------------------------------------------------
   2. Título Principal (Nuevo Formato Tipográfico para "PÁGINA WEB")
   -------------------------------------------------------------------------- */
.title-wrap {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-badge-wrap {
    margin-bottom: 6px;
}

/* Nuevo Formato de Letra para "PÁGINA WEB" */
.title-sub {
    font-family: var(--font-outfit);
    font-size: clamp(0.92rem, 2.2vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--ccto-blue-light);
    text-transform: uppercase;
    display: inline-block;
    padding: 3px 14px;
    background: rgba(2, 132, 199, 0.06);
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.05);
}

.title-main {
    font-family: var(--font-inter);
    font-size: clamp(1.85rem, 4.8vw, 2.9rem);
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1.15;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   3. Frase Secundaria
   -------------------------------------------------------------------------- */
.subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 28px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   4. Línea de Progreso Minimalista Institucional
   -------------------------------------------------------------------------- */
.progress-wrap {
    width: 100%;
    max-width: 240px;
    margin: 0 auto 28px;
}

.progress-track {
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 45%;
    background: linear-gradient(90deg, 
        var(--ccto-blue) 0%, 
        var(--ccto-blue-light) 65%, 
        var(--ccto-yellow) 85%, 
        var(--ccto-red) 100%);
    border-radius: 9999px;
    animation: progressMotion 2.8s infinite ease-in-out;
}

/* --------------------------------------------------------------------------
   5. Dominio Oficial
   -------------------------------------------------------------------------- */
.domain-wrap {
    display: inline-block;
}

.domain-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: var(--ccto-blue);
    position: relative;
    padding-bottom: 2px;
}

.domain-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 1.5px;
    background-color: var(--ccto-yellow);
    border-radius: 2px;
    opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Microanimaciones de Entrada
   -------------------------------------------------------------------------- */
.anim-item {
    animation-duration: 0.85s;
    animation-timing-function: var(--ease-out);
    animation-fill-mode: both;
}

.anim-logo {
    animation-name: fadeDown;
    animation-delay: 0.08s;
}

.anim-title {
    animation-name: fadeUp;
    animation-delay: 0.22s;
}

.anim-subtitle {
    animation-name: fadeUp;
    animation-delay: 0.36s;
}

.anim-progress {
    animation-name: fadeUp;
    animation-delay: 0.48s;
}

.anim-domain {
    animation-name: fadeUp;
    animation-delay: 0.60s;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes progressMotion {
    0% {
        left: -45%;
    }
    50% {
        left: 55%;
    }
    100% {
        left: 105%;
    }
}

/* --------------------------------------------------------------------------
   Adaptaciones Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .viewport-wrapper {
        padding: 32px 24px;
    }

    .logo-wrap {
        width: 140px;
        margin-bottom: 22px;
    }

    .title-sub {
        letter-spacing: 4px;
        font-size: 0.82rem;
        padding: 2px 10px;
    }

    .title-main {
        letter-spacing: 1px;
    }

    .subtitle {
        margin-bottom: 24px;
        padding: 0 8px;
    }

    .progress-wrap {
        max-width: 200px;
        margin-bottom: 24px;
    }
}

/* --------------------------------------------------------------------------
   Accesibilidad: Reducción de Movimiento
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .progress-bar {
        width: 100%;
        left: 0 !important;
        animation: none !important;
    }
}
