/* ==========================================================================
   Bcapital — main.css
   Capa visual del sitio corporativo. Marca: azul marino #111958 + dorado #F7C84A.
   Mobile-first. Cero dependencias externas. Tokens en :root.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens de diseño
   -------------------------------------------------------------------------- */
:root {
    /* Paleta de marca */
    --navy:            #111958;
    --navy-700:        #1b2576;
    --navy-600:        #2a368f;
    --navy-900:        #0c1240;
    --navy-950:        #080d2e;
    --gold:            #f7c84a;
    --gold-600:        #e8b52f;
    --gold-700:        #d6a31b;
    --white:           #ffffff;

    /* Acentos de tono para steps */
    --tone-pink:       #ec4d8f;
    --tone-green:      #2bb673;
    --tone-purple:     #7c5cdb;
    --tone-sky:        #2fa6e0;

    /* Superficies y fondos */
    --bg:              #ffffff;
    --bg-alt:          #f3f5fc;     /* tinte claro azulado para section--alt */
    --surface:         #ffffff;
    --surface-2:       #f7f9ff;

    /* Texto */
    --text-1:          #131b3e;     /* primario sobre claro */
    --text-2:          #4a5172;     /* secundario */
    --text-3:          #6b7191;     /* muted */
    --text-on-dark:    #ffffff;
    --text-on-dark-2:  rgba(255, 255, 255, 0.78);
    --text-on-dark-3:  rgba(255, 255, 255, 0.6);

    /* Bordes */
    --border-1:        rgba(17, 25, 88, 0.1);
    --border-2:        rgba(17, 25, 88, 0.18);
    --border-light:    rgba(255, 255, 255, 0.18);

    /* Sombras suaves azuladas */
    --shadow-1:        0 1px 2px rgba(17, 25, 88, 0.06), 0 2px 6px rgba(17, 25, 88, 0.06);
    --shadow-2:        0 8px 24px rgba(17, 25, 88, 0.1), 0 2px 6px rgba(17, 25, 88, 0.06);
    --shadow-3:        0 20px 48px rgba(17, 25, 88, 0.16), 0 6px 14px rgba(17, 25, 88, 0.08);
    --shadow-4:        0 32px 70px rgba(8, 13, 46, 0.28);
    --glow-gold:       0 0 0 4px rgba(247, 200, 74, 0.28);

    /* Tipografía */
    --font-sans:       "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Escala tipográfica fluida */
    --fs-eyebrow:      0.8125rem;
    --fs-sm:           clamp(0.875rem, 0.84rem + 0.18vw, 0.95rem);
    --fs-body:         clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --fs-lead:         clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    --fs-h3:           clamp(1.125rem, 1.04rem + 0.45vw, 1.375rem);
    --fs-h2:           clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem);
    --fs-h1:           clamp(2.25rem, 1.5rem + 3.4vw, 4rem);

    /* Espaciado (escala de 4) */
    --s-1:  4px;
    --s-2:  8px;
    --s-3:  12px;
    --s-4:  16px;
    --s-5:  24px;
    --s-6:  32px;
    --s-7:  48px;
    --s-8:  64px;
    --s-9:  96px;

    /* Radios generosos */
    --r-s:    10px;
    --r-m:    16px;
    --r-l:    22px;
    --r-xl:   30px;
    --r-pill: 999px;

    /* Layout */
    --container:       1200px;
    --header-h:        76px;
    --header-h-sm:     64px;

    /* Motion */
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snap: cubic-bezier(0.5, 0, 0.1, 1);
    --dur-xs:   90ms;
    --dur-s:    180ms;
    --dur-m:    280ms;
    --dur-l:    480ms;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--text-1);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

img { height: auto; }

a { color: inherit; }

button { font: inherit; color: inherit; }

h1, h2, h3 {
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-1);
}

p { color: var(--text-2); }

ul { list-style: none; padding: 0; }

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

