/* ================================================================
   PROYECTHOR — Sistema de Diseño Global
   Compartido por todas las páginas
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ----------------------------------------------------------------
   TOKENS DE DISEÑO (Adaptados al Logo de la App)
---------------------------------------------------------------- */
:root {
    /* Colores primarios extraídos de la imagen */
    --gold:          #73f4e9a8; /* Amarillo/Dorado de la esquina superior derecha */
    --gold-dim:      #4ac278;
    --gold-glow:     rgba(115, 244, 205, 0.35);
    --gold-pale:     rgba(115, 244, 216, 0.08);
    --gold-mid:      rgba(115, 244, 216, 0.15);
    
    --cyan:          #3598a71e; /* Tono de transición turquesa/océano del medio */
    --cyan-glow:     rgba(53, 152, 167, 0.3);
    
    --red-live:      #e83a3a; /* Se mantiene igual para los estados de error */
    --green-ok:      #4ae870; /* Se mantiene igual para los estados de éxito */

    /* Fondos - Basados en el azul oscuro profundo de la esquina inferior izquierda */
    --bg-0:          #12151a;
    --bg-1:          #05152a;
    --bg-2:          #07172c;
    --bg-3:          #091b33;

    /* Superficies - Tonos azules medios para las tarjetas y contenedores */
    --surface-1:     #091a31;
    --surface-2:     #102b50;
    --surface-3:     #0f2c4e;

    /* Bordes */
    --border:        rgba(255, 255, 255, 0.08);
    --border-gold:   rgba(244, 205, 115, 0.22);
    --border-cyan:   rgba(53, 152, 167, 0.2);

    /* Texto */
    --text-1:        #ffffff; /* Las letras del logo son de un blanco puro */
    --text-2:        #b3c6df; /* Azul claro / grisáceo para subtítulos */
    --text-3:        #7a91b5; /* Azul desaturado para texto secundario */
    --text-4:        #4a6185;

    /* Tipografía (Se mantienen) */
    --font-display:  'Bebas Neue', cursive;
    --font-body:     'DM Sans', sans-serif;
    --font-mono:     'JetBrains Mono', monospace;

    /* Radios (Se mantienen) */
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-xl:     24px;

    /* Sombras */
    --shadow-gold:   0 0 40px rgba(115, 235, 244, 0.15);
    --shadow-card:   0 8px 40px rgba(0, 0, 0, 0.4);

    /* Transiciones (Se mantienen) */
    --transition:    0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.15s ease;

    /* Layout (Se mantienen) */
    --nav-height:    64px;
    --page-padding:  6%;
}
/* ----------------------------------------------------------------
   RESET & BASE
---------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-0);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ----------------------------------------------------------------
   CANVAS DE FONDO
---------------------------------------------------------------- */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

/* ----------------------------------------------------------------
   NAVEGACIÓN
---------------------------------------------------------------- */
nav#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    height: var(--nav-height);
    padding: 0 var(--page-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
}

nav#navbar.scrolled {
    background: rgba(4, 4, 7, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.9rem;
    letter-spacing: 2px;
    color: var(--text-1);
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-logo .logo-accent {
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--gold);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
}

.nav-cta {
    background: var(--gold) !important;
    color: var(--bg-0) !important;
    font-weight: 700 !important;
    padding: 0.45rem 1.2rem !important;
    letter-spacing: 0.02em;
    transition: box-shadow var(--transition), transform var(--transition-fast) !important;
}

.nav-cta:hover {
    box-shadow: 0 0 28px var(--gold-glow) !important;
    transform: translateY(-1px) !important;
    background: var(--gold) !important;
    color: var(--bg-0) !important;
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--text-2);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.nav-mobile-toggle:hover {
    border-color: var(--border-gold);
    color: var(--gold);
}

.nav-mobile-toggle svg { display: block; }

/* ----------------------------------------------------------------
   LAYOUT BASE DE PÁGINAS INTERIORES
---------------------------------------------------------------- */
.page-wrapper {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--nav-height) + 4rem);
}

.page-header {
    padding: 0 var(--page-padding) 4rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4rem;
}

.page-header .page-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gold);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 9vw, 7rem);
    line-height: 0.9;
    letter-spacing: 2px;
    color: var(--text-1);
    margin-bottom: 1.2rem;
}

.page-header h1 span {
    color: var(--gold);
}

.page-header .page-desc {
    font-size: 1.05rem;
    color: var(--text-2);
    font-weight: 300;
    max-width: 540px;
    line-height: 1.75;
}

