/* Concepto: cinco maneras de integrar las fotos A (frente vertical) y B (faro + bus lateral) en flota.html.
   Misma paleta y tipografías que el sitio: azul marino de marca, rojo Casanova, Bebas Neue + Poppins. */
:root {
  --bg: #070a14;
  --bg-2: #0c1226;
  --card: #111a36;
  --fg: #f0f4ff;
  --fg-2: #a8b8d8;
  --muted: #6a7fa8;
  --line: rgba(255,255,255,.1);
  --accent: #e0001b;
  --bus: #2a9df4;
  --stage: #0b0d12;
  --font-title: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bar-h: 52px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 8px); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 15px; line-height: 1.6;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bus); outline-offset: 3px; }

.gutter {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.inner { max-width: 1180px; margin: 0 auto; }

/* Barra del demo */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  height: var(--bar-h); display: flex; align-items: center;
  background: rgba(7,10,20,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar .inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar__brand { font-family: var(--font-title); font-size: 22px; letter-spacing: .06em; white-space: nowrap; }
.bar__brand span { color: var(--accent); }
.bar__home {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--accent); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
}
.bar__home:hover { background: #b30016; }
.bar nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.bar nav a {
  color: var(--fg-2); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap;
}
.bar nav a:hover { color: var(--fg); border-color: var(--bus); }

/* Encabezado de cada opción */
.opt { padding-block: 56px 20px; }
.opt__tag {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--bus);
  margin: 0 0 6px;
}
.opt__title { font-family: var(--font-title); font-weight: 400; font-size: clamp(34px, 6vw, 56px); line-height: 1; margin: 0 0 10px; text-wrap: balance; }
.opt__note { color: var(--fg-2); max-width: 62ch; margin: 0; }
.opt__note b { color: var(--fg); font-weight: 600; }

.intro { position: relative; overflow: hidden; padding-block: 32px 36px; }
.intro h1 { font-family: var(--font-title); font-weight: 400; font-size: clamp(40px, 9vw, 56px); line-height: .95; margin: 0 0 14px; text-align: center; text-wrap: balance; }
/* PC y tablet: dos lineas fijas. La primera ocupa unas 13,5 veces el tamano de letra. */
@media (min-width: 720px) {
  .intro h1 { white-space: nowrap; font-size: min(calc((100vw - 32px) / 14.2), 83px); }
}
.intro h1 span { color: var(--accent); }
.intro p { color: var(--fg-2); max-width: 60ch; margin: 0; }

/* Intro: fondo animado y logo con pulso electrico */
.intro .inner { position: relative; z-index: 1; }
.intro__bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(900px 420px at 15% 20%, rgba(57,85,180,.35), transparent 60%),
    radial-gradient(700px 380px at 90% 85%, rgba(224,0,27,.18), transparent 60%),
    linear-gradient(180deg, #0a1128, var(--bg));
}
.intro__bg::after {
  content: ""; position: absolute; inset: -20%;
  background: linear-gradient(100deg, transparent 40%, rgba(255,255,255,.05) 50%, transparent 60%);
  animation: introDrift 14s linear infinite;
}
.intro__logo { position: relative; width: clamp(230px, 56vw, 460px); aspect-ratio: 3723 / 827; margin: 0 auto clamp(28px, 4.5vw, 52px); animation: introFadeUp .8s ease-out backwards; }
.intro__logo > div { position: absolute; inset: 0; }
.intro__logo-arc, .intro__logo-word { background-repeat: no-repeat; background-size: 100% 100%; }
.intro__logo-arc { background-image: url("../img/logo-arco.png"); filter: drop-shadow(0 0 6px rgba(255,60,80,.55)); }
/* Arco y pulso: ocupan el ancho completo y la parte superior (sin la franja de DESDE 1921) */
.intro__logo > .intro__logo-arc, .intro__logo > .intro__logo-pulse { inset: 0 auto auto 0; width: 100%; aspect-ratio: 1498 / 300; }
/* Palabra CASANOVA + DESDE 1921: posicion medida sobre el logo original (3723 x 827) */
.intro__logo > .intro__logo-word { background-image: url("../img/logo-casanova.png"); inset: auto; left: 14.397%; top: 22.128%; width: 74.429%; aspect-ratio: 2771 / 644; transform: scaleY(1.1); transform-origin: 50% 0; }
/* Estirado vertical de la palabra: 1 = proporcion original. Subir el 1.1 para estirar mas. */
.intro__logo-pulse {
  background-image: linear-gradient(110deg, transparent 44%, rgba(170,225,255,.95) 50%, transparent 56%);
  background-size: 300% 100%; background-position: 170% 0;
  -webkit-mask-image: url("../img/logo-arco.png"); mask-image: url("../img/logo-arco.png");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: introPulse 2.6s linear 1s infinite;
}
.intro h1 { animation: introFadeUp .7s ease-out .5s backwards; }
.intro h1 span { animation: introGlow 2.6s ease-in-out 1.2s infinite alternate; }
@keyframes introDrift { from { transform: translateX(-30%); } to { transform: translateX(30%); } }
@keyframes introFadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes introPulse { from { background-position: 170% 0; } to { background-position: -70% 0; } }
@keyframes introGlow { from { text-shadow: 0 0 0 rgba(224,0,27,0); } to { text-shadow: 0 0 22px rgba(224,0,27,.65); } }
@media (prefers-reduced-motion: reduce) {
  .intro__bg::after, .intro__logo, .intro__logo-pulse, .intro h1, .intro h1 span { animation: none; }
  .intro__logo-pulse { display: none; }
}
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.legend figure { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-2); }
.legend img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* ---------- 1. Hero con cambio de plano (frente -> detalle -> lateral) ---------- */
.scene1 { height: 320vh; position: relative; }
.stage1 {
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  height: min(calc(100vh - var(--bar-h)), 760px); min-height: 520px;
  background: var(--stage); overflow: hidden;
}
.stage1__D { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: 0; transform: scale(1.12); will-change: transform, opacity; }
.stage1__C {
  position: absolute; left: 0; bottom: 0; width: 100%; height: auto; opacity: 0; will-change: transform, opacity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 22%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 22%);
          mask-composite: intersect;
}
.stage1__Awrap {
  position: absolute; top: 0; right: 0; bottom: 0; width: 56%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%);
          mask-image: linear-gradient(90deg, transparent 0, #000 34%);
  will-change: transform, opacity;
}
.stage1__A { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.stage1__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,10,20,.9) 0, rgba(7,10,20,.35) 45%, transparent 70%); pointer-events: none; }
.stage1__text { position: absolute; inset: 0; display: flex; align-items: center; }
.stage1__text .inner { width: 100%; position: relative; height: 100%; }
.t1, .t2, .t3 { position: absolute; left: 0; max-width: 440px; will-change: opacity, transform; }
.t1 { top: 50%; transform: translateY(-50%); }
.t2 { bottom: 9%; opacity: 0; }
.t3 { top: 9%; opacity: 0; }
.eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--bus); font-weight: 600; margin: 0 0 8px; }
.t1 h3, .t2 h3, .t3 h3 { font-family: var(--font-title); font-weight: 400; font-size: clamp(52px, 9vw, 104px); line-height: .92; margin: 0 0 12px; }
.t2 h3, .t3 h3 { font-size: clamp(38px, 5.4vw, 64px); }
.t1 p, .t2 p, .t3 p { color: var(--fg-2); margin: 0; max-width: 40ch; }
.hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; white-space: nowrap; z-index: 3; }
.hint i { display: block; width: 56px; height: 2px; background: var(--line); position: relative; }
.hint i::after { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: calc(var(--f, 0) * 100%); background: var(--accent); }

