/* =========================================
   ContinuumAI - Eonix Energy Inspired Theme
   ========================================= */

:root {
    --bg-color: #050505;
    --bg-secondary: #0a0a0a;
    --bg-surface: #111111;
    --text-primary: #ffffff;
    --text-dim: #888888;
    --text-dimmer: #555555;
    --accent-color: #00ff88;
    /* Neon Emerald */
    --accent-hover: #00cc6a;
    --grid-line: #222222;
    --border-radius: 4px;
    --font-sans: 'Inter', sans-serif;
}

/* =========================================
   LIGHT MODE THEME
   ========================================= */
.light-mode {
    --bg-color: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-surface: #ffffff;
    --text-primary: #0d1117;
    --text-dim: #4b5563;
    --text-dimmer: #9ca3af;
    --accent-color: #00a85a;
    --accent-hover: #007a42;
    --grid-line: #e5e7eb;
}

/* Body background */
.light-mode { background-color: var(--bg-color); color: var(--text-primary); }

/* ---- Navbar ---- */
.light-mode .navbar {
    background: rgba(245, 247, 250, 0.92);
    border-bottom-color: var(--grid-line);
}

/* ---- Hero: ambient glows ---- */
.light-mode .glow-core { background: rgba(0, 168, 90, 0.12); }
.light-mode .glow-accent { background: rgba(0, 100, 200, 0.06); }

/* ---- Hero: SVG network lines ---- */
.light-mode .line-animated { stroke: rgba(0, 168, 90, 0.45); }
.light-mode .line-interconnect { stroke: rgba(0, 100, 200, 0.18); }
.light-mode .line-orbit { stroke: rgba(0, 0, 0, 0.08); }

