/* ==========================================================================
   Barrios Corporación — hoja única (reemplaza el template BeTheme + RevSlider)
   ========================================================================== */

:root {
    --gold: #bf9a6b;
    --gold-soft: #c29a6b;
    --cream: #f2e2ce;
    --bg: #0d0d0d;
    --surface: #181818;
    --ink: #ffffff;
    --muted: #9a9a9a;           /* antes #626262: no pasaba contraste sobre negro */
    --line: rgba(255, 255, 255, .12);

    --font: "Montserrat", Arial, sans-serif;
    --container: 1176px;
    --gutter: clamp(20px, 4vw, 40px);
    --header-h: 96px;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

    color-scheme: dark;
}

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

html {
    background: var(--bg);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
/* Compensa el header fijo al saltar a una sección. (No usar scroll-padding en
   <html>: desplaza la línea de tiempo del parallax.) */
section[id] { scroll-margin-top: 63px; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.75;
    color: var(--muted);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;   /* clip (no hidden) para no romper position: sticky */
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.2em; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 700; }
ul { list-style: none; margin: 0; padding: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; }

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

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

.gold { color: var(--gold); }

.rule {
    display: block;
    width: 50px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 40px;
}

.display {
    font-size: clamp(28px, 4.2vw, 50px);
    line-height: 1.2;
    text-transform: uppercase;
    text-wrap: balance;
}
.display--case { text-transform: none; }

.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink); }

.skip-link {
    position: absolute; left: 16px; top: -100px; z-index: 100;
    padding: 10px 16px; background: var(--gold); color: #111;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    isolation: isolate;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    max-width: none;
    padding-inline: clamp(20px, 4vw, 58px);
    transition: height 300ms var(--ease-out);
}
.site-header__logo img {
    width: 200px;
    transition: width 300ms var(--ease-out);
}
/* El fondo sólido va en una capa ::before y no en el header: un backdrop-filter
   en el header lo vuelve contenedor de los position: fixed de adentro y el
   panel del menú móvil quedaba recortado a la altura del header. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, .88);
    box-shadow: 0 1px 0 var(--line);
    opacity: 0;
    transition: opacity 250ms ease;
    pointer-events: none;
}
.site-header.is-solid::before { opacity: 1; }
@supports (backdrop-filter: blur(1px)) {
    .site-header::before { background: rgba(0, 0, 0, .72); backdrop-filter: blur(14px); }
}
.site-header.is-solid .site-header__inner { height: 64px; }
.site-header.is-solid .site-header__logo img { width: 140px; }

.nav__list { display: flex; gap: clamp(20px, 2.6vw, 40px); }
.nav__link {
    position: relative;
    display: block;
    padding: 6px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    transition: color 200ms ease;
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 300ms var(--ease-out);
}
.nav__link.is-current { color: var(--gold); }
.nav__link.is-current::after { transform: scaleX(1); transform-origin: left; }
@media (hover: hover) and (pointer: fine) {
    .nav__link:hover { color: var(--gold); }
    .nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
}

.nav:focus { outline: none; }
.menu-toggle { display: none; }
.nav-overlay { display: none; }

@media (max-width: 960px) {
    :root { --header-h: 72px; }
    .site-header__logo img { width: 150px; }
    .site-header.is-solid .site-header__logo img { width: 130px; }

    .menu-toggle {
        position: relative;
        z-index: 2;
        display: grid;
        place-content: center;
        gap: 6px;
        width: 44px; height: 44px;
        padding: 0;
        background: none;
        border: 0;
        cursor: pointer;
    }
    .menu-toggle span {
        display: block;
        width: 24px; height: 2px;
        background: var(--ink);
        transition: transform 250ms var(--ease-out), opacity 150ms ease;
    }
    .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(300px, 82vw);
        padding: 96px 32px 32px;
        background: #0a0a0a;
        border-left: 1px solid var(--line);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 400ms var(--ease-drawer), visibility 0s 400ms;
    }
    .nav.is-open {
        transform: none;
        visibility: visible;
        transition: transform 400ms var(--ease-drawer), visibility 0s;
    }
    .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
    .nav__link { padding: 12px 0; font-size: 18px; }
    .nav__link::after { display: none; }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(0, 0, 0, .6);
        opacity: 0;
        pointer-events: none;
        transition: opacity 300ms ease;
    }
    .nav-overlay[hidden] { display: none; }   /* el display:block de arriba le ganaba al atributo hidden */
    .nav-overlay.is-visible { opacity: 1; pointer-events: auto; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    background: #000;
}
.hero__media { position: absolute; inset: 0; }
.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1800ms var(--ease-in-out);
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
/* La saliente se queda opaca debajo mientras la nueva se funde encima */
.hero__slide.is-prev { opacity: 1; transition: none; }
.hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ken Burns: la imagen inactiva espera ampliada (se resetea cuando ya no se ve) */
    transform: scale(1.12);
    transition: transform 0s 1800ms;
}
.hero__slide.is-active img {
    transform: scale(1);
    transition: transform 9000ms var(--ease-out);
}
.hero__slide:nth-child(2) img { object-position: right center; }

