/* ==========================================================================
   Propuesta A · con uniformes Levante–Global
   Carácter: cinematográfico. El scroll hace avanzar la jugada (vídeo en canvas).
   ========================================================================== */

.page--con .hero__player { right: 13vw; bottom: 6.5vw; height: calc(100% - 6.5vw - var(--header-h) * 0.45); }
.page--con .hero__inset { bottom: clamp(150px, 31vh, 320px); width: clamp(190px, 16.5vw, 280px); }

/* ---------- 02 · Experiencia ---------- */
.exp { --cut: 6vw; position: relative; z-index: 5; background: var(--cobalt); color: var(--white); }
.exp::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--cut);
  background: var(--cobalt); clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.exp__pin { position: relative; display: flex; flex-direction: column; }
.exp:not(.is-cinematic) .exp__copy { order: -1; }

/* Maquetación base (sin JS, móvil o movimiento reducido) */
.exp__copy { position: relative; z-index: 3; padding: clamp(40px, 6vw, 80px) var(--gutter) 0; }
.exp__title { margin-top: 18px; font-size: clamp(3rem, 6.7vw, 8.4rem); }
.exp__line { display: block; white-space: nowrap; }
.exp__sub { margin-top: clamp(18px, 2.4vw, 30px); font: 700 clamp(1.15rem, 1.5vw, 1.45rem)/1.3 var(--font-body); }
.exp__text { margin-top: 12px; color: rgba(245, 248, 252, 0.86); }
.exp__stage {
  position: relative; margin: clamp(32px, 5vw, 56px) var(--gutter) 0; aspect-ratio: 16 / 10; overflow: hidden;
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%); background: var(--navy);
}
.exp__poster, .exp__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exp__canvas { opacity: 0; }
.exp__canvas.is-live { opacity: 1; }
.exp__shade { display: none; }
.exp__hud { display: none; }
.exp__note { display: none; }
.exp__beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: clamp(36px, 5vw, 64px) var(--gutter) clamp(56px, 8vw, 110px); }
.beat { display: grid; gap: 8px; align-content: start; }
.beat__word { font: 900 clamp(2rem, 3.4vw, 3.6rem)/0.9 var(--font-display); text-transform: uppercase; }
.beat__text { font-size: 0.9375rem; line-height: 1.55; color: rgba(245, 248, 252, 0.86); max-width: 34ch; }

/* Versión cinematográfica (escritorio + movimiento): la activa el JS */
.exp.is-cinematic .exp__pin { height: 100svh; min-height: 680px; overflow: hidden; }
.exp.is-cinematic .exp__stage {
  position: absolute; inset: 0; margin: 0; aspect-ratio: auto; z-index: 1;
  clip-path: polygon(50% 13%, 96.5% 9%, 92% 91%, 45.5% 95%);
}
.exp.is-cinematic .exp__shade {
  display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(4, 30, 80, 0.86) 0%, rgba(4, 30, 80, 0.42) 38%, rgba(4, 30, 80, 0) 64%), linear-gradient(0deg, rgba(3, 22, 43, 0.6) 0%, rgba(3, 22, 43, 0) 36%);
}
.exp.is-cinematic .exp__copy {
  position: absolute; left: 0; top: 50%; width: min(64vw, 1100px); padding: 0 var(--gutter);
  transform: translateY(-46%);
}
.exp.is-cinematic .exp__text { max-width: 44ch; }
.exp.is-cinematic .exp__note {
  display: block; position: absolute; z-index: 3; right: calc(var(--gutter) + 1vw); top: calc(var(--header-h) - 18px);
  padding: 18px 22px 14px; background: var(--cobalt-900); transform: rotate(-6deg);
  color: var(--white); font-size: clamp(1.3rem, 1.8vw, 1.9rem);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.6);
}
.exp.is-cinematic .exp__hud { display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; }
.exp.is-cinematic .exp__beats { position: absolute; z-index: 4; left: var(--gutter); bottom: clamp(70px, 13vh, 130px); display: block; padding: 0; width: min(560px, 44vw); }
.exp.is-cinematic .beat { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; }
.exp.is-cinematic .beat__word { font-size: clamp(4rem, 8.4vw, 9rem); line-height: 0.84; }
.exp.is-cinematic .beat__text { font-size: 1.0625rem; color: var(--white); }

