/* ==========================================================================
   CMNQ SOLUTIONS · v2.0
   ========================================================================== */

/* ---- Tokens ---- */
:root {
    --primary: #0052CC;
    --primary-hover: #0043A8;
    --primary-50: #EBF2FF;
    --primary-100: #D6E4FF;
    --accent: #00A3E0;
    --accent-soft: #7FD3F2;

    --navy: #0B1B36;
    --navy-2: #13284D;
    --navy-3: #081429;
    --secondary: #172B4D;

    --text: #172B4D;
    --text-light: #5E6C84;
    --text-faint: #8B97AB;

    --bg: #FFFFFF;
    --bg-light: #F5F7FB;
    --border: #E3E8F0;
    --border-strong: #C8D1DE;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(11, 27, 54, 0.06), 0 1px 3px rgba(11, 27, 54, 0.04);
    --shadow-md: 0 12px 28px -10px rgba(11, 27, 54, 0.16);
    --shadow-lg: 0 28px 56px -16px rgba(11, 27, 54, 0.32);

    --header-h: 72px;
    --container: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2rem);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

/* Iconos de trazo: heredan el color del texto que los rodea */
.i {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

/* Visible solo al navegar con teclado */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

/* ---- Botones ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.9rem 1.6rem;
    border: 1.5px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(0, 82, 204, 0.6);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 12px 24px -10px rgba(0, 82, 204, 0.75);
    transform: translateY(-1px);
}

/* Azul marino: el anillo azul primario se perdería sobre el propio botón */
.btn-primary:focus-visible {
    outline-color: var(--navy);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.6rem 1.15rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* ---- Header ---- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled,
.site-header.menu-open {
    background: rgba(255, 255, 255, 0.96);
    border-color: var(--border);
    box-shadow: 0 6px 20px -12px rgba(11, 27, 54, 0.2);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: var(--header-h);
}

/* Lockup de marca: icono + nombre + bajada */
.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.logo-mark {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.logo-name em {
    font-style: normal;
    color: var(--primary);
}

.logo-tagline {
    margin-top: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
}

.nav-links a:not(.btn) {
    position: relative;
    padding: 0.35rem 0;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease-out);
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

.nav-links a:not(.btn):hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--navy);
    cursor: pointer;
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--header-h) + 4.5rem) 0 5.5rem;
    background:
        radial-gradient(55% 60% at 88% 18%, rgba(0, 163, 224, 0.13), transparent 62%),
        radial-gradient(45% 50% at 8% 0%, rgba(0, 82, 204, 0.10), transparent 60%),
        var(--bg);
}

/* Cuadrícula técnica que se desvanece hacia los bordes */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(23, 43, 77, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 43, 77, 0.055) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 75%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    padding: 0.4rem 0.9rem 0.4rem 0.75rem;
    border: 1px solid var(--primary-100);
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 163, 224, 0.2);
}

.hero h1 {
    margin-bottom: 1.5rem;
    color: var(--navy);
    font-size: clamp(2.2rem, 4.8vw, 3.9rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.text-gradient {
    white-space: nowrap;
    background: linear-gradient(100deg, var(--primary) 15%, var(--accent) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 34rem;
    margin-bottom: 2.25rem;
    color: var(--text-light);
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.6rem;
    margin-top: 2.25rem;
    list-style: none;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

.check {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary-50);
    color: var(--primary);
}

.check svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.6;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-visual svg {
    width: 100%;
    max-width: 540px;
    height: auto;
    overflow: visible;
}

.net-label {
    fill: var(--navy);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
}

/* Pulso de datos recorriendo los enlaces de red */
.net-link {
    stroke-dasharray: 6 10;
    animation: dataFlow 2.5s linear infinite;
}

.net-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: netPulse 3s ease-out infinite;
}

/* Cada nodo flota desfasado (el retardo va en el propio SVG) */
.net-node {
    animation: netFloat 6s ease-in-out infinite;
}

@keyframes dataFlow {
    to { stroke-dashoffset: -32; }
}

@keyframes netPulse {
    0%   { transform: scale(1);    opacity: 0.55; }
    100% { transform: scale(1.35); opacity: 0; }
}

@keyframes netFloat {
    50% { transform: translateY(-6px); }
}

/* ---- Estadísticas ---- */
.stats {
    /* La tarjeta queda a caballo entre el hero (blanco) y servicios (gris) */
    background: linear-gradient(to bottom, var(--bg) 50%, var(--bg-light) 50%);
}

.stats-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 2.5rem 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    box-shadow: var(--shadow-lg);
}

.stats-card::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: radial-gradient(closest-side, rgba(0, 163, 224, 0.22), transparent);
    pointer-events: none;
}