/* ---- Hero: Center node ---- */
.light-mode .edu-node {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.light-mode .center-node {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0,168,90,0.2), inset 0 0 10px rgba(0,168,90,0.08);
}
.light-mode .center-text { color: var(--text-primary); text-shadow: none; }
/* Satellite node icons: were white, now dark */
.light-mode .sat-node svg { stroke: #374151; }

/* ---- Hero: Data pulse particles (white→invisible on white bg) ---- */
.light-mode .data-pulse {
    background: #0d1117;
    box-shadow: 0 0 10px rgba(0,0,0,0.3), 0 0 20px var(--accent-color);
}

/* ---- Dropdown ---- */
.light-mode .dropdown-menu {
    background-color: rgba(255,255,255,0.98);
    border-color: var(--grid-line);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.light-mode .dropdown-menu a { color: var(--text-dim) !important; }
.light-mode .dropdown-menu a:hover {
    background-color: rgba(0, 168, 90, 0.05);
    color: var(--accent-color) !important;
}

/* ---- Cards (differentiators) ---- */
.light-mode .card {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.light-mode .card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* ---- Services list ---- */
.light-mode .service-item { border-color: #e5e7eb; color: var(--text-primary); }
.light-mode .service-item:hover { border-color: var(--accent-color); background: rgba(0,168,90,0.03); }
.light-mode .services-list { border-top-color: #e5e7eb; }

/* ---- Problem section: disconnected system nodes ---- */
.light-mode .system-node {
    background: #ffffff;
    border-color: rgba(220, 50, 50, 0.35);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.light-mode .excel-sheet {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.1);
}

/* ---- Para quién section: growth animation ---- */
.light-mode .foundation-layer {
    background: rgba(0,0,0,0.02);
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.light-mode .grid-floor {
    background-image: linear-gradient(#d1d5db 1px, transparent 1px),
        linear-gradient(90deg, #d1d5db 1px, transparent 1px);
}
.light-mode .cognitive-layer {
    background: rgba(0, 168, 90, 0.05);
    border-color: rgba(0, 168, 90, 0.25);
}
.light-mode .module-block {
    background: #ffffff;
    border-color: #e5e7eb;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.light-mode .arrow {
    background: linear-gradient(to top, rgba(0,0,0,0), #9ca3af 50%, rgba(0,0,0,0));
}

/* ---- Diagnóstico: radar/scan animation ---- */
.light-mode .radar-circle { border-color: rgba(0,168,90,0.15); }
.light-mode .rc-1 { border-color: rgba(0,168,90,0.35); }
.light-mode .rc-3 { border-color: rgba(0,100,200,0.12); }
.light-mode .scanner-sweep {
    background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(0,168,90,0.2) 360deg);
}
.light-mode .scan-target {
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0,168,90,0.12);
}
.light-mode .a-line { background: #d1d5db; }

/* ---- Problematica: continuity timeline ---- */
.light-mode .app-icon {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    color: var(--text-primary);
}
.light-mode .app-icon svg { stroke: #374151; }
.light-mode .sys-badge {
    background: rgba(0,0,0,0.03);
    border-color: #e5e7eb;
    color: var(--text-dim);
}

/* ---- Cost animation container ---- */
.light-mode .cost-anim-container {
    background: rgba(0,0,0,0.02);
    border-color: #e5e7eb;
}
.light-mode .cost-bar-track { background: rgba(0,0,0,0.06); }

/* ---- Architecture (plataforma) ---- */
.light-mode .arch-layer {
    background: rgba(0,0,0,0.02);
    border-color: #e5e7eb;
    color: var(--text-dim);
}
.light-mode .arch-layer:hover {
    background: rgba(0,168,90,0.04);
    border-color: var(--accent-color);
    color: var(--text-primary);
}
.light-mode .iso-app {
    background: rgba(0,0,0,0.03);
    border-color: #e5e7eb;
    color: var(--text-dim);
}
.light-mode .iso-app svg { color: #374151; }
.light-mode .al-icon { background: rgba(0,0,0,0.04); }
.light-mode .arch-vs-label {
    background: var(--bg-color);
    border-color: #e5e7eb;
}

/* ---- Memflow (plataforma) ---- */
.light-mode .memflow-container {
    background: rgba(0,0,0,0.02);
    border-color: #e5e7eb;
}
.light-mode .mf-node {
    background: rgba(0,0,0,0.02);
    border-color: #e5e7eb;
}
.light-mode .mf-node-active {
    border-color: var(--accent-color);
    background: rgba(0,168,90,0.04);
}
.light-mode .mf-tag {
    background: rgba(0,0,0,0.03);
    border-color: #e5e7eb;
}

/* ---- Servicios: neural network ---- */
.light-mode .nn-line { stroke: rgba(0,168,90,0.2); }
.light-mode .nn-brand-sub {
    color: rgba(0,0,0,0.45);  /* was rgba(255,255,255,0.5) → invisible on light */
}
.light-mode .nn-node svg {
    color: rgba(0,0,0,0.5); /* was rgba(255,255,255,0.6) → invisible */
}
.light-mode .nn-node span {
    color: rgba(0,0,0,0.5); /* was rgba(255,255,255,0.5) → invisible */
}
.light-mode .nn-node::before {
    background: rgba(0,0,0,0.02);
    border-color: #e5e7eb;
}
.light-mode .nn-node:hover::before {
    background: rgba(0,168,90,0.05);
    border-color: rgba(0,168,90,0.3);
}
.light-mode .nn-node:hover svg { color: var(--accent-color); }
.light-mode .nn-node:hover span { color: var(--accent-color); }

/* ---- Footer (keep dark always for contrast) ---- */
.light-mode .footer {
    border-top-color: #e5e7eb;
}

/* ---- Global text helpers ---- */
.light-mode .text-neon {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(0,168,90,0.25);
}
.light-mode .btn-outline {
    border-color: #9ca3af;
    color: var(--text-primary);
}
.light-mode .btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.light-mode .btn-text { color: var(--text-primary); }
.light-mode .link-animate { color: var(--text-primary); border-color: #9ca3af; }
.light-mode .section-num { color: #d1d5db; }
.light-mode .vertical-header { border-right-color: var(--grid-line); }

/* =========================================
   Theme Toggle Button
   ========================================= */
.theme-toggle {
    background: none;
    border: 1px solid var(--grid-line);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.75rem;
}
.theme-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(0, 255, 136, 0.07);
    transform: scale(1.08);
}
.light-mode .theme-toggle:hover { background: rgba(0, 168, 90, 0.07); }

/* Icon visibility logic */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; pointer-events: none; }
/* In dark mode → show sun (to switch to light) */
body:not(.light-mode) .theme-toggle .icon-sun { display: block; }
/* In light mode → show moon (to switch to dark) */
.light-mode .theme-toggle .icon-moon { display: block; }



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.heading-large {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.heading-medium {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

.text-lead {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.text-dim {
    color: var(--text-dim);
}

.text-neon {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-6 {
    margin-top: 3rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.pb-6 {
    padding-bottom: 6rem;
}

.text-center {
    text-align: center;
}

.d-inline-block {
    display: inline-block;
}

.block {
    display: block;
}

/* =========================================
   Grid & Structure (The "Blueprint" look)
   ========================================= */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    display: flex;
    justify-content: space-between;
}

.grid-overlay .line.vertical {
    width: 1px;
    height: 100%;
    background-color: var(--grid-line);
    opacity: 0.5;
}

.grid-overlay .line.horizontal {
    position: absolute;
    top: 80px;
    /* Under navbar */
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--grid-line);
    opacity: 0.5;
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--grid-line);
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.logo-accent {
    color: var(--accent-color);
    margin-right: 2px;
}

.logo-sub {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -10px;
    margin-top: 1.5rem;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--grid-line);
    min-width: 260px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    padding: 0.5rem 0;
    border-radius: var(--border-radius);
    list-style: none;
}

/* Invisible bridge to prevent dropdown from closing when hovering gap */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 0;
    width: 100%;
    height: 1.5rem;
    background-color: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu li {
    margin: 0 !important;
}

.dropdown-menu a {
    position: relative;
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-dim) !important;
    text-decoration: none;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* New Hover Animation for Dropdown Links */
.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--accent-color);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu a:hover {
    background-color: rgba(0, 255, 136, 0.05);
    color: var(--accent-color) !important;
    padding-left: 2rem;
}

.dropdown-menu a:hover::before {
    transform: scaleY(1);
}

/* =========================================
   Buttons & Links
   ========================================= */
.btn {
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #000;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--text-dimmer);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-text {
    color: var(--text-primary);
    padding: 0.8rem 0;
    margin-left: 1.5rem;
}

.btn-text span {
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-text:hover span {
    transform: translateX(5px);
    color: var(--accent-color);
}

.link-animate {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--text-dimmer);
    padding-bottom: 2px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.link-animate span {
    transition: transform 0.3s ease;
}

.link-animate:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.link-animate:hover span {
    transform: translateX(4px);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 100vh;
    padding: 120px 4% 4% 4%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-subtitle {
    color: var(--text-dim);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Edu-AI Network Animation container */
.hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    z-index: 1;
    pointer-events: none;
}

.edu-ai-network {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ambient Lighting */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.glow-core {
    width: 250px;
    height: 250px;
    background: rgba(0, 255, 136, 0.2);
    animation: coreBreath 4s infinite alternate;
}

.glow-accent {
    width: 350px;
    height: 350px;
    background: rgba(0, 136, 255, 0.1);
    animation: coreBreath 6s infinite alternate-reverse;
}

/* SVGs and Connections */
.network-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.line-animated {
    fill: none;
    stroke: rgba(0, 255, 136, 0.4);
    stroke-width: 2;
    stroke-dasharray: 15 15;
    animation: dashMove 30s linear infinite;
}

.line-interconnect {
    fill: none;
    stroke: rgba(0, 136, 255, 0.2);
    /* Subtle blue for interconnected logic */
    stroke-width: 1.5;
    stroke-dasharray: 5 10;
    animation: dashMove 40s linear infinite reverse;
}

.line-orbit {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    animation: orbitRotate 40s linear infinite;
    transform-origin: center;
}

/* Nodes */
.edu-node {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 2;
    background: var(--bg-secondary);
    border: 1px solid var(--grid-line);
}

.center-node {
    padding: 0 1.5rem;
    height: 50px;
    border-radius: 25px;
    /* Pill shape for text */
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), inset 0 0 10px rgba(0, 255, 136, 0.2);
    animation: nodePulse 3s infinite alternate;
}

.center-text {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    letter-spacing: -0.02em;
}

.sat-node {
    width: 55px;
    height: 55px;
    transition: all 0.3s ease;
    animation: floatNode 4s infinite ease-in-out alternate;
}

.sat-node svg {
    width: 26px;
    height: 26px;
    opacity: 0.9;
}

.sat-node:nth-child(2) {
    animation-delay: 0s;
}

.sat-node:nth-child(3) {
    animation-delay: 1s;
}

.sat-node:nth-child(4) {
    animation-delay: 2s;
}

.sat-node:nth-child(5) {
    animation-delay: 3s;
}

/* Particle Pulses tracing the paths */
.data-pulse {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--accent-color);
    z-index: 3;
    opacity: 0;
}

/* Approximate trace relative to 600x600 container */
.pulse-1 {
    animation: tracePath1 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.pulse-2 {
    animation: tracePath2 4s cubic-bezier(0.4, 0, 0.2, 1) infinite 1s;
}

.pulse-3 {
    animation: tracePath3 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite 0.5s;
}

.pulse-4 {
    animation: tracePath4 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite 1.5s;
}

/* Animation Keyframes */
@keyframes coreBreath {
    from {
        transform: scale(0.9);
        opacity: 0.5;
    }

    to {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes dashMove {
    to {
        stroke-dashoffset: -1000;
    }
}

@keyframes orbitRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes nodePulse {
    from {
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.2), inset 0 0 10px rgba(0, 255, 136, 0.1);
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.5), inset 0 0 20px rgba(0, 255, 136, 0.4);
        transform: scale(1.05);
    }
}

@keyframes floatNode {
    from {
        transform: translateY(-10px);
    }

    to {
        transform: translateY(10px);
    }
}

@keyframes tracePath1 {
    0% {
        top: 50%;
        left: 50%;
        opacity: 0;
        transform: scale(0);
    }

    10% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        top: 25%;
        left: 35%;
    }

    90% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        top: 15%;
        left: 15%;
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes tracePath2 {
    0% {
        top: 50%;
        left: 50%;
        opacity: 0;
        transform: scale(0);
    }

    10% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        top: 25%;
        left: 65%;
    }

    90% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        top: 15%;
        left: 85%;
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes tracePath3 {
    0% {
        top: 85%;
        left: 15%;
        opacity: 0;
        transform: scale(0);
    }

    /* Flowing inward */
    10% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        top: 75%;
        left: 35%;
    }

    90% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        top: 50%;
        left: 50%;
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes tracePath4 {
    0% {
        top: 85%;
        left: 85%;
        opacity: 0;
        transform: scale(0);
    }

    /* Flowing inward */
    10% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        top: 75%;
        left: 65%;
    }

    90% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        top: 50%;
        left: 50%;
        opacity: 0;
        transform: scale(0);
    }
}

/* =========================================
   Sections & Layout Bento
   ========================================= */
.section {
    padding: 8rem 4%;
    position: relative;
    z-index: 10;
}

.layout-bento {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
}

.vertical-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid var(--grid-line);
    padding-right: 2rem;
    height: 100%;
}

.section-num {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-dimmer);
    margin-bottom: 2rem;
}

.section-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    white-space: nowrap;
}

.section-content {
    max-width: 1200px;
    width: 100%;
}

.section-content.full-width {
    grid-column: 1 / -1;
    margin: 0 auto;
}

.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.visual-content {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: flex-end;
    /* Align animation to the right */
    align-items: center;
}

/* =========================================
   Disconnected Systems Animation (Problema Section)
   ========================================= */

.disconnected-systems-anim {
    position: relative;
    width: 400px;
    height: 400px;
}

.system-node {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 50, 50, 0.4);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    z-index: 2;
    animation: jitter 0.5s infinite alternate;
}

/* Positioning isolated nodes */
.sn-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.sn-2 {
    top: 20%;
    right: 10%;
    animation-delay: 0.1s;
}

.sn-3 {
    bottom: 30%;
    left: 10%;
    animation-delay: 0.2s;
}

.sn-4 {
    bottom: 10%;
    right: 20%;
    animation-delay: 0.3s;
}

.sn-5 {
    top: 40%;
    left: 45%;
    animation-delay: 0.4s;
}

.error-ping {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 10px;
    height: 10px;
    background: #ff3333;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff3333;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.broken-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.broken-path {
    fill: none;
    stroke: rgba(255, 50, 50, 0.3);
    stroke-width: 2;
    stroke-dasharray: 5 15;
    animation: strokeDashMove 2s linear infinite reverse;
}

.dropped-packet {
    fill: #ff3333;
    opacity: 0;
    animation: dropPacket 2s ease-in infinite;
}

.dp-1 {
    animation-delay: 0s;
}

.dp-2 {
    animation-delay: 0.7s;
}

.dp-3 {
    animation-delay: 1.4s;
}

.excel-chaos {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    z-index: 0;
    opacity: 0.3;
}

.excel-sheet {
    position: absolute;
    width: 80px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.es-1 {
    transform: rotate(-15deg);
    animation: floatExcel 3s infinite alternate;
}

.es-2 {
    transform: translate(15px, 10px) rotate(5deg);
    animation: floatExcel 4s infinite alternate-reverse;
}

.es-3 {
    transform: translate(-10px, 20px) rotate(-8deg);
    animation: floatExcel 3.5s infinite alternate;
}


@keyframes jitter {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(1px, 1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 0) rotate(-1deg);
    }

    75% {
        transform: translate(0, -1px) rotate(0deg);
    }

    100% {
        transform: translate(-1px, 1px) rotate(1deg);
    }
}

@keyframes ping {

    75%,
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

@keyframes strokeDashMove {
    to {
        stroke-dashoffset: 100;
    }
}

@keyframes dropPacket {
    0% {
        opacity: 1;
        transform: translateY(-20px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(40px);
    }
}

@keyframes floatExcel {
    from {
        margin-top: -5px;
    }

    to {
        margin-top: 5px;
    }
}

/* =========================================
   Infrastructure Growth Animation (Para Quién Section)
   ========================================= */

.growth-anim-container {
    position: relative;
    width: 320px;
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

/* Common text label */
.layer-label {
    position: absolute;
    bottom: -25px;
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
}

/* Foundation */
.foundation-layer {
    width: 280px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.grid-floor {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

/* Cognitive AI Layer */
.cognitive-layer {
    width: 240px;
    height: 60px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
    animation: pulseBox 3s infinite alternate;
}

.cognitive-waves {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.wave {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 2;
    opacity: 0.5;
}

.w1 {
    animation: waveShift 4s linear infinite;
}

.w2 {
    animation: waveShift 3s linear infinite reverse;
    stroke: #0088ff;
}

/* Module Blocks */
.modules-layer {
    display: flex;
    gap: 1rem;
    width: 200px;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.module-block {
    width: 60px;
    height: 80px;
    background: var(--bg-secondary);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-primary);
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* Stagger building animation */
.module-block.mb-1 {
    animation: buildUp 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite alternate;
}

.module-block.mb-2 {
    animation: buildUp 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite alternate 0.5s;
    border-color: rgba(0, 136, 255, 0.4);
}

.module-block.mb-3 {
    animation: buildUp 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite alternate 1s;
}

/* Arrows pointing up */
.growth-arrows {
    position: absolute;
    top: 0;
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    gap: 40px;
    z-index: 0;
}

.arrow {
    width: 2px;
    height: 100%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0), var(--text-dim) 50%, rgba(255, 255, 255, 0));
    position: relative;
    opacity: 0;
}

.arr-1 {
    animation: shootUp 3s infinite;
}

.arr-2 {
    animation: shootUp 3s infinite 1s;
}

.arr-3 {
    animation: shootUp 3s infinite 2s;
}

/* Keyframes */
@keyframes pulseBox {
    from {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
    }

    to {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    }
}

@keyframes waveShift {
    from {
        stroke-dasharray: 200;
        stroke-dashoffset: 400;
    }

    to {
        stroke-dasharray: 200;
        stroke-dashoffset: 0;
    }
}

@keyframes buildUp {
    from {
        transform: translateY(20px) rotate(180deg);
        opacity: 0.5;
    }

    to {
        transform: translateY(0) rotate(180deg);
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
    }
}

@keyframes shootUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

/* =========================================
   Diagnostic Scan Animation (Diagnóstico Section)
   ========================================= */

.diagnostic-anim-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Radar Rings */
.radar-circle {
    position: absolute;
    border: 1px dashed rgba(0, 255, 136, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.rc-1 {
    width: 100px;
    height: 100px;
    border-style: solid;
    border-color: rgba(0, 255, 136, 0.4);
}

.rc-2 {
    width: 200px;
    height: 200px;
    animation: spinRadar 20s linear infinite reverse;
}

.rc-3 {
    width: 300px;
    height: 300px;
    border-color: rgba(0, 136, 255, 0.2);
    animation: spinRadar 30s linear infinite;
}

/* Scanner shape */
.scanner-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(0, 255, 136, 0.3) 360deg);
    border-radius: 100% 0 0 0;
    transform-origin: bottom right;
    animation: radarSweep 4s linear infinite;
    z-index: 1;
}

/* Data Points Found (Education Icons) */
.data-point {
    position: absolute;
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    z-index: 2;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.data-point svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px currentColor);
}

.dp-a {
    top: 20%;
    left: 30%;
    animation: flashPoint 4s ease infinite 0.5s;
    color: var(--accent-color);
}

.dp-b {
    top: 70%;
    right: 20%;
    animation: flashPoint 4s ease infinite 1.5s;
    color: #ffb800;
    /* Distinct color for graduation cap */
}

.dp-c {
    bottom: 15%;
    left: 40%;
    animation: flashPoint 4s ease infinite;
    color: #0088ff;
    /* Distinct color for school */
}

/* Center Target Icon */
.scan-target {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 3;
    background: var(--bg-surface);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    animation: targetBreathe 2s alternate infinite;
}

/* Fake code lines analyzing */
.analysis-lines {
    position: absolute;
    right: -40px;
    top: 20%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 0;
}

.a-line {
    height: 4px;
    background: var(--grid-line);
    border-radius: 2px;
}

.al-1 {
    width: 60px;
    animation: analyzeLines 1.5s infinite alternate;
}

.al-2 {
    width: 40px;
    animation: analyzeLines 2s infinite alternate-reverse;
}

.al-3 {
    width: 80px;
    animation: analyzeLines 1.2s infinite alternate;
}

/* Keyframes */
@keyframes spinRadar {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes radarSweep {
    from {
        transform: translate(-100%, -100%) rotate(0deg);
    }

    to {
        transform: translate(-100%, -100%) rotate(360deg);
    }
}

@keyframes flashPoint {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    5% {
        opacity: 1;
        transform: scale(1.5);
    }

    10% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes targetBreathe {
    from {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
    }

    to {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
    }
}

@keyframes analyzeLines {
    from {
        background: var(--grid-line);
        width: 20px;
    }

    to {
        background: rgba(0, 136, 255, 0.5);
        width: 80px;
    }
}

/* =========================================
   Lack of Continuity Animation (Problematica Hero)
   ========================================= */

.continuity-anim-container {
    position: relative;
    width: 500px;
    height: 180px;
    display: flex;
    align-items: center;
}

/* Broken Timeline Track */
.timeline-track {
    position: absolute;
    top: 20px;
    left: 40px;
    width: 420px;
    display: flex;
    align-items: center;
}

.track-segment {
    height: 2px;
    background: var(--grid-line);
    position: relative;
}

.ts-1 {
    width: 85px;
}

.ts-2 {
    width: 170px;
}

.ts-3 {
    width: 85px;
}

.track-gap {
    width: 40px;
    height: 4px;
    border-top: 2px dashed rgba(255, 0, 51, 0.4);
    position: relative;
    margin: 0;
}

/* App Nodes */
.app-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    top: -10px;
    z-index: 2;
}

.an-1 {
    left: 0px;
}

.an-2 {
    left: 210px;
}

.an-3 {
    left: 420px;
}

.app-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-surface);
    border: 1px solid var(--grid-line);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    z-index: 2;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.app-icon svg {
    width: 30px;
    height: 30px;
}

.continuity-anim-container:hover .app-icon {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.app-label {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.3;
}

/* Flowing Orbs */
.orb {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: 20px;
    transform: translateY(-50%);
    box-shadow: 0 0 15px currentColor;
}

.flow-orb-1 {
    color: var(--accent-color);
    background: currentColor;
    left: 40px;
    animation: flowAcross1 3s linear infinite;
}

.flow-orb-2 {
    color: #ffb800;
    /* different data color */
    background: currentColor;
    left: 250px;
    animation: flowAcross2 3s linear infinite 1.5s;
}

/* Failing/Dropping Orbs */
.drop-orb-1 {
    color: #ff0033;
    background: currentColor;
    left: 145px;
    /* Position perfectly at mid gap 1 */
    opacity: 0;
    animation: dropIntoVoid 3s ease-in infinite;
}

.drop-orb-2 {
    color: #ff0033;
    background: currentColor;
    left: 355px;
    /* Position perfectly at mid gap 2 */
    opacity: 0;
    animation: dropIntoVoid 3s ease-in infinite 1.5s;
}

/* System Labels */
.sys-badge {
    position: absolute;
    font-size: 0.75rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--grid-line);
    white-space: nowrap;
}

.sb-1 {
    left: 40px;
    top: -45px;
    transform: translateX(-50%);
}

/* center above node 1 */
.sb-3 {
    left: 460px;
    top: -45px;
    transform: translateX(-50%);
}

/* center above 3rd node */

.sb-error {
    top: 100px;
    /* Well below icons and labels */
    transform: translateX(-50%);
    border-color: rgba(255, 0, 51, 0.4);
    z-index: 10;
    font-weight: 500;
}

/* Upward pointing CSS triangle for the error bagdes */
.sb-error::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 5px 6px 5px;
    border-style: solid;
    border-color: transparent transparent rgba(255, 0, 51, 0.4) transparent;
}

.sb-gap-1 {
    left: 145px;
}

/* exactly middle of gap 1 */
.sb-gap-2 {
    left: 355px;
}

/* exactly middle of gap 2 */

.error-text {
    color: #ff0033;
}

/* Timeline Keyframes */
@keyframes flowAcross1 {
    0% {
        left: 40px;
        opacity: 1;
    }

    40% {
        left: 145px;
        opacity: 1;
    }

    41% {
        opacity: 0;
    }

    /* Disappears at gap */
    100% {
        left: 145px;
        opacity: 0;
    }
}

@keyframes flowAcross2 {
    0% {
        left: 250px;
        opacity: 1;
    }

    40% {
        left: 355px;
        opacity: 1;
    }

    41% {
        opacity: 0;
    }

    /* Disappears at gap */
    100% {
        left: 355px;
        opacity: 0;
    }
}

@keyframes dropIntoVoid {
    0% {
        transform: translateY(-50%);
        opacity: 0;
    }

    40% {
        opacity: 0;
    }

    /* Waited till flow reached the gap */
    41% {
        opacity: 1;
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(60px);
        opacity: 0;
    }
}

@keyframes pulseError {
    0% {
        border-color: rgba(255, 0, 51, 0.3);
        color: var(--text-dim);
    }

    50% {
        border-color: rgba(255, 0, 51, 0.8);
        color: #ff0033;
    }

    100% {
        border-color: rgba(255, 0, 51, 0.3);
        color: var(--text-dim);
    }
}

.pulse-error {
    animation: pulseError 2s infinite;
}

/* =========================================
   Cost Accumulator Animation (El Costo)
   ========================================= */
.cost-anim-container {
    width: 420px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--grid-line);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.cost-anim-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(var(--accent-rgb, 0, 255, 136), 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.cost-anim-title {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 1.75rem;
}

.cost-bars {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cost-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 0.75rem;
}

.cost-bar-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.cost-bar-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--accent-color);
}

.cost-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    overflow: hidden;
}

.cost-bar {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-1 {
    background: linear-gradient(90deg, var(--accent-color), #00cc6e);
}

.cb-2 {
    background: linear-gradient(90deg, #ff6600, #ff0033);
}

.cb-3 {
    background: linear-gradient(90deg, #ffb800, #ff6600);
}

.cb-4 {
    background: linear-gradient(90deg, #0088ff, #6600ff);
}

.cost-bar-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
}

.cost-bar-value.revealed {
    opacity: 1;
}

.cost-total {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--grid-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cost-total-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.cost-total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ff0033;
    letter-spacing: -0.02em;
}

/* =========================================
   Architecture Stack Animation (Plataforma Hero)
   ========================================= */
.arch-stack-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 460px;
}

.arch-vs-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    background: var(--bg-base);
    border: 1px solid var(--grid-line);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    letter-spacing: 0;
}

.arch-side-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-align: center;
}

.arch-side-label.neon {
    color: var(--accent-color);
}

/* --- Left: Isolated Apps --- */
.arch-apps-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.arch-isolated-apps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.iso-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    font-size: 0.65rem;
    color: var(--text-dim);
    animation: isoFloat 3s ease-in-out infinite;
}

.iso-app svg {
    width: 18px;
    height: 18px;
}

.iso-1 {
    animation-delay: 0s;
}

.iso-2 {
    animation-delay: 0.5s;
}

.iso-3 {
    animation-delay: 1s;
}

.iso-4 {
    animation-delay: 1.5s;
}

@keyframes isoFloat {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-3px);
        opacity: 0.8;
    }
}

.iso-broken-line {
    width: 60%;
    height: 1px;
    border-top: 1px dashed rgba(255, 0, 51, 0.3);
    margin: 0.3rem auto 0;
}

/* --- Right: ContinuumAI Layers --- */
.arch-platform-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.arch-layers {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.arch-layer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--grid-line);
    border-radius: 8px;
    margin-bottom: 3px;
    font-size: 0.75rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease, background 0.3s ease;
}

.arch-layer:hover {
    border-color: var(--accent-color);
    background: rgba(var(--accent-rgb, 0, 255, 136), 0.05);
    color: var(--text-primary);
}

.arch-layer.visible {
    opacity: 1;
    transform: translateX(0);
}

.al-1 {
    transition-delay: 0.1s;
    border-left: 2px solid rgba(255, 0, 51, 0.5);
}

.al-2 {
    transition-delay: 0.25s;
    border-left: 2px solid rgba(255, 184, 0, 0.5);
}

.al-3 {
    transition-delay: 0.4s;
    border-left: 2px solid rgba(0, 136, 255, 0.5);
}

.al-4 {
    transition-delay: 0.55s;
    border-left: 2px solid var(--accent-color);
}

.al-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.al-icon svg {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
}

.al-4 .al-icon svg {
    color: var(--accent-color);
}

.al-3 .al-icon svg {
    color: #0088ff;
}

.al-2 .al-icon svg {
    color: #ffb800;
}

.al-1 .al-icon svg {
    color: #ff0033;
}

.arch-connector {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 0, 51, 0.5), rgba(255, 184, 0, 0.5), rgba(0, 136, 255, 0.5), var(--accent-color));
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.5s ease 0.7s;
}

.arch-connector.visible {
    opacity: 1;
}

/* =========================================
   Memory Flowchart Animation (Plataforma)
   ========================================= */
.memflow-container {
    width: 460px;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--grid-line);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.memflow-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.memflow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-color);
    flex-shrink: 0;
    animation: livePulse 2s ease-in-out infinite;
}

.memflow-diagram {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* --- Cycle node --- */
.mf-cycle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.mf-cycle.mf-visible {
    opacity: 1;
    transform: translateY(0);
}

.mf-c1 {
    transition-delay: 0.1s;
}

.mf-c2 {
    transition-delay: 0.5s;
}

.mf-c3 {
    transition-delay: 0.9s;
}

.mf-node {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid var(--grid-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: border-color 0.3s;
}

.mf-node-active {
    border-color: var(--accent-color);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.mf-year {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.mf-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.mf-live-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: livePulse 1.5s ease-in-out infinite;
}

.mf-tags {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    max-width: 100px;
}

.mf-tag {
    font-size: 0.6rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    padding: 2px 6px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

.mf-tag-warn {
    color: #ffb800;
    border-color: rgba(255, 184, 0, 0.25);
    background: rgba(255, 184, 0, 0.05);
}

.mf-tag-neon {
    color: var(--accent-color);
    border-color: rgba(0, 255, 136, 0.25);
    background: rgba(0, 255, 136, 0.05);
}

/* --- Connector --- */
.mf-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 22px;
    flex: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mf-connector.mf-visible {
    opacity: 1;
}

.mf-connector:nth-of-type(2) {
    transition-delay: 0.3s;
}

.mf-connector:nth-of-type(4) {
    transition-delay: 0.7s;
}

.mf-conn-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--grid-line), var(--accent-color), var(--grid-line));
    position: relative;
}

.mf-conn-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    text-align: center;
    line-height: 1.3;
    margin-top: 4px;
}

.mf-conn-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid var(--accent-color);
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    margin-top: -7px;
    align-self: flex-end;
}

