/* ==========================================================================
   PALETA DE COLORES Y VARIABLES UX/UI
   Foco Principal: 
   - #355E3B (Verde Cazador / Brunswick Green)
   - #004953 (Azul Petróleo / Deep Teal)
   - #F8F9FA / #F4F6F5 (Blanco Suave No Fastidioso)
   - #111111 / #000000 (Negro Puro para Footer y Contrastes)
   ========================================================================== */

:root {
    --color-green-primary: #355E3B;
    --color-green-light: #4c8253;
    --color-teal-primary: #004953;
    --color-teal-light: #006e7d;
    --color-white-soft: #F8F9FA;
    --color-white-muted: #E9ECEF;
    --color-dark-bg: #0D1412;
    --color-card-bg: #141F1C;
    --color-black-footer: #080C0B;
    --color-text-main: #212529;
    --color-text-light: #E2E8F0;
    --color-text-muted: #94A3B8;
    
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Métricas UX / Spacing & Padding */
    --padding-container-desktop: 32px 48px;
    --padding-container-mobile: 20px 16px;
    --border-radius-card: 16px;
    --border-radius-badge: 30px;
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET GENERAL */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-white-soft);
    color: var(--color-text-main);
    font-family: var(--font-heading);
}

body {
    overflow-x: hidden;
    background-color: var(--color-white-soft);
}

/* ==========================================================================
   HEADER / STICKY NAV PEGAJOSO (4 ANCLAS)
   ========================================================================== */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(0, 73, 83, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 0;
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.logo-icon {
    color: #56c271;
    font-size: 1.4rem;
}

.logo .highlight {
    color: #4cd3df;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-item {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: var(--border-radius-badge);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #6ee7b7;
}

.nav-item:hover {
    color: #FFFFFF;
    background-color: rgba(53, 94, 59, 0.6);
}

.nav-item.active {
    color: #FFFFFF;
    background-color: var(--color-green-primary);
    box-shadow: 0 4px 12px rgba(53, 94, 59, 0.4);
}

/* ==========================================================================
   SIDE CONTROLS (BOTONES DE FLECHA PARA SCROLL POR SECCIONES)
   ========================================================================== */
.side-controls {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 73, 83, 0.85);
    backdrop-filter: blur(8px);
    padding: 12px 8px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.arrow-btn {
    background-color: var(--color-green-primary);
    color: #FFFFFF;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.arrow-btn:hover {
    background-color: var(--color-green-light);
    transform: scale(1.1);
}

.section-indicator {
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 8px 0;
    letter-spacing: 1px;
}

/* ==========================================================================
   LAYOUT Y SNAP SCROLL SECCIONES
   ========================================================================== */
.snap-container {
    width: 100%;
}

.snap-section {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    position: relative;
}

/* Alternancia de Fondos con la Paleta Recomendada */
#intro {
    background: linear-gradient(135deg, var(--color-dark-bg) 0%, var(--color-teal-primary) 100%);
    color: var(--color-text-light);
}

#apple {
    background-color: var(--color-white-soft);
    color: var(--color-text-main);
}

#intel-amd {
    background: linear-gradient(180deg, #101c18 0%, var(--color-dark-bg) 100%);
    color: var(--color-text-light);
}

#cotidiano {
    background-color: #F0F4F3;
    color: var(--color-text-main);
}

.section-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   GRIDS, TYPOGRAPHY & BOX METRICS
   ========================================================================== */
.content-grid {
    display: grid;
    gap: 48px;
    align-items: center;
}

.grid-2-col {
    grid-template-columns: 1fr 1fr;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(53, 94, 59, 0.25);
    border: 1px solid var(--color-green-light);
    color: #6ee7b7;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--border-radius-badge);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.badge-teal {
    background-color: rgba(0, 73, 83, 0.15);
    border-color: var(--color-teal-primary);
    color: var(--color-teal-primary);
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
}