.hud-corner { position: absolute; width: 30px; height: 30px; border: 0 solid rgba(245, 248, 252, 0.85); }
.hud-corner--tl { left: var(--gutter); top: calc(var(--header-h) + 8px); border-left-width: 2px; border-top-width: 2px; }
.hud-corner--tr { right: var(--gutter); top: calc(var(--header-h) + 8px); border-right-width: 2px; border-top-width: 2px; }
.hud-corner--bl { left: var(--gutter); bottom: 40px; border-left-width: 2px; border-bottom-width: 2px; }
.hud-corner--br { right: var(--gutter); bottom: 40px; border-right-width: 2px; border-bottom-width: 2px; }
.hud-label {
  position: absolute; left: calc(var(--gutter) + 46px); top: calc(var(--header-h) + 14px);
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 0.75rem/1 var(--font-display); letter-spacing: 0.26em; text-transform: uppercase;
}
.hud-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: hud-blink 1.1s steps(2, jump-none) infinite; }
@keyframes hud-blink { 50% { opacity: 0.15; } }
.hud-time {
  position: absolute; right: calc(var(--gutter) + 46px); top: calc(var(--header-h) + 14px);
  font: 700 0.875rem/1 var(--font-display); letter-spacing: 0.16em; font-variant-numeric: tabular-nums;
}
.hud-ruler {
  position: absolute; left: calc(var(--gutter) + 46px); right: calc(var(--gutter) + 46px); bottom: 52px; height: 10px;
  background: repeating-linear-gradient(90deg, rgba(245, 248, 252, 0.45) 0 1px, transparent 1px 14px);
}
.hud-ruler i { position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left center; }

/* ---------- 04 · Ciudad Deportiva ---------- */
.cdl { position: relative; isolation: isolate; overflow: hidden; padding: var(--space-xl) 0; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-950) 100%); }
.cdl__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 96px); align-items: center; padding: 0 var(--gutter); }
.cdl__copy { display: grid; gap: 22px; align-content: start; }
.cdl__title { font-size: clamp(3rem, 5.4vw, 6.4rem); }
.cdl__map { position: relative; perspective: 1600px; }
.cdl__map3d { position: relative; transform-style: preserve-3d; transform-origin: 50% 60%; }
.cdl__map3d img { width: 100%; filter: drop-shadow(0 50px 50px rgba(0, 0, 0, 0.55)); }
.cdl__scan {
  position: absolute; inset: 8% 4%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(100deg, rgba(224, 0, 52, 0) 38%, rgba(224, 0, 52, 0.26) 50%, rgba(224, 0, 52, 0) 62%);
  background-size: 260% 100%; animation: scan 5.5s linear infinite;
  -webkit-mask: url("../img/con/ciudad-deportiva-960.webp") center / 100% 100% no-repeat; mask: url("../img/con/ciudad-deportiva-960.webp") center / 100% 100% no-repeat;
  inset: 0;
}
@keyframes scan { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.cdl__caption { display: flex; align-items: center; gap: 12px; margin-top: 18px; font: 600 0.75rem/1 var(--font-display); letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.cdl__caption-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.cdl__caption-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--red); animation: ping 2s var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.route { display: grid; grid-template-columns: minmax(0, 0.62fr) minmax(0, 2fr); gap: clamp(28px, 4vw, 72px); align-items: center; margin-top: clamp(72px, 9vw, 140px); padding: 0 var(--gutter); }
.route__head { display: grid; gap: 16px; align-content: start; }
.route__text { font-size: 1rem; line-height: 1.6; color: var(--muted); max-width: 34ch; }
.route__svg { width: 100%; height: auto; overflow: visible; }
.route__coast { fill: none; stroke: rgba(96, 125, 155, 0.7); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; }
.route__sea { fill: var(--line); font: 600 16px var(--font-display); letter-spacing: 0.36em; text-transform: uppercase; }
.route__road { fill: none; stroke: rgba(200, 212, 227, 0.26); stroke-width: 3; stroke-linecap: round; }
.route__trip { fill: none; stroke: var(--red); stroke-width: 4.5; stroke-linecap: round; }
.route__km text { fill: var(--white); font: 800 48px var(--font-display); letter-spacing: 0.01em; }
.route__km .route__km-sub { fill: var(--muted); font: 600 15px var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; }
.route__pt circle { fill: var(--navy); stroke: var(--white); stroke-width: 2.5; }
.route__pt--main circle { fill: var(--red); }
.route__pt--city circle { fill: var(--white); }
.route__pt .route__pulse { fill: none; stroke: var(--red); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: route-pulse 2.2s var(--ease-out) infinite; }
@keyframes route-pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }
.route__pt text { fill: var(--muted); font: 600 19px var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; }
.route__pt--main text { fill: var(--white); font-weight: 700; }
.route__bus rect { fill: var(--white); }
.route__bus path { fill: var(--navy); }
.route__bus circle { fill: var(--navy); stroke: var(--white); stroke-width: 2; }
.js.motion-ok .route__bus { opacity: 0; }