/* --- Footer stats --- */
.memflow-footer {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--grid-line);
    padding-top: 1rem;
}

.mf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mf-stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.mf-stat-desc {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

/* =========================================
   Differentiators Grid (Cards)
   ========================================= */
.differentiators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--grid-line);
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* =========================================
   Services List
   ========================================= */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--grid-line);
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--grid-line);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.service-item:hover {
    padding-left: 1rem;
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.service-arrow {
    font-weight: 300;
    transition: transform 0.3s ease;
}

.service-item:hover .service-arrow {
    transform: translateX(10px);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    border-top: 1px solid var(--grid-line);
    padding: 4rem 4%;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-legal {
    border-top: 1px solid var(--grid-line);
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-legal a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--accent-color);
}

/* =========================================
   Neural Network Animation (Servicios Hero)
   ========================================= */
.neural-net-wrapper {
    position: relative;
    width: 560px;
    height: 560px;
    flex-shrink: 0;
}

.neural-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Connection lines */
.nn-line {
    stroke: rgba(0, 255, 136, 0.15);
    stroke-width: 1;
    stroke-dasharray: 6 4;
    animation: nnLineDash 3s linear infinite;
}

.nl-1 {
    animation-delay: 0s;
}

.nl-2 {
    animation-delay: -0.4s;
}

.nl-3 {
    animation-delay: -0.8s;
}

.nl-4 {
    animation-delay: -1.2s;
}

.nl-5 {
    animation-delay: -1.6s;
}

.nl-6 {
    animation-delay: -2s;
}

.nl-7 {
    animation-delay: -2.4s;
}

@keyframes nnLineDash {
    to {
        stroke-dashoffset: -20;
    }
}

.nn-center-ring {
    animation: nnRingPulse 3s ease-in-out infinite;
}

@keyframes nnRingPulse {

    0%,
    100% {
        opacity: 0.25;
        r: 52;
    }

    50% {
        opacity: 0.55;
        r: 56;
    }
}

/* Center label overlay */
.nn-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    pointer-events: none;
    gap: 4px;
    z-index: 2;
}

