/* ==========================================================================
   YPF · Nueva colección Verano — landing
   --------------------------------------------------------------------------
   · Base  = layout apilado (mobile y fallback para "prefers-reduced-motion").
   · .fp   = "full-page" (desktop >= 768px): el JS la agrega al <html> antes del
             primer paint y las secciones pasan a ser capas fijas que orquesta GSAP.
   ========================================================================== */

/* ---------- Fuentes (tomadas de /masterbrand) ---------- */
@font-face { font-family: "DIN"; src: url("../fonts/DINLight.ttf?t=4")    format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "DIN"; src: url("../fonts/din-regular.ttf?t=4") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DIN"; src: url("../fonts/DINMedium.ttf?t=4")   format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DIN"; src: url("../fonts/DINPro-Bold.otf?t=4") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --cream: #fff8ed;
  --ink:   #0d0a03;
  --blue:  #0451DD;     /* botones */
  --sky:   #0a62b4;

  /* "Frame" de diseño en desktop: caja 16:10 centrada que contiene la composición.
     Todo se posiciona en % de esta caja => las proporciones del diseño se respetan en cualquier aspect ratio. */
  --fw: min(100vw, 160vh);
  --fh: calc(var(--fw) / 1.6);
  --fx: calc((100vw - var(--fw)) / 2);
  --fy: calc((100vh - var(--fh)) / 2);
  --footer-h: calc(var(--fw) * 0.14);

  /* Gradientes de empalme con el video de gaviotas (solo desktop), uno por límite. Los bordes superior e inferior del video
     actual (gaviotas.webm) se ven, en pantalla, de un color uniforme ≈ rgb(61, 113, 173). Ojo: el video y los colores CSS no
     pasan por la misma gestión de color, así que el valor CSS que se ve igual NO es ese sino el calibrado abajo (se midió el
     render de cada candidato). Si se reemplaza el video, volver a medir y calibrar. --edge-size es la altura del degradé. */
  --edge-gav-top: rgb(42, 114, 179);      /* borde superior del video  → degradé en el borde inferior de s3 */
  --edge-gav-bottom: rgb(42, 114, 179);   /* borde inferior del video  → degradé en el borde superior de s4 (y empalme sobre el video) */
  --edge-size: 50px;
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: "DIN", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Visibilidad por modo */
.d-only { display: none; }
.fp .d-only { display: block; }
.fp .m-only { display: none !important; }
.nav, .fx { display: none; }
.fp .nav, .fp .fx { display: block; }

a:focus-visible, .s1__watch:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

/* ==========================================================================
   BASE · MOBILE (apilado)
   ========================================================================== */
.stage { max-width: 560px; margin: 0 auto; overflow: hidden; overflow: clip; background: var(--ink); }
.sec   { position: relative; overflow: hidden; }
.frame { position: relative; width: 100%; }

.band-css { display: flex; justify-content: center; }
.band-css img { height: auto; }

/* Isotipo YPF + "Energía Argentina" (secciones 2-4 en mobile) */
/* Logo sticky (mobile): vive en .mid (secciones 2-4) con altura 0 y el logo "colgando"; se pega arriba mientras se recorren esas secciones.
   Requiere que ningún ancestro tenga overflow:hidden (por eso .stage usa overflow:clip). */
.mid { position: relative; overflow: clip; }
.brand-sticky { position: sticky; top: 0; height: 0; z-index: 5; }
.brand { padding-top: 5.5%; }
.brand a { display: block; }
.brand img { width: 25.7%; margin: 0 auto; filter: drop-shadow(0 1px 8px rgba(0, 20, 60, .35)); }

/* ---------- 1 · Hero ---------- */
.s1 { display: flex; min-height: max(100svh, 640px); background: #1b5fa8; }
.s1__video { position: absolute; inset: 0; }
.s1__video video { width: 100%; height: 100%; object-fit: cover; }
.s1__shade {
  position: absolute; inset: 0; pointer-events: none;
  /* Gradiente marrón/arena para que el texto se lea con cualquier video de fondo */
  background: linear-gradient(to top,
    rgba(104, 62, 24, .94) 0%, rgba(104, 62, 24, .74) 22%, rgba(104, 62, 24, .36) 42%, rgba(104, 62, 24, 0) 62%);
}
.s1 .frame {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(40px, 9svh, 84px) 6% 26px;
}
.s1__logos { width: 43%; }
.s1__title { width: 92%; margin-top: 7%; }
/* En mobile el wrapper no genera caja: el badge sigue empujando el bloque hacia abajo */
.s1__bottom { display: contents; }
.s1__app   { display: block; width: 126px; margin-top: auto; text-align: center; }
.s1__app img { margin: 0 auto; }
.s1__text  {
  margin-top: 6%; max-width: 26em; text-align: center;
  font-size: clamp(15px, 4.1vw, 21px); font-weight: 500; line-height: 1.25;
  text-shadow: 0 1px 10px rgba(70, 40, 10, .45);
}
.s1__more {
  margin-top: 5%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 15px; font-weight: 500; text-decoration: none;
}
.s1__arrow { animation: bob 1.9s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .75; } 50% { transform: translateY(7px); opacity: 1; } }

/* ---------- 2 + 3 · Cielo ---------- */
.sky { display: block; position: relative; background: var(--sky); }
/* Cada sección lleva su cielo y se desplaza con el contenido. El de s3 va invertido verticalmente: el tramo oscuro queda abajo
   y empalma con el cielo de s4 (arriba de s3 queda el tramo claro, igual que el borde inferior de s2) */
.s2 { background: var(--sky) url("../web/cielo-m.webp?t=4") center / cover no-repeat; }
.s3 { background: var(--sky); }
html:not(.fp) .s3::before {   /* en fp .s3 es display:contents: sin este filtro el pseudo-elemento se dibujaría sobre el cielo de desktop */
  content: ""; position: absolute; inset: 0; transform: scaleY(-1);
  background: url("../web/cielo-m.webp?t=4") center / cover no-repeat;
}
/* Empalme s2 → s3 (mobile): 20px centrados en el borde, del color del tramo claro del cielo, para disimular la línea entre ambos fondos */
html:not(.fp) .s3 { overflow: visible; }
html:not(.fp) .s3::after {
  content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 20px; z-index: 0; pointer-events: none;   /* z 0: queda por debajo de las pelotas (z 1-4) que cruzan el borde */
  background: linear-gradient(to bottom, rgba(83, 164, 218, 0), rgb(83, 164, 218) 50%, rgba(83, 164, 218, 0));
}
/* Empalme sutil s3 → s4 (mobile): 20px centrados en el borde entre ambas secciones */
.sky::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 20px; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 108, 180, 0), rgb(12, 108, 180) 50%, rgba(12, 108, 180, 0));
}
.fp .sky::after { display: none; }