/* ---------- 06 · Tu historia (gol) ---------- */
.dream { position: relative; background: var(--navy-950); }
.dream__pin { position: relative; display: grid; align-items: end; min-height: max(100svh, 680px); overflow: hidden; }
.dream__media { position: absolute; inset: 0; }
.dream__poster, .dream__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.dream__canvas { opacity: 0; }
.dream__canvas.is-live { opacity: 1; }
.dream__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(2, 14, 28, 0.9) 0%, rgba(2, 14, 28, 0.55) 38%, rgba(2, 14, 28, 0) 66%), linear-gradient(0deg, rgba(2, 14, 28, 0.92) 0%, rgba(2, 14, 28, 0) 46%);
}
.dream__copy { position: relative; z-index: 2; display: grid; gap: clamp(18px, 2.4vw, 30px); max-width: 1180px; padding: var(--space-xl) var(--gutter) clamp(56px, 11vh, 120px); }
.dream__lines { display: grid; gap: 10px; }
.dream__lines li { font: 800 clamp(1.8rem, 3.2vw, 3.4rem)/1 var(--font-display); text-transform: uppercase; max-width: 22ch; }
.dream__title { font-size: clamp(3.2rem, 7.6vw, 9rem); }
.dream__title span { display: block; }
.dream__end { display: grid; gap: 22px; justify-items: start; }
.dream__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(245, 248, 252, 0.12); }
.dream__progress i { position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left center; }

.dream.is-cinematic .dream__pin { height: 100svh; align-items: stretch; }
.dream.is-cinematic .dream__copy { grid-template-areas: "stack"; align-items: end; height: 100%; padding-top: 0; }
.dream.is-cinematic .dream__copy > * { grid-area: stack; }
.dream.is-cinematic .dream__copy > .eyebrow { align-self: start; margin-top: calc(var(--header-h) - 20px); }
.dream.is-cinematic .dream__lines { position: relative; height: 1em; }
.dream.is-cinematic .dream__lines li { position: absolute; left: 0; bottom: 0; opacity: 0; font-size: clamp(2.4rem, 4.8vw, 5.4rem); max-width: 18ch; }
.dream.is-cinematic .dream__title { align-self: end; margin-bottom: clamp(120px, 20vh, 200px); }
.dream.is-cinematic .dream__end { align-self: end; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .exp.is-cinematic .exp__copy { width: 64vw; }
  .exp.is-cinematic .exp__note { display: none; }
}
@media (max-width: 899px) {
  /* El balón queda por encima del titular (antes lo pisaba en móviles pequeños) */
  .page--con .hero__player { right: -3vw; bottom: 39.5%; height: 40%; }
  .exp { --cut: 10vw; }
  .exp__stage { aspect-ratio: 4 / 5; clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%); }
  .exp__beats { grid-template-columns: 1fr; gap: 28px; }
  .cdl__grid { grid-template-columns: 1fr; }
  .cdl__map { order: -1; margin: 0 calc(var(--gutter) * -0.5); }
  .route { grid-template-columns: 1fr; }
  .route__pt text { font-size: 22px; }
  .route__km text { font-size: 40px; }
  .dream__poster, .dream__canvas { object-position: 38% 50%; }
}
@media (max-width: 520px) {
  .page--con .hero__player { right: -6vw; height: 38%; bottom: 42%; }
}
@media (max-width: 520px) and (max-height: 720px) {
  /* Teléfonos bajos: el texto ocupa más alto, el jugador sube y se reduce un poco */
  .page--con .hero__player { height: 34%; bottom: 46.5%; }
}