/* --------------------------------------------------------------------------
   3. Utilidades / layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(var(--s-4), 4vw, var(--s-7));
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: var(--s-3);
    left: var(--s-3);
    z-index: 200;
    padding: var(--s-3) var(--s-5);
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    border-radius: var(--r-s);
    box-shadow: var(--shadow-3);
    transform: translateY(-150%);
    transition: transform var(--dur-s) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* Secciones */
.section {
    padding-block: clamp(var(--s-8), 9vw, var(--s-9));
    scroll-margin-top: calc(var(--header-h) + 12px);
}
.section--alt { background: var(--bg-alt); }
.section--contact {
    background:
        radial-gradient(120% 120% at 85% 0%, rgba(247, 200, 74, 0.12), transparent 55%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
    color: var(--text-on-dark);
}

[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Permite que las columnas de los grids encojan: sin esto, una imagen con
   width:100% aporta su ancho intrínseco como mínimo y desborda en móvil. */
.hero__inner > *,
.split > *,
.cta__inner > *,
.contact > * { min-width: 0; }

.section__head {
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: clamp(var(--s-6), 5vw, var(--s-8));
    text-align: center;
}
.section__eyebrow {
    display: inline-block;
    margin-bottom: var(--s-3);
    font-size: var(--fs-eyebrow);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-700);
}
.section--contact .section__eyebrow { color: var(--gold); }
.section__title { font-size: var(--fs-h2); }
.section--contact .section__title { color: var(--white); }
.section__lead {
    margin-top: var(--s-4);
    font-size: var(--fs-lead);
    color: var(--text-2);
}
.section--contact .section__lead { color: var(--text-on-dark-2); }
.section--contact .section__lead a { color: var(--gold); text-decoration: underline; }

/* --------------------------------------------------------------------------
   4. Iconos
   -------------------------------------------------------------------------- */
.icon {
    width: 22px;
    height: 22px;
    flex: none;
    color: currentColor;
}
.icon--sm { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   5. Botones
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: 0.75rem 1.4rem;
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--r-pill);
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--dur-s) var(--ease-out),
                box-shadow var(--dur-s) var(--ease-out),
                background-color var(--dur-s) var(--ease-out),
                color var(--dur-s) var(--ease-out),
                border-color var(--dur-s) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--lg {
    padding: 0.95rem 1.85rem;
    font-size: var(--fs-body);
}

.btn--accent {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 6px 18px rgba(247, 200, 74, 0.4);
}
.btn--accent:hover { background: var(--gold-600); box-shadow: 0 10px 26px rgba(247, 200, 74, 0.5); }

.btn--primary {
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-2);
}
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--shadow-3); }

.btn--ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--border-2);
}
.btn--ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.btn--ghost-dark {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.55);
}
.btn--ghost-dark:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* En la CTA amarilla, el ghost-dark debe leerse sobre dorado */
.cta .btn--ghost-dark {
    background: transparent;
    color: var(--navy);
    border-color: rgba(17, 25, 88, 0.5);
}
.cta .btn--ghost-dark:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* --------------------------------------------------------------------------
   6. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(17, 25, 88, 0.72);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background var(--dur-m) var(--ease-out),
                box-shadow var(--dur-m) var(--ease-out),
                border-color var(--dur-m) var(--ease-out);
}
.site-header.is-scrolled {
    background: rgba(12, 18, 64, 0.92);
    box-shadow: 0 8px 28px rgba(8, 13, 46, 0.35);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    height: var(--header-h);
    transition: height var(--dur-m) var(--ease-out);
}
.is-scrolled .nav { height: var(--header-h-sm); }

.nav__brand {
    display: inline-flex;
    align-items: center;
    flex: none;
}
.nav__brand img {
    height: 38px;
    width: auto;
    transition: height var(--dur-m) var(--ease-out);
}
.is-scrolled .nav__brand img { height: 32px; }