.s2__title { width: 71%; margin: 6.5% auto 0; }

.balls { position: relative; padding-bottom: 142.6%; margin-top: 5%; }
.ball  { position: absolute; height: auto; }
div.ball { aspect-ratio: 1; }
.ball__img { display: block; width: 100%; height: auto; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
/* Hover (solo dispositivos con hover): leve escala + rotación. El contenedor es circular => el hover respeta la forma de la pelota */
.ball { border-radius: 50%; }
@media (hover: hover) {
  .ball:hover .ball__img { transform: scale(1.06) rotate(8deg); }
}
.ball--ypf { left: -1.8%; top: .6%;   width: 72.2%; z-index: 3; }
.ball--5   { left: 53.5%; top: 32.5%; width: 44.6%; z-index: 1; }
.ball--7   { left: 37.5%; top: 66.3%; width: 59%;   z-index: 2; }
.ball--24  { left: -1%;   top: 56.3%; width: 55%;   z-index: 4; }

.s2 .frame { padding-top: 15.6%; }   /* reserva el espacio del logo sticky */
.s3 .frame { padding-top: 15.6%; padding-bottom: 13%; }
.s3__ball  { position: relative; z-index: 2; width: 69.5%; margin: 4% auto -3%; height: auto; }
/* Con JS (sin reduced-motion) la pelota de s3 es la misma YPF de s2 (queda fija con el fondo y se acopla acá): este <img> solo reserva el lugar */
html.ball-pin .s3__ball { visibility: hidden; }
html.ball-pin:not(.fp) .s2 { overflow: visible; }   /* la pelota YPF baja por fuera de s2 */
.s3__band  { position: relative; z-index: 1; }
.s3__band .band-css {
  padding: 4.6% 0;
  background: linear-gradient(90deg, rgba(255, 248, 237, 0) 0%, #fff8ed 18%, #fff8ed 92%, rgba(255, 248, 237, .55) 100%);
}
.s3__band .band-css img { width: 71.8%; }
.s3__nums { width: 57.6%; margin: 7.2% auto 0; }
.s3__nums li + li { margin-top: 12.4%; }

/* ---------- 4 · Enzo, Rodri o Paredes ---------- */
.s4 { background: #d5ae78; }
/* Mobile: la imagen vertical cubre toda la sección */
.s4__bg {
  position: absolute; inset: 0;
  background: url("../web/jugadores-m.webp?t=4") 50% 50% / cover no-repeat;
}
/* Gradiente inferior: solo desktop (ver .fp .s4__shade) */
.s4__shade { display: none; position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; }
.s4 .frame { padding-top: 76%; padding-bottom: 20%; }
.s4__panel { margin-top: -3.6%; }
.s4__band .band-css {
  padding: 1.6% 0;
  background: linear-gradient(90deg, rgba(255, 248, 237, 0) 0%, #fff8ed 18%, #fff8ed 82%, rgba(255, 248, 237, 0) 100%);
}
.s4__band .band-css img { width: 91.3%; }
.s4__nums { margin-top: 8.5%; }
.s4__nums li { margin-inline: auto; }
.s4__nums li + li { margin-top: 7.7%; }
.s4__nums .c1, .s4__nums .c2 { width: 46%; }
.s4__nums .c3 { width: 55.3%; }

/* ---------- 5 · ¿Puedo jugar? ---------- */
.s5 { min-height: 128vw; background: #1f74bd; }
.s5__bg { position: absolute; inset: 0; background: #1f74bd url("../web/puedo-jugar.webp?t=4") 51.5% 50% / auto 100% no-repeat; }
.s5 .frame { padding-top: 22%; }
.s5__title { width: 72%; margin: 6% auto 0; }
.s5__title img { display: block; width: 100%; height: auto; }

/* ---------- 6 · Descargá la app ---------- */
.s6 { min-height: min(205vw, 1150px); background: #0a5aa8; }
/* Mobile: foto vertical (pirámide de pelotas con gaviota). Solo se usa en mobile; en desktop se pisa más abajo (.fp .s6__bg) */
.s6__bg { position: absolute; inset: 0; background: #0a5aa8 url("../web/pelotas-piramide-m.webp") 50% 50% / cover no-repeat; }
.s6 .frame { min-height: inherit; }
.s6__title {
  padding: 19% 6% 0; text-align: center; text-wrap: balance; text-transform: uppercase;
  font-size: clamp(18px, 5.4vw, 30px); font-weight: 700; line-height: 1.15;
}
.s6__app  { display: block; width: 39%; margin: 7% auto 0; }
.s6__btns { position: absolute; left: 0; right: 0; bottom: 12%; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.btn {
  display: inline-block; padding: 11px 24px 13px; border: 1px solid var(--blue); border-radius: 5px; background: transparent; color: var(--blue);
  font-size: 14px; font-weight: 700; text-decoration: none; text-align: center;
  text-shadow: 0px 0px 6px #fff;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
  cursor: pointer;
}
.btn:hover { background: var(--blue); color: #fff; text-shadow: none; }

/* Hero: mismo botón que .btn.btn-primary.px-3, con borde blanco y fondo transparente */
.s1 a.btn.btn-primary {
  margin-top: 4.5%; padding: 0.6rem 1rem; border: 1px solid #fff; border-radius: 5px;
  background: transparent; color: #fff; font-size: 1.1rem; font-weight: 500; line-height: 1.5;
  text-shadow: none;
}
.s1 a.btn.btn-primary:hover,
.s1 a.btn.btn-primary:focus-visible {
  background: var(--blue); border-color: var(--blue); color: #fff; text-shadow: none;
}
.s1 .bi-play { font-weight: 400; line-height: 1; vertical-align: -1px; }

/* Modal de video: mismas piezas que el resto del sitio (esta página no carga app.css) */
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1050; background: #000; }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: .5; }
.modal {
  position: fixed; inset: 0; z-index: 1055; display: none; width: 100%; height: 100%;
  overflow-x: hidden; overflow-y: auto; outline: 0;
}
.modal.show { display: block; }
.modal-dialog { position: relative; width: auto; margin: .5rem; pointer-events: none; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 1rem); }
.modal.fade .modal-dialog { transform: translateY(-50px); transition: transform .3s ease-out; }
.modal.show .modal-dialog { transform: none; }
@media (min-width: 576px) {
  .modal-dialog { max-width: 500px; margin: 1.75rem auto; }
  .modal-dialog-centered { min-height: calc(100% - 3.5rem); }
}
@media (min-width: 992px) { .modal-lg { max-width: 800px; } }
.modal-content {
  position: relative; display: flex; flex-direction: column; width: 100%;
  pointer-events: auto; background: #fff; border-radius: .5rem; outline: 0;
}
.modal .modal-body { padding: 0; }
.ratio { position: relative; width: 100%; }
.ratio::before { display: block; padding-top: var(--bs-aspect-ratio); content: ""; }
.ratio > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ratio-16x9 { --bs-aspect-ratio: 56.25%; }
.btn-close {
  --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e");
  box-sizing: content-box; width: 1em; height: 1em; padding: .25em; border: 0; border-radius: .375rem;
  background: transparent var(--bs-btn-close-bg) center / 1em auto no-repeat; opacity: .5; cursor: pointer;
}
.btn-close:hover { opacity: .75; }
.btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }
.modal .btn-close { position: absolute; top: -25px; right: 0; opacity: 1; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #fff; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 44px 24px 24px; }
.footer__brand { display: contents; }
.footer__brand > a { order: 1; }
.footer__social    { order: 2; }
.footer__legal     {
  order: 3; width: 70%; margin-top: 14px; padding-top: 18px; border-top: 1px solid #313131;
  text-align: center; display: flex; flex-direction: column; gap: 2px; font-size: 12px;
}
.footer__legal small { font-size: inherit; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__links span { margin-inline: .35em; }
.footer__social p { display: none; }
.footer__social ul { display: flex; gap: 6px; }
.footer__social a { display: block; border-radius: 50%; transition: transform .2s ease; }
.footer__social a:hover { transform: scale(1.1); }
.footer__social img { width: 32px; height: 32px; }

/* ---------- Reveal en mobile (sin JS = visible) ---------- */
html.reveal:not(.fp) [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s ease var(--d, 0s), transform .9s cubic-bezier(.2, .7, .2, 1) var(--d, 0s);
}
/* Pelotas de la sección 2: entran rodando desde los costados (sin fade; el JS observa el contenedor .balls) */
html.reveal:not(.fp) [data-reveal="left"],
html.reveal:not(.fp) [data-reveal="right"] {
  opacity: 1;
  transition: transform 1.3s cubic-bezier(.2, .8, .2, 1) var(--d, 0s);
}
html.reveal:not(.fp) [data-reveal="left"]  { transform: translateX(-140%) rotate(-110deg); }
html.reveal:not(.fp) [data-reveal="right"] { transform: translateX(140%)  rotate(110deg); }
html.reveal:not(.fp) [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.reveal:not(.fp) [data-reveal] { opacity: 1; transform: none; transition: none; }
  .s1__arrow { animation: none; }
}

/* ==========================================================================
   DESKTOP · scroll por secciones  (html.fp)
   ========================================================================== */
html.fp, html.fp body { height: 100%; overflow: hidden; scroll-behavior: auto; overscroll-behavior: none; }
.fp .stage {
  position: fixed; inset: 0; max-width: none; margin: 0; overflow: hidden; touch-action: none; background: #02315e;
  height: 100vh; height: 100dvh;
}
.fp .sec   { position: absolute; inset: 0; }
.fp .frame { position: absolute; left: var(--fx); top: var(--fy); width: var(--fw); height: var(--fh); }

/* s2 y s3 no generan caja propia: sus hijos viven en el contexto de #sky (así la pelota YPF puede quedar sobre la banda de s3) */
.fp .s2, .fp .s3, .fp .mid { display: contents; }

/* Capas (z-index) */
.fp .s1   { z-index: 1; }
.fp .sky  { z-index: 2; }
.fp .s4   { z-index: 3; }
.fp .s5   { z-index: 3; }   /* como s4: se alternan por detrás del video de olas */
.fp .last { z-index: 4; }
.fp .nav  { z-index: 6; }
.fp .fx--gaviotas { z-index: 5; }
.fp .fx--olas     { z-index: 8; }

/* Estados iniciales (evitan flashes antes de que GSAP tome el control) */
.fp .sky, .fp .s4, .fp .s5, .fp .last, .fp .nav, .fp .fx { visibility: hidden; }
.fp .intro { opacity: 0; }

/* ----- Navbar ----- */
/* El navbar se apoya en los bordes del viewport (no en el frame) para no pisar a los jugadores en pantallas más anchas */
.fp .nav { position: absolute; inset: 0; pointer-events: none; }
.fp .nav .frame { left: 0; top: 0; width: 100%; }
.nav__brand   { position: absolute; left: 8.4vw; top: calc(var(--fh) * .09); width: calc(var(--fw) * .075); pointer-events: auto; }
.nav__players { position: absolute; right: 6.2vw; top: calc(var(--fh) * .08); width: calc(var(--fw) * .16); }
.nav__brand img { width: 100%; }

/* ----- 1 · Hero ----- */
.fp .s1__video { z-index: 0; }
.fp .s1__shade {
  background: linear-gradient(to top,
    rgba(104, 62, 24, .60) 0%, rgba(104, 62, 24, .50) 75px, rgba(104, 62, 24, .3) 150px, rgba(104, 62, 24, 0) 225px);
}
.fp .s1 { display: block; min-height: 0; }
.fp .s1 .frame { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 0; top: 0; left: 0; right: 0; bottom: 0; height: 100%; width: 100%;}
.fp .s1__logos { margin-top: 50px; width: 264px; }
.fp .s1__title { width: 712px; margin: 0; }
.fp .s1__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
  width: 520px;
}
.fp .s1__app   { position: static; width: 146px; margin: 0; }
.fp .s1__text  {
  position: static; max-width: none; margin: 0;
  font-size: max(15px, calc(var(--fw) * .0128)); line-height: 1.22;
}
.fp .s1__watch { position: static; margin: 0; }
.fp .s1__more  {
  position: static; width: auto; margin: 0;
  font-size: max(13px, calc(var(--fw) * .0092));
}

/* ----- 2 + 3 · Cielo ----- */
.fp .sky { position: absolute; inset: 0; background: var(--sky) url("../web/cielo.webp?t=4") center / cover no-repeat; overflow: hidden; }
.fp .s2__title { position: absolute; left: 22.2%; top: 13.1%; width: 59.1%; margin: 0; }
.fp .balls { position: absolute; inset: 0; margin: 0; padding: 0; }
.fp .ball  { z-index: 3; }
/* Las 4 pelotas forman un grupo centrado en el frame, con margen simétrico a los lados (no tocan los bordes de la pantalla) */
.fp .ball--24  { left: 1.3%;   top: 29.4%; width: 25.7%; }
.fp .ball--ypf { left: 24.6%;  top: 32.4%; width: 33.8%; z-index: 4; }
.fp .ball--7   { left: 53.9%;  top: 44.3%; width: 23.3%; }
.fp .ball--5   { left: 72.8%;  top: 36.7%; width: 25.9%; }
/* posición final de la pelota YPF en la sección 3 (el JS mide esta caja) */
.fp .ball-target { position: absolute; left: 15.3%; top: 27.2%; width: 35.8%; aspect-ratio: 1; visibility: hidden; pointer-events: none; }

.fp .s2 .frame, .fp .s3 .frame { padding: 0; }
.fp .s3__band { position: absolute; left: calc(-1 * var(--fx)); width: 100vw; top: 29.4%; z-index: 1; }
.fp .s3__band img { width: 100%; }
.fp .s3__nums { position: absolute; left: 64.85%; top: 43.6%; width: 17.1%; margin: 0; z-index: 0; }

/* ----- 4 · Enzo, Rodri o Paredes ----- */
.fp .s4 { background: #1d6db3; }
.fp .s4__bg { aspect-ratio: auto; inset: 0; background: url("../web/jugadores.webp?t=4") 50% 38% / cover no-repeat; -webkit-mask-image: none; mask-image: none; }
.fp .s4__shade {
  display: block; height: 46%;
  background: linear-gradient(to top, rgba(92, 58, 28, .66) 0%, rgba(92, 58, 28, .36) 45%, rgba(92, 58, 28, 0) 100%);
}
.fp .s4 .frame { padding: 0; }
.fp .s4__panel { position: absolute; left: 5.8%; bottom: 0; width: 88.4%; aspect-ratio: 1098.48 / 210.47; margin: 0; }
.fp .s4__band img { width: 100%; }
.fp .s4__nums { position: absolute; inset: 0; margin: 0; }
.fp .s4__nums li { position: absolute; margin: 0 !important; }
.fp .s4__nums li img { display: block; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) {
  .fp .s4__nums li:hover img { transform: scale(1.1); }   /* en el <img>, porque GSAP anima el <li> */
}
.fp .s4__nums .c1 { left: calc(177.1 / 1098.48 * 100%); top: calc(82.41 / 210.47 * 100%); width: calc(180.57 / 1098.48 * 100%); }
.fp .s4__nums .c2 { left: calc(436.1 / 1098.48 * 100%); top: calc(82.41 / 210.47 * 100%); width: calc(180.57 / 1098.48 * 100%); }
.fp .s4__nums .c3 { left: calc(696.3 / 1098.48 * 100%); top: calc(82.41 / 210.47 * 100%); width: calc(217.17 / 1098.48 * 100%); }

/* ----- 5 · ¿Puedo jugar? ----- */
.fp .s5 { min-height: 0; background: #1f74bd; }
/* La foto (2000×1150, 16:9) se ve completa en 16:9 y se recorta apenas arriba/abajo o a los costados en otras proporciones */
.fp .s5__bg { background: #1f74bd url("../web/puedo-jugar.webp?t=4") 50% 50% / cover no-repeat; }
.fp .s5 .frame { padding: 0; }
.fp .s5__title { position: absolute; left: calc(50% - 277px); top: 154px; width: 555px; margin: 0; }

/* ----- 6 + footer ----- */
/* #last (s6 + footer) es el único tramo con scroll NATIVO (sin transición): contenedor con overflow propio, sin barra visible.
   Su alto de contenido es --s6-h + el footer (ver main.js: measure()). */
.fp .last {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  touch-action: pan-y; scrollbar-width: none;
}
.fp .last::-webkit-scrollbar { display: none; }
.fp .s6 { min-height: 0; background: #1062ad; }
/* El fondo conserva el mismo tamaño/encuadre que tenía como "cover" del viewport (la foto es cuadrada, así que cover = max(100vw, 100vh)),
   pero ahora se extiende hacia abajo hasta --s6-h (alto real de la sección, lo calcula main.js) porque la sección puede ser más alta que la ventana.
   Si la foto no llega (pantallas muy cuadradas), debajo queda arena lisa del mismo tono que su borde inferior. */
.fp .s6 { overflow: visible; }
.fp .s6__bg {
  bottom: auto; height: var(--s6-h, 100%);
  background: #e8c49f url("../web/pelotas-playa.webp?t=4") 50% calc((100vh - max(100vw, 100vh)) * .346) / max(100vw, 100vh) auto no-repeat;
}
.fp .s6 .frame { min-height: 0; }
/* Degradé detrás de las condiciones de compra (mejora la lectura del texto): 250px de alto, pegado al borde inferior de la sección
   (justo arriba del footer); negro con alpha abajo → transparente arriba. */
.fp .s6__bg::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 250px; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 100%);
}
.fp .s6__title {
  position: absolute; left: 20%; top: 17%; width: 60%; padding: 0;
  font-size: calc(var(--fw) * .0383); line-height: 1.16; text-shadow: 0 2px 18px rgba(0, 60, 130, .35);
}
.fp .s6__title span { display: block; }
.fp .s6__app  { position: absolute; left: calc(50% - 139px); top: 33%; width: 278px; margin: 0; }
.fp .s6__btns {
  top: 87.7%; bottom: auto; flex-direction: row; justify-content: center; gap: 20px; align-items: stretch;
}
.fp .btn { font-size: 16px; }
.fp .s1 a.btn.btn-primary { font-size: 1.1rem; }
/* Condiciones de compra (solo desktop): en la misma fila-contenedor que los botones, en una línea propia.
   Ancho máx. 1200px · 100px de separación con los botones · el footer queda 70px debajo (main.js: measure()) */
.s6__cond { display: none; }
.fp .s6__btns { flex-wrap: wrap; row-gap: 0; }   /* el gap de 20px es solo entre botones */
.fp .s6__cond { display: flex; justify-content: center; flex: 0 0 100%; margin-top: 100px; }
.fp .s6__cond img { display: block; width: min(1200px, calc(100% - 48px)); height: auto; }

.fp .footer { position: absolute; left: 0; right: 0; top: var(--s6-h, 100%); height: var(--footer-h); display: flex; align-items: center; }
.fp .footer__inner {
  width: 100%; flex-direction: row; justify-content: space-between; align-items: center; gap: 0;
  padding: 0 6.2vw 0 8.4vw;
}
.fp .footer__brand { display: block; }
.fp .footer__brand > a img { width: calc(var(--fw) * .07); min-width: 84px; }
.fp .footer__legal {
  width: auto; margin: calc(var(--fw) * .012) 0 0; padding: 0; border: 0; text-align: left; gap: 3px;
  font-size: max(11px, calc(var(--fw) * .0078));
}
.fp .footer__social { text-align: center; }
.fp .footer__social p { display: block; font-size: max(12px, calc(var(--fw) * .0085)); margin-bottom: 8px; }
.fp .footer__social ul { justify-content: center; gap: 8px; }
.fp .footer__social img { width: calc(var(--fw) * .0185); height: auto; min-width: 26px; }

/* ----- Gradientes de empalme con el video (solo desktop) ----- */
.edge-fade { display: none; }
.fp .edge-fade { display: block; position: absolute; left: 0; right: 0; height: var(--edge-size); z-index: 0; pointer-events: none; }
/* Límite superior del video: borde inferior de s3 → color del borde superior del video (opaco abajo, se desvanece hacia arriba) */
.fp .edge-fade--bottom { bottom: 0; background: linear-gradient(to top, var(--edge-gav-top) 0%, rgba(0, 0, 0, 0) 100%); }
/* Límite inferior del video: borde superior de s4 → color del borde inferior del video (opaco arriba, se desvanece hacia abajo) */
.fp .edge-fade--top    { top: 0;    background: linear-gradient(to bottom, var(--edge-gav-bottom) 0%, rgba(0, 0, 0, 0) 100%); }
/* Empalme video → sección 4: por encima del video, centrado en el borde superior de s4 (la mitad de arriba cubre el final del video).
   Al ser opaco en el centro también tapa la línea oscura de 1px que asoma entre capas mientras se mueven */
.fp .edge-fade--seam {
  top: calc(-1 * var(--edge-size)); height: calc(var(--edge-size) * 2); z-index: 5; visibility: hidden;
  background: linear-gradient(to bottom, rgba(42, 114, 179, 0) 0%, var(--edge-gav-bottom) 50%, rgba(42, 114, 179, 0) 100%);
}

/* ----- Videos de transición ----- */
.fp .fx { position: absolute; left: 0; width: 100%; overflow: hidden; pointer-events: none; background: #1b6fb8; }
.fp .fx--gaviotas { top: 0; height: calc(100% + 2px); }   /* +2px: sin costura entre capas */
.fp .fx--olas     { top: 0; height: 100%; background: #6f8f90; }
.fx video { width: 100%; height: 100%; object-fit: cover; }

/* Hero: la flecha rebota con suavidad (invita a hacer scroll) */
.fp .s1__more:hover span { text-decoration: underline; }

/* ==========================================================================
   TEASER  (<html class="teaser">) · solo hero + footer
   ========================================================================== */
html.teaser .s1 { height: calc(100vh - 50px); min-height: 0; }

html.teaser.fp, html.teaser.fp body { height: auto; overflow: visible; overscroll-behavior: auto; scroll-behavior: smooth; }
html.teaser.fp .stage {
  position: relative; inset: auto; height: auto; max-width: none; margin: 0;
  overflow: clip; touch-action: auto; background: var(--ink);
}
html.teaser.fp .s1 {
  position: relative; inset: auto;
  --fw: min(100vw, calc((100vh - 50px) * 1.6));
  --fh: calc(var(--fw) / 1.6);
  --fx: calc((100vw - var(--fw)) / 2);
  --fy: calc(((100vh - 50px) - var(--fh)) / 2);
}
html.teaser.fp .footer { position: relative; top: auto; }
