/* OKV · capa «impacto» (v1, 23-11-2026): rediseño visible con la misma marca (tinta, amarillo de obra, azul y Archivo).
   Pensada primero para el móvil, que es por donde entra la mayoría. Va DESPUÉS de okv-moderno.css.
   No cambia textos. Añade: cabecera a pantalla completa, cifras en mosaico, carruseles deslizables, fotos de obra
   con profundidad al bajar, franjas amarillas, cierre oscuro con foto y pasos en línea de tiempo.
   Para quitarla basta con borrar su <link>, su <script> y las <figure class="okv-foto"> de las páginas. */

:root {
    --okv-gutter: 26px;
    --okv-barra: 68px;            /* barra fija inferior del móvil (Llamar · WhatsApp · …) */
    --okv-cab: 82px;              /* cabecera fija */
}

/* ===================================================================================================== */
/* 1 · FOTOS DE OBRA A TODO ANCHO (todas las pantallas)                                                   */
/* ===================================================================================================== */
.okv-foto { position: relative; margin: 0; height: clamp(300px, 58svh, 620px); overflow: clip; background: var(--ink); isolation: isolate; }
.okv-foto picture, .okv-foto img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.okv-foto img { object-fit: cover; object-position: var(--okv-foco, 50% 50%); }
.okv-foto::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(12,15,20,.35) 0%, rgba(12,15,20,0) 28%, rgba(12,15,20,0) 58%, rgba(12,15,20,.82) 100%); }
.okv-foto figcaption { position: absolute; z-index: 2; left: var(--okv-gutter); right: var(--okv-gutter); bottom: 26px;
    display: flex; align-items: center; gap: 12px; color: #fff;
    font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.okv-foto figcaption::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--safety); box-shadow: 0 0 0 4px rgba(255,182,39,.25); }