.nn-brand {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -0.02em;
    white-space: nowrap;
    text-shadow: 0 0 18px rgba(0, 255, 136, 0.5);
}

.nn-brand-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

/* Service nodes — positioned absolutely using percentages matching SVG coords (500x500  → 100%) */
/* SVG coords: top=250,120 → 50%, 24% */
.nn-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 3;
}

.nn-node svg {
    width: 26px;
    height: 26px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
}

.nn-node span {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    transition: color 0.3s;
}

/* Node backgrounds */
.nn-node::before {
    content: '';
    position: absolute;
    inset: -10px -12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--grid-line);
    border-radius: 10px;
    transition: all 0.3s ease;
    z-index: -1;
}

.nn-node:hover::before {
    background: rgba(0, 255, 136, 0.06);
    border-color: rgba(0, 255, 136, 0.35);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.08);
}

.nn-node:hover svg {
    color: var(--accent-color);
}

.nn-node:hover span {
    color: var(--accent-color);
}

/* Individual node positions — mapped from SVG 500×500 viewBox to % */
/* Control Escolar  250,120 → 50%, 24% */
.nn-n1 {
    top: 24%;
    left: 50%;
}

/* Sistema Cognitivo 380,160 → 76%, 32% */
.nn-n2 {
    top: 32%;
    left: 76%;
}

