/* Brawlnimals — página del juego. Noche de estadio: cielo azul profundo, la luz cálida de los focos y el arte del juego.
   Una idea por pantalla y el texto siempre sobre la noche, nunca encima de una imagen con ruido.
   Las secciones con [data-scroll] y [data-top] reciben --p desde js/site.js; el recorrido [data-tour] cambia de paso al
   bajar; el plantel, las ligas y la frase que se enciende los mueve js/brawlnimals.js. */

.bn { --ink-b: #f3f6ff; --soft-b: #a3b1d6; --oro: #ffcd4f; --ambar: #ff9f2e; --cielo: #8fd0ff; --noche: #070d1f; --cielo-alto: #01103e;
  --spring: cubic-bezier(.34, 1.32, .5, 1); }
.bn main { position: relative; overflow-x: clip; }
.bn main > section { position: relative; z-index: 1; }
.bn-soft { color: var(--soft-b); }
.bn .kicker { font-family: var(--display); font-weight: 600; font-size: clamp(17px, 1.6vw, 21px); letter-spacing: -.01em; color: var(--oro); }
.bn .lead { color: var(--soft-b); text-wrap: balance; }
.bn-grad { background: linear-gradient(180deg, #fff 30%, #cfe6ff 70%, var(--cielo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bn-grad-warm { background: linear-gradient(90deg, #ffe08a, var(--oro) 40%, var(--ambar)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bn-head { text-align: center; display: grid; gap: 14px; justify-items: center; margin: 0 auto 60px; }
.bn-head .lead { max-width: 620px; }
[data-rar="comun"] { --rc: #a9d6ff; } [data-rar="rara"] { --rc: #5aa9ff; } [data-rar="epica"] { --rc: #c68bff; } [data-rar="legendaria"] { --rc: #ffcd4f; }

/* Luz de estadio: tres manchas muy lentas detrás de todo (la apertura, que es opaca, las tapa). */
.bn-aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bn-aurora i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .5; will-change: transform;
  background: radial-gradient(closest-side, rgba(58, 104, 255, .2), transparent); animation: bn-aur 28s ease-in-out infinite alternate; }
.bn-aurora i:nth-child(1) { left: -25vmax; top: -30vmax; }
.bn-aurora i:nth-child(2) { right: -30vmax; top: 10vh; background: radial-gradient(closest-side, rgba(255, 180, 70, .11), transparent); animation-duration: 34s; animation-delay: -10s; }
.bn-aurora i:nth-child(3) { left: 10vw; bottom: -45vmax; background: radial-gradient(closest-side, rgba(90, 200, 255, .09), transparent); animation-duration: 40s; }
@keyframes bn-aur { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* El iPhone de estas pantallas: proporciones del iPhone 17 Pro (pantalla 1206 × 2622, bisel 3,4 % del ancho), para que las
   capturas del juego entren justas, sin recortes. */
.bn .iphone.portrait { height: calc(var(--w) * 2.0943); }

/* Emoticono animado: la tira de cuatro fotogramas del juego. Corre una vez y descansa, para que no agote. */
.emo { display: block; width: 100%; aspect-ratio: 1; background: var(--img) 0 0 / 400% 100% no-repeat; animation: bn-emo 2.6s step-end infinite; }
@keyframes bn-emo { 0% { background-position: 0 0; } 9% { background-position: 33.333% 0; } 18% { background-position: 66.667% 0; } 27% { background-position: 100% 0; }
  36% { background-position: 66.667% 0; } 45% { background-position: 33.333% 0; } 54%, 100% { background-position: 0 0; } }

/* ——— 1 · Apertura ———
   --cw es el ancho del grupo de héroes; todo lo demás (estadio, polvo, focos) se coloca respecto a él, así que la escena
   se compone igual en cualquier pantalla: cielo para el texto, focos a la altura de la cabeza del gorila, gradas detrás. */
.bh { --cw: min(100vw, 880px, 104svh); --bw: max(100vw, 1100px); position: relative; isolation: isolate; overflow: clip; text-align: center;
  background: var(--cielo-alto); min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start;
  padding: calc(var(--nav) + 5vh) 0 calc(var(--cw) * 1.0 + 2vh); }
.bh-scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bh-noche { position: absolute; left: 50%; width: var(--bw); max-width: none; margin-left: calc(var(--bw) / -2); height: auto;
  bottom: calc(var(--cw) * 1.0245 - 64px - var(--bw) * .5885);
  transform: translateY(calc(var(--p, 0) * 5vh)) scale(calc(1.02 + var(--p, 0) * .03)); transform-origin: 50% 70%; will-change: transform;
  -webkit-mask: linear-gradient(transparent, #000 9%); mask: linear-gradient(transparent, #000 9%);
  animation: bh-luz 1.6s var(--ease) both; }
@keyframes bh-luz { from { opacity: 0; transform: scale(1.1); } }
.bh-cast { position: absolute; left: 50%; }
.bh-cast img { display: block; width: 100%; height: auto; will-change: transform; }
.c-heroes { width: var(--cw); margin-left: calc(var(--cw) / -2); bottom: calc(var(--cw) * -.07);
  animation: bh-carga 1.25s .15s var(--spring) both; }
.c-heroes img { transform-origin: 50% 72%; transform: translateY(calc(var(--p, 0) * -9vh)) scale(calc(1 + var(--p, 0) * .07));
  filter: drop-shadow(0 30px 40px rgba(2, 6, 24, .5)); }
@keyframes bh-carga { from { opacity: 0; transform: translateY(9%) scale(.9); } }
.c-polvo { --pw: calc(var(--cw) * 1.3); width: var(--pw); margin-left: calc(var(--pw) / -2); bottom: calc(var(--cw) * -.545);
  -webkit-mask: linear-gradient(transparent 1%, #000 15%); mask: linear-gradient(transparent 1%, #000 15%);
  animation: bh-polvo 1.6s var(--ease) both; }
.c-polvo img { transform-origin: 50% 60%; transform: translateY(calc(var(--p, 0) * -3vh)) scale(calc(1 + var(--p, 0) * .05)); }
@keyframes bh-polvo { from { opacity: 0; transform: scale(.84); } }
/* Luz: el resplandor cálido de la arena detrás de los héroes y el velo que oscurece los bordes. */
.bh-haz { position: absolute; left: 50%; bottom: calc(var(--cw) * .1); width: calc(var(--cw) * 1.5); aspect-ratio: 1.3; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 176, 74, .38), rgba(255, 150, 60, .12) 55%, transparent); animation: bn-respira 7s ease-in-out infinite; }
@keyframes bn-respira { 50% { opacity: .7; } }
.bh-velo { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(1, 12, 48, .5) 0%, rgba(1, 12, 48, 0) 34%),
              radial-gradient(120% 90% at 50% 62%, transparent 45%, rgba(3, 8, 28, .55) 100%); }
.bh-pie { position: absolute; inset: auto 0 0 0; height: calc(var(--cw) * .3);
  background: linear-gradient(180deg, rgba(7, 13, 31, 0) 0%, rgba(7, 13, 31, .86) 62%, var(--noche) 100%); }
.bh-text { position: relative; display: grid; gap: 16px; justify-items: center; padding: 0 22px;
  transform: translateY(calc(var(--p, 0) * -5vh)); opacity: calc(1 - var(--p, 0) * 1.3); }
.bh-text > * { animation: bh-sube 1s var(--ease) both; }
.bh-text > :nth-child(2) { animation-delay: .08s; } .bh-text > :nth-child(3) { animation-delay: .18s; } .bh-text > :nth-child(4) { animation-delay: .28s; }
@keyframes bh-sube { from { opacity: 0; transform: translateY(22px); } }
.bh-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.02em; color: var(--ink-b); }
.bh-brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.bh-title { font-family: var(--display); font-weight: 700; font-size: clamp(36px, min(8.2vw, 11.4vh), 116px); line-height: .98; letter-spacing: -.045em; padding-bottom: .06em;
  filter: drop-shadow(0 4px 30px rgba(1, 10, 40, .6)); }
.bh-text .lead { max-width: 600px; color: #c4d0ee; text-shadow: 0 1px 18px rgba(1, 10, 40, .8); }
.bh-text .store-badge { margin-top: 6px; }

/* ——— 2 · La idea ——— */
.bm { max-width: 1020px; margin: 0 auto; padding: 17vh 22px 15vh; text-align: center; display: grid; gap: 34px; justify-items: center; }
.bm-vidas { display: flex; gap: 10px; }
.bm-vidas img { width: 44px; height: 44px; filter: drop-shadow(0 8px 16px rgba(255, 50, 70, .4)); opacity: 0; transform: scale(.3); transition: opacity .4s var(--ease), transform .7s var(--spring); }
.bm.vivo .bm-vidas img { opacity: 1; transform: none; }
.bm.vivo .bm-vidas img:nth-child(2) { transition-delay: .12s; } .bm.vivo .bm-vidas img:nth-child(3) { transition-delay: .24s; }
.bm-frase { font-family: var(--display); font-weight: 600; font-size: clamp(27px, 4.4vw, 62px); line-height: 1.1; letter-spacing: -.032em; color: var(--ink-b); text-wrap: balance; }
.bm-frase .w { opacity: .2; transition: opacity .45s var(--ease); }
.bm-frase .w.on { opacity: 1; }

/* ——— 3 · La batalla ———
   --k va de 0 a 1 mientras el vídeo crece. El titular vive sobre la noche y se va antes de que el vídeo llegue arriba;
   el vídeo acaba a todo el ancho con su proporción entera (2,17:1): se ve la batalla completa, sin recortes y sin nada encima. */
.bf { height: 290vh; }
.bf-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden;
  --k: clamp(0, calc((var(--p, 0) - .12) * 2.4), 1);
  --w0: min(72vw, 1080px); --hf: min(calc(100vw / 2.167), calc(100svh - var(--nav)));
  --w: calc(var(--w0) + (100vw - var(--w0)) * var(--k)); }
.bf-copy { position: absolute; left: 0; right: 0; top: calc(var(--nav) + 7svh); display: grid; gap: 14px; justify-items: center; text-align: center; padding: 0 22px;
  opacity: calc(1 - var(--k) * 2.6); transform: translateY(calc(var(--k) * -9svh)); }
.bf-title { font-family: var(--display); font-weight: 600; font-size: clamp(40px, min(6.6vw, 9.4svh), 92px); line-height: 1.02; letter-spacing: -.035em; color: var(--ink-b); }
.bf-copy .lead { max-width: 780px; }
.bf-frame { position: absolute; left: 50%; width: var(--w); height: min(calc(var(--w) / 2.167), calc(100svh - var(--nav))); margin-left: calc(var(--w) / -2); overflow: hidden; background: #000;
  top: calc(61svh + (var(--nav) + (100svh - var(--nav) - var(--hf)) / 2 - 61svh) * var(--k));
  border-radius: calc((1 - var(--k)) * 30px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, calc((1 - var(--k)) * .1)), 0 50px 120px -30px rgba(0, 0, 0, .8), 0 0 140px rgba(255, 170, 70, calc(.1 + var(--k) * .1)); }
.bf-frame img, .bf-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bf-frame video { opacity: 0; transition: opacity .8s var(--ease); }
.bf-frame video.ready { opacity: 1; }

/* ——— 4 · Recorrido ——— */
.tour { position: relative; height: 380vh; }
.tour-sticky { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px;
  max-width: 1080px; margin: 0 auto; padding: var(--nav) 22px 0; }
.tour-copy { position: relative; height: 400px; }
.tour-step { position: absolute; inset: 0; display: grid; align-content: center; gap: 14px; opacity: 0; transform: translateY(26px);
  transition: opacity .6s var(--ease), transform .8s var(--ease); pointer-events: none; }
.tour-step.on { opacity: 1; transform: none; pointer-events: auto; }
.tour-step .h-l { font-size: clamp(30px, 3.6vw, 50px); }
.tour-step .lead { max-width: 430px; }
.tour-phone { --pw: min(320px, 30vw, calc((100svh - var(--nav) - 90px) / 2.0943)); position: relative; display: grid; justify-items: center; gap: 22px; }
.tour-phone .iphone.portrait { --w: var(--pw); transform: none; z-index: 1;
  box-shadow: 0 0 0 1.5px #2a2a2e, 0 0 0 3px #0d0d0f, 0 60px 120px -30px rgba(255, 170, 60, .3); }
.tour-glow { position: absolute; left: 50%; top: 45%; width: min(680px, 70vw, 76vh); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--g, rgba(58, 150, 255, .3)), transparent); transition: background 1s var(--ease); }
.tour[data-step="1"] .tour-glow { --g: rgba(255, 140, 60, .3); }
.tour[data-step="2"] .tour-glow { --g: rgba(255, 205, 79, .3); }
.tour[data-step="3"] .tour-glow { --g: rgba(110, 224, 120, .24); }
.tour-screen { opacity: 0; transform: scale(1.04); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.tour-screen.on { opacity: 1; transform: none; }
/* El vídeo del paso del combate: solo se ve en su paso (site.css lo enseña en cuanto carga). */
.tour-phone .iphone .screen video.tour-screen:not(.on) { opacity: 0; }
.tour-phone .iphone .screen video.tour-screen.on { opacity: 1; }
.tour-dots { display: flex; gap: 8px; z-index: 1; }
.tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .25); transition: width .5s var(--ease), background .5s; }
.tour-dots i.on { width: 22px; background: var(--oro); }
/* Las criaturas de cada paso, asomando por los lados del iPhone (sin tapar la pantalla). */
.tour-deco { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tour-deco .fl { position: absolute; width: clamp(110px, 11vw, 170px); opacity: 0; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .5));
  transform: translateY(30px) scale(.6); transition: opacity .5s var(--ease), transform .8s var(--spring); }