/* Toggle hamburguesa (móvil) */
.nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-s);
    cursor: pointer;
}
.nav__burger,
.nav__burger::before,
.nav__burger::after {
    content: "";
    display: block;
    width: 22px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform var(--dur-s) var(--ease-out),
                opacity var(--dur-s) var(--ease-out);
}
.nav__burger { position: relative; }
.nav__burger::before { position: absolute; top: -7px; }
.nav__burger::after  { position: absolute; top: 7px; }

/* Estado abierto → X (la clase is-open vive en el menú; usamos :has como refuerzo
   y el JS también marca aria-expanded en el toggle) */
.nav__toggle[aria-expanded="true"] .nav__burger { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__burger::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__burger::after  { top: 0; transform: rotate(-45deg); }

/* Menú: en móvil panel desplegable */
.nav__menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: grid;
    gap: var(--s-4);
    padding: var(--s-5) clamp(var(--s-4), 4vw, var(--s-7)) var(--s-6);
    background: rgba(12, 18, 64, 0.98);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-4);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--dur-s) var(--ease-out),
                transform var(--dur-s) var(--ease-out),
                visibility var(--dur-s);
}
.nav__menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.nav__list {
    display: grid;
    gap: var(--s-2);
}
.nav__link {
    position: relative;
    display: inline-block;
    padding: var(--s-2) 0;
    color: var(--text-on-dark-2);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--dur-s) var(--ease-out);
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 2px;
    width: 100%; height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-s) var(--ease-out);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__cta { justify-self: start; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    padding-top: calc(var(--header-h) + clamp(var(--s-7), 8vw, var(--s-9)));
    padding-bottom: clamp(var(--s-8), 9vw, var(--s-9));
    overflow: hidden;
    color: var(--text-on-dark);
    background:
        radial-gradient(110% 120% at 75% 0%, var(--navy-700) 0%, transparent 55%),
        linear-gradient(165deg, var(--navy-900) 0%, var(--navy) 48%, var(--navy-700) 100%);
}
.hero__glow {
    position: absolute;
    z-index: -1;
    top: -10%;
    right: -6%;
    width: min(560px, 70vw);
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(247, 200, 74, 0.45), rgba(247, 200, 74, 0) 70%);
    filter: blur(20px);
    pointer-events: none;
    animation: glowPulse 9s var(--ease-out) infinite;
}

.hero__inner {
    display: grid;
    gap: clamp(var(--s-7), 7vw, var(--s-8));
    align-items: center;
}
.hero__copy { max-width: 620px; }

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-bottom: var(--s-5);
    padding: var(--s-2) var(--s-4);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--gold);
    background: rgba(247, 200, 74, 0.12);
    border: 1px solid rgba(247, 200, 74, 0.3);
    border-radius: var(--r-pill);
}
.hero__title {
    font-size: var(--fs-h1);
    color: var(--white);
    margin-bottom: var(--s-5);
}
.hero__subtitle {
    font-size: var(--fs-lead);
    color: var(--text-on-dark-2);
    max-width: 52ch;
    margin-bottom: var(--s-6);
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    margin-bottom: var(--s-7);
}
/* En el hero (fondo oscuro) el ghost debe verse claro */
.hero .btn--ghost {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.45);
}
.hero .btn--ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-5);
}
.hero__badges li {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-sm);
    color: var(--text-on-dark-2);
}
.hero__badges .icon { color: var(--gold); }

.hero__art {
    position: relative;
    justify-self: center;
}
.hero__art-laptop {
    width: 100%;
    max-width: 640px;
    height: auto;
    filter: drop-shadow(0 30px 50px rgba(8, 13, 46, 0.5));
    animation: floatY 6s ease-in-out infinite;
}
.hero__art-pan {
    position: absolute;
    z-index: -1;
    bottom: -8%;
    left: -8%;
    width: clamp(110px, 22vw, 220px);
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(8, 13, 46, 0.45));
    animation: floatY 7.5s ease-in-out infinite reverse;
}