.stat-item {
    position: relative;
    padding: 0.5rem 1.5rem;
    text-align: center;
}

.stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.stat-number {
    display: block;
    margin-bottom: 0.4rem;
    background: linear-gradient(180deg, #FFFFFF 30%, #9FDCF5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(2.25rem, 3.6vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    font-weight: 500;
}

/* ---- Secciones ---- */
.section {
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section-gray {
    background: var(--bg-light);
}

/* Evita que el header fijo tape el título al saltar por anclas */
section[id] {
    scroll-margin-top: calc(var(--header-h) + 8px);
}

.section-head {
    max-width: 680px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.section-head--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 4rem;
    align-items: end;
    max-width: none;
    text-align: left;
}

.section-label {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-head h2,
.contact-info h2 {
    color: var(--navy);
    font-size: clamp(2rem, 3.6vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.section-head p {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.section-head--split p {
    margin-top: 0;
}

/* ---- Servicios ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s;
}

/* Filete de marca que se dibuja al pasar el cursor */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
}

.service-card:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-50);
    color: var(--primary);
    transition: background 0.3s, color 0.3s;
}

.service-icon svg {
    width: 26px;
    height: 26px;
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: #fff;
}

.service-number {
    color: var(--text-faint);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.service-card h3 {
    margin-bottom: 0.6rem;
    color: var(--navy);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ---- Proceso ---- */
.process-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    list-style: none;
}

/* Línea punteada que une los pasos */
.process-steps::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--primary-100) 0 8px, transparent 8px 14px);
}

.process-step {
    position: relative;
    padding: 0 0.5rem;
    text-align: center;
}

.step-number {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #0A6BE0);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow:
        0 0 0 8px var(--bg),
        0 0 0 9px var(--primary-100),
        0 12px 22px -8px rgba(0, 82, 204, 0.55);
}

.process-step h3 {
    margin-bottom: 0.5rem;
    color: var(--navy);
    font-size: 1.15rem;
    font-weight: 700;
}

.process-step p {
    max-width: 15rem;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ---- Tecnologías ---- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.tech-card {
    --brand: var(--primary);
    --brand-bg: var(--primary-50);
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s;
}

.tech-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.tech-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--brand-bg);
    color: var(--brand);
}

.tech-icon svg {
    width: 24px;
    height: 24px;
}

.tech-card h3 {
    margin-bottom: 0.2rem;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 700;
}