/* Seguridad  420,290 → 84%, 58% */
.nn-n3 {
    top: 58%;
    left: 84%;
}

/* Cobranza 350,400 → 70%, 80% */
.nn-n4 {
    top: 80%;
    left: 70%;
}

/* Aulas 150,400 → 30%, 80% */
.nn-n5 {
    top: 80%;
    left: 30%;
}

/* App 80,290 → 16%, 58% */
.nn-n6 {
    top: 58%;
    left: 16%;
}

/* Admin 120,160 → 24%, 32% */
.nn-n7 {
    top: 32%;
    left: 24%;
}

/* Entry animation */
.neural-net-wrapper .nn-node {
    opacity: 0;
    animation: nnNodeIn 0.5s ease forwards;
}

.nn-n1 {
    animation-delay: 0.2s;
}

.nn-n2 {
    animation-delay: 0.35s;
}

.nn-n3 {
    animation-delay: 0.5s;
}

.nn-n4 {
    animation-delay: 0.65s;
}

.nn-n5 {
    animation-delay: 0.8s;
}

.nn-n6 {
    animation-delay: 0.95s;
}

.nn-n7 {
    animation-delay: 1.1s;
}

@keyframes nnNodeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive: scale down neural network on mobile */
@media (max-width: 900px) {
    .neural-net-wrapper {
        transform: scale(0.65);
        transform-origin: center top;
        /* After 0.65 scale, effective size = 364px. Negative margin compensates */
        margin-left: auto;
        margin-right: auto;
        margin-bottom: calc(-560px * 0.35 / 2);
    }

    /* Smaller label inside center node */
    .nn-brand {
        font-size: 0.85rem;
    }

    .nn-brand-sub {
        font-size: 0.58rem;
    }
}