/* --------------------------------------------------------------------------
   8. Steps
   -------------------------------------------------------------------------- */
.steps {
    display: grid;
    gap: clamp(var(--s-5), 3vw, var(--s-6));
}
.step {
    --tone: var(--navy);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    padding: var(--s-6);
    background: var(--surface);
    border: 1px solid var(--border-1);
    border-radius: var(--r-l);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    transition: transform var(--dur-m) var(--ease-out),
                box-shadow var(--dur-m) var(--ease-out);
}
.step::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 5px; height: 100%;
    background: var(--tone);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-3); }

.step--pink   { --tone: var(--tone-pink); }
.step--green  { --tone: var(--tone-green); }
.step--purple { --tone: var(--tone-purple); }
.step--sky    { --tone: var(--tone-sky); }

.step__media {
    position: relative;
    width: fit-content;
}
.step__media img {
    width: 96px; height: 96px;
    object-fit: cover;
    border-radius: var(--r-m);
    box-shadow: var(--shadow-1);
}
.step__num {
    position: absolute;
    right: -10px; bottom: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--white);
    background: var(--tone);
    border: 3px solid var(--surface);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-2);
}
.step__title { font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.step__body p { color: var(--text-2); }

/* --------------------------------------------------------------------------
   9. Split (texto / imagen)
   -------------------------------------------------------------------------- */
.split {
    display: grid;
    gap: clamp(var(--s-6), 6vw, var(--s-8));
    align-items: center;
}
.split__copy > .section__eyebrow { text-align: left; }
.split__copy .section__title { margin-bottom: var(--s-4); }
.split__copy p { margin-bottom: var(--s-4); }
.split__copy .btn { margin-top: var(--s-3); }
.split__art { justify-self: center; width: 100%; }

/* Frame */
.frame {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding: var(--s-3);
    background: var(--surface);
    border: 1px solid var(--border-1);
    border-radius: var(--r-l);
    box-shadow: var(--shadow-3);
    transition: transform var(--dur-m) var(--ease-out), box-shadow var(--dur-m) var(--ease-out);
}
.frame img { border-radius: var(--r-m); width: 100%; height: auto; }
/* En "Beneficios al usar Bcapital" el marco va en azul marino, con más aire alrededor de la laptop */
#benefits .frame {
    background: var(--navy);
    border-color: var(--navy-700);
    padding: clamp(var(--s-5), 4vw, var(--s-7));
}
/* El tilt solo en desktop: rotar un marco full-width en móvil reintroduce overflow */
.frame--tilt:hover,
.frame--tilt-left:hover { transform: rotate(0); box-shadow: var(--shadow-4); }

/* --------------------------------------------------------------------------
   10. CTA (banda amarilla)
   -------------------------------------------------------------------------- */
.cta {
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.4), transparent 50%),
        var(--gold);
    color: var(--navy);
    padding-block: clamp(var(--s-7), 7vw, var(--s-9));
    scroll-margin-top: calc(var(--header-h) + 12px);
}
.cta__inner {
    display: grid;
    gap: clamp(var(--s-6), 5vw, var(--s-8));
    align-items: center;
}
.cta__copy { max-width: 640px; }
.cta__logo {
    width: auto;
    height: 56px;
    margin-bottom: var(--s-5);
    padding: var(--s-3) var(--s-4);
    background: var(--navy);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-2);
}
.cta__title { font-size: var(--fs-h2); color: var(--navy); margin-bottom: var(--s-4); }
.cta__copy p { color: rgba(17, 25, 88, 0.82); margin-bottom: var(--s-4); }
.cta__hint { font-size: var(--fs-lead); color: var(--navy) !important; }
.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    margin-top: var(--s-5);
}
.cta__art { justify-self: center; }
.cta__art img {
    width: 100%;
    max-width: 420px;
    height: auto;
    filter: drop-shadow(0 26px 44px rgba(17, 25, 88, 0.28));
    animation: floatY 7s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   11. Reasons
   -------------------------------------------------------------------------- */
.reasons {
    display: grid;
    gap: var(--s-5);
    margin-top: var(--s-6);
}
.reason {
    display: flex;
    align-items: flex-start;
    gap: var(--s-4);
}
.reason__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 52px; height: 52px;
    color: var(--white);
    background: linear-gradient(140deg, var(--navy-600), var(--navy));
    border-radius: var(--r-m);
    box-shadow: var(--shadow-2);
}
.reason__icon .icon { width: 24px; height: 24px; }
.reason__title { font-size: var(--fs-h3); margin-bottom: var(--s-1); }
.reason p { color: var(--text-2); }

