:root {
    --bg-dark: #000000;
    --accent-cyan: #00CED1;
    --accent-secondary: #008B8B;
    --text-white: #FFFFFF;
    --text-gray: #B0B0B0;
    --gradient: linear-gradient(135deg, var(--accent-cyan), var(--accent-secondary));
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

h1, h2, h3, h4, .brand {
    font-family: 'Space Grotesk', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   NAVEGACIÓN (compartida)
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 206, 209, 0.1);
    z-index: 1000;
    padding: 0.8rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1002;
}

.brand-logo {
    height: 32px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-white);
    opacity: 0.8;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--accent-cyan);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ============================================
   BOTÓN HAMBURGUESA
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* ============================================
   MENÚ MÓVIL FULLSCREEN
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
    padding: 0;
}

.mobile-menu ul li {
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
}

.mobile-menu.active ul li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active ul li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active ul li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active ul li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active ul li:nth-child(4) { transition-delay: 0.4s; }

.mobile-menu ul li a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 0.3s;
}

.mobile-menu ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a.active {
    color: var(--accent-cyan);
}

.mobile-menu ul li a:hover::after,
.mobile-menu ul li a.active::after {
    width: 100%;
}

/* ============================================
   HERO (home)
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.circuit-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.circuit-svg {
    width: 100%;
    height: 100%;
    animation: rotateCircuit 120s linear infinite;
}

@keyframes rotateCircuit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.circuit-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 0%, var(--bg-dark) 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

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

/* ============================================
   BOTONES
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 3rem;
    background: var(--gradient);
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 206, 209, 0.3);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 206, 209, 0.5);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 3rem;
    background: transparent;
    border: 2px solid var(--bg-dark);
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-outline:hover {
    background: var(--bg-dark);
    color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-outline:hover::before {
    left: 100%;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

/* ============================================
   BENTO GRID (compartido)
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2rem;
}

.bento-card {
    background: rgba(0, 206, 209, 0.03);
    border: 1px solid rgba(0, 206, 209, 0.1);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(30px);
}

.bento-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

.bento-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 60px rgba(0, 206, 209, 0.2);
}

.bento-card:hover::before {
    opacity: 0.05;
}

.card-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-icon svg path,
.card-icon svg circle,
.card-icon svg rect,
.card-icon svg line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.bento-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-white);
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bento-card p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.bento-card ul {
    list-style: none;
    padding-left: 0;
    position: relative;
    z-index: 1;
}

.bento-card ul li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 300;
}

.bento-card ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    line-height: 1.4;
}

.bento-card:nth-child(odd) .card-icon {
    animation: float 6s ease-in-out infinite;
}

.bento-card:nth-child(even) .card-icon {
    animation: float 6s ease-in-out infinite 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   DATA SECURITY (home)
   ============================================ */
.security-section {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.security-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.security-text {
    flex: 1;
}

.security-text h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.security-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.security-icon {
    flex: 0 0 auto;
}

.security-icon svg {
    width: clamp(200px, 25vw, 350px);
    height: auto;
}

/* ============================================
   HISTORIAS / CLIENTES (home)
   ============================================ */
.stories-section {
    background: #FFFFFF;
    color: var(--bg-dark);
    padding: 4rem 0 2rem;
}

.stories-section .container {
    padding: 0 3rem;
}

.stories-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stories-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bg-dark);
    white-space: nowrap;
}

.stories-divider {
    flex: 1;
    height: 2px;
    background: var(--bg-dark);
    opacity: 0.2;
}

.clients-section {
    background: #FFFFFF;
    padding: 1rem 0 4rem;
}

.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.client-logo {
    width: 160px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6); /* Efecto uniforme inicial */
    transition: all 0.3s ease;
}

.client-logo:hover img {
    filter: grayscale(0%) opacity(1); /* Color original al hover */
}

/* Móvil */
@media (max-width: 768px) {
    .client-logo {
        width: 130px;
        height: 60px;
    }
}

/* ============================================
   PÁGINAS INTERNAS (Servicios / Tecnologías)
   ============================================ */
.page-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 150px 3rem 80px;
    overflow: hidden;
}

.network-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

.network-bg line {
    stroke: var(--accent-cyan);
    stroke-width: 1;
    opacity: 0.5;
    animation: networkPulse 4s ease-in-out infinite;
}

.network-bg circle {
    fill: var(--accent-cyan);
    opacity: 0.7;
}

@keyframes networkPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.page-hero h1 {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    color: var(--accent-cyan);
    line-height: 1;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.page-content {
    padding: 4rem 0;
    background: var(--bg-dark);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.category-card {
    background: rgba(0, 206, 209, 0.03);
    border: 1px solid rgba(0, 206, 209, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(30px);
}

.category-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 60px rgba(0, 206, 209, 0.2);
}

.category-card:hover::before {
    opacity: 0.05;
}

.category-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-card ul {
    list-style: none;
    padding-left: 0;
    position: relative;
    z-index: 1;
}

.category-card ul li {
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 206, 209, 0.05);
    transition: all 0.3s;
}

.category-card ul li:last-child {
    border-bottom: none;
}

.category-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    transition: all 0.3s;
}

.category-card ul li:hover {
    color: var(--text-white);
    padding-left: 2rem;
}

.category-card ul li:hover::before {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(to bottom, var(--bg-dark), rgba(0, 206, 209, 0.05));
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.cta-content h2 span {
    color: var(--accent-cyan);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 3rem;
    background: var(--gradient);
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    margin-top: 2rem;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 206, 209, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 206, 209, 0.5);
}

.cta-button:hover::before {
    left: 100%;
}

/* ============================================
   FOOTER (compartido)
   ============================================ */
footer {
    background: var(--bg-dark);
    padding: 3rem 0;
    border-top: 1px solid rgba(0, 206, 209, 0.1);
    text-align: center;
}

.footer-content {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.footer-content a {
    color: var(--accent-cyan);
}

.footer-content a:hover {
    text-decoration: underline;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .security-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .security-icon {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .container {
        padding: 0 2rem;
    }

    .bento-grid,
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .bento-card,
    .category-card {
        padding: 2rem;
    }

    .circuit-background {
        width: 200%;
        height: 200%;
    }

    .stories-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stories-divider {
        width: 100%;
    }

    .clients-grid {
        gap: 1.5rem;
    }

    .client-logo-placeholder {
        width: 130px;
        height: 60px;
    }

    .page-hero {
        padding: 120px 2rem 60px;
    }

    .page-content {
        padding: 3rem 0;
    }

    .mobile-menu ul li a {
        font-size: 1.6rem;
    }
}