.hero__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 22%),
        linear-gradient(0deg, rgba(13,13,13,.85) 0%, rgba(13,13,13,0) 30%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: clamp(28px, 4vh, 44px);
    height: 100%;
    padding: var(--header-h) var(--gutter) 140px;
}
.hero__cta { animation: hero-in 1200ms var(--ease-out) 700ms both; }
.hero__logo { width: min(960px, 78vw); }
.hero__logo img {
    width: 100%;
    animation: hero-in 1400ms var(--ease-out) 200ms both;
}

.hero__dots {
    position: absolute;
    right: clamp(16px, 2.5vw, 32px);
    top: 50%;
    z-index: 2;
    display: grid;
    gap: 14px;
    transform: translateY(-50%);
}
.hero__dot {
    position: relative;
    width: 3px;
    height: 44px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.25);
    cursor: pointer;
    overflow: hidden;
}
.hero__dot::before { content: ""; position: absolute; inset: -10px -14px; } /* área táctil */
.hero__dot span {
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scaleY(0);
    transform-origin: top;
}
.hero__dot.is-active span {
    animation: dot-progress var(--slide-ms, 7000ms) linear forwards;
}
.hero.is-paused .hero__dot.is-active span { animation-play-state: paused; }

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: clamp(28px, 5vh, 50px);
    z-index: 2;
    display: grid;
    justify-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 13px;
    letter-spacing: .18em;
    text-transform: uppercase;
    transform: translateX(-50%);
    animation: fade-up 1000ms var(--ease-out) 900ms both;
}
.scroll-cue__mouse {
    position: relative;
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 14px;
}
.scroll-cue__mouse span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 3px;
    height: 8px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--gold);
    animation: wheel 1800ms var(--ease-out) infinite;
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(32px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
@keyframes fade-up {
    from { opacity: 0; transform: translate(-50%, 16px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes wheel {
    0%   { opacity: 0; transform: translateY(0); }
    20%  { opacity: 1; }
    70%  { opacity: 0; transform: translateY(14px); }
    100% { opacity: 0; transform: translateY(14px); }
}
@keyframes dot-progress {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(80px, 10vw, 120px); }
.section--surface { background: var(--surface); }

.intro { max-width: 980px; margin: 0 auto clamp(56px, 7vw, 90px); }
.intro--center { text-align: center; }
.intro--center .rule { margin-inline: auto; }

/* Valores (servicios) */
.values {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 32px;
    text-align: center;
}
.value img { width: 64px; margin: 0 auto 28px; }
.value h3 {
    margin-bottom: 14px;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.2;
    text-transform: uppercase;
}
.value p { margin: 0; color: #d6d6d6; font-weight: 300; }

/* Nosotros */
.section--straw {
    background: var(--bg) url("../images/pic6.png") no-repeat center bottom;
    background-size: min(1920px, 140%) auto;
    padding-bottom: clamp(220px, 26vw, 420px);
}
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto clamp(60px, 8vw, 100px);
}
.feature { display: flex; align-items: flex-start; gap: 28px; }
.feature img { width: 84px; flex: none; }
.feature p {
    margin: 0;
    padding-bottom: 18px;
    font-size: 20px;
    line-height: 1.5;
    color: var(--ink);
    background: linear-gradient(var(--gold), var(--gold)) no-repeat left bottom / 50px 2px;
}

.about {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: clamp(32px, 6vw, 110px);
}
.about__side { font-size: 14px; }
.about__side .lead { margin-top: 1.6em; }
.link-gold {
    color: var(--gold);
    background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
    transition: background-size 400ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .link-gold:hover { background-size: 100% 1px; }
}

/* CTA */
.section--cta { padding-bottom: clamp(100px, 14vw, 200px); }
.mail-line {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 40px 0 0;
    color: #d6d6d6;
    font-size: 15px;
    font-weight: 300;
}
.mail-line img { width: 30px; flex: none; }
.mail-line a { color: var(--cream); font-weight: 500; overflow-wrap: anywhere; }

/* Proceso (intro de galería) */
.process {
    position: relative;
    overflow: hidden;
    padding-top: clamp(100px, 12vw, 170px);
    isolation: isolate;
}
.process__bg { position: absolute; inset: -12% 0; z-index: -1; }
.process__bg img { width: 100%; height: 100%; object-fit: cover; }
.process::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.1) 70%);
}
.process__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: end;
}
.process__title { padding: 0 0 clamp(60px, 8vw, 100px); }
.process__card { padding: 50px; color: var(--ink); }
.process__card-title { display: block; margin: 0 0 25px; font-size: 20px; line-height: 1.5; color: var(--ink); }
.process__card--gold {
    background: var(--gold-soft);
    clip-path: polygon(20px 0, 100% 0, 100% 100%, 0 100%, 0 20px);
    min-height: 210px;
}
.process__arrow { margin-top: 40px; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
    .process__card--gold:hover .process__arrow { transform: translateX(8px); }
}
.process__card--dark { background: #000; min-height: 430px; }
.process__card--dark .rule { margin-bottom: 25px; }
.process__card--dark p:last-child { margin: 0; color: #d6d6d6; font-size: 14px; }

/* Galería */
.gallery { background: var(--gold); padding-block: clamp(60px, 9vw, 140px) clamp(80px, 10vw, 170px); }
.gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.gallery__item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 960 / 700;
    background: #a8865c;
    cursor: zoom-in;
}
.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms var(--ease-out), filter 400ms ease;
}
.gallery__item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40"><circle cx="11" cy="11" r="6.5" fill="none" stroke="white" stroke-width="1.6"/><path d="M16 16l4.5 4.5M11 8.5v5M8.5 11h5" stroke="white" stroke-width="1.6" stroke-linecap="round"/></svg>') no-repeat center / 44px;
    opacity: 0;
    transition: opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
    .gallery__item:hover img { transform: scale(1.05); }
    .gallery__item:hover::after { opacity: 1; }
}