.tour-deco .f-a { left: calc(50% + var(--pw) / 2 - 30px); top: 4%; }
.tour-deco .f-b { left: calc(50% - var(--pw) / 2 - clamp(110px, 11vw, 170px) + 30px); top: 58%; transition-delay: .08s; }
.tour-deco .izq { scale: -1 1; }
.tour-deco.on .fl { opacity: 1; transform: none; }
.tour-deco.on .fl.f-a { animation: float 6s ease-in-out .9s infinite; }

/* ——— 5 · El plantel ——— */
.br { max-width: 1180px; margin: 0 auto; padding: 17vh 22px 9vh; }
.br-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 90px); max-width: 1000px; margin: 0 auto; }
.br-deck { position: relative; display: grid; place-items: center; justify-self: end; padding: 34px 20px; }
.br-rays { position: absolute; left: 50%; top: 50%; width: 170%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc, #5aa9ff) 42%, transparent), transparent 72%); transition: opacity .6s var(--ease); opacity: .8; }
.br-rays::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; opacity: 0; transition: opacity .6s var(--ease);
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 110, .34) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 78%); mask: radial-gradient(closest-side, #000 20%, transparent 78%); animation: bn-giro 40s linear infinite; }
@keyframes bn-giro { to { transform: rotate(360deg); } }
.br.evo .br-rays::after { opacity: 1; }
.br-cards { position: relative; width: min(350px, 70vw, 44svh); aspect-ratio: 520 / 650;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); transform-style: preserve-3d; }
.br-card { position: absolute; inset: 0; border-radius: 7.5% / 6%; overflow: hidden; opacity: 0; transform: translateX(46px) rotate(7deg) scale(.9);
  transition: opacity .4s var(--ease), transform .75s var(--spring); background: #0d1630;
  box-shadow: 0 34px 70px -18px rgba(0, 0, 0, .75), 0 0 60px -8px color-mix(in srgb, var(--rc) 55%, transparent); }