.text-accent-teal {
    color: #4cd3df;
}

.text-accent-green {
    color: var(--color-green-primary);
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.body-text {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 24px;
}

.max-width-p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.text-center-block {
    text-align: center;
    margin-bottom: 32px;
}

/* Métricas en Cajas de Texto */
.metrics-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric-box {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--color-green-primary);
    padding: 20px 16px;
    border-radius: 12px;
    text-align: center;
}

.metric-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFFFFF;
    font-family: var(--font-mono);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    display: block;
}

/* Feature List */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-list li {
    position: relative;
    padding-left: 28px;
    line-height: 1.5;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-green-primary);
    font-weight: bold;
}

/* Cards en Grid (Intel vs AMD) */
.two-column-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.card {
    padding: 32px;
    border-radius: var(--border-radius-card);
    transition: var(--transition-smooth);
}

.bg-card-dark {
    background-color: var(--color-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 14px;
    color: #FFFFFF;
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ==========================================================================
   IMÁGENES UX & FRAMES (5 IMÁGENES REQUERIDAS)
   ========================================================================== */
.img-frame {
    border-radius: 16px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.glow-border {
    border: 1px solid rgba(76, 211, 223, 0.3);
    box-shadow: 0 0 30px rgba(0, 73, 83, 0.5);
}

.responsive-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

.mini-frame .responsive-img {
    height: 200px;
}

.img-frame:hover .responsive-img {
    transform: scale(1.03);
}

.img-caption {
    padding: 10px 16px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
    font-family: var(--font-mono);
}

/* Tags de chips cotidianos */
.chip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tag {
    background-color: var(--color-teal-primary);
    color: #FFFFFF;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==========================================================================
   WEBGRAFÍA / LINKS DE INTERÉS
   ========================================================================== */
.webgrafia-box {
    background-color: #FFFFFF;
    padding: 28px;
    border-radius: var(--border-radius-card);
    border-left: 5px solid var(--color-green-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.webgrafia-box h3 {
    font-size: 1.2rem;
    color: var(--color-teal-primary);
    margin-bottom: 8px;
}

.webgrafia-box p {
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 16px;
}

.links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.links-list a {
    color: var(--color-teal-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.links-list a:hover {
    color: var(--color-green-primary);
    transform: translateX(4px);
}

/* ==========================================================================
   FOOTER EN NEGRO (AUTORES & COPYRIGHT)
   ========================================================================== */
.main-footer {
    background-color: var(--color-black-footer);
    color: #FFFFFF;
    padding: 48px 24px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.footer-brand .highlight {
    color: #4cd3df;
}

.footer-info p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    max-width: 360px;
}

.footer-authors h4 {
    font-size: 1rem;
    color: var(--color-green-light);
    margin-bottom: 12px;
}

.authors-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.author-name {
    font-weight: 700;
    color: #FFFFFF;
}

.author-id {
    font-family: var(--font-mono);
    color: #4cd3df;
    font-size: 0.85rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0 auto;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN (UX METRICS)
   ========================================================================== */
@media (max-width: 992px) {
    .grid-2-col, .two-column-cards {
        grid-template-columns: 1fr;
    }

    .main-title {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .metrics-card-grid {
        grid-template-columns: 1fr;
    }

    .side-controls {
        right: 12px;
        padding: 8px 4px;
    }

    .nav-links {
        display: none; /* Simplificación para móvil */
    }
}

/* ==========================================================================
   HUB DE NODOS Y TERMINAL INTERACTIVA
   ========================================================================== */

#companeros {
    background: linear-gradient(135deg, var(--color-dark-bg) 0%, #0a1715 100%);
    color: var(--color-text-light);
}

.nodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.node-card {
    background-color: rgba(20, 31, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--color-text-light);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.node-card:hover {
    border-color: var(--color-green-light);
    background-color: rgba(53, 94, 59, 0.3);
    transform: translateY(-2px);
}

.node-card.active {
    border-color: #4cd3df;
    background-color: rgba(0, 73, 83, 0.5);
    box-shadow: 0 4px 16px rgba(76, 211, 223, 0.2);
}

.node-id {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #6ee7b7;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 4px 6px;
    border-radius: 6px;
}

.node-info strong {
    display: block;
    font-size: 0.85rem;
}

.node-info small {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.node-ping {
    width: 6px;
    height: 6px;
    background-color: #6ee7b7;
    border-radius: 50%;
    margin-left: auto;
    box-shadow: 0 0 8px #6ee7b7;
}

/* Visor Terminal */
.preview-card {
    border-radius: 16px;
    overflow: hidden;
}

.terminal-header {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.terminal-title {
    margin-left: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.preview-body {
    padding: 28px;
}

.preview-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
    margin-top: 14px;
    margin-bottom: 4px;
}

.preview-status {
    color: #6ee7b7;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #6ee7b7;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.preview-url {
    display: block;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: 8px;
    color: #4cd3df;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    word-break: break-all;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-actions {
    margin-top: 24px;
}

.btn-visit-node {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    background-color: var(--color-green-primary);
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    border-radius: var(--border-radius-badge);
    transition: var(--transition-smooth);
}

.btn-visit-node:hover {
    background-color: var(--color-green-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(53, 94, 59, 0.4);
}

/* Animaciones escalonadas para la red de nodos */
.snap-section.in-view #companeros .node-card {
    opacity: 1;
    transform: translateY(0);
}

.snap-section.in-view #companeros .node-card:nth-child(1) { transition-delay: 0.1s; }
.snap-section.in-view #companeros .node-card:nth-child(2) { transition-delay: 0.15s; }
.snap-section.in-view #companeros .node-card:nth-child(3) { transition-delay: 0.2s; }
.snap-section.in-view #companeros .node-card:nth-child(4) { transition-delay: 0.25s; }
.snap-section.in-view #companeros .node-card:nth-child(5) { transition-delay: 0.3s; }
.snap-section.in-view #companeros .node-card:nth-child(6) { transition-delay: 0.35s; }
.snap-section.in-view #companeros .node-card:nth-child(7) { transition-delay: 0.4s; }
.snap-section.in-view #companeros .node-card:nth-child(8) { transition-delay: 0.45s; }
.snap-section.in-view #companeros .node-card:nth-child(9) { transition-delay: 0.5s; }



/* ==========================================================================
   ANIMACIONES UI/UX PROFESIONALES (ENTRADA SUTIL & ESCALONADA)
   ========================================================================== */

/* Estado inicial (oculto y desplazado suavemente) */
.snap-section .text-block,
.snap-section .media-block,
.snap-section .text-center-block,
.snap-section .card,
.snap-section .metric-box {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Estado activo cuando la sección entra en pantalla */
.snap-section.in-view .text-block,
.snap-section.in-view .media-block,
.snap-section.in-view .text-center-block,
.snap-section.in-view .card,
.snap-section.in-view .metric-box {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Retardos escalonados (Staggered Animation UX) */
.snap-section.in-view .text-block,
.snap-section.in-view .text-center-block {
    transition-delay: 0.1s;
}

.snap-section.in-view .media-block {
    transition-delay: 0.25s;
}

.snap-section.in-view .metrics-card-grid .metric-box:nth-child(1) { transition-delay: 0.3s; }
.snap-section.in-view .metrics-card-grid .metric-box:nth-child(2) { transition-delay: 0.4s; }
.snap-section.in-view .metrics-card-grid .metric-box:nth-child(3) { transition-delay: 0.5s; }

.snap-section.in-view .two-column-cards .card:nth-child(1) { transition-delay: 0.25s; }
.snap-section.in-view .two-column-cards .card:nth-child(2) { transition-delay: 0.4s; }