/* Contacto */
.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: var(--bg);
}
.contact__text { padding: clamp(60px, 8vw, 110px) 13%; }
.contact__text h2 { margin-bottom: 24px; }
.contact__media { align-self: stretch; overflow: hidden; }
.contact__media img { width: 100%; height: 100%; object-fit: cover; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #111;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 200ms ease, color 200ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; color: var(--gold); }
.btn--small { min-height: 40px; padding: 8px 18px; font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
    .btn:hover { background: var(--cream); border-color: var(--cream); color: #111; }
}

/* Footer */
.site-footer { background: var(--bg); color: #ccc; font-size: 14px; border-top: 1px solid var(--line); }
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    align-items: start;
    padding-block: 70px 50px;
}
.site-footer__grid img { width: 179px; }
.site-footer a { transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
    .site-footer a:hover { color: var(--gold); }
}
.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding-block: 24px 32px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: #888;
}
.site-footer__bottom p { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 20px; }
.linklike { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
    .linklike:hover { color: var(--gold); }
}

/* Volver arriba */
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background: #111;
    border: 1px solid var(--gold);
    color: var(--gold);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 250ms ease, transform 250ms var(--ease-out);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Lightbox ---------- */
.lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 8, 8, .94); }
.lightbox__img {
    position: absolute;
    inset: 0;
    margin: auto;
    max-width: min(92vw, 1600px);
    max-height: 84vh;
    width: auto;
    height: auto;
    object-fit: contain;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: rgba(0,0,0,.4);
    color: #fff;
    cursor: pointer;
    transition: background-color 200ms ease, border-color 200ms ease, transform 120ms var(--ease-out);
}
.lightbox__btn:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
    .lightbox__btn:hover { background: var(--gold); border-color: var(--gold); color: #111; }
}
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev  { left: 20px;  top: 50%; margin-top: -24px; }
.lightbox__next  { right: 20px; top: 50%; margin-top: -24px; }
.lightbox__count {
    position: absolute;
    left: 50%;
    bottom: 18px;
    margin: 0;
    transform: translateX(-50%);
    color: #bbb;
    font-size: 13px;
    letter-spacing: .12em;
}
.lightbox__chrome { transition: opacity 200ms ease; }

