/* ConnectFlag – paleta: blanco, negro, azul claro #62abdd, azul oscuro #0e244b */
:root {
    --blue: #62abdd;
    --navy: #0e244b;
    --black: #000;
    --white: #fff;
    --ink: rgba(0, 0, 0, .82);
    --tint: rgba(98, 171, 221, .10);
    --line: rgba(14, 36, 75, .12);
    --radius: 14px;
    --header-h: 84px;
    --container: 1200px;
    --shadow: 0 14px 44px rgba(14, 36, 75, .15);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin-top: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
    transition: background .3s ease, box-shadow .3s ease;
}
.site-header.is-solid, .site-header.is-open { background: var(--white); box-shadow: 0 4px 22px rgba(14, 36, 75, .14); }
.brand { display: block; line-height: 0; }
.brand .logo-dark { display: none; }
.site-header.is-solid .logo-light, .site-header.is-open .logo-light { display: none; }
.site-header.is-solid .logo-dark, .site-header.is-open .logo-dark { display: block; }
.site-header.is-solid .main-nav a, .site-header.is-open .main-nav a { color: var(--navy); }
.site-header.is-solid .main-nav a:hover, .site-header.is-open .main-nav a:hover { color: var(--blue); }
.site-header.is-solid .main-nav a.active, .site-header.is-open .main-nav a.active { color: var(--navy); border-color: var(--blue); }
.site-header.is-solid .burger span, .site-header.is-open .burger span { background: var(--navy); }
.site-header.is-solid .flags svg, .site-header.is-open .flags svg { box-shadow: 0 0 0 1px rgba(14, 36, 75, .22); }
.site-header .inner {
    height: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
}
.brand img { height: 52px; width: auto; }

.main-nav { justify-self: center; }
.main-nav ul { display: flex; gap: clamp(20px, 3.4vw, 46px); }
.main-nav a {
    display: inline-block; padding: 8px 0; color: var(--white); text-decoration: none;
    font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--blue); border-color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.flags { display: flex; gap: 8px; }
.flags a { display: block; line-height: 0; opacity: .6; transition: opacity .2s, transform .2s; }
.flags a:hover, .flags a[aria-current] { opacity: 1; }
.flags a:hover { transform: translateY(-1px); }
.flags svg { width: 26px; height: 18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }

.burger {
    display: none; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.burger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px;
    font: 600 .9rem/1.2 'Poppins', sans-serif; text-decoration: none; border-radius: 4px;
    border: 2px solid transparent; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--white); border-color: rgba(98, 171, 221, .55); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.btn-outline { color: var(--white); border-color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-blue { background: var(--blue); color: var(--navy); border-color: var(--blue); }
.btn-blue:hover { background: var(--white); border-color: var(--white); }

/* ---------- Hero ---------- */
.hero {
    position: relative; display: flex; align-items: center; color: var(--white); overflow: hidden;
    min-height: min(88vh, 780px); padding: calc(var(--header-h) + 48px) 0 88px; background: var(--navy);
}
.hero--page { min-height: clamp(400px, 58vh, 540px); padding-bottom: 72px; }
.hero--navy { background: linear-gradient(135deg, var(--navy) 0%, #143266 55%, #1b4a85 100%); }
.hero--navy::before {
    content: ""; position: absolute; width: 640px; height: 640px; right: -160px; top: -200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(98, 171, 221, .35), transparent 65%);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero:not(.hero--navy)::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, rgba(14, 36, 75, .80) 0%, rgba(14, 36, 75, .45) 62%, rgba(14, 36, 75, .22) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.15; font-weight: 700; max-width: 780px; margin-bottom: 20px; }
.hero p { font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.6; max-width: 660px; margin-bottom: 34px; opacity: .96; }
.hero--page p { margin-bottom: 0; }

body.no-hero main { min-height: 62vh; padding-top: var(--header-h); }

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-tint { background: var(--tint); }
.section-navy { background: var(--navy); color: var(--white); }

.section-title {
    font-size: clamp(1.55rem, 2.7vw, 2.15rem); line-height: 1.25; font-weight: 700;
    color: var(--navy); text-align: center; margin-bottom: 14px;
}
.section-title--left { text-align: left; }
.title-line { margin-bottom: 48px; }
.title-line::after { content: ""; display: block; width: 64px; height: 3px; background: var(--blue); margin: 16px auto 0; border-radius: 2px; }
.section-navy .section-title { color: var(--white); }
.section-sub { text-align: center; max-width: 760px; margin: -26px auto 48px; font-size: 1.05rem; }
.section-navy .section-sub { opacity: .9; }
.section-note { text-align: center; margin: 44px 0 0; font-weight: 500; color: var(--blue); }

/* ---------- Carruseles de aliados ---------- */
.allies { padding: 36px 0 28px; box-shadow: 0 10px 30px rgba(14, 36, 75, .05); position: relative; }
.allies + .allies { padding-top: 40px; }
.allies .section-title { text-transform: uppercase; margin-bottom: 28px; letter-spacing: .01em; }

.logo-carousel { position: relative; }
.logo-viewport { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.logo-track { display: flex; gap: 24px; width: max-content; will-change: transform; }
.logo-item { flex: 0 0 190px; height: 110px; display: flex; align-items: center; justify-content: center; }
.logo-item img { max-width: 100%; max-height: 84px; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.logo-progress { height: 4px; margin-top: 16px; background: rgba(98, 171, 221, .18); border-radius: 4px; position: relative; overflow: hidden; }
.logo-progress span { position: absolute; top: 0; bottom: 0; left: 0; width: 20%; background: var(--blue); border-radius: 4px; }

/* ---------- Split (texto + imagen) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--reverse .split-media { order: -1; }
.split-text p { font-size: 1.05rem; }
.split-text p + p { margin-top: 18px; }
.split-media { margin: 0; }
.split-media img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 5 / 3; object-fit: cover; }

.stats { display: flex; flex-wrap: wrap; gap: 20px 48px; margin-top: 32px; }
.stat { display: flex; flex-direction: column; max-width: 220px; }
.stat-n { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 800; color: var(--navy); line-height: 1; }
.stat-n::first-letter { color: var(--blue); }
.stat-l { margin-top: 8px; font-size: .92rem; line-height: 1.45; }

/* ---------- Tarjetas ---------- */
.cards { display: grid; gap: 28px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
    background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--blue);
    border-radius: var(--radius); padding: 32px 28px; box-shadow: 0 8px 28px rgba(14, 36, 75, .07);
    transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; line-height: 1.3; }
.card p { margin: 0; font-size: .96rem; }
.card-ico {
    display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
    border-radius: 50%; background: var(--navy); color: var(--blue); margin-bottom: 20px; flex: none;
}
.card-row { display: flex; gap: 22px; align-items: flex-start; }
.card-row .card-ico { margin-bottom: 0; }

.card-dark { background: rgba(255, 255, 255, .06); border-color: rgba(98, 171, 221, .28); border-top-color: var(--blue); box-shadow: none; }
.card-dark h3 { color: var(--white); }
.card-dark p { color: rgba(255, 255, 255, .86); }
.card-dark .card-ico { background: rgba(98, 171, 221, .16); }
.card-dark:hover { background: rgba(255, 255, 255, .1); box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }

/* ---------- Metodología ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; counter-reset: none; }
.step { position: relative; text-align: center; }
.step-n {
    position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--white);
    font-weight: 700; font-size: 1.15rem; box-shadow: 0 0 0 6px rgba(98, 171, 221, .25); margin-bottom: 22px;
}
.step:not(:last-child)::after {
    content: ""; position: absolute; top: 31px; left: calc(50% + 44px); width: calc(100% + 24px - 88px); height: 2px;
    background: repeating-linear-gradient(90deg, var(--blue) 0 8px, transparent 8px 14px);
}
.step h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.3; }
.step p { margin: 0; font-size: .9rem; line-height: 1.6; }

/* ---------- CTA final / Score ---------- */
.cta {
    position: relative; color: var(--white); text-align: center; background-size: cover; background-position: center;
    padding: clamp(72px, 10vw, 130px) 0;
}
.cta::before { content: ""; position: absolute; inset: 0; background: rgba(14, 36, 75, .55); }
.cta .container { position: relative; }
.cta h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.2; font-weight: 700; max-width: 820px; margin: 0 auto 18px; }
.cta p { max-width: 720px; margin: 0 auto 32px; font-size: 1.08rem; }

.score { background: linear-gradient(135deg, var(--navy), #1b4a85); color: var(--white); text-align: center; padding: clamp(56px, 8vw, 96px) 0; }
.score h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 16px; }
.score p { max-width: 760px; margin: 0 auto 30px; font-size: 1.05rem; opacity: .95; }

/* ---------- Equipo ---------- */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.team .member:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 16px); }
.member {
    position: relative; overflow: hidden; border-radius: 18px; background: var(--navy);
    box-shadow: var(--shadow); cursor: default; isolation: isolate;
}
.member { --member-ratio: 4 / 5; }
.member img { width: 100%; height: auto; aspect-ratio: var(--member-ratio); object-fit: cover; object-position: center 20%; transition: transform .6s ease; }
.member:hover img { transform: scale(1.04); }

.member-overlay {
    position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: clamp(24px, 5vw, 56px); color: var(--white);
    background: linear-gradient(160deg, rgba(14, 36, 75, .96) 0%, rgba(20, 50, 102, .94) 55%, rgba(48, 108, 168, .92) 100%);
    opacity: 0; transition: opacity .35s ease; overflow-y: auto;
}
.member-overlay h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 700; margin-bottom: 6px; transform: translateY(10px); transition: transform .4s ease; }
.member-overlay .role { background: none; padding: 0; border-radius: 0; color: var(--blue); font-weight: 500; font-size: 1rem; margin-bottom: 18px; transform: translateY(10px); transition: transform .4s ease .04s; }
.member-overlay p { margin: 0; max-width: 460px; font-size: .98rem; line-height: 1.7; transform: translateY(10px); transition: transform .4s ease .08s; }
.member:hover .member-overlay, .member:focus-visible .member-overlay, .member.is-active .member-overlay { opacity: 1; }
.member:hover .member-overlay > *, .member:focus-visible .member-overlay > *, .member.is-active .member-overlay > * { transform: none; }