/* ---------- 2. Visor de detalles ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 22px; cursor: pointer; font-size: 14px; color: var(--fg-2); }
.tab:hover { border-color: var(--bus); color: var(--fg); }
.tab[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: #070a14; font-weight: 600; }
.viewer { position: relative; background: var(--stage); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.viewer > img { width: 100%; height: 100%; object-fit: cover; }
.hot {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(224,0,27,.85); cursor: pointer; padding: 0;
  display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(224,0,27,.6);
  animation: pulse 2.2s infinite;
}
.hot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.hot[aria-pressed="true"] { background: var(--bus); animation: none; box-shadow: 0 0 0 6px rgba(42,157,244,.3); }
.hot__label {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  background: rgba(7,10,20,.92); border: 1px solid var(--line); padding: 3px 10px; border-radius: 6px;
  font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 2;
}
.hot:hover .hot__label, .hot:focus-visible .hot__label { opacity: 1; }
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgba(224,0,27,0); } 100% { box-shadow: 0 0 0 0 rgba(224,0,27,0); } }
.viewer__ui { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; min-height: 132px; }
.panel h3 { font-family: var(--font-title); font-weight: 400; font-size: 30px; margin: 0 0 4px; letter-spacing: .02em; }
.panel p { margin: 0; color: var(--fg-2); }
.panel small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.chip { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 13px; color: var(--fg-2); }
.chip:hover { border-color: var(--bus); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--bus); border-color: var(--bus); color: #04101c; font-weight: 600; }

/* ---------- 3. La flota sube y enciende las cifras ---------- */
.scene3 { height: 280vh; position: relative; }
.stage3 {
  --h: min(calc(100vh - var(--bar-h)), 720px);
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + max(0px, (100vh - var(--bar-h) - var(--h)) / 2));
  height: var(--h); min-height: 560px; overflow: hidden;
  background: linear-gradient(180deg, #090c16, #08090e);
}
.stage3__top { position: absolute; left: 0; right: 0; top: 7%; z-index: 3; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { text-align: center; opacity: .25; transform: translateY(14px); will-change: opacity, transform; }
.stat__n { font-family: var(--font-title); font-size: clamp(44px, 7vw, 84px); line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.stat__n b { font-weight: 400; }
.stat__n .suf { color: var(--accent); }
.stat__l { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); margin-top: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fleet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 2;
  width: min(100%, calc(var(--h) * 1.16)); aspect-ratio: 1489 / 922; mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 4%, #000 86%, transparent);
  -webkit-mask-composite: source-in; -webkit-mask-repeat: no-repeat; -webkit-mask-size: 100% 100%;
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 4%, #000 86%, transparent);
          mask-composite: intersect; mask-repeat: no-repeat; mask-size: 100% 100%;
}
.fleet__layer { position: absolute; inset: 0; will-change: transform; }
.fleet__layer img { width: 100%; height: 100%; display: block; max-width: none; }
/* La foto sube entera, de una sola pieza */
.fleet__layer { transform-origin: 50% 100%; }

/* ---------- 4. Tarjetas con intercambio de vista ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform .3s, border-color .3s; }
.card:hover { transform: translateY(-4px); border-color: rgba(42,157,244,.5); }
.card__img { position: relative; aspect-ratio: 16 / 10; background: var(--stage); overflow: hidden; cursor: pointer; }
.card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s, transform .8s; }
.card__img img + img { opacity: 0; transform: scale(1.06); }
.card__img:hover img:first-of-type, .card__img.flip img:first-of-type { opacity: 0; }
.card__img:hover img + img, .card__img.flip img + img { opacity: 1; transform: none; }
.card__badge { position: absolute; left: 10px; top: 10px; z-index: 2; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; background: rgba(7,10,20,.8); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }
.card__badge::after { content: attr(data-a); }
.card__img:hover .card__badge::after, .card__img.flip .card__badge::after { content: attr(data-b); }
.card__body { padding: 18px 20px 22px; }
.card__body h3 { font-family: var(--font-title); font-weight: 400; font-size: 30px; margin: 0 0 4px; letter-spacing: .02em; }
.card__body p { margin: 0 0 12px; color: var(--fg-2); font-size: 14px; }
.card__body a { color: var(--bus); text-decoration: none; font-weight: 500; font-size: 14px; }
.card__body a:hover { text-decoration: underline; }
.pos-lat { object-position: 64% 50%; }
.pos-d { object-position: 64% 50%; }

/* ---------- 5. Galería con fondo cinematográfico ---------- */
.cine { position: relative; overflow: hidden; padding-block: 70px 110px; background: var(--stage); isolation: isolate; }
.cine__bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(22px) brightness(.45) saturate(1.2); z-index: -1; }
.cine h3 { font-family: var(--font-title); font-weight: 400; font-size: clamp(34px, 6vw, 60px); line-height: 1; margin: 0 0 6px; }
.cine p.sub { color: var(--fg-2); margin: 0 0 34px; }
.track-wrap { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: 18px; width: max-content; animation: slide 42s linear infinite; padding-bottom: 70px; }
.track-wrap:hover .track { animation-play-state: paused; }
.thumb { width: clamp(220px, 30vw, 340px); aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); -webkit-box-reflect: below 6px linear-gradient(transparent 62%, rgba(255,255,255,.22)); background: var(--stage); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
@keyframes slide { to { transform: translateX(calc(-50% - 9px)); } }

