/* =====================================================================
   «Del dron a tu factura» (#vuelo) — la escena la pinta vuelo.js.

   .vu-track mide varias pantallas y .vu-stage se queda pegado arriba
   mientras se recorre: lo que se mueve es la escena, no la página.
   Ojo: position: sticky no funciona si html o body llevan
   overflow-x: hidden (body pasa a ser contenedor de scroll); por eso en
   styles.css van con overflow-x: clip.
   ===================================================================== */

.vu {
    --vu-ink: #1d1d1f;
    --vu-mute: #6e6a66;
    --vu-orange: #ff4500;
    --vu-teal: #2aa79e;
    --vu-cream: #fffcf9;
    position: relative;
    background: var(--vu-cream);
}

.vu-track {
    position: relative;
    height: 1000vh;
}
/* Dos secciones con la misma escena: la tecnología (7 pantallas) y los
   servicios (4). */
.vu--historia .vu-track { height: 700vh; }
.vu--modelos .vu-track { height: 400vh; }

.vu-stage {
    --vu-sky: #e9eff3;
    --vu-dim: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    /* El alto visible de verdad: en el móvil crece cuando el navegador
       esconde su barra al bajar. Con svh se quedaba en el alto con barra y
       abajo asomaba una franja vacía. vuelo.js reajusta el lienzo solo. */
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 70% 0%, var(--vu-sky) 0%, transparent 70%),
        var(--vu-base, var(--vu-cream));
    transition: background-color 0.3s;
}

.vu-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.vu-ready .vu-canvas { opacity: 1; }

/* Velo para leer la factura encima de la escena. */
.vu-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 252, 249, 0.92) 0%, rgba(255, 252, 249, 0.6) 40%, rgba(255, 252, 249, 0) 70%);
    /* Siempre un poco, para que el rótulo se lea sobre los árboles; del
       todo cuando sale la factura. */
    opacity: calc(0.5 + var(--vu-dim) * 0.5);
}

/* ---- Rótulos ---------------------------------------------------------- */
.vu-copy {
    position: absolute;
    z-index: 2;
    left: max(28px, 6vw);
    top: 50%;
    width: min(460px, 36vw);
    pointer-events: none;
}
.vu-cap {
    --vu-cap-y: -50%;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, -50%, 0);
    will-change: opacity, transform;
}
.vu-cap a, .vu-cap button { pointer-events: auto; }

.vu-eyebrow {
    margin: 0 0 14px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vu-orange);
}
.vu-h {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(34px, 4.1vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.035em;
    font-weight: 700;
    color: var(--vu-ink);
    text-wrap: balance;
}
.vu-p {
    margin: 18px 0 0;
    font-family: 'Satoshi', sans-serif;
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.5;
    color: var(--vu-mute);
    max-width: 30em;
    text-wrap: pretty;
}
.vu-p b { color: var(--vu-ink); font-weight: normal; }

/* ---- Indicadores sobre la escena ------------------------------------ */
.vu-hud {
    position: absolute;
    z-index: 2;
    right: max(28px, 5vw);
    bottom: 120px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 14px 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 12px 40px rgba(60, 40, 20, 0.1);
    font-family: 'Space Grotesk', sans-serif;
    color: var(--vu-ink);
    opacity: 0;
    visibility: hidden;
}
.vu-scan svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.vu-scan-track { fill: none; stroke: rgba(29, 29, 31, 0.08); stroke-width: 3; }
.vu-scan-ring {
    fill: none;
    stroke: var(--vu-teal);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100 100;
    stroke-dashoffset: 100;
    transition: stroke 0.4s;
}
.vu-scan.is-done .vu-scan-ring { stroke: var(--vu-orange); }
.vu-scan-txt { display: flex; flex-direction: column; line-height: 1.15; }
.vu-scan-num {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.vu-scan-num small { font-size: 14px; font-weight: 400; margin-left: 1px; }
.vu-scan-label {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vu-mute);
}

.vu-sun { padding: 12px 22px 14px; flex-direction: column; gap: 2px; }
.vu-sun svg { width: 132px; height: 70px; overflow: visible; }
.vu-sun-arc { fill: none; stroke: rgba(29, 29, 31, 0.14); stroke-width: 1.5; stroke-dasharray: 2 4; }
.vu-sun-ground { stroke: rgba(29, 29, 31, 0.18); stroke-width: 1.5; }
.vu-sun-dot { fill: #ffb24a; filter: drop-shadow(0 0 6px rgba(255, 150, 40, 0.9)); }
.vu-sun-time {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}
.vu-sun-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vu-mute);
}