/* --------------------------------------------------------------------------
   12. Benefits
   -------------------------------------------------------------------------- */
.benefits {
    display: grid;
    gap: var(--s-3) var(--s-5);
    margin-block: var(--s-5) var(--s-6);
}
.benefits li {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-weight: 600;
    color: var(--text-1);
}
.benefits .icon {
    color: var(--gold-700);
    background: rgba(247, 200, 74, 0.18);
    border-radius: var(--r-pill);
    padding: 5px;
    width: 26px; height: 26px;
}
.benefits--compact { grid-template-columns: 1fr; gap: var(--s-3); }

/* --------------------------------------------------------------------------
   13. Phones
   -------------------------------------------------------------------------- */
.phones {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 420px;
}
.phones__front,
.phones__back {
    width: clamp(180px, 40vw, 240px);
    height: auto;
    border-radius: var(--r-l);
    filter: drop-shadow(0 24px 40px rgba(17, 25, 88, 0.25));
}
.phones__back {
    position: absolute;
    top: 8%;
    left: 8%;
    transform: rotate(-8deg);
    opacity: 0.92;
    animation: floatY 8s ease-in-out infinite;
}
.phones__front {
    position: relative;
    z-index: 1;
    transform: rotate(3deg);
    animation: floatY 6.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   14. Video trigger + modal
   -------------------------------------------------------------------------- */
.video-trigger {
    position: relative;
    display: inline-block;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    border-radius: var(--r-l);
    line-height: 0;
}
.video-trigger img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: var(--r-l);
    filter: drop-shadow(0 24px 44px rgba(17, 25, 88, 0.28));
    transition: transform var(--dur-m) var(--ease-out);
}
.video-trigger:hover img { transform: translateY(-4px) scale(1.01); }
.video-trigger__play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px; height: 76px;
    color: var(--navy);
    background: var(--gold);
    border-radius: var(--r-pill);
    box-shadow: 0 12px 30px rgba(17, 25, 88, 0.35);
    transition: transform var(--dur-m) var(--ease-out), box-shadow var(--dur-m) var(--ease-out);
}
.video-trigger__play .icon { width: 30px; height: 30px; margin-left: 3px; }
.video-trigger:hover .video-trigger__play,
.video-trigger:focus-visible .video-trigger__play {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 16px 38px rgba(247, 200, 74, 0.55), 0 0 0 10px rgba(247, 200, 74, 0.18);
}

.video-modal {
    position: fixed;
    inset: 0;
    margin: auto;                 /* centrado robusto en ambos ejes */
    width: min(960px, 92vw);
    max-width: 92vw;
    height: -moz-fit-content;
    height: fit-content;
    max-height: 90vh;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}
.video-modal::backdrop {
    background: rgba(8, 13, 46, 0.78);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
/* Fallback cuando <dialog> no soporta showModal: usar clase is-open */
.video-modal.is-open {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    width: 100vw; max-width: 100vw; height: 100vh;
    background: rgba(8, 13, 46, 0.82);
}
.video-modal.is-open .video-modal__player { width: min(960px, 92vw); }
.video-modal[open] { animation: modalIn var(--dur-m) var(--ease-out); }

.video-modal__player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--r-m);
    box-shadow: var(--shadow-4);
}
.video-modal__close {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--navy);
    background: var(--white);
    border: 0;
    border-radius: var(--r-pill);
    cursor: pointer;
    box-shadow: var(--shadow-3);
    transition: transform var(--dur-s) var(--ease-out);
}
.video-modal__close:hover { transform: scale(1.08); }