/* ---------- 8. Recorrido interior: avance por el pasillo con parallax ---------- */
.scene8 { height: 520vh; position: relative; }
.stage8 {
  --h: min(calc(100vh - var(--bar-h)), 760px);
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + max(0px, (100vh - var(--bar-h) - var(--h)) / 2));
  height: var(--h); min-height: 360px; overflow: hidden; background: var(--stage);
}
.img8 { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 42%; will-change: transform, opacity; opacity: 0; }
.img8:first-of-type { opacity: 1; }
.stage8__shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse at 50% 42%, transparent 45%, rgba(7,10,20,.55) 100%), linear-gradient(0deg, rgba(7,10,20,.88) 0, rgba(7,10,20,.45) 28%, transparent 52%); }
.stage8__txt { position: absolute; z-index: 3; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: 28px; height: 150px; max-width: 1180px; margin: 0 auto; }
.stage8__count { position: absolute; left: 0; top: 0; margin: 0; font-size: 12px; letter-spacing: .2em; color: var(--fg-2); }
.stage8__count b { color: var(--fg); font-weight: 600; }
.t8 { position: absolute; left: 0; right: 0; top: 26px; opacity: 0; will-change: opacity, transform; }
.t8 h3 { font-family: var(--font-title); font-weight: 400; font-size: clamp(36px, 5.4vw, 68px); line-height: .95; margin: 0 0 8px; color: var(--fg); }
.t8 p { margin: 0; color: var(--fg); max-width: 44ch; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.stage8__bar { position: absolute; left: 0; bottom: -12px; width: 120px; height: 2px; background: rgba(255,255,255,.25); }
.stage8__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.stage8__hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 4; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg); background: rgba(7,10,20,.78); padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 860px) {
  .scene8 { height: 460vh; }
  .stage8 { --h: min(calc(100vh - var(--bar-h)), 640px); }
  .t8 p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene8 { height: auto; }
  .stage8 { position: static; height: auto; display: grid; gap: 12px; padding-block: 16px; background: transparent; }
  .img8 { position: static; opacity: 1 !important; transform: none !important; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; }
  .stage8__shade, .stage8__hint, .stage8__count, .stage8__bar { display: none; }
  .stage8__txt { position: static; height: auto; }
  .t8 { position: static; opacity: 1 !important; transform: none !important; margin: 0 0 14px; }
  .t8 h3 { font-size: 34px; }
}