.br-card.on { opacity: 1; transform: rotate(-2.5deg); z-index: 1; }
.br-card.out { opacity: 0; transform: translateX(-46px) rotate(-9deg) scale(.9); }
.br-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.br-card .evo { opacity: 0; transition: opacity .3s var(--ease) .12s; }
.br.evo .br-card .evo { opacity: 1; }
.br-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; transition: box-shadow .5s var(--ease);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -30px 60px rgba(0, 0, 0, .12); }
.br.evo .br-card::after { box-shadow: inset 0 0 0 3px rgba(255, 220, 120, .95), inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 0 40px rgba(255, 210, 90, .35); }
.br-flash { position: absolute; z-index: 2; inset: -30%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, #fff 0%, rgba(255, 232, 150, .9) 34%, rgba(255, 190, 70, 0) 70%); }
.br.flash .br-flash { animation: br-flash .7s var(--ease); }
@keyframes br-flash { 0% { opacity: 0; transform: scale(.4); } 28% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
.br-side { display: grid; gap: 26px; justify-items: start; }
.br-infos { display: grid; }
.br-info { grid-area: 1 / 1; display: grid; gap: 12px; align-content: start; justify-items: start; opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .18s var(--ease), transform .4s var(--ease); }
.br-info.on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .4s var(--ease) .2s, transform .55s var(--ease) .2s; }
.br-rar { font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--rc); padding: 5px 12px; border-radius: 99px;
  background: color-mix(in srgb, var(--rc) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 40%, transparent); }