.tech-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Color de cada marca, en versión legible sobre blanco */
.tech-card--microsoft { --brand: #0078D4; --brand-bg: #E6F1FB; }
.tech-card--cisco     { --brand: #0479A8; --brand-bg: #E3F4FB; }
.tech-card--aws       { --brand: #C46A00; --brand-bg: #FFF2E0; }
.tech-card--google    { --brand: #1A73E8; --brand-bg: #E8F0FE; }
.tech-card--linux     { --brand: #172B4D; --brand-bg: #EDF0F5; }
.tech-card--db        { --brand: #00758F; --brand-bg: #E1F3F6; }

/* ---- Contacto ---- */
.contact-section {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 8vw, 6.5rem) 0;
    background:
        radial-gradient(70% 80% at 0% 0%, rgba(0, 163, 224, 0.28), transparent 60%),
        linear-gradient(135deg, #0047B3 0%, var(--navy) 72%);
    color: #fff;
}

.contact-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(to right, #000, transparent 60%);
    mask-image: linear-gradient(to right, #000, transparent 60%);
    pointer-events: none;
}

.contact-inner {
    position: relative;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-label {
    color: var(--accent-soft);
}

.contact-info h2 {
    margin-bottom: 1rem;
    color: #fff;
}

.contact-info > p {
    max-width: 30rem;
    margin-bottom: 2.25rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.1rem;
}

.contact-list {
    display: grid;
    gap: 0.85rem;
    max-width: 26rem;
    list-style: none;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

a.contact-item:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
}

a.contact-item:focus-visible {
    outline-color: #fff;
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(0, 163, 224, 0.18);
    color: var(--accent-soft);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.contact-meta small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-meta span {
    font-size: 0.98rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* ---- Formulario ---- */
.contact-form {
    padding: 2.25rem;
    border-radius: var(--radius-lg);
    background: #fff;
    color: var(--text);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}

.form-head {
    margin-bottom: 1.5rem;
}

.form-head h3 {
    color: var(--navy);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.form-head p {
    color: var(--text-light);
    font-size: 0.92rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 600;
}

.req {
    color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.78rem 0.95rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background-color: #FAFBFD;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #98A2B3;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--border-strong);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.12);
}

.form-group select {
    padding-right: 2.6rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E6C84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 16px;
    cursor: pointer;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .btn {
    margin-top: 0.5rem;
}

.form-note {
    margin-top: 0.9rem;
    color: var(--text-light);
    font-size: 0.8rem;
    text-align: center;
}

/* ---- Footer ---- */
.site-footer {
    padding: 3rem 0 1.25rem;
    background: var(--navy-3);
    color: #fff;
}

/* Marca a la izquierda y los enlaces agrupados a la derecha,
   en vez de cuatro columnas repartidas a todo el ancho */
.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem 4rem;
    margin-bottom: 2rem;
}

.footer-brand-block {
    max-width: 18.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.footer-brand svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.footer-brand span {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.footer-about {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 3.5rem;
}

.footer-section h3 {
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.footer-list {
    display: grid;
    justify-items: start;
    gap: 0.45rem;
}

/* Seis servicios en dos columnas: la mitad de alto */
.footer-list--2col {
    grid-template-columns: repeat(2, auto);
    column-gap: 2rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #fff;
}

.footer-section a:focus-visible {
    outline-color: #fff;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* ---- Aparición al hacer scroll (solo si hay JS) ---- */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.services-grid > .reveal:nth-child(3n + 2),
.tech-grid > .reveal:nth-child(3n + 2),
.process-steps > .reveal:nth-child(2) { --delay: 0.08s; }

.services-grid > .reveal:nth-child(3n + 3),
.tech-grid > .reveal:nth-child(3n + 3),
.process-steps > .reveal:nth-child(3) { --delay: 0.16s; }

.process-steps > .reveal:nth-child(4) { --delay: 0.24s; }

.hero-visual.reveal { --delay: 0.15s; }

/* ==========================================================================
   Modal de confirmación del formulario
   ========================================================================== */
.popup-container {
    position: fixed;
    inset: 0;
    background: rgba(9, 30, 66, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    z-index: 9999;
    opacity: 0;
    animation: popupFadeIn 0.25s ease forwards;
}

.popup-container.is-closing {
    animation: popupFadeOut 0.2s ease forwards;
}

.popup-content {
    position: relative;
    background: white;
    color: var(--text);
    padding: 2.75rem 2.25rem 2.25rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 24px 60px rgba(9, 30, 66, 0.28);
    width: 100%;
    max-width: 420px;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    animation: popupCardIn 0.35s var(--ease-out) 0.05s forwards;
}

.popup-content:focus {
    outline: none;
}

.popup-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.popup-close:hover {
    background: var(--bg-light);
    color: var(--text);
}

.popup-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.3rem;
    border-radius: 50%;
    background: #E6F6EF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-icon svg {
    width: 36px;
    height: 36px;
}

/* El trazo se dibuja solo: más creíble que un emoji ✅ */
.popup-mark {
    fill: none;
    stroke: #12875A;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: popupDraw 0.45s ease 0.3s forwards;
}

.popup-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.6rem;
}

.popup-content p {
    color: var(--text-light);
    font-size: 0.97rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.popup-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s;
}

.popup-btn:hover {
    background: var(--primary-hover);
}

.popup-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Azul marino: el azul primario se confundiría con el propio botón */
.popup-btn:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Variante para mensajes de error */
.popup-content.error .popup-icon { background: #FDECEA; }
.popup-content.error .popup-mark { stroke: #C9372C; }

@keyframes popupFadeIn  { to { opacity: 1; } }
@keyframes popupFadeOut { to { opacity: 0; } }
@keyframes popupCardIn  { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes popupDraw    { to { stroke-dashoffset: 0; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual svg {
        max-width: 440px;
    }

    .section-head--split {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .stats-card {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 1.75rem;
    }

    /* En 2×2 el tercer dato abre fila: sin separador a su izquierda */
    .stat-item:nth-child(3)::before {
        display: none;
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Marca arriba y enlaces debajo: en una sola fila ya no caben */
@media (max-width: 1180px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-brand-block {
        max-width: 30rem;
    }

    .footer-links {
        gap: 1.75rem 2.5rem;
    }
}

/* Menú hamburguesa: el logo y los enlaces ya no entran en una fila */
@media (max-width: 880px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem var(--gutter) 1.25rem;
        border-bottom: 1px solid var(--border);
        background: #fff;
        box-shadow: 0 16px 30px -16px rgba(11, 27, 54, 0.25);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s, transform 0.2s var(--ease-out), visibility 0.2s;
    }

    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-links a:not(.btn) {
        display: block;
        padding: 0.9rem 0.25rem;
        border-bottom: 1px solid var(--border);
        font-size: 1rem;
    }

    .nav-links a:not(.btn)::after {
        display: none;
    }

    .nav-links li:last-child {
        padding-top: 1rem;
    }

    .nav-links .btn {
        width: 100%;
        padding: 0.85rem 1.2rem;
        font-size: 0.98rem;
    }
}

@media (max-width: 760px) {
    /* Proceso como línea de tiempo vertical */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .process-steps::before {
        top: 28px;
        bottom: 28px;
        left: 27px;
        right: auto;
        width: 2px;
        height: auto;
        background: repeating-linear-gradient(180deg, var(--primary-100) 0 8px, transparent 8px 14px);
    }

    .process-step {
        display: grid;
        grid-template-columns: 56px 1fr;
        column-gap: 1.25rem;
        padding: 0;
        text-align: left;
    }

    .step-number {
        grid-row: span 2;
        margin: 0;
    }

    .process-step h3 {
        align-self: end;
        margin-bottom: 0.25rem;
        padding-top: 0.35rem;
    }

    .process-step p {
        max-width: none;
        margin: 0;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: calc(var(--header-h) + 2.5rem) 0 3.5rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-visual svg {
        max-width: 340px;
    }

    .nav {
        gap: 1rem;
    }

    .logo {
        gap: 0.55rem;
    }

    .logo-name {
        font-size: 1.08rem;
    }

    .logo-tagline {
        font-size: 0.55rem;
        letter-spacing: 0.08em;
        white-space: nowrap;
    }

    .stats-card {
        padding: 2rem 0.5rem;
    }

    .stat-item {
        padding: 0.25rem 0.75rem;
    }

    .services-grid,
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        margin-bottom: 2.5rem;
    }

    .service-card {
        padding: 1.6rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* El email completo cabe en una línea a 375px */
    .contact-item {
        gap: 0.8rem;
        padding: 0.75rem;
    }

    .contact-meta span {
        font-size: 0.92rem;
    }

    .contact-form {
        padding: 1.6rem 1.25rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-list--2col {
        column-gap: 1rem;
    }

    /* Los enlaces de empresa van en fila: son cortos */
    .footer-list--inline-sm {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem 1.25rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .popup-content { padding: 2.25rem 1.5rem 1.75rem; }
}

/* Móviles de 320–360px: "conectividad TI" no se parte, así que baja el cuerpo */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.95rem;
    }

    /* Los servicios del footer ya no caben en una línea: se reparten el ancho y ajustan */
    .footer-list--2col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Respeta a quien pide menos animación por accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .net-link,
    .net-pulse,
    .net-node {
        animation: none;
    }

    .net-pulse {
        opacity: 0;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .btn,
    .service-card,
    .tech-card {
        transition: none;
    }

    .btn:hover,
    .service-card:hover,
    .tech-card:hover,
    .btn:hover svg {
        transform: none;
    }

    .popup-container,
    .popup-content,
    .popup-mark {
        animation-duration: 0.01ms;
        animation-delay: 0s;
    }

    .popup-mark { stroke-dashoffset: 0; }
}