/* ---------- 6. Vuelta a la unidad: cortina con parallax ---------- */
.scene6 { height: 260vh; position: relative; }
.stage6 {
  --h: min(calc(100vh - var(--bar-h)), 760px);
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + max(0px, (100vh - var(--bar-h) - var(--h)) / 2));
  height: var(--h); min-height: 300px; overflow: hidden; background: var(--stage);
}
.stage6 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.stage6__E { position: absolute; inset: 0; will-change: clip-path; clip-path: inset(0 100% 0 0); }
.stage6__line { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: linear-gradient(180deg, transparent, var(--bus) 15%, var(--bus) 85%, transparent); box-shadow: 0 0 18px 2px rgba(42,157,244,.65); z-index: 3; will-change: left; }
.stage6__knob { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(7,10,20,.85); border: 2px solid var(--bus); display: grid; place-items: center; font-size: 18px; color: var(--fg); }
.pill { position: absolute; top: 16px; z-index: 4; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; background: rgba(7,10,20,.78); border: 1px solid var(--line); transition: opacity .3s; }
.pill--l { left: max(16px, env(safe-area-inset-left, 0px)); }
.pill--r { right: max(16px, env(safe-area-inset-right, 0px)); }
.pill b { color: var(--accent); font-weight: 600; }
.stage6__hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-2); background: rgba(7,10,20,.7); padding: 4px 14px; border-radius: 999px; white-space: nowrap; }