.br-name { display: grid; font-family: var(--display); font-weight: 600; font-size: clamp(36px, 4.3vw, 58px); line-height: 1.02; letter-spacing: -.035em; color: var(--ink-b); }
.br-name span { grid-area: 1 / 1; transition: opacity .4s var(--ease), transform .55s var(--ease); }
.br-name .n1 { opacity: 0; transform: translateY(12px); background: linear-gradient(90deg, #fff0b8, var(--oro) 45%, var(--ambar)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.br-name .n0 { transition-delay: .16s; }
.br.evo .br-name .n0 { opacity: 0; transform: translateY(-12px); transition-delay: 0s; transition-duration: .2s, .4s; }
.br.evo .br-name .n1 { opacity: 1; transform: none; transition-delay: .16s; }
.br:not(.evo) .br-name .n1 { transition-duration: .2s, .4s; }
.br-trick { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.35; letter-spacing: -.012em; color: #c6d1ee; max-width: 400px; }
.br-evo { display: grid; font-size: 15px; color: var(--soft-b); }
.br-evo span { grid-area: 1 / 1; transition: opacity .4s var(--ease); }
.br-evo b { font-weight: 600; color: var(--oro); }
.br-evo .v1, .br.evo .br-evo .v0 { opacity: 0; }
.br.evo .br-evo .v1 { opacity: 1; }
.br-evo .v1 b { color: var(--ink-b); }
.br-toggle { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px 0 16px; border-radius: 99px; font-size: 16px; font-weight: 500; color: #2d1c00;
  background: linear-gradient(180deg, #ffe58a, #ffb52e); box-shadow: 0 10px 26px -6px rgba(255, 180, 60, .55), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .3s var(--ease), background .4s, color .4s, box-shadow .4s; }
.br-toggle:hover { transform: translateY(-1px); }
.br-toggle:focus-visible, .br-chip:focus-visible, .bl-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.br-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.br-toggle .t1, .br.evo .br-toggle .t0 { display: none; }
.br.evo .br-toggle .t1 { display: inline; }
.br.evo .br-toggle { color: var(--ink-b); background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.br-pick { --cs: clamp(50px, 5.2vw, 64px); display: grid; grid-template-columns: repeat(10, var(--cs)); gap: 14px 12px; justify-content: center; margin-top: 62px; }
.br-chip { position: relative; width: var(--cs); height: var(--cs); border-radius: 50%; opacity: .66; transition: transform .45s var(--spring), opacity .3s, box-shadow .3s; }
.br-chip img { width: 100%; height: 100%; border-radius: 50%; }
.br-chip:hover { opacity: 1; transform: scale(1.08); }
.br-chip.on { opacity: 1; transform: scale(1.16); box-shadow: 0 0 0 2.5px var(--noche), 0 0 0 5px var(--rc), 0 0 30px color-mix(in srgb, var(--rc) 60%, transparent); }

/* ——— 6 · Ligas: un viaje por las ocho arenas ——— */
.bl-intro { padding: 17vh 22px 0; }
.bl-intro .bn-head { margin-bottom: 0; }
.bl { height: 560vh; margin-top: 6vh; }
.bl-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; justify-items: center;
  padding: var(--nav) 22px max(26px, 4.4svh); }
/* La panorámica de cada arena (el estandarte de su liga), a todo lo ancho y fundida con la noche por abajo. */
.bl-sky { position: absolute; inset: var(--nav) 0 auto 0; height: min(62svh, max(100vw / 2.5, 56svh));
  -webkit-mask: linear-gradient(#000 38%, transparent 96%); mask: linear-gradient(#000 38%, transparent 96%); }
.bl-pano { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1.1s var(--ease), transform 1.6s var(--ease); }
.bl-pano.on { opacity: 1; transform: none; }
.bl-islas { position: relative; z-index: 1; align-self: end; width: min(700px, 94vw, 76svh); aspect-ratio: 3 / 2; margin-bottom: -1.5svh; }
.bl-isla { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: translateY(40px) scale(.84);
  transition: opacity .45s var(--ease), transform .85s var(--spring); filter: drop-shadow(0 46px 40px rgba(0, 0, 0, .55)); }
.bl-isla.on { opacity: 1; transform: none; }
.bl-isla.on { animation: bl-flota 7s ease-in-out 1s infinite; }
@keyframes bl-flota { 50% { translate: 0 -10px; } }
.bl-caps { position: relative; z-index: 1; display: grid; justify-items: center; }
.bl-cap { grid-area: 1 / 1; display: flex; align-items: center; gap: 16px; opacity: 0; transform: translateY(14px); transition: opacity .4s var(--ease), transform .6s var(--ease); text-align: left; }
.bl-cap.on { opacity: 1; transform: none; transition-delay: .1s; }
.bl-cap img { width: clamp(64px, 6.4vw, 86px); height: auto; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.bl-cap p { display: grid; gap: 2px; }
.bl-cap b { font-family: var(--display); font-weight: 600; font-size: clamp(34px, min(4.6vw, 7svh), 58px); line-height: 1; letter-spacing: -.035em; color: var(--ink-b); }
.bl-cap p > span { font-size: clamp(17px, 1.6vw, 21px); color: var(--soft-b); font-weight: 450; }
.bl-dots { position: relative; z-index: 1; display: flex; gap: clamp(4px, 1vw, 12px); margin-top: clamp(12px, 2.4svh, 24px); }
.bl-dot { width: clamp(34px, 4vw, 44px); height: clamp(34px, 4vw, 44px); padding: 0; opacity: .32; filter: grayscale(.7); transition: opacity .4s, transform .5s var(--spring), filter .4s; }
.bl-dot img { width: 100%; height: 100%; object-fit: contain; }
.bl-dot.hecha { opacity: .8; filter: none; }
.bl-dot.on { opacity: 1; filter: drop-shadow(0 0 12px rgba(255, 205, 79, .6)); transform: scale(1.3); }
.bl-dot:hover { opacity: 1; }

/* ——— 7 · Premios ——— */
.bw { max-width: 1180px; margin: 0 auto; padding: 17vh 22px 8vh; }
.bw-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.bcard { position: relative; overflow: hidden; border-radius: 30px; padding: 30px; display: grid; align-content: space-between; gap: 22px; min-height: 400px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .025)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); grid-column: span 4;
  transition: transform .6s var(--ease), box-shadow .6s, opacity 1s var(--ease); }
.bcard:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 60px rgba(0, 0, 0, .3); }
.bcard[data-reveal] { transform: translateY(40px) scale(.98); }
.bcard[data-reveal].in { transform: none; }
.bcard h3 { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2vw, 28px); line-height: 1.12; letter-spacing: -.02em; color: var(--ink-b); }
.bcard-text p { margin-top: 8px; color: var(--soft-b); font-size: 16px; line-height: 1.45; max-width: 460px; }
.c-cofre { grid-column: span 7; min-height: 520px;
  background: radial-gradient(80% 70% at 50% 34%, rgba(255, 180, 60, .26), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02)); }
.c-temp { grid-column: span 5; min-height: 520px; padding-top: 0; }
/* El cofre: tiembla, se abre con un destello y vuelve a empezar. */
.cofre { position: relative; height: 330px; }
.cofre img { position: absolute; left: 50%; top: 52%; translate: -50% -50%; width: min(300px, 62%); height: auto; }
.cofre .rayos { top: 44%; width: min(540px, 112%); max-width: none; opacity: 0;
  -webkit-mask: radial-gradient(closest-side, #000 52%, transparent 88%); mask: radial-gradient(closest-side, #000 52%, transparent 88%); }
.c-cofre .bcard-text { position: relative; }
.cofre .abierto { opacity: 0; }
.c-cofre.in .cerrado { animation: cofre-cerrado 5.4s var(--ease) 1s infinite both; }
.c-cofre.in .abierto { animation: cofre-abierto 5.4s var(--ease) 1s infinite both; }
.c-cofre.in .rayos { animation: cofre-rayos 5.4s var(--ease) 1s infinite both; }
@keyframes cofre-cerrado { 0%, 22% { opacity: 1; transform: none; } 26% { transform: rotate(-4deg) scale(1.03); } 30% { transform: rotate(4deg) scale(1.03); } 34% { transform: rotate(-3deg) scale(1.05); }
  38% { opacity: 1; transform: rotate(2deg) scale(1.08); } 40%, 92% { opacity: 0; transform: scale(1.08); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes cofre-abierto { 0%, 39% { opacity: 0; transform: scale(.94); } 40% { opacity: 1; transform: scale(1.14); } 48%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: scale(.98); } }
@keyframes cofre-rayos { 0%, 39% { opacity: 0; transform: scale(.5); } 44% { opacity: 1; transform: scale(1.06); } 50%, 86% { opacity: .9; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(.9); } }
/* Temporada: su cartel pintado y los cinco rangos de Leyenda. */
.temp { position: relative; margin: 0 -30px 26px; }
.temp .cartel { width: 100%; height: 250px; object-fit: cover; -webkit-mask: linear-gradient(#000 55%, transparent); mask: linear-gradient(#000 55%, transparent); }
.temp .rangos { position: absolute; left: 0; right: 0; bottom: -18px; display: flex; justify-content: center; gap: 2%; padding: 0 22px; }
.temp .rangos img { width: 17%; max-width: 88px; height: auto; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); transition: transform .6s var(--spring); }
.temp .rangos img:nth-child(odd) { transform: translateY(8px); }
.c-temp:hover .rangos img { transform: translateY(-4px); }
.c-pase { background: radial-gradient(70% 60% at 50% 30%, rgba(160, 90, 255, .26), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02)); }
.pase { display: grid; place-items: center; height: 200px; }
.pase img { width: 176px; height: auto; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5)) drop-shadow(0 0 40px rgba(190, 120, 255, .35)); animation: float 6s ease-in-out infinite; }
.c-emotes { background: radial-gradient(70% 60% at 50% 30%, rgba(58, 150, 255, .22), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02)); }
.emotes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-self: start; }
.emotes .emo, .bd-emo { border-radius: 26%; background-color: #f6efe0; box-shadow: 0 10px 22px rgba(0, 0, 0, .35), inset 0 -3px 0 rgba(0, 0, 0, .08); }
.emotes .emo { background-origin: content-box; padding: 7%; }
.emotes .emo:nth-child(odd) { rotate: -4deg; } .emotes .emo:nth-child(even) { rotate: 3deg; translate: 0 4px; }
.emotes .emo:nth-child(2) { animation-delay: -.5s; } .emotes .emo:nth-child(3) { animation-delay: -1.2s; } .emotes .emo:nth-child(4) { animation-delay: -1.9s; }
.emotes .emo:nth-child(5) { animation-delay: -.9s; } .emotes .emo:nth-child(6) { animation-delay: -2.2s; } .emotes .emo:nth-child(7) { animation-delay: -.2s; } .emotes .emo:nth-child(8) { animation-delay: -1.6s; }
/* Perfil: estandarte, marco y avatar, montados como en el juego. */
.perfil { position: relative; margin-bottom: 34px; }
.perfil .estandarte { width: 100%; aspect-ratio: 1206 / 520; object-fit: cover; border-radius: 18px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 20px 40px rgba(0, 0, 0, .4); }
.perfil .retrato { position: absolute; left: 18px; bottom: -34px; width: 38%; max-width: 120px; aspect-ratio: 1; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55)); }
.perfil .avatar { position: absolute; inset: 7%; width: 86%; height: 86%; border-radius: 8%; }
.perfil .marco { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ——— 8 · Duelos ——— */
.bd { max-width: 1180px; margin: 0 auto; padding: 14vh 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4vw; }
.bd-copy { display: grid; gap: 16px; }
.bd-copy .lead { max-width: 480px; }
.bd-stage { position: relative; display: grid; place-items: center; padding: 40px 0; }
.bd-glow { position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(58, 130, 255, .3), rgba(255, 180, 70, .1) 55%, transparent); }
.bd-stage .iphone.portrait { --w: min(300px, 62vw); transform: translateY(calc((1 - var(--p, 0)) * 50px)); margin: 0; z-index: 1;
  box-shadow: 0 0 0 1.5px #2a2a2e, 0 0 0 3px #0d0d0f, 0 60px 120px -30px rgba(58, 130, 255, .45); }
.bd-emo { position: absolute; z-index: 2; width: clamp(64px, 6.4vw, 92px); padding: 7px; opacity: 0; transform: translateY(20px) scale(.6);
  transition: opacity .5s var(--ease), transform .8s var(--spring); }
.bd.in .bd-emo { opacity: 1; transform: none; }
.bd-emo.e1 { left: calc(50% + min(150px, 31vw) - 12px); top: 14%; transition-delay: .3s; rotate: 6deg; }
.bd-emo.e2 { left: calc(50% - min(150px, 31vw) - clamp(64px, 6.4vw, 92px) + 12px); top: 46%; transition-delay: .5s; rotate: -6deg; }
.bd-emo.e3 { left: calc(50% + min(150px, 31vw) - 26px); top: 66%; transition-delay: .7s; rotate: -4deg; }
.bd-emo.e2 .emo { animation-delay: -1s; } .bd-emo.e3 .emo { animation-delay: -1.8s; }

/* ——— 9 · En cifras ——— */
.bx { max-width: 1180px; margin: 0 auto; padding: 10vh 22px 4vh; text-align: center; }
.bx-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 54px 0; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.bx-row div { display: grid; gap: 6px; justify-items: center; }
.bx-row b { font-family: var(--display); font-weight: 700; font-size: clamp(54px, 8.4vw, 116px); line-height: .95; letter-spacing: -.05em; padding: 0 .06em .04em;
  background: linear-gradient(180deg, #fff 20%, #ffe9a8 60%, var(--oro)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bx-row span { font-size: clamp(15px, 1.5vw, 19px); color: var(--soft-b); font-weight: 450; }
.bx-nota { display: inline-flex; align-items: center; gap: 12px; margin-top: 34px; font-size: 17px; color: var(--soft-b); }
.bx-nota img { width: 40px; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }

/* ——— 10 · Cierre: dos focos y el logotipo del juego ——— */
.be { position: relative; overflow: clip; padding: 18vh 22px 22vh; text-align: center; display: grid; gap: 18px; justify-items: center;
  background: radial-gradient(90% 60% at 50% 100%, rgba(255, 180, 70, .34), rgba(58, 104, 255, .14) 45%, transparent 75%); }
.be-focos { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: linear-gradient(transparent 0, #000 18%, #000 36%, transparent 92%); mask: linear-gradient(transparent 0, #000 18%, #000 36%, transparent 92%); }
.be-focos i { position: absolute; inset: 0; opacity: .8; filter: blur(10px); }
.be-focos i:nth-child(1) { background: conic-gradient(from 132deg at 8% -8%, transparent 0deg, rgba(255, 226, 150, .22) 10deg, rgba(255, 226, 150, .22) 15deg, transparent 27deg);
  transform-origin: 8% -8%; animation: be-foco-a 9s ease-in-out infinite alternate; }
.be-focos i:nth-child(2) { background: conic-gradient(from 201deg at 92% -8%, transparent 0deg, rgba(255, 226, 150, .22) 12deg, rgba(255, 226, 150, .22) 17deg, transparent 27deg);
  transform-origin: 92% -8%; animation: be-foco-b 11s ease-in-out infinite alternate; }
@keyframes be-foco-a { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
@keyframes be-foco-b { from { transform: rotate(5deg); } to { transform: rotate(-6deg); } }
.be-logo { position: relative; width: min(560px, 84vw); height: auto; margin-bottom: 4px; filter: drop-shadow(0 30px 44px rgba(0, 0, 0, .55)); }
.be .lead, .be .store-badge { position: relative; }
.be .lead { color: #c9d3ee; }
.bn .footer { position: relative; z-index: 1; }

/* ——— Pantallas estrechas ——— */
@media (max-width: 900px) {
  .tour { height: 400vh; }
  .tour-sticky { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 18px; padding-top: calc(var(--nav) + 8px); }
  .tour-phone { order: -1; }
  .tour-phone { --pw: min(300px, 54vw, calc((100svh - var(--nav) - 300px) / 2.0943)); }
  .tour-copy { height: 220px; text-align: center; }
  .tour-step { justify-items: center; align-content: start; gap: 8px; }
  .tour-step .h-l { font-size: clamp(28px, 7.5vw, 40px); }
  .tour-step .lead { font-size: 16px; }
  .tour-deco .fl { width: clamp(84px, 16vw, 130px); }
  .tour-deco .f-a { left: calc(50% + var(--pw) / 2 - 26px); }
  .tour-deco .f-b { left: calc(50% - var(--pw) / 2 - clamp(84px, 16vw, 130px) + 26px); }

  .bn-head { margin-bottom: 40px; }
  .br { padding-top: 12vh; }
  .br-stage { grid-template-columns: 1fr; gap: 14px; }
  .br-deck { justify-self: center; padding: 22px 0; }
  .br-cards { width: min(250px, 62vw, 38svh); }
  .br-side { justify-items: center; text-align: center; gap: 20px; }
  .br-info { justify-items: center; }
  .br-pick { margin-top: 40px; }

  .bw { padding-top: 12vh; }
  .bw-grid { grid-template-columns: 1fr; gap: 14px; }
  .bcard, .c-cofre, .c-temp { grid-column: auto; min-height: 0; padding: 24px; }
  .c-temp { padding-top: 0; }
  .temp { margin: 0 -24px 26px; }
  .cofre { height: 260px; }
  .emotes { max-width: 360px; margin: 0 auto; width: 100%; }
  .perfil { max-width: 420px; width: 100%; margin-left: auto; margin-right: auto; }
  .bd { grid-template-columns: 1fr; text-align: center; gap: 30px; padding: 10vh 22px; }
  .bd-copy { justify-items: center; }
}
/* Tableta: los premios, de dos en dos. */
@media (min-width: 620px) and (max-width: 900px) {
  .bw-grid { grid-template-columns: 1fr 1fr; }
  .c-perfil { grid-column: 1 / -1; }
  .c-cofre, .c-temp { min-height: 440px; }
}
@media (max-width: 700px), (max-aspect-ratio: 1/1) {
  /* La batalla, sin pegar: titular y, debajo, el vídeo entero a lo ancho. */
  .bf { height: auto; padding: 4vh 0 10vh; }
  .bf-sticky { position: static; height: auto; overflow: visible; display: grid; gap: 34px; }
  .bf-copy { position: static; opacity: 1; transform: none; }
  .bf-title { font-size: clamp(34px, 9.6vw, 64px); }
  .bf-frame { position: relative; left: auto; top: auto; margin: 0 auto; width: calc(100% - 24px); height: auto; aspect-ratio: 1920 / 886; border-radius: clamp(18px, 3vw, 28px);
    transform: scale(calc(.94 + min(1, var(--p, 0) * 2.2) * .06)); }
}
@media (max-width: 700px) {
  .br-pick { --cs: min(58px, 15.4vw); grid-template-columns: repeat(5, var(--cs)); gap: 12px 10px; }
  .bx-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 34px 8px; padding: 40px 0; }
  .bx-row div { grid-column: span 2; }
  .bx-row div:nth-child(n + 4) { grid-column: span 3; }
  .bl { height: 520vh; }
}
@media (max-aspect-ratio: 4/5) {
  /* En vertical se usa la escena entera (con la arena), al ancho de la pantalla. */
  .bh { --bw: 100vw; }
  .bh-noche { bottom: calc(var(--cw) * 1.0245 - 44px - var(--bw) * 1.8175); }
}
@media (prefers-reduced-motion: reduce) {
  .bm-frase .w { opacity: 1; }
  .bm-vidas img { opacity: 1; transform: none; }
  .cofre .cerrado { opacity: 0; } .cofre .abierto, .cofre .rayos { opacity: 1; }
}