/* ---- Pasos ---------------------------------------------------------- */
.vu-steps {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
}
.vu-steps-list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.vu-step {
    appearance: none;
    border: 0;
    background: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: rgba(29, 29, 31, 0.38);
    transition: color 0.3s, background-color 0.3s;
    white-space: nowrap;
}
.vu-step.is-past { color: rgba(29, 29, 31, 0.6); }
.vu-step.is-active { color: var(--vu-ink); background: rgba(29, 29, 31, 0.06); font-weight: 700; }
.vu-step:hover { color: var(--vu-ink); }
.vu-step:focus-visible { outline: 2px solid var(--vu-orange); outline-offset: 2px; }
.vu-steps-line { height: 2px; border-radius: 2px; background: rgba(29, 29, 31, 0.08); overflow: hidden; }
.vu-steps-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff4500, #ff8c42 60%, #6bdbd0);
    transform-origin: 0 50%;
    transform: scaleX(0);
}

.vu-hint {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 118px;
    transform: translateX(-50%);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vu-mute);
    pointer-events: none;
}
.vu-hint::after {
    content: '';
    width: 1.5px;
    height: 30px;
    background: linear-gradient(var(--vu-mute), transparent);
    animation: vuHint 1.8s ease-in-out infinite;
    transform-origin: top;
}
@keyframes vuHint {
    0% { transform: scaleY(0); opacity: 1; }
    60% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

/* ---- Factura --------------------------------------------------------- */
.vu-bill {
    margin-top: 26px;
    padding: 22px 24px 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 24px 60px rgba(60, 40, 20, 0.12), 0 2px 8px rgba(60, 40, 20, 0.05);
    font-family: 'Space Grotesk', sans-serif;
    color: var(--vu-ink);
}
.vu-bill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vu-mute);
}
.vu-bill-pct {
    font-size: 15px;
    letter-spacing: 0;
    font-weight: 700;
    color: var(--vu-teal);
    font-variant-numeric: tabular-nums;
}
.vu-bill-row { margin-top: 16px; }
.vu-bill-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    color: var(--vu-mute);
}
.vu-bill-amt {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--vu-ink);
    font-variant-numeric: tabular-nums;
}
.vu-bill-row.is-old .vu-bill-amt { color: rgba(29, 29, 31, 0.45); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.vu-bill-track { margin-top: 8px; height: 8px; border-radius: 8px; background: rgba(29, 29, 31, 0.06); overflow: hidden; }
.vu-bill-fill { height: 100%; border-radius: 8px; transform-origin: 0 50%; }
.vu-bill-row.is-old .vu-bill-fill { background: rgba(29, 29, 31, 0.22); }
.vu-bill-row.is-new .vu-bill-fill { background: linear-gradient(90deg, #ff4500, #ff8c42); }
.vu-bill-foot { margin: 14px 0 0; font-family: 'Satoshi', sans-serif; font-size: 12px; line-height: 1.45; color: var(--vu-mute); }
.vu-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 13px 24px;
    border-radius: 40px;
    background: var(--vu-orange);
    color: #fffcf9;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}
.vu-cta:hover { background: linear-gradient(90deg, #ff4500 0%, #ff6b35 32%, #ff8c42 58%, #6bdbd0 100%); transform: translateY(-1px); }

/* ---- Móvil: texto arriba, escena abajo ------------------------------ */
@media (max-width: 759px) {
    .vu-copy { left: 20px; right: 20px; top: 104px; width: auto; }
    .vu-cap { --vu-cap-y: 0px; transform: translate3d(0, 0, 0); }
    .vu-eyebrow { font-size: 11px; margin-bottom: 10px; }
    .vu-h { font-size: clamp(28px, 8.4vw, 38px); }
    .vu-p { font-size: 15px; margin-top: 12px; }
    .vu-hud { right: 50%; transform: translateX(50%); bottom: 92px; padding: 10px 16px 10px 10px; }
    .vu-sun { padding: 10px 18px 12px; }
    .vu-sun svg { width: 110px; height: 58px; }
    .vu-steps { bottom: 22px; left: 20px; right: 20px; transform: none; padding: 10px 14px; }
    .vu-steps-list { justify-content: space-between; }
    .vu-step { font-size: 0; padding: 0; width: 8px; height: 8px; border-radius: 50%; background: rgba(29, 29, 31, 0.15); }
    .vu-step.is-past { background: rgba(29, 29, 31, 0.35); }
    .vu-step.is-active { background: var(--vu-orange); }
    .vu-hint { bottom: 86px; }
    .vu-stage::after { background: linear-gradient(180deg, rgba(255, 252, 249, 0.94) 0%, rgba(255, 252, 249, 0.75) 55%, rgba(255, 252, 249, 0.2) 100%); }
    .vu-bill { margin-top: 18px; padding: 18px 18px 16px; }
    .vu-cta { margin-top: 16px; }
}

/* ---- Sin WebGL: los rótulos en columna, sin escena ----------------- */
.vu-nogl .vu-track { height: auto; }
.vu-nogl .vu-stage { position: relative; height: auto; padding: 120px 0 60px; }
.vu-nogl .vu-canvas, .vu-nogl .vu-hud, .vu-nogl .vu-steps, .vu-nogl .vu-hint { display: none; }
.vu-nogl .vu-copy { position: relative; top: 0; left: 0; width: auto; max-width: 560px; margin: 0 auto; padding: 0 24px; }
.vu-nogl .vu-cap { position: relative; opacity: 1; visibility: visible; transform: none; margin-bottom: 64px; }

/* ---- Los tres modelos ------------------------------------------------ */
.vu-facts {
    display: grid;
    gap: 0;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(29, 29, 31, 0.1);
    max-width: 30em;
}
.vu-facts li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(29, 29, 31, 0.1);
    font-family: 'Satoshi', sans-serif;
    font-size: 15px;
    color: var(--vu-ink);
    text-align: right;
}
.vu-facts b {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vu-mute);
    text-align: left;
    white-space: nowrap;
    padding-top: 2px;
}

/* Etiquetas pegadas a la escena: vuelo.js las coloca sobre su punto 3D. */
.vu-tags { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.vu-tag {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
}
.vu-tag span {
    position: absolute;
    left: 0;
    bottom: 22px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    box-shadow: 0 8px 26px rgba(40, 30, 20, 0.14);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1d1d1f;
    white-space: nowrap;
}
.vu-tag span::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vu-tag, #ff4500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vu-tag, #ff4500) 22%, transparent);
}
.vu-tag::after {
    content: '';
    position: absolute;
    left: -0.5px;
    bottom: 0;
    width: 1px;
    height: 22px;
    background: linear-gradient(rgba(29, 29, 31, 0.45), rgba(29, 29, 31, 0));
}
.vu-tag.is-grid { --vu-tag: #45d6ff; }
.vu-tag.is-own { --vu-tag: #2aa79e; }
.vu-tag.is-bat { --vu-tag: #2fbf9e; }

/* ---- De noche (final del modelo aislado) ------------------------------ */
.vu-stage.is-night { --vu-ink: #f4f1ec; --vu-mute: rgba(244, 241, 236, 0.66); }
.vu-stage.is-night::after {
    background: linear-gradient(90deg, rgba(22, 28, 42, 0.9) 0%, rgba(22, 28, 42, 0.55) 40%, rgba(22, 28, 42, 0) 70%);
}
.vu-stage.is-night .vu-facts, .vu-stage.is-night .vu-facts li { border-color: rgba(244, 241, 236, 0.16); }
.vu-stage.is-night .vu-steps { background: rgba(30, 37, 54, 0.62); }
.vu-stage.is-night .vu-step { color: rgba(244, 241, 236, 0.45); }
.vu-stage.is-night .vu-step.is-past { color: rgba(244, 241, 236, 0.7); }
.vu-stage.is-night .vu-step.is-active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.vu-stage.is-night .vu-steps-line { background: rgba(255, 255, 255, 0.12); }
.vu-stage.is-night .vu-tag::after { background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)); }

@media (max-width: 759px) {
    .vu-facts { margin-top: 14px; }
    .vu-facts li { font-size: 13px; padding: 7px 0; }
    .vu-tag span { font-size: 11px; padding: 6px 11px 6px 9px; }
    .vu-stage.is-night::after { background: linear-gradient(180deg, rgba(22, 28, 42, 0.94) 0%, rgba(22, 28, 42, 0.7) 55%, rgba(22, 28, 42, 0.15) 100%); }
    .vu-stage.is-night .vu-step { background: rgba(255, 255, 255, 0.2); }
    .vu-stage.is-night .vu-step.is-active { background: #ff4500; }
}

/* El cambio a noche llega a mitad del atardecer: el texto pasa a claro con
   una transición para que no salte. */
.vu-h, .vu-p, .vu-facts li, .vu-facts b, .vu-step { transition: color 0.6s ease, background-color 0.3s; }


/* Ventanas bajas de escritorio (portátil con la barra del navegador): los
   rótulos con tarjeta —factura, costo por 100 km— crecían hacia arriba hasta
   meterse bajo el logo. Titular algo menor, la nota de supuestos fuera y el
   bloque un poco más abajo. */
@media (min-width: 760px) and (max-height: 860px) {
    .vu-copy { top: calc(50% + 34px); }
    .vu-h { font-size: clamp(30px, 6.2vh, 54px); }
    .vu-p { margin-top: 12px; }
    .vu-bill { margin-top: 18px; padding: 16px 20px 14px; }
    .vu-facts { margin-top: 14px; }
    .vu-facts li { padding: 8px 0; }
}