/* ---------- 7. Una flota, tres miradas: fotos enteras que se apilan ---------- */
.scene7 { height: 340vh; position: relative; }
.stage7 {
  --h: min(calc(100vh - var(--bar-h)), 720px);
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + max(0px, (100vh - var(--bar-h) - var(--h)) / 2));
  height: var(--h); min-height: 520px; overflow: hidden; background: #090b11;
}
.stage7__in { height: 100%; }
.stage7__grid { height: 100%; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 40px; align-items: center; }
.stage7__txt { position: relative; height: 310px; }
.stage7__count { position: absolute; left: 0; top: 0; margin: 0; font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.stage7__count b { color: var(--fg); font-weight: 600; }
.t7 { position: absolute; left: 0; top: 34px; right: 0; opacity: 0; will-change: opacity, transform; }
.t7 h3 { font-family: var(--font-title); font-weight: 400; font-size: clamp(44px, 6vw, 80px); line-height: .95; margin: 0 0 12px; }
.t7 p { margin: 0; color: var(--fg-2); max-width: 34ch; }
.stage7__bar { position: absolute; left: 0; bottom: 0; width: 120px; height: 2px; background: var(--line); }
.stage7__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.stage7__frames { position: relative; height: calc(100% - 64px); }
.frame7 { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; will-change: transform, opacity; }
.frame7 img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 60px rgba(0,0,0,.55);
}