/* ----------------------------------------------------------------
   SECCIONES GENERALES
---------------------------------------------------------------- */
section {
    position: relative;
    z-index: 1;
}

.section-pad {
    padding: 6rem var(--page-padding);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gold);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--gold);
    opacity: 0.6;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 0.95;
    letter-spacing: 1px;
    color: var(--text-1);
    margin-bottom: 1.2rem;
}

.section-title span { color: var(--gold); }

.section-subtitle {
    color: var(--text-2);
    font-size: 1.05rem;
    font-weight: 300;
    max-width: 560px;
    line-height: 1.75;
}

/* ----------------------------------------------------------------
   COMPONENTES: BOTONES
---------------------------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold);
    color: var(--bg-0);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: box-shadow var(--transition), transform var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    box-shadow: 0 0 40px var(--gold-glow);
    transform: translateY(-2px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-gold);
    color: var(--text-2);
    font-size: 0.9rem;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
    background: transparent;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
}

.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 20px rgba(232, 200, 74, 0.15);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-3);
    background: transparent;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
    text-decoration: none;
}

.btn-icon:hover {
    border-color: var(--border-gold);
    color: var(--gold);
    background: var(--gold-pale);
}

/* ----------------------------------------------------------------
   COMPONENTES: CARDS
---------------------------------------------------------------- */
.card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.card:hover {
    border-color: var(--border-gold);
    background: var(--bg-2);
    box-shadow: var(--shadow-card);
}

.card-sm {
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-md);
}

/* ----------------------------------------------------------------
   COMPONENTES: BADGES / TAGS
---------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.05em;
}

.badge-gold {
    background: var(--gold-pale);
    border: 1px solid var(--border-gold);
    color: var(--gold);
}

.badge-cyan {
    background: rgba(0, 212, 232, 0.08);
    border: 1px solid var(--border-cyan);
    color: var(--cyan);
}

.badge-green {
    background: rgba(74, 232, 112, 0.08);
    border: 1px solid rgba(74, 232, 112, 0.2);
    color: var(--green-ok);
}

.badge-red {
    background: rgba(232, 58, 58, 0.08);
    border: 1px solid rgba(232, 58, 58, 0.2);
    color: var(--red-live);
}

.badge-dim {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-3);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.dot-pulse {
    animation: dotPulse 1.8s infinite;
}

/* ----------------------------------------------------------------
   COMPONENTES: DIVIDER
---------------------------------------------------------------- */
.divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.divider-gold {
    background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

/* ----------------------------------------------------------------
   COMPONENTES: INLINE CODE
---------------------------------------------------------------- */
code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    background: var(--gold-pale);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------------
   ANIMACIONES DE REVEAL (SCROLL)
---------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ----------------------------------------------------------------
   FOOTER
---------------------------------------------------------------- */
footer#site-footer {
    position: relative;
    z-index: 1;
    background: var(--bg-0);
    border-top: 1px solid var(--border);
    padding: 3.5rem var(--page-padding) 2.5rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 4rem;
    align-items: start;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--text-1);
    text-decoration: none;
    display: block;
    margin-bottom: 0.7rem;
}

.footer-brand .footer-logo span { color: var(--gold); }

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-3);
    line-height: 1.6;
    max-width: 220px;
}

.footer-col h4 {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col ul li a {
    font-size: 0.88rem;
    color: var(--text-2);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-3);
}

.footer-bottom a {
    color: var(--text-3);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-bottom a:hover { color: var(--gold); }

/* ----------------------------------------------------------------
   KEYFRAMES GLOBALES
---------------------------------------------------------------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes glowPulse {
    0%   { text-shadow: 0 0 20px rgba(74, 232, 224, 0.2); }
    100% { text-shadow: 0 0 60px rgba(74, 232, 211, 0.6), 0 0 100px rgba(232, 200, 74, 0.2); }
}

@keyframes badgeBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

@keyframes scrollLine {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------------
   RESPONSIVE — NAVEGACIÓN MOBILE
---------------------------------------------------------------- */
@media (max-width: 900px) {
    :root { --page-padding: 5%; }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(4, 4, 7, 0.97);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2rem var(--page-padding);
        gap: 0.2rem;
    }

    .nav-links.open { display: flex; }
    .nav-links a { width: 100%; padding: 0.7rem 0.8rem; }
    .nav-mobile-toggle { display: flex; }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    :root { --page-padding: 4%; }

    .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}