/* ==========================================================
   CAPITAL GLOBAL SOLUTIONS
   SITE.CSS
   ========================================================== */


/* ==========================================================
   VARIABLES CORPORATIVAS
   ========================================================== */

:root {
    --blue: #004174;
    --navy: #08152f;
    --ink: #0e1d3b;
    --soft: #f3f6fb;
    --gray: #DBDBDB;
    --header-height: 76px;
    --home-side-margin: clamp(80px, 10vw, 220px);
    --cgs-image-y: 0px;
}


/* ==========================================================
   RESET
   ========================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: #ffffff;
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* ==========================================================
   CONTENEDOR GENERAL
   ========================================================== */

.container {
    width: min(1280px, calc(100% - 80px));
    margin-right: auto;
    margin-left: auto;
}


/* ==========================================================
   HEADER
   ========================================================== */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #dde5f0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav {
    display: flex;
    align-items: center;
    height: var(--header-height);
    gap: 32px;
}


/* ==========================================================
   LOGO HEADER
   ========================================================== */

.logo {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.logo-img {
    display: block;
    width: auto;
    max-width: 210px;
    height: 50px;
    object-fit: contain;
}


/* ==========================================================
   NAVEGACIÓN
   ========================================================== */

nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 24px;
}

    nav a {
        font-weight: 600;
        transition: color 0.2s ease, opacity 0.2s ease;
    }

        nav a:hover {
            color: var(--blue);
        }


/* ==========================================================
   BOTONES
   ========================================================== */

.btn {
    display: inline-block;
    padding: 12px 18px;
    border: 0;
    border-radius: 6px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

    .btn:hover {
        opacity: 0.88;
        transform: translateY(-1px);
    }

    .btn.big {
        padding: 16px 23px;
    }

    .btn.light {
        background: #ffffff;
        color: var(--navy);
    }


/* ==========================================================
   TIPOGRAFÍA
   ========================================================== */

h1,
h2 {
    line-height: 1.05;
    letter-spacing: -0.04em;
}

h1 {
    color: var(--blue);
    font-size: clamp(48px, 7vw, 92px);
}

h2 {
    font-size: clamp(36px, 5vw, 64px);
}

h3 {
    line-height: 1.2;
}

em {
    color: var(--blue);
    font-style: normal;
}

.eyebrow {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--blue);
    font-weight: 800;
    letter-spacing: 0.15em;
}

.lead {
    max-width: 780px;
    color: #5f6b7d;
    font-size: 20px;
    text-align: justify;
    text-justify: inter-word;
}


/* ==========================================================
   TEXTO CORPORATIVO
   ========================================================== */

.company-description {
    width: 100%;
    max-width: 900px;
}

    .company-description p {
        margin: 0 0 20px;
        text-align: justify;
        text-justify: inter-word;
    }

    .company-description strong {
        font-weight: 700;
    }


/* ==========================================================
   IMAGEN DE MARCA
   ========================================================== */

.home-brand-image {
    display: block;
    width: min(100%, 470px);
    height: auto;
    object-fit: contain;
}


/* ==========================================================
   SECCIONES GENERALES
   ========================================================== */

.hero,
.section {
    padding: 100px 0;
}

.hero {
    display: flex;
    align-items: center;
    min-height: 70vh;
    background: linear-gradient( 145deg, #ffffff, #eef4ff );
}

.soft {
    background: var(--soft);
}


/* ==========================================================
   GRID Y TARJETAS
   ========================================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 42px;
    gap: 24px;
}

    .grid article {
        padding: 28px;
        border: 1px solid #dce4f0;
        border-radius: 10px;
        background: #ffffff;
    }

        .grid article h3 {
            margin-top: 0;
        }

        .grid article a {
            color: var(--blue);
            font-weight: 700;
        }


/* ==========================================================
   FORMULARIOS
   ========================================================== */

form {
    max-width: 760px;
    padding: 32px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--ink);
}