footer { padding-block: 40px 60px; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .viewer__ui { grid-template-columns: 1fr; }
  .stage1__Awrap { width: 100%; -webkit-mask-image: none; mask-image: none; opacity: .75; }
  .stage1__C { width: 135%; max-width: none; left: -17%; bottom: 8%; }
  .stage1__D { object-position: 62% 50%; }
  .hint { font-size: 10px; gap: 6px; }
  .hint i { width: 28px; }
  .stage1__shade { background: linear-gradient(0deg, rgba(7,10,20,.92) 0, rgba(7,10,20,.4) 55%, transparent 85%); }
  .t1 { top: auto; bottom: 12%; transform: none; }
  .t2 { bottom: 12%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .stage3 { --h: min(calc(100vh - var(--bar-h)), 700px); min-height: 600px; }
  .stage3__top { top: 5%; }
  .fleet { width: 124vw; }
  .bar__brand { display: none; }
  .stage6 { --h: 82vw; }
  .stage6__knob { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .hot { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
}
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
  .track-wrap { overflow-x: auto; }
  .hot { animation: none; }
  html { scroll-behavior: auto; }
}

[hidden] { display: none !important; }


@media (max-width: 860px) {
  .stage7 { --h: min(calc(100vh - var(--bar-h)), 720px); min-height: 560px; }
  .stage7__grid { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; padding-block: 16px 20px; }
  .stage7__frames { order: -1; height: 100%; }
  .stage7__txt { height: 150px; }
  .t7 { top: 26px; }
  .t7 h3 { font-size: clamp(38px, 11vw, 52px); }
  .t7 p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene7 { height: auto; }
  .stage7 { position: static; height: auto; padding-block: 24px; }
  .stage7__grid { display: block; }
  .stage7__txt { height: auto; }
  .stage7__count, .stage7__bar { display: none; }
  .t7 { position: static; opacity: 1 !important; transform: none !important; margin-bottom: 20px; }
  .stage7__frames { height: auto; display: grid; gap: 16px; }
  .frame7 { position: static; transform: none !important; opacity: 1 !important; }
}

/* ---------- 9. Rodar con seguridad: lupa que recorre la foto del rodado ---------- */
.scene9 { height: 380vh; position: relative; }
.stage9 {
  --h: min(calc(100vh - var(--bar-h)), 720px);
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + max(0px, (100vh - var(--bar-h) - var(--h)) / 2));
  height: var(--h); min-height: 520px; overflow: hidden; background: #090b11; isolation: isolate;
}
.stage9__bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(26px) brightness(.38) saturate(1.3); z-index: -2; }
.stage9__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,10,20,.88) 0, rgba(7,10,20,.45) 55%, rgba(7,10,20,.2) 100%); }
.stage9__in { height: 100%; }
.stage9__grid { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 40px; align-items: center; }
.stage9__txt { position: relative; height: 270px; }
.stage9__count { position: absolute; left: 0; top: 0; margin: 0; font-size: 12px; letter-spacing: .2em; color: var(--fg-2); }
.stage9__count b { color: var(--fg); font-weight: 600; }
.t9 { position: absolute; left: 0; top: 34px; right: 0; opacity: 0; will-change: opacity, transform; }
.t9 h3 { font-family: var(--font-title); font-weight: 400; font-size: clamp(44px, 6vw, 80px); line-height: .95; margin: 0 0 12px; color: var(--fg); }
.t9 p { margin: 0; color: var(--fg); max-width: 36ch; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.stage9__bar { position: absolute; left: 0; bottom: 0; width: 120px; height: 2px; background: rgba(255,255,255,.25); }
.stage9__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.frame9 {
  position: relative; margin: 0; justify-self: center; overflow: hidden;
  width: min(100%, calc((var(--h) - 56px) * .75)); aspect-ratio: 1086 / 1448;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 24px 60px rgba(0,0,0,.6); background: var(--stage);
}
.frame9 img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform-origin: 0 0; will-change: transform; }
.frame9__ret {
  position: absolute; inset: 16%; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .25s;
  background:
    linear-gradient(#fff, #fff) 0 0 / 22px 2px no-repeat, linear-gradient(#fff, #fff) 0 0 / 2px 22px no-repeat,
    linear-gradient(#fff, #fff) 100% 0 / 22px 2px no-repeat, linear-gradient(#fff, #fff) 100% 0 / 2px 22px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 22px 2px no-repeat, linear-gradient(#fff, #fff) 0 100% / 2px 22px no-repeat,
    linear-gradient(#fff, #fff) 100% 100% / 22px 2px no-repeat, linear-gradient(#fff, #fff) 100% 100% / 2px 22px no-repeat;
}
.frame9__zoom { position: absolute; right: 12px; top: 12px; z-index: 3; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--fg); background: rgba(7,10,20,.82); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.frame9__zoom b { font-weight: 600; }
@media (max-width: 860px) {
  .scene9 { height: 360vh; }
  .stage9 { min-height: 560px; }
  .stage9__veil { background: linear-gradient(0deg, rgba(7,10,20,.88) 0, rgba(7,10,20,.5) 60%, rgba(7,10,20,.25) 100%); }
  .stage9__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 16px; padding-block: 16px 20px; }
  .frame9 { order: -1; width: min(100%, calc((var(--h) - 230px) * .75)); }
  .stage9__txt { height: 150px; }
  .t9 { top: 26px; }
  .t9 h3 { font-size: clamp(38px, 11vw, 52px); }
  .t9 p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene9 { height: auto; }
  .stage9 { position: static; height: auto; padding-block: 24px; }
  .stage9__grid { display: block; }
  .stage9__txt { height: auto; }
  .stage9__count, .stage9__bar, .frame9__ret, .frame9__zoom { display: none; }
  .t9 { position: static; opacity: 1 !important; transform: none !important; margin-bottom: 20px; }
  .frame9 { margin: 0 auto; }
  .frame9 img { transform: none !important; }
}