.okv-foto > .hazard { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 8px; }
@media (min-width: 1081px) { .okv-foto figcaption { left: 56px; bottom: 40px; } }
/* Profundidad al bajar: la foto se mueve un poco más despacio que la página (solo con animaciones permitidas) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
    @media (prefers-reduced-motion: no-preference) {
        .okv-foto { view-timeline: --okv-foto block; }
        .okv-foto img { inset: -9% 0; height: 118%; animation: okv-paralaje linear both; animation-timeline: --okv-foto; animation-range: cover 0% cover 100%; }
        .okv-foto figcaption { animation: okv-rotulo linear both; animation-timeline: --okv-foto; animation-range: entry 40% cover 50%; }
    }
}
@keyframes okv-paralaje { from { transform: translateY(-7%); } to { transform: translateY(7%); } }
@keyframes okv-rotulo { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ===================================================================================================== */
/* 2 · «¿QUÉ ES OKV?» EN BANDA OSCURA, CONTINUANDO LA CABECERA                                               */
/* ===================================================================================================== */
.okv-resp { background: var(--ink); border-bottom: none; }
.okv-resp-grid { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.12); }
.okv-resp-item { background: #11151C; }
.okv-resp-item h2 { color: #fff; }
.okv-resp-item h2::before { content: ""; display: block; width: 34px; height: 7px; margin-bottom: 16px; background: var(--hazard); }
.okv-resp-item p { color: rgba(255,255,255,.74); }
.okv-resp-item p b { color: #fff; }

/* ===================================================================================================== */
/* 3 · FRANJAS DE LLAMADA EN AMARILLO DE OBRA                                                              */
/* ===================================================================================================== */
.cta-band { background: var(--safety); border-color: var(--ink); }
.cta-band p { color: var(--ink); }
.cta-band .sub { color: rgba(12,15,20,.78); }
.cta-band .tick { background: var(--ink); }
.cta-band .btn-lg-line { border-color: var(--ink); color: var(--ink); }

/* ===================================================================================================== */
/* 4 · CIERRE OSCURO CON FOTO («Nadie cambia de obra un martes…», «Una reunión y sabes…»)                   */
/* ===================================================================================================== */
.section:has(> .wrap > .closer) {
    position: relative; overflow: clip; color: #fff;
    background: linear-gradient(180deg, rgba(12,15,20,.86) 0%, rgba(12,15,20,.72) 45%, rgba(12,15,20,.94) 100%),
                url("/assets/foto/celosia-1280.webp") center / cover no-repeat, var(--ink);
}
.section:has(> .wrap > .closer) .closer { position: relative; }
.closer h2, .section:has(> .wrap > .closer) .h2 { color: #fff; }
.closer .lede { color: rgba(255,255,255,.8); }
.closer .lede b, .closer .lede strong { color: #fff; }
.closer .kicker { color: var(--cyan); }
.closer .btn-lg-line { color: #fff; border-color: rgba(255,255,255,.55); }
.closer .btn-lg-line:hover { border-color: var(--cyan); color: var(--cyan); }
.closer .btn-lg-ink { background: var(--cyan); color: var(--okv-sobre-cyan); }
.closer .btn-lg-ink:hover { background: #fff; color: var(--ink); }

/* ===================================================================================================== */
/* 5 · MÓVIL (hasta 760 px): aquí está casi todo el cambio                                                 */
/* ===================================================================================================== */
@media (max-width: 760px) {
    :root { --okv-gutter: 22px; }
    .wrap { padding: 0 var(--okv-gutter); }
    .section { padding: 64px 0; }

    /* --- 5.1 Cabecera a pantalla completa: la foto o el vídeo se ve arriba, el mensaje abajo --- */
    .hero.has-video { display: block; min-height: 0; padding: 0; background: var(--ink); }
    .hero.has-video .hero-media { bottom: auto; height: calc(100svh - var(--okv-barra)); min-height: 560px; }
    .hero.has-video .hero-media::after {
        background: linear-gradient(180deg, rgba(12,15,20,.6) 0%, rgba(12,15,20,.14) 16%, rgba(12,15,20,.28) 30%,
                    rgba(12,15,20,.74) 48%, rgba(12,15,20,.93) 68%, #0C0F14 100%);
    }
    /* Sombra suave bajo el texto: se lee aunque la foto sea clara (cielo, grúa amarilla) */
    .hero.has-video .kicker, .hero.has-video h1, .hero.has-video .hero-sub { text-shadow: 0 1px 2px rgba(12,15,20,.55), 0 2px 18px rgba(12,15,20,.45); }
    .hero.has-video .hero-inner { gap: 0; padding-top: 0; }
    .hero.has-video .hero-inner > div:first-child {
        min-height: calc(100svh - var(--okv-barra)); min-height: max(560px, calc(100svh - var(--okv-barra)));
        display: flex; flex-direction: column; justify-content: flex-end;
        padding: calc(var(--okv-cab) + 20px) 0 26px;
    }
    .hero.has-video .kicker { font-size: .6875rem; }
    .hero h1 { font-size: clamp(4rem, 22vw, 6.25rem); line-height: .84; letter-spacing: -.055em; margin-top: 16px; }
    .hero h1.h1-lema { font-size: clamp(2.25rem, 11.6vw, 3.25rem); line-height: .9; letter-spacing: -.045em; }
    .hero.has-video .hero-sub { margin-top: 18px; font-size: 1.0625rem; line-height: 1.5; }
    .hero.has-video .hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
    .hero.has-video .hero-cta > * { justify-content: center; text-align: center; min-height: 54px; padding: 16px 12px;
        font-size: .8125rem; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 8px; }
    .hero.has-video .hero-cta > :first-child { grid-column: 1 / -1; min-height: 60px; font-size: .9375rem; }
    .hero.has-video .hero-cta > :only-child, .hero.has-video .hero-cta > :last-child:nth-child(2) { grid-column: auto; }
    /* De la barra «En pantalla» queda solo el botón de pausa del vídeo (obligatorio para poder pararlo), arriba a la derecha */
    .hero-bar { left: auto; right: 14px; top: calc(var(--okv-cab) + 14px); bottom: auto; }
    .hero-bar > :not(.hero-pause) { display: none; }
    .hero.has-video > .hazard { position: relative; }

    /* --- 5.2 «Lo que puedes esperar»: de lista larga a mosaico de cifras --- */
    .hero.has-video .hero-inner > .panel { width: auto; }
    .hero.has-video .panel { margin: 0 calc(var(--okv-gutter) * -1); padding: 26px var(--okv-gutter) 34px; border: none;
        background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
    .hero.has-video .panel-head { border: none; padding-bottom: 14px; }
    .hero .panel > div:not(.panel-head) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); }
    .hero .panel .row, .hero .panel .attr { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px;
        padding: 16px 14px 18px; border: none; background: #11151C; }
    .hero .panel .row:last-child:nth-child(odd), .hero .panel .attr:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .hero .panel .row-k { font-size: .6875rem; letter-spacing: .12em; }
    .hero .panel .row-v { font-size: 1.25rem; line-height: 1.1; color: #fff; }

    /* --- 5.3 Títulos de sección más grandes --- */
    .h2 { font-size: clamp(2rem, 10.6vw, 2.75rem); line-height: .95; letter-spacing: -.045em; }
    .lede { font-size: 1rem; line-height: 1.6; }
    .okv-resp { padding: 40px 0; }
    .okv-resp-item { padding: 26px 22px 28px; }

    /* --- 5.4 Carruseles deslizables (los prepara okv-impacto.js; sin JS se quedan apilados como antes) --- */
    /* Las ofertas de la portada (.jobs-grid) se deslizan desde el principio, también con los esqueletos de carga:
       así la sección no cambia de alto cuando llegan de la API */
    .okv-carrusel, .jobs-grid { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 12px; margin: 34px calc(var(--okv-gutter) * -1) 0; padding: 4px var(--okv-gutter) 6px;
        overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-padding-inline: var(--okv-gutter);
        background: none; border: none; scrollbar-width: none; touch-action: pan-x pan-y; }
    .okv-carrusel::-webkit-scrollbar, .jobs-grid::-webkit-scrollbar { display: none; }
    .okv-carrusel > *, .jobs-grid > * { order: 0 !important; flex: 0 0 84%; scroll-snap-align: start; scroll-snap-stop: always; border: 1px solid var(--line-strong); min-width: 0; }
    .okv-carrusel.tiers > * { flex-basis: 88%; }
    /* Una sola tarjeta (sin ofertas o error de carga): a todo el ancho */
    .jobs-grid > :only-child { flex-basis: 100%; }
    @media (prefers-reduced-motion: no-preference) { .okv-carrusel { scroll-behavior: smooth; } }
    /* El que está a la vista se marca (borde de tinta + franja); los demás quedan un poco atrás */
    .okv-carrusel > [data-okv-actual] { border-color: var(--ink); box-shadow: inset 0 4px 0 var(--safety); }
    .okv-carrusel.tiers > .featured[data-okv-actual] { box-shadow: none; }
    /* Ofertas: tarjeta más alta y con el «Aplicar ahora» siempre abajo */
    .jobs-grid > .job-card { padding: 24px 22px 22px; min-height: 260px; }
    .jobs-grid .job-card h3 { font-size: 1.25rem; }
    .jobs-grid .job-foot { margin-top: auto; padding-top: 16px; }

    .okv-car-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
    .okv-car-ctrl[hidden] { display: none; }
    .okv-car-ctrl button { touch-action: manipulation; }
    .okv-car-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--ink); background: var(--white);
        color: var(--ink); font: 800 1.125rem/1 'Archivo', sans-serif; cursor: pointer; }
    .okv-car-btn:disabled { border-color: var(--line-strong); color: rgba(12,15,20,.3); cursor: default; }
    .okv-car-btn:focus-visible, .okv-car-puntos button:focus-visible { outline: 2px solid var(--cyan-dark); outline-offset: 3px; }
    /* Con muchas tarjetas (las 8 ofertas) los puntos pasan a una segunda línea antes que salirse de la pantalla */
    .okv-car-puntos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0; flex: 1; min-width: 0; }
    .okv-car-puntos button { width: 24px; height: 28px; padding: 0; border: none; background: none; cursor: pointer; display: grid; place-items: center; }
    .okv-car-puntos button::before { content: ""; width: 10px; height: 10px; background: var(--line-strong); transition: width .25s cubic-bezier(.23,1,.32,1), background-color .2s; }
    .okv-car-puntos button[aria-current="true"]::before { width: 20px; background: var(--ink); }   /* más ancho, no solo otro color */
    .section.alt .okv-car-btn { background: var(--surface); }

    /* Tarjetas de garantías dentro del carrusel: número grande */
    .okv-carrusel .guard { padding: 28px 22px 26px; background: var(--white); }
    .okv-carrusel .guard h3, .okv-carrusel .phase h3 { font-size: clamp(1.25rem, 6.2vw, 1.625rem); overflow-wrap: normal; }
    .okv-carrusel .phase { padding: 26px 22px; background: var(--white); }

    /* «INTERNACIONAL.» ocupa casi 9 veces el tamaño de la letra: el tamaño se calcula para que quepa entera */
    .hero-ti h1.h1-lema { font-size: min(3.25rem, calc((100vw - 2 * var(--okv-gutter)) / 9.2)); }
    #patrocinio .h2 { font-size: min(2.75rem, calc((100vw - 2 * var(--okv-gutter)) / 9.2)); }
    .tiers-one .tier h3 { font-size: min(1.875rem, calc((100vw - 2 * var(--okv-gutter) - 70px) / 9)); }

    /* --- 5.5 Pasos como línea de tiempo --- */
    .steps { display: block; margin-top: 34px; background: none; border: none; }
    .step { position: relative; padding: 0 0 30px 30px; background: none; border-left: 3px solid var(--ink); margin-left: 8px; }
    .step:last-child { padding-bottom: 0; border-left-color: transparent; }
    .step::before { content: ""; position: absolute; left: -11px; top: 0; width: 19px; height: 19px; background: var(--safety); border: 3px solid var(--ink); }
    .step:hover { background: none; }
    .step-n { font-size: .75rem; }
    .step h4 { margin-top: 8px; font-size: 1.25rem; line-height: 1.1; }

    /* --- 5.6 Franja amarilla: texto grande y botones a todo el ancho --- */
    .cta-band .wrap { padding-top: 30px; padding-bottom: 30px; gap: 20px; }
    .cta-band p { font-size: 1.625rem; line-height: 1; }
    .cta-band .acts { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 10px; }
    .cta-band .acts > * { justify-content: center; text-align: center; padding: 16px 10px; font-size: .8125rem; }

    /* --- 5.7 Cierre oscuro con la foto vertical --- */
    .section:has(> .wrap > .closer) {
        background: linear-gradient(180deg, rgba(12,15,20,.9) 0%, rgba(12,15,20,.66) 40%, rgba(12,15,20,.95) 100%),
                    url("/assets/foto/celosia-movil.webp") center / cover no-repeat, var(--ink);
        padding: 96px 0;
    }
    .closer { text-align: left; }
    .closer h2 { font-size: clamp(2.25rem, 11vw, 2.875rem); }
    .closer-cta { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .closer-cta > * { justify-content: center; text-align: center; }

    /* --- 5.8 Preguntas frecuentes: filas más cómodas para el dedo --- */
    .faq details { padding: 20px 0; }
    .faq details[open] { box-shadow: inset 3px 0 0 var(--safety); padding-left: 14px; }
    @media (prefers-reduced-motion: no-preference) { .faq details { transition: padding-left .25s cubic-bezier(.23,1,.32,1); } }

    /* --- 5.9 Formulario como tarjeta --- */
    .contact { border: none; background: none; gap: 14px; }
    .contact > div { border: 1px solid var(--line-strong); }
    .contact > div:first-child { box-shadow: inset 0 6px 0 var(--ink); }
    #formSubmit { width: 100%; min-height: 58px; }

    /* --- 5.10 Barra inferior fija: más legible y con zona segura del iPhone --- */
    .quickbar { padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(255,255,255,.94);
        backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
    .quickbar a { font-size: .6875rem; letter-spacing: .08em; min-height: 60px; }
    .quickbar a i { font-size: 1.0625rem; }
    .quickbar a:last-child { background: var(--ink); }
}

/* Teléfonos estrechos */
@media (max-width: 380px) {
    .hero:not(.hero-ti) h1.h1-lema { font-size: clamp(2rem, 10.8vw, 2.5rem); }
    .h2:not(#patrocinio .h2) { font-size: clamp(1.75rem, 10vw, 2.25rem); }
    .hero.has-video .hero-cta > * { font-size: .75rem; padding-inline: 8px; }
}

/* Utilidad para el aviso del carrusel */
.okv-oculto { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
    overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