/* En pantallas táctiles: nombre visible y el detalle se abre al tocar */
.member-caption { display: none; }
@media (hover: none) {
    .member { cursor: pointer; }
    .member-caption {
        display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 56px 20px 18px; color: var(--white);
        background: linear-gradient(180deg, transparent, rgba(14, 36, 75, .92)); transition: opacity .3s;
    }
    .member-caption strong { display: block; font-size: 1.1rem; }
    .member-caption span { font-size: .85rem; color: var(--blue); }
    .member.is-active .member-caption { opacity: 0; }
}

/* ---------- Contacto ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-cards li {
    display: flex; align-items: center; gap: 18px; padding: 28px; border: 1px solid var(--line);
    border-top: 4px solid var(--blue); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(14, 36, 75, .07);
}
.contact-cards strong { display: block; color: var(--navy); font-weight: 700; }
.contact-cards a { text-decoration: none; word-break: break-word; }
.contact-cards a:hover { color: var(--blue); }
.f-ico {
    flex: none; width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, .45); color: var(--white);
}
.f-ico--light { border-color: transparent; background: var(--navy); color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--white); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: 36px 48px; }
.f-brand { grid-row: span 2; }
.site-footer h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; }
.site-footer p { margin: 0; color: rgba(255, 255, 255, .88); font-size: .98rem; line-height: 1.7; }
.f-links li + li { margin-top: 6px; }
.f-links a, .f-contact a { color: rgba(255, 255, 255, .9); text-decoration: none; transition: color .2s; }
.f-links a:hover, .f-contact a:hover { color: var(--blue); }
.f-strong { font-weight: 700; color: var(--white); }
.f-contact { margin-top: 26px; display: grid; gap: 16px; }
.f-contact li { display: flex; align-items: center; gap: 16px; }
.f-contact strong { display: block; font-weight: 700; line-height: 1.3; }
.f-contact a { display: block; }

.footer-bottom {
    margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14);
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
}
.copy { font-size: .92rem !important; }
.social { display: flex; gap: 20px; justify-content: center; }
.social a { color: var(--white); display: inline-flex; transition: color .2s, transform .2s; }
.social a:hover { color: var(--blue); transform: translateY(-2px); }
.footer-bottom .flags { justify-content: flex-end; }

/* ---------- Animaciones de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .steps { grid-template-columns: 1fr; gap: 28px; max-width: 640px; margin-inline: auto; }
    .step { display: flex; gap: 22px; text-align: left; align-items: flex-start; }
    .step-n { margin-bottom: 0; flex: none; }
    .step:not(:last-child)::after { top: 64px; left: 31px; width: 2px; height: calc(100% - 36px); background: repeating-linear-gradient(180deg, var(--blue) 0 8px, transparent 8px 14px); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .f-brand { grid-row: auto; grid-column: 1 / -1; }
}

@media (max-width: 960px) {
    .site-header .inner { grid-template-columns: 1fr auto; }
    .burger { display: inline-flex; }
    .main-nav {
        justify-self: stretch; width: 100%;
        position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--white);
        padding: 12px 24px 28px; border-top: 1px solid var(--line); box-shadow: 0 14px 24px rgba(14, 36, 75, .12);
        transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
    }
    .site-header.is-open .main-nav { transform: none; opacity: 1; visibility: visible; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { display: block; padding: 16px 0; font-size: .85rem; border-bottom: 1px solid var(--line); }
    .main-nav a:hover, .main-nav a.active, .site-header.is-open .main-nav a.active { border-color: var(--line); }
    .site-header.is-open .main-nav a.active { color: var(--blue); }

    .split { grid-template-columns: 1fr; }
    .split--reverse .split-media { order: 0; }
    .cards-3 { grid-template-columns: 1fr 1fr; }
    .contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    :root { --header-h: 72px; }
    .container { width: min(var(--container), 100% - 36px); }
    .brand img { height: 44px; }
    .flags svg { width: 24px; height: 17px; }
    .header-actions { gap: 8px; }
    .hero { min-height: 82vh; }
    .btn-row .btn { flex: 1 1 100%; }
    .cards-3, .cards-2 { grid-template-columns: 1fr; }
    .team { grid-template-columns: 1fr; }
    .team .member:last-child:nth-child(odd) { width: auto; }
    .card-row { flex-direction: column; }
    .logo-item { flex-basis: 150px; height: 90px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .footer-bottom .flags { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .card, .member, .btn { transition: none; }
}