label {
    display: block;
    margin: 14px 0;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #ccd5e2;
    border-radius: 5px;
    background: #ffffff;
    color: var(--ink);
}


/* ==========================================================
   FPEF GENERAL
   ========================================================== */

.fpef {
    padding: 100px 0;
    background: var(--navy);
    color: #ffffff;
}

    .fpef .lead {
        color: #bdc8da;
    }

.framework-label {
    color: var(--gray);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
}


/* ==========================================================
   CTA
   ========================================================== */

.cta {
    padding: 100px 0;
    background: var(--blue);
    color: #ffffff;
    text-align: center;
}


/* ==========================================================
   DIAGRAMA ESTÁNDAR
   ========================================================== */

.framework-diagram {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-right: auto;
    margin-left: auto;
    border-radius: 8px;
    cursor: zoom-in;
    box-shadow: 0 8px 24px rgba(0, 65, 116, 0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .framework-diagram:hover {
        transform: scale(1.035);
        box-shadow: 0 12px 32px rgba(0, 65, 116, 0.24);
    }

    .framework-diagram:focus-visible {
        outline: 3px solid rgba(0, 65, 116, 0.55);
        outline-offset: 5px;
    }


/* ==========================================================
   INSTRUCCIÓN PARA DIAGRAMAS
   ========================================================== */

.framework-diagram-hint {
    margin: 0 0 22px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    opacity: 1;
    text-shadow: 0 1px 8px rgba(8, 21, 47, 0.92);
}


/* ==========================================================
   DIAGRAMA EN COLUMNA DERECHA
   ========================================================== */

.framework-side-column {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    padding: clamp(320px, 52vh, 560px) clamp(16px, 2vw, 30px) 100px;
    background: transparent;
    pointer-events: auto;
}

.framework-side-diagram {
    position: sticky;
    top: calc(var(--header-height) + 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 350px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    pointer-events: auto;
}

    .framework-side-diagram .framework-diagram {
        width: 100%;
        max-width: 350px;
        pointer-events: auto;
    }


/* ==========================================================
   OVERLAYS
   ========================================================== */

.fpef-overlay,
.approach-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 30px;
    background: rgba(0, 25, 45, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

    .fpef-overlay.show,
    .approach-overlay.show {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

.fpef-overlay-image,
.approach-overlay-image {
    display: block;
    width: auto;
    max-width: 95vw;
    height: auto;
    max-height: 92vh;
    border-radius: 8px;
    background: #ffffff;
    object-fit: contain;
    pointer-events: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.fpef-close,
.approach-overlay-close {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: var(--blue);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

    .fpef-close:hover,
    .approach-overlay-close:hover {
        background: var(--blue);
        color: #ffffff;
        transform: scale(1.04);
    }

    .fpef-close:focus-visible,
    .approach-overlay-close:focus-visible {
        outline: 3px solid rgba(255, 255, 255, 0.90);
        outline-offset: 4px;
    }


/* ==========================================================
   INSIGHTS
   ========================================================== */

.insights-list,
.insight-item {
    width: 100%;
}

.insight-category {
    display: block;
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insight-item h3 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: clamp( 22px, 2.5vw, 30px );
}

.insight-summary {
    max-width: 780px;
    margin-bottom: 18px;
    color: #5f6b7d;
    font-size: 16px;
    line-height: 1.7;
    text-align: justify;
    text-justify: inter-word;
}

.insight-item a {
    color: var(--blue);
    font-weight: 700;
}

    .insight-item a:hover {
        text-decoration: underline;
        text-underline-offset: 4px;
    }

.insight-whitepaper-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}


/* ==========================================================
   VISUAL FIJO
   ========================================================== */

.home-visual-background {
    position: fixed;
    top: var(--header-height);
    right: var(--home-side-margin);
    bottom: 0;
    left: var(--home-side-margin);
    z-index: 0;
    overflow: hidden;
    background: var(--navy);
    pointer-events: none;
}


/* ==========================================================
   IMAGEN DEL VISUAL
   ========================================================== */

.home-visual-background-image {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    filter: none;
    opacity: 1;
    image-rendering: auto;
    transform: translate3d( -50%, var(--cgs-image-y, 0px), 0 );
    transform-origin: center top;
    will-change: transform;
    pointer-events: none;
}


/* ==========================================================
   CAPA GENERAL DE LEGIBILIDAD
   ========================================================== */

.home-visual-background::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient( to right, rgba(255, 255, 255, 1.00) 0%, rgba(255, 255, 255, 0.98) 25%, rgba(255, 255, 255, 0.90) 42%, rgba(255, 255, 255, 0.72) 58%, rgba(255, 255, 255, 0.42) 72%, rgba(255, 255, 255, 0.16) 86%, rgba(255, 255, 255, 0.00) 100% );
}


/* ==========================================================
   LAYOUT PRINCIPAL 68 / 32
   ========================================================== */

.home-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 68fr) minmax(300px, 32fr);
    align-items: stretch;
    width: calc( 100% - (var(--home-side-margin) * 2) );
    margin-right: var(--home-side-margin);
    margin-left: var(--home-side-margin);
}


/* ==========================================================
   COLUMNA DE CONTENIDO
   ========================================================== */

.home-content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    background: transparent;
}


    /* ==========================================================
   ANCHO DEL CONTENIDO
   ========================================================== */

    .home-content > section > .container {
        width: calc(100% - 80px);
        max-width: 1000px;
        margin-right: auto;
        margin-left: auto;
    }


    /* ==========================================================
   FONDOS DE SECCIONES
   ========================================================== */

    .home-content .hero,
    .home-content .section {
        background: transparent;
    }

        .home-content .section.soft {
            background: rgba( 243, 246, 251, 0.58 );
        }

    .home-content .fpef {
        background: rgba( 8, 21, 47, 0.90 );
    }

    .home-content .cta {
        background: rgba( 0, 65, 116, 0.92 );
    }


    /* ==========================================================
   TARJETAS
   ========================================================== */

    .home-content .grid article {
        background: rgba( 255, 255, 255, 0.82 );
        box-shadow: 0 10px 30px rgba(8, 21, 47, 0.06);
    }


/* ==========================================================
   COLUMNA VISUAL DERECHA
   ========================================================== */

.home-visual-column {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    background: transparent;
    pointer-events: none;
}

.home-visual-label {
    position: fixed;
    right: calc( var(--home-side-margin) + 28px );
    bottom: 28px;
    z-index: 2;
    color: var(--gray);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(8, 21, 47, 0.85);
}


/* ==========================================================
   ENLACE FPEF INLINE
   ========================================================== */

.fpef-inline-link {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

    .fpef-inline-link:hover {
        opacity: 0.72;
    }


/* ==========================================================
   FOOTER
   ========================================================== */

footer {
    position: relative;
    z-index: 100;
    padding: 60px 0;
    background: #050d1f;
    color: #ffffff;
}

    footer .container {
        text-align: left;
    }


    /* ==========================================================
   FOOTER
   BLOQUE DE MARCA
   ========================================================== */

    footer .footer-brand-block {
        display: block;
        width: 210px;
        max-width: 210px;
        margin: 0;
        padding: 0;
        text-align: left;
    }


    /* ==========================================================
   FOOTER
   LOGO
   ========================================================== */

    footer .footer-brand-logo {
        display: block;
        width: 210px;
        max-width: 210px;
        height: auto;
        margin: 0;
        padding: 0;
    }


    /* ==========================================================
   FOOTER
   EMAIL

   El email ocupa exactamente el mismo ancho
   de 210px que el logo y se centra dentro de él.
   ========================================================== */

    footer .footer-brand-email {
        display: block;
        width: 210px;
        max-width: 210px;
        margin-top: 10px;
        margin-right: 0;
        margin-left: 0;
        padding: 0;
        color: #DBDBDB;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.4;
        text-align: center;
        white-space: nowrap;
    }

        footer .footer-brand-email a {
            display: inline-block;
            margin: 0;
            padding: 0;
            color: inherit;
            text-decoration: none;
            transition: color 0.2s ease, opacity 0.2s ease;
        }

            footer .footer-brand-email a:hover {
                color: #ffffff;
            }


    /* ==========================================================
   FOOTER
   COPYRIGHT
   ========================================================== */

    footer .footer-brand-copyright {
        display: block;
        margin-top: 8px;
        /*
       Ajuste aprobado para el copyright.
    */
        margin-left: 18px;
        padding: 0;
        color: #DBDBDB;
        font-size: 11px;
        font-weight: 400;
        line-height: 1.4;
        white-space: nowrap;
    }


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {

    :root {
        --home-side-margin: 48px;
    }

    .home-layout {
        grid-template-columns: minmax(0, 68fr) minmax(260px, 32fr);
    }

    .home-content > section > .container {
        width: calc(100% - 48px);
        max-width: 1000px;
    }

    .framework-side-column {
        padding: clamp(280px, 48vh, 480px) 18px 80px;
    }

    .framework-side-diagram {
        max-width: 300px;
    }

        .framework-side-diagram
        .framework-diagram {
            max-width: 300px;
        }

    .grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   TABLET VERTICAL
   ========================================================== */

@media (max-width: 900px) {

    .framework-side-column {
        padding: clamp(250px, 42vh, 420px) 16px 70px;
    }

    .framework-side-diagram {
        max-width: 270px;
    }

        .framework-side-diagram
        .framework-diagram {
            max-width: 270px;
        }

    .framework-diagram-hint {
        display: none;
    }
}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 820px) {

    :root {
        --header-height: 64px;
        --home-side-margin: 12px;
    }

    .container {
        width: calc(100% - 40px);
    }

    .nav {
        height: var(--header-height);
    }

    nav {
        display: none;
    }

    .nav > .btn {
        margin-left: auto;
    }

    .logo-img {
        width: auto;
        max-width: 175px;
        height: 42px;
    }

    .home-layout {
        display: flex;
        flex-direction: column;
    }

    .home-content {
        order: 1;
        width: 100%;
        background: transparent;
    }

        .home-content > section > .container {
            width: calc(100% - 40px);
            max-width: none;
        }

    .home-visual-background::after {
        background: linear-gradient( to right, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.96) 40%, rgba(255, 255, 255, 0.90) 70%, rgba(255, 255, 255, 0.82) 100% );
    }

    .home-content .section.soft {
        background: rgba( 243, 246, 251, 0.64 );
    }

    .home-visual-column {
        display: none;
    }

    .home-visual-label {
        display: none;
    }

    .home-visual-column.framework-side-column {
        order: 2;
        display: flex;
        width: 100%;
        min-height: auto;
        padding: 48px 20px 72px;
        background: rgba( 243, 246, 251, 0.68 );
        pointer-events: auto;
    }

    .framework-side-diagram {
        position: relative;
        top: auto;
        width: 100%;
        max-width: 420px;
        margin-right: auto;
        margin-left: auto;
    }

        .framework-side-diagram
        .framework-diagram {
            width: 100%;
            max-width: 420px;
        }

        .framework-side-diagram
        .framework-diagram-hint {
            display: none;
        }

    .grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .section,
    .fpef,
    .cta {
        padding: 72px 0;
    }

    .home-brand-image {
        width: min(100%, 360px);
    }
}


/* ==========================================================
   TELÉFONOS PEQUEÑOS
   ========================================================== */

@media (max-width: 576px) {

    .framework-side-diagram,
    .framework-side-diagram
    .framework-diagram {
        width: 100%;
        max-width: 100%;
    }

    .fpef-overlay,
    .approach-overlay {
        padding: 10px;
    }

    .fpef-overlay-image,
    .approach-overlay-image {
        max-width: 98vw;
        max-height: 88vh;
    }

    .fpef-close,
    .approach-overlay-close {
        top: 10px;
        right: 10px;
    }
}


/* ==========================================================
   ACCESIBILIDAD
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