/* --------------------------------------------------------------------------
   15. Contacto
   -------------------------------------------------------------------------- */
.contact {
    display: grid;
    gap: clamp(var(--s-6), 5vw, var(--s-7));
    align-items: start;
}
.contact__form {
    display: grid;
    gap: var(--s-5);
    padding: clamp(var(--s-5), 4vw, var(--s-7));
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--r-l);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.field { display: grid; gap: var(--s-2); }
.field label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-on-dark);
}
.field label span { color: var(--text-on-dark-3); font-weight: 500; }
.field input,
.field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: var(--fs-sm);
    color: var(--white);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-light);
    border-radius: var(--r-s);
    transition: border-color var(--dur-s) var(--ease-out),
                box-shadow var(--dur-s) var(--ease-out),
                background-color var(--dur-s) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.45); }
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--glow-gold);
}

/* Honeypot: fuera de pantalla, NO display:none */
.field--hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px; height: 1px;
    overflow: hidden;
}

.contact__submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-4);
}
.contact__alt {
    color: var(--gold);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.contact__status {
    margin-top: var(--s-1);
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-s);
    font-weight: 600;
    border: 1px solid transparent;
}
.contact__status.is-ok {
    color: #d6ffe8;
    background: rgba(43, 182, 115, 0.18);
    border-color: rgba(43, 182, 115, 0.5);
}
.contact__status.is-error {
    color: #ffd9dd;
    background: rgba(236, 77, 77, 0.18);
    border-color: rgba(236, 77, 77, 0.5);
}

.contact__aside {
    padding: clamp(var(--s-5), 4vw, var(--s-6));
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-light);
    border-radius: var(--r-l);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.contact__aside h3 { color: var(--white); margin-bottom: var(--s-4); font-size: var(--fs-h3); }
.contact__aside .benefits li { color: var(--text-on-dark); font-weight: 500; }
.contact__aside .benefits .icon {
    color: var(--gold);
    background: rgba(247, 200, 74, 0.16);
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--navy-950);
    color: var(--text-on-dark-2);
    padding-block: clamp(var(--s-8), 8vw, var(--s-9)) var(--s-6);
}
.clients { text-align: center; margin-bottom: var(--s-8); }
.clients__title {
    font-size: var(--fs-h2);
    color: var(--white);
    margin-bottom: clamp(var(--s-6), 4vw, var(--s-7));
}
.clients__title span { color: var(--gold); }
.clients__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-5);
    max-width: 880px;
    margin-inline: auto;
}
.clients__item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
    background: var(--white);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-2);
    transition: transform var(--dur-m) var(--ease-out);
}
.clients__item:hover { transform: translateY(-4px); }
.clients__item img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-4);
    padding-top: var(--s-7);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}
.footer__logo { height: 40px; width: auto; }
.footer__copy { color: var(--text-on-dark-3); font-size: var(--fs-sm); }
.footer__copy a { color: var(--gold); font-weight: 600; text-decoration: none; }
.footer__copy a:hover { text-decoration: underline; }