@media (max-width: 480px) {
    .neural-net-wrapper {
        transform: scale(0.52);
        transform-origin: center top;
        margin-bottom: calc(-560px * 0.48 / 2);
    }
}

/* =========================================
   Animations & Utils
   ========================================= */
@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.8;
    }
}

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateZ(360deg);
    }
}

@keyframes rotate-reverse {
    0% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg);
    }
}

/* Scroll reveal classes handled by JS */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Base Utility Classes */
.d-none {
    display: none !important;
}

/* Responsive & Mobile Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 200;
}

.hamburger-menu span {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    .layout-bento {
        grid-template-columns: 1fr;
    }

    .split-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .visual-content {
        height: auto;
        min-height: 300px;
        order: 1;
        justify-content: center !important;
    }

    .disconnected-systems-anim,
    .growth-anim-container,
    .diagnostic-anim-container {
        transform: scale(0.7);
        transform-origin: center center;
    }

    .continuity-anim-container {
        transform: scale(0.65);
        transform-origin: center center;
        margin: 0 auto;
    }

    .vertical-header {
        flex-direction: row;
        border-right: none;
        border-bottom: 2px solid var(--accent-color);
        padding-right: 0;
        padding-bottom: 0.5rem;
        margin-bottom: 2rem;
        height: auto;
        justify-content: flex-start;
    }

    .section-label {
        writing-mode: horizontal-tb;
        transform: none;
        margin-left: 1rem;
        font-size: 1.2rem;
        color: var(--accent-color);
        letter-spacing: 0.1em;
    }

    .section-num {
        margin-bottom: 0;
        font-size: 1.5rem;
    }

    .hero-visual {
        position: relative;
        top: 0;
        right: 0;
        transform: translateY(0) scale(0.6);
        margin: 2rem auto 0 auto;
        width: 100%;
        max-width: 600px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero {
        padding-top: 120px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
        margin-top: 2rem;
    }

    .btn-text {
        margin-left: 0;
        margin-top: 1rem;
    }

    /* Nav Menu Mobile */
    .nav-btn-desktop {
        display: none;
    }

    /* Theme toggle: still visible on mobile, next to hamburger */
    .theme-toggle {
        width: 34px;
        height: 34px;
        margin-left: 0.5rem;
        order: 2;
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(5, 5, 5, 0.97);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        border-left: 1px solid var(--grid-line);
        z-index: 150;
    }

    /* Light mode mobile nav */
    .light-mode .nav-links {
        background-color: rgba(245, 247, 250, 0.98);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }

    .dropdown {
        flex-direction: column;
    }

    .dropdown-menu {
        position: static;
        min-width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
        margin-top: 0;
        padding-top: 1rem;
    }

    .dropdown-menu a {
        font-size: 1.1rem !important;
        padding: 0.5rem 0;
    }

    .nav-btn-mobile {
        display: inline-block !important;
        margin-top: 2rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* Section padding on tablet */
    .section {
        padding: 4rem 5%;
    }

    /* Service items font */
    .service-item {
        font-size: 1.1rem;
    }

    /* Hero title clamp on tablet */
    .hero-title {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
}

/* ---- Small mobile (≤ 480px) ---- */
@media (max-width: 480px) {
    /* Section padding */
    .section {
        padding: 3rem 4%;
    }

    /* Hero */
    .hero {
        padding-top: 100px;
        padding-bottom: 2rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 0.75rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    /* Buttons stack */
    .hero-actions {
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Heading sizes */
    .heading-large {
        font-size: clamp(1.6rem, 7vw, 2.5rem);
    }

    .heading-medium {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }

    /* Animations scale down more aggressively */
    .disconnected-systems-anim,
    .growth-anim-container,
    .diagnostic-anim-container {
        transform: scale(0.55);
        transform-origin: center center;
        margin-bottom: -4rem;
    }

    .continuity-anim-container {
        transform: scale(0.5);
        transform-origin: center center;
        margin: 0 auto -4rem;
    }

    .cost-anim-container {
        width: 100%;
        padding: 1.25rem;
    }

    .arch-stack-container {
        width: 100%;
        flex-direction: column;
        gap: 1.5rem;
    }

    .memflow-container {
        width: 100%;
    }

    /* Cards */
    .differentiators-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.5rem;
    }

    /* Plan grid (planes.html) */
    .plan-grid {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer {
        padding: 3rem 4%;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    /* Neural network wrapper */
    .neural-net-wrapper {
        transform: scale(0.52);
        transform-origin: center top;
        margin-bottom: calc(-560px * 0.48 / 2);
    }

    /* Navbar: logo smaller */
    .logo {
        font-size: 0.9rem;
    }

    .logo-sub {
        font-size: 0.7rem;
    }

    /* Theme toggle on mobile */
    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    /* Section service list */
    .service-item {
        font-size: 1rem;
        padding: 1.25rem 0;
    }
}