/* ---------- Aviso de cookies ---------- */
.cookies {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    max-width: 720px;
    margin-inline: auto;
    padding: 18px 22px;
    background: #141414;
    border: 1px solid var(--line);
    color: #ddd;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    transition: opacity 250ms ease, transform 250ms var(--ease-out);
}
.cookies[hidden] { display: none; }
.cookies.is-leaving { opacity: 0; transform: translateY(12px); }
.cookies p { flex: 1 1 320px; margin: 0; }
.cookies a { color: var(--gold); text-decoration: underline; }
.cookies__actions { display: flex; gap: 10px; }
@starting-style {
    .cookies { opacity: 0; transform: translateY(12px); }
}

/* ---------- Botón "Cotizar" del menú ---------- */
.nav__cta {
    padding: 9px 18px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 200ms ease, color 200ms ease, transform 120ms var(--ease-out);
}
.nav__cta:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
    .nav__cta:hover { background: var(--gold); color: #111; }
}
@media (min-width: 961px) { .nav__list { align-items: center; } }
.cta-actions { margin: 36px 0 0; }

/* CTA destacado de cotización (sección Contacto) */
.contact__actions .btn { flex: 1 1 auto; }
.quote-cta {
    position: relative;
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border: 0;
    background: linear-gradient(135deg, #d4b07f 0%, var(--gold) 55%, #a8814f 100%);
    color: #111;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 18px 40px -16px rgba(191, 154, 107, .55), inset 0 1px 0 rgba(255,255,255,.35);
    transition: transform 160ms var(--ease-out), box-shadow 300ms ease;
}
/* Brillo que cruza el botón una vez al aparecer y en cada hover */
.quote-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
    transform: translateX(-110%);
}
.quote-cta.is-shining::after { animation: sheen 1100ms var(--ease-in-out) 300ms both; }
.quote-cta:active { transform: scale(.98); }
.quote-cta__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: #111;
    color: var(--gold);
}
.quote-cta__text { display: grid; gap: 2px; }
.quote-cta__text strong { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.25; font-weight: 700; }
.quote-cta__text span { font-size: 13.5px; line-height: 1.45; color: rgba(17,17,17,.75); }
.quote-cta__arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(17,17,17,.6);
    border-radius: 50%;
    transition: transform 300ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
    .quote-cta:hover { box-shadow: 0 24px 50px -16px rgba(191, 154, 107, .75), inset 0 1px 0 rgba(255,255,255,.35); }
    .quote-cta:hover::after { animation: sheen 900ms var(--ease-in-out) both; }
    .quote-cta:hover .quote-cta__arrow { transform: translateX(4px); background: #111; color: var(--gold); border-color: #111; }
}
@keyframes sheen {
    from { transform: translateX(-110%); }
    to   { transform: translateX(110%); }
}
@media (max-width: 480px) {
    .quote-cta { grid-template-columns: auto 1fr; padding: 20px; gap: 14px; }
    .quote-cta__arrow { display: none; }
    .quote-cta__icon { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .quote-cta.is-shining::after,
    .quote-cta:hover::after { animation: none; }
}
@media (max-width: 960px) {
    .nav__cta { width: 100%; min-height: 48px; margin-top: 16px; font-size: 16px; }
}

/* ---------- Rutas: del Perú al mundo (sección fija con scroll) ---------- */
.routes { position: relative; margin-block: clamp(20px, 4vw, 60px); }
.routes__sticky { position: relative; }
.routes__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(24px, 4vh, 48px);
    position: relative;
    z-index: 2;
}
.routes__title {
    font-size: clamp(28px, 4.2vw, 50px);
    line-height: 1.15;
}
.routes__stage { overflow: hidden; }
.routes__map {
    position: relative;
    width: min(1080px, 100% - var(--gutter) * 2);
    margin-inline: auto;
    aspect-ratio: 1080 / 456;
}
.routes__dots, .routes__svg, .routes__glow { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Contador de destinos (solo con la animación activa) */
.routes__hud { display: none; margin: 0; text-align: right; }
.routes__hud-num { display: block; font-size: clamp(34px, 4vw, 54px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--gold); }
.routes__total { color: #4a4a4a; font-size: .5em; margin-left: 4px; }
/* Al conectar el último destino, el contador cede su lugar a «Para todo el mundo» */
.routes__hud-swap { display: grid; justify-items: end; align-items: end; }
.routes__hud-step, .routes__hud-final { grid-area: 1 / 1; transition: opacity 450ms ease, transform 700ms var(--ease-out), filter 450ms ease; }
.routes__hud-final { opacity: 0; transform: translateY(14px); filter: blur(6px); }
.routes__hud-big { display: block; font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.routes.is-all .routes__hud-step { opacity: 0; transform: translateY(-14px); filter: blur(6px); }
.routes.is-all .routes__hud-final { opacity: 1; transform: none; filter: none; }
.routes__hud-label { display: block; margin-top: 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.routes__bar { display: block; width: 100%; min-width: 160px; height: 2px; margin-top: 12px; background: #262626; overflow: hidden; }
.routes__bar-fill { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }
.routes__count.is-tick { animation: tick 500ms var(--ease-out); }
@keyframes tick { from { color: var(--cream); text-shadow: 0 0 18px rgba(242,226,206,.8); } }

/* Capa de luz: degradados que solo se ven donde hay puntos del mapa */
.routes__glow {
    display: none;
    pointer-events: none;
    -webkit-mask: url(../images/mapa-puntos.svg) 0 0 / 100% 100% no-repeat;
            mask: url(../images/mapa-puntos.svg) 0 0 / 100% 100% no-repeat;
}
.glow {
    position: absolute;
    width: 22%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #fff3e0 0, #e2bd8c 22%, rgba(191,154,107,.55) 45%, rgba(191,154,107,0) 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(.2);
    transition: opacity 700ms ease, transform 1100ms var(--ease-out);
}
.glow.is-on { opacity: .95; transform: translate(-50%, -50%) scale(1); }
.glow--origin { width: 30%; transition: none; }
.glow--wave {
    width: 40%;
    background: radial-gradient(circle, rgba(191,154,107,0) 48%, rgba(226,189,140,.9) 60%, #fff3e0 64%, rgba(191,154,107,0) 72%);
    transition: none;
}

/* Capas extra del trazo (las crea site.js) */
.route-glow { stroke: #bf9a6b; stroke-width: 11; opacity: .14; fill: none; stroke-linecap: round; }
.route-trail { stroke: #e2bd8c; stroke-width: 7; opacity: .35; fill: none; stroke-linecap: round; }
.route-head { stroke: #fff3e0; stroke-width: 3; fill: none; stroke-linecap: round; }
.route-flow {
    stroke: #fff3e0;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    opacity: 0;
    transition: opacity 600ms ease;
}
.routes.is-complete .route-flow { opacity: .9; }
.tip-halo { fill: #e2bd8c; opacity: 0; }
.dest__wave { opacity: 0; transform-box: fill-box; transform-origin: center; }
.routes__svg { overflow: visible; }
.origin__label {
    font: 500 15px var(--font);
    fill: var(--cream);
    letter-spacing: .04em;
}
.origin__pulse { transform-box: fill-box; transform-origin: center; opacity: 0; }
.tip { opacity: 0; }
.dest__dot, .dest__ring { transform-box: fill-box; transform-origin: center; }

/* Con JS + motion: la sección se fija y el scroll dibuja las rutas */
.routes.is-live { height: 300vh; height: 300svh; margin-block: 0; }
.routes.is-live .routes__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 64px;
}
.routes.is-live .dest__dot {
    opacity: 0;
    transform: scale(.4);
    transition: opacity 250ms ease, transform 450ms var(--ease-out);
}
.routes.is-live .dest.is-reached .dest__dot { opacity: 1; transform: none; }
.routes.is-live .dest__ring { opacity: 0; }
.routes.is-live .dest.is-reached .dest__ring { animation: ping 900ms var(--ease-out) both; }
.routes.is-live .dest.is-reached .dest__wave { animation: wave 1500ms var(--ease-out) both; }
.routes.is-live .dest.is-reached .dest__dot { animation: land 650ms var(--ease-out); }
.routes.is-live .routes__glow { display: block; }
/* Bordes suaves: con la cámara cerca, el mapa se desvanece en vez de cortarse */
.routes.is-live .routes__stage {
    padding-block: 28px;
    -webkit-mask: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent),
                  linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-composite: source-in;
            mask: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent),
                  linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
            mask-composite: intersect;
}
.routes.is-live .routes__hud { display: block; }
.routes.is-live .routes__map { transform-origin: 0 0; }   /* sin will-change: se rasterizaría a 1× y se vería borroso al acercar */
.routes.is-complete .origin > circle:nth-of-type(3) { animation: breathe 2600ms ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes wave {
    from { opacity: .7; transform: scale(1); stroke-width: 2.5; }
    to   { opacity: 0;  transform: scale(9); stroke-width: .4; }
}
@keyframes land {
    0%   { transform: scale(.4); }
    45%  { transform: scale(1.9); fill: #fff3e0; }
    100% { transform: scale(1); }
}
@keyframes breathe { 50% { transform: scale(1.25); } }
.routes.is-live .origin.is-on .origin__pulse { animation: pulse 2400ms var(--ease-out) infinite; }
.routes.is-live .origin.is-on .origin__pulse--late { animation-delay: 1200ms; }

@keyframes ping {
    from { opacity: .9; transform: scale(1); }
    to   { opacity: 0;  transform: scale(3.2); }
}
@keyframes pulse {
    0%   { opacity: .8; transform: scale(1); }
    100% { opacity: 0;  transform: scale(3.6); }
}

@media (max-width: 700px) {
    /* En móvil el mapa es más ancho que la pantalla y la "cámara" viaja de América a Asia */
    .routes.is-live .routes__map { width: 175vw; margin-inline: 0; }
    .routes__head { align-items: flex-start; flex-direction: column; gap: 18px; }
    .routes__hud { text-align: left; width: 100%; }
    .routes__hud-num { font-size: 34px; }
    .routes__hud-swap { justify-items: start; }
    .routes__hud-big { font-size: 28px; }
    .routes.is-live { height: 260vh; height: 260svh; }
    .origin__label { font-size: 22px; }
}

/* ---------- Cotización ---------- */
.quote {
    width: min(560px, 100vw - 32px);
    max-height: min(92vh, 860px);
    padding: 0;
    border: 1px solid var(--line);
    background: #121212;
    color: #cfcfcf;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.quote::backdrop { background: rgba(0,0,0,.65); transition: opacity 250ms ease; }
.quote.is-closing::backdrop { opacity: 0; }
@starting-style {
    .quote[open]::backdrop { opacity: 0; }
}
@supports (backdrop-filter: blur(1px)) {
    .quote::backdrop { backdrop-filter: blur(4px); }
}
.quote__panel {
    max-height: inherit;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 32px 32px 28px;
}
.quote__grip { display: none; }
.quote__head { position: relative; padding-right: 44px; margin-bottom: 22px; }
.quote__head h2 { font-size: 26px; line-height: 1.2; margin-bottom: 6px; }
.quote__head p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.quote__close {
    position: absolute;
    top: -6px;
    right: -8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: #aaa;
    cursor: pointer;
    transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .quote__close:hover { color: var(--ink); } }

.quote__form { display: grid; gap: 18px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.field legend, .field > label { padding: 0; font-size: 13px; font-weight: 500; color: var(--ink); letter-spacing: .02em; }
.field legend { margin-bottom: 8px; }
.req { color: var(--gold); }
.opt { color: #777; font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.quote input[type="text"],
.quote input[type="number"],
.quote input[type="tel"],
.quote input[type="email"],
.quote input[type="date"],
.quote textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid #333;
    border-radius: 0;
    background: #0b0b0b;
    color: var(--ink);
    font: inherit;
    font-size: 16px;            /* 16px evita el zoom automático en iOS */
    line-height: 1.4;
    transition: border-color 150ms ease;
}
.quote textarea { resize: vertical; min-height: 70px; }
.quote input:focus, .quote textarea:focus { outline: none; border-color: var(--gold); }
.quote input[aria-invalid="true"] { border-color: #e0795f; }
.quote input::placeholder, .quote textarea::placeholder { color: #666; }
.quote input[type="date"] { color-scheme: dark; }

.qty { display: grid; grid-template-columns: 46px 1fr 46px; }
.qty__input { text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty__input::-webkit-inner-spin-button, .qty__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty__step {
    border: 1px solid #333;
    background: #1a1a1a;
    color: var(--ink);
    font-size: 20px;
    cursor: pointer;
    transition: background-color 150ms ease, transform 100ms var(--ease-out);
}
.qty__step:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .qty__step:hover { background: #262626; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
    min-height: 34px;
    padding: 4px 14px;
    border: 1px solid #333;
    background: transparent;
    color: #bbb;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}
.chip.is-on { border-color: var(--gold); color: var(--gold); background: rgba(191,154,107,.08); }

/* Cantidad + unidad (TN / m³) en una fila */
.qty-row { display: grid; grid-template-columns: 1fr 132px; gap: 10px; }
.segmented--unit span { font-weight: 700; letter-spacing: .03em; }

/* Selección múltiple de EPPs: cada chip es un checkbox */
.chips--check { margin-top: 0; }
.chips--check .chip { position: relative; display: inline-flex; padding: 0; }
.chips--check input { position: absolute; opacity: 0; pointer-events: none; }
.chips--check .chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 14px; }
.chips--check input:checked + span { color: var(--gold); }
.chips--check input:checked + span::before { content: "✓"; font-weight: 700; }
.chips--check .chip:has(input:checked) { border-color: var(--gold); background: rgba(191,154,107,.08); }
.chips--check input:focus-visible + span { outline: 2px solid var(--cream); outline-offset: -3px; }
.chips--check[aria-invalid="true"] .chip { border-color: #e0795f; }
@media (hover: hover) and (pointer: fine) { .chips--check .chip:hover { color: var(--ink); border-color: #555; } }

/* Bloque de dirección agrupado */
.field--group { gap: 12px; padding: 16px; border: 1px solid #262626; background: #0e0e0e; }
.field--group > legend { float: left; width: 100%; margin-bottom: 4px; }
.field--group .field > label { font-size: 12px; color: #aaa; font-weight: 400; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #333; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
    display: grid;
    place-items: center;
    min-height: 46px;
    padding: 8px 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.3;
    transition: background-color 200ms ease, color 200ms ease;
}
.segmented input:checked + span { background: var(--gold); color: #111; font-weight: 500; }
.segmented input:focus-visible + span { outline: 2px solid var(--cream); outline-offset: -4px; }

.field[hidden] { display: none; }

.preview { padding: 14px; background: #0a1410; border: 1px solid #1d2e26; }
.preview__label { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6f8f80; }
.preview__bubble {
    margin: 0 0 0 auto;
    max-width: 92%;
    padding: 10px 12px;
    background: #134d37;
    color: #e9f5ee;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border-radius: 8px 0 8px 8px;
}
.quote__error { margin: 0; color: #f0957d; font-size: 14px; }
.quote__foot {
    position: sticky;
    bottom: -28px;
    display: grid;
    gap: 10px;
    margin: 0 -32px -28px;
    padding: 14px 32px 20px;
    background: linear-gradient(rgba(18,18,18,0), #121212 18px);
}
.quote__submit { width: 100%; gap: 10px; min-height: 52px; font-size: 16px; }
.quote__note { margin: 0; font-size: 12px; line-height: 1.5; color: #777; text-align: center; }
.quote__note a { color: #999; text-decoration: underline; }

/* Móvil: hoja inferior que se puede bajar arrastrando */
@media (max-width: 640px) {
    .quote {
        width: 100vw;
        max-width: none;
        max-height: 92vh;
        max-height: 92dvh;
        margin: auto 0 0;
        border-width: 1px 0 0;
        border-radius: 16px 16px 0 0;
    }
    .quote__panel { padding: 0 20px calc(20px + env(safe-area-inset-bottom)); }
    .quote__grip {
        display: grid;
        place-items: center;
        height: 28px;
        position: sticky;
        top: 0;
        z-index: 1;
        margin: 0 -20px 8px;
        background: #121212;
        cursor: grab;
        touch-action: none;
    }
    .quote__grip span { width: 40px; height: 5px; border-radius: 3px; background: #444; }
    .quote__head { touch-action: none; }
    .field-row { grid-template-columns: 1fr; }
    .qty-row { grid-template-columns: 1fr 110px; }
    .field--group { padding: 14px 12px; }
    .quote__foot { bottom: calc(-20px - env(safe-area-inset-bottom)); margin: 0 -20px calc(-20px - env(safe-area-inset-bottom)); padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .routes.is-live .dest__ring,
    .routes.is-live .origin.is-on .origin__pulse { animation: none; }
    .routes__glow, .routes__hud { display: none !important; }
}

/* ---------- Páginas simples (404, legales) ---------- */
.simple, .legal {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) var(--gutter);
}
.simple { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.simple img, .legal > a:first-child img { width: 180px; margin-bottom: 56px; }
.simple .lead { margin: 16px 0 32px; }
.simple .btn { align-self: flex-start; }
.legal h2 { margin: 2.2em 0 .6em; font-size: 19px; }
.legal ul { padding-left: 1.2em; list-style: disc; margin-bottom: 1.2em; }
.legal li { margin-bottom: .5em; }
.legal a:not(.btn) { color: var(--gold); text-decoration: underline; }
.legal strong { color: #ddd; }
.legal .btn { margin-top: 2em; }

/* ---------- Estado inicial de las entradas al hacer scroll ----------
   Solo se ocultan si hay JS (clase .js puesta por boot.js). Si motion no
   carga, site.js pone .no-motion y todo queda visible. */
.js:not(.no-motion) [data-reveal] { opacity: 0; }
/* El recorte va en la imagen interior: un elemento recortado del todo no lo
   detecta IntersectionObserver, así que se observa el contenedor. */
.js:not(.no-motion) [data-reveal="wipe"],
.js:not(.no-motion) [data-reveal="wipe-up"] { opacity: 1; }
.js:not(.no-motion) [data-reveal="wipe"] > img { clip-path: inset(0 100% 0 0); }
.js:not(.no-motion) [data-reveal="wipe-up"] > img { clip-path: inset(100% 0 0 0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .values { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: 1fr; max-width: 360px; }
    .about { grid-template-columns: 1fr; }
    .process__grid { grid-template-columns: 1fr 1fr; }
    .process__title { grid-column: 1 / -1; }
    .process__card--dark { min-height: 0; }
    .contact { grid-template-columns: 1fr; }
    .contact__text { padding-inline: var(--gutter); }
    .contact__media { aspect-ratio: 16 / 10; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__grid > img { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    body { font-size: 14px; }
    .values { grid-template-columns: 1fr; }
    .process__grid { grid-template-columns: 1fr; }
    .process__card { padding: 36px 28px; }
    .process__card--gold { min-height: 0; }
    .gallery__grid { grid-template-columns: 1fr; }
    .hero__dots { display: none; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .site-footer__bottom { flex-direction: column; }
    .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; margin-top: 0; }
    .lightbox__img { max-height: 76vh; }
}

/* ---------- Movimiento reducido: menos y más suave, no cero ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero__slide img,
    .hero__slide.is-active img { transform: none; transition: none; }
    .hero__logo img { animation: fade 600ms ease both; }
    .scroll-cue { animation: none; }
    .scroll-cue__mouse span { animation: none; }
    .gallery__item img { transition: none; }
    @media (hover: hover) and (pointer: fine) {
        .gallery__item:hover img { transform: none; }
    }
    .js:not(.no-motion) [data-reveal="wipe"],
    .js:not(.no-motion) [data-reveal="wipe-up"] { opacity: 0; }
    .js:not(.no-motion) [data-reveal="wipe"] > img,
    .js:not(.no-motion) [data-reveal="wipe-up"] > img { clip-path: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