/* Botón to-top */
.to-top {
    position: fixed;
    /* A la izquierda para no encimarse con el widget de chat (Tawk.to, abajo-derecha) */
    left: clamp(var(--s-4), 4vw, var(--s-6));
    bottom: clamp(var(--s-4), 4vw, var(--s-6));
    z-index: 90;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px; height: 50px;
    color: var(--navy);
    background: var(--gold);
    border-radius: var(--r-pill);
    box-shadow: 0 10px 26px rgba(8, 13, 46, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    transition: opacity var(--dur-m) var(--ease-out),
                transform var(--dur-m) var(--ease-out),
                visibility var(--dur-m),
                background-color var(--dur-s) var(--ease-out);
}
.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.to-top:hover { background: var(--gold-600); transform: translateY(-3px) scale(1.04); }

/* --------------------------------------------------------------------------
   17. Scroll reveal
   -------------------------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity var(--dur-l) var(--ease-out),
                transform var(--dur-l) var(--ease-out);
    will-change: opacity, transform;
}
[data-reveal].is-visible {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* --------------------------------------------------------------------------
   18. Keyframes
   -------------------------------------------------------------------------- */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
/* El float de los phones debe preservar su rotación */
.phones__front { animation-name: floatYFront; }
.phones__back  { animation-name: floatYBack; }
@keyframes floatYFront {
    0%, 100% { transform: rotate(3deg) translateY(0); }
    50%      { transform: rotate(3deg) translateY(-12px); }
}
@keyframes floatYBack {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50%      { transform: rotate(-8deg) translateY(-10px); }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.1); }
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   19. Breakpoints
   -------------------------------------------------------------------------- */
/* Refinamientos para móvil (< 640px) */
@media (max-width: 639px) {
    .section { padding-block: clamp(var(--s-7), 13vw, var(--s-8)); }

    /* Botones de acción a todo el ancho: tap targets cómodos y layout limpio */
    .hero__actions .btn,
    .cta__actions .btn,
    #download .hero__actions .btn { flex: 1 1 100%; }
    .hero__actions,
    .cta__actions { gap: var(--s-3); }
    .contact__submit { flex-direction: column; align-items: stretch; }
    .contact__submit .btn { width: 100%; }
    .contact__alt { text-align: center; }

    /* Imágenes de arte un poco más contenidas y centradas */
    .cta__art img,
    .split__art { max-width: 360px; margin-inline: auto; }

    /* Marca del nav un pelo más pequeña */
    .nav__brand img { max-width: 132px; }
}

@media (min-width: 640px) {
    .steps    { grid-template-columns: repeat(2, 1fr); }
    .benefits { grid-template-columns: repeat(2, 1fr); }
    .step { flex-direction: row; align-items: flex-start; }
    .step__body { flex: 1; }
}

@media (min-width: 900px) {
    .hero__inner   { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
    .split         { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .split--reverse .split__art { order: 2; }
    .cta__inner    { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); }
    .contact       { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr); }
    .clients__grid { grid-template-columns: repeat(4, 1fr); }
    .footer__bottom { flex-direction: row; justify-content: space-between; }

    /* El tilt de los marcos solo en desktop */
    .frame--tilt      { transform: rotate(2.2deg); }
    .frame--tilt-left { transform: rotate(-2.2deg); }
    /* El marco se ajusta a su imagen (no estira imágenes pequeñas) */
    .frame { width: fit-content; }

    /* Nav horizontal en desktop: el menú deja de ser panel */
    .nav__toggle { display: none; }
    .nav__menu {
        position: static;
        display: flex;
        align-items: center;
        gap: var(--s-6);
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav__list { grid-auto-flow: column; gap: var(--s-6); }
    .nav__cta { justify-self: auto; }
}

@media (min-width: 1200px) {
    .benefits:not(.benefits--compact) { gap: var(--s-4) var(--s-6); }
}

/* --------------------------------------------------------------------------
   20. Preferencias de usuario
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1 !important; transform: none !important; }
    .hero__art-laptop,
    .hero__art-pan,
    .hero__glow,
    .cta__art img,
    .phones__front,
    .phones__back { animation: none !important; }
    /* Conservar rotaciones estáticas de los phones */
    .phones__front { transform: rotate(3deg); }
    .phones__back  { transform: rotate(-8deg); }
}

@media (prefers-contrast: more) {
    .step,
    .frame,
    .contact__form,
    .contact__aside { border-width: 2px; border-color: var(--navy); }
    .field input,
    .field textarea { border-color: rgba(255, 255, 255, 0.6); }
    .nav__link { color: var(--white); }
}
