/* Chaos of Destiny · la página del juego. Empieza como un cuento y acaba ardiendo. */
body.game { background: #05070f; }
body.game::before { z-index: 3; }
#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; mix-blend-mode: screen; }
main, .foot, .gnav { position: relative; z-index: 2; }
.section { position: relative; }
.night { position: fixed; inset: 0; z-index: 70; background: #000; opacity: 0; pointer-events: none; transition: opacity .12s; }
.night.on { opacity: .95; }
.night .eyes { position: absolute; display: flex; gap: 18px; }
.night .eyes i { width: 16px; height: 9px; border-radius: 50%; background: #F4EEF8; box-shadow: 0 0 14px 3px #F4EEF8; animation: eye 4s infinite; }

/* barra */
.gnav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); background: linear-gradient(180deg, rgba(5,7,15,.85), transparent); }
.gnav.is-solid { background: rgba(5,7,15,.86); backdrop-filter: blur(12px); }
.gnav__back { font-family: var(--f-kick); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.gnav__links { display: flex; gap: clamp(12px, 2vw, 28px); }
.gnav__links a { font-family: var(--f-kick); font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; transition: text-shadow .15s; }
.gnav__links a:hover { text-shadow: 0 0 14px #ffb347; }

/* portada */
.ghero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 110px 0 70px; overflow: hidden; }
.ghero__art { position: absolute; inset: 0; background: url("../../assets/img/cod/portada.jpg?v=1") center / cover no-repeat; opacity: .35; filter: blur(14px) saturate(1.2); transform: scale(1.06); }
@keyframes kb { to { transform: scale(1.14) translate(-1.5%, -1%); } }
.ghero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,7,15,.92) 12%, rgba(5,7,15,.35) 60%, rgba(5,7,15,.7)), linear-gradient(180deg, transparent 60%, #05070f); }
.ghero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.ghero__text { display: grid; gap: 20px; justify-items: start; }
.ghero__logo { width: min(100%, 760px); height: auto; filter: drop-shadow(0 0 22px rgba(155,63,212,.7)) drop-shadow(0 0 60px rgba(255,120,40,.35)); cursor: pointer; }
.ghero__pitch { font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.5; max-width: 38ch; }
.ghero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; padding: 18px 22px; width: min(100%, 520px); }
.facts dt { font-family: var(--f-mono); font-size: .72rem; opacity: .8; text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.pcover { margin: 0; justify-self: center; width: 100%; transform-style: preserve-3d; perspective: 900px; }
.pcover img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 2px #cfd8ff, 0 0 0 5px #070b26, 0 0 0 6px rgba(207,216,255,.45), 0 40px 90px -20px rgba(0,0,0,.9), 0 0 100px -10px rgba(255,110,30,.5); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .15s; }

/* del cuento a lo que hay debajo: el scroll quema el mundo */
.world { position: relative; height: 420vh; }
.world__stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.world__layer { position: absolute; inset: 0; }
.world__layer img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.world__day img { object-position: 50% 100%; }
.world__sky { position: absolute; left: 0; top: 0; width: 66%; height: 40%; background: linear-gradient(90deg, #5da4d1, #6bb1da 70%, rgba(107,177,218,0)); -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.world__fire { opacity: 0; }
.world__dusk { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,120,40,.0), rgba(255,100,30,.5)); opacity: 0; mix-blend-mode: multiply; }
.world__vig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,.75) 100%); }
.world__cap { position: absolute; left: 0; right: 0; bottom: 8vh; display: grid; gap: 14px; justify-items: start; }
.world__cap .rpgwin { max-width: 560px; transition: opacity .35s, transform .35s; }
.world__cap .rpgwin.swap { opacity: 0; transform: translateY(8px); }
.world__txt { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 800; line-height: 1.2; font-family: var(--f-title); }
.world__hint { opacity: .85; animation: breathe 3s ease-in-out infinite; }

/* tráiler */
.trailer { padding: 14px; } .trailer video { width: 100%; border-radius: 8px; display: block; background: #000; }

/* episodios: sin portadas, el mundo se va oscureciendo de carta en carta */
.eps { list-style: none; padding: 0 0 18px; margin: 30px 0 0; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; }
.ep { flex: 0 0 min(280px, 74vw); scroll-snap-align: start; display: grid; gap: 4px; transition: transform .25s; }
.ep__art { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; margin-bottom: 8px; background: var(--scene) var(--pos, 50% 50%) / cover no-repeat; box-shadow: 0 0 0 2px #cfd8ff, 0 0 0 5px #070b26, 0 20px 40px -10px rgba(0,0,0,.8); transition: box-shadow .25s; }
.ep__art::before { content: ""; position: absolute; inset: 0; background: var(--tint, transparent); }
.ep__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(5,7,15,.75)); }
.ep__art b { position: absolute; z-index: 1; left: 16px; bottom: 8px; font-family: var(--f-kick); font-size: 3.4rem; line-height: 1; color: #fff; letter-spacing: .02em; text-shadow: 0 0 6px rgba(255,255,255,.5), 0 0 26px var(--glow, #ffd24a), 0 4px 0 #070b26; }
.ep__k { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; opacity: .85; }
.ep__t { font-weight: 800; font-size: 1.15rem; }
.ep--0 { --scene: url("../../assets/img/cod/capturas/01-bosque-s.jpg"); --glow: #5bb8f0; }
.ep--1 { --scene: url("../../assets/img/cod/capturas/02-pueblo-s.jpg?v=2"); --glow: #5bb8f0; }
.ep--2 { --scene: url("../../assets/img/cod/capturas/05-desierto-s.jpg"); --glow: #ff9a3d; }
.ep--3 { --scene: url("../../assets/img/cod/capturas/11-cueva-gb-s.jpg"); --glow: #c86bff; }
.ep--4 { --scene: url("../../assets/img/cod/capturas/12-jefe-s.jpg?v=2"); --glow: #ff5a2a; }
.ep:hover { transform: translateY(-6px); } .ep:hover .ep__art { box-shadow: 0 0 0 2px #ffd24a, 0 0 0 5px #070b26, 0 20px 50px -8px rgba(255,150,40,.5); }
.ep .gem-spot { z-index: 2; right: 14%; top: 22%; cursor: pointer; }

/* grupo: cartas que se giran */
.party { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.pcard { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; perspective: 1000px; cursor: pointer; text-align: left; }
.pcard__in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.3,1.3,.4,1); }
.pcard[aria-pressed="true"] .pcard__in { transform: rotateY(180deg); }
.pcard__face, .pcard__back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; padding: 18px; display: grid; align-content: end; gap: 4px; background: linear-gradient(180deg, rgba(20,34,104,.9), rgba(6,10,44,.96)); box-shadow: 0 0 0 2px #cfd8ff, 0 0 0 5px #070b26, 0 24px 50px -10px rgba(0,0,0,.8), inset 0 0 40px rgba(70,100,240,.25); transition: box-shadow .2s; }
.pcard:hover .pcard__face { box-shadow: 0 0 0 2px #ffd24a, 0 0 0 5px #070b26, 0 24px 60px -8px rgba(255,150,40,.5), inset 0 0 40px rgba(70,100,240,.25); }
.pcard__face img { position: absolute; left: 50%; top: 6%; width: 78%; max-height: 66%; object-fit: contain; transform: translateX(-50%); filter: drop-shadow(0 12px 18px rgba(0,0,0,.6)); transition: transform .3s; }
.pcard:hover .pcard__face img { transform: translateX(-50%) translateY(-6px) scale(1.04); }
.pcard__face b, .pcard__back b { font-size: 1.5rem; font-weight: 800; position: relative; } .pcard__face small { position: relative; opacity: .9; line-height: 1.3; }
.pcard__back { transform: rotateY(180deg); align-content: center; gap: 12px; } .pcard__back span { line-height: 1.5; }

.gem-spot { position: absolute; right: 8%; top: 18%; width: 20px; height: 26px; opacity: .0; clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); background: radial-gradient(circle at 35% 30%, #fff, var(--magenta) 55%, var(--violet)); transition: opacity .3s; }
.ep:hover .gem-spot { opacity: .85; animation: gemglow 1.4s ease-in-out infinite; }

/* capturas */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.shotc { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #000; aspect-ratio: 4 / 3; box-shadow: 0 0 0 2px #cfd8ff, 0 0 0 5px #070b26, 0 20px 40px -10px rgba(0,0,0,.8); transition: transform .25s, box-shadow .25s; }
.shotc--big { grid-column: span 2; grid-row: span 2; }
.shotc img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .5s; }
.shotc__cap { position: absolute; left: 10px; bottom: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(5,8,30,.85); box-shadow: inset 0 0 0 1px rgba(207,216,255,.4); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: 0; translate: 0 6px; transition: opacity .2s, translate .2s; pointer-events: none; }
.shotc:hover, .shotc:focus-visible { transform: translateY(-4px); box-shadow: 0 0 0 2px #ffd24a, 0 0 0 5px #070b26, 0 20px 50px -8px rgba(255,150,40,.45); }
.shotc:hover img { transform: scale(1.04); }
.shotc:hover .shotc__cap, .shotc:focus-visible .shotc__cap { opacity: 1; translate: 0 0; }
.lightbox { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; background: rgba(2,3,10,.95); padding: 20px; cursor: zoom-out; }
.lightbox.on { display: grid; }
.lightbox img { max-width: min(94vw, 1412px); max-height: 84vh; border-radius: 10px; cursor: pointer; box-shadow: 0 0 0 2px #cfd8ff, 0 0 0 5px #070b26, 0 0 120px rgba(255,140,40,.3); }
.lightbox button { position: absolute; border: 0; cursor: pointer; color: var(--text); background: #0a1030; box-shadow: 0 0 0 2px #cfd8ff; transition: box-shadow .15s, transform .15s; }
.lightbox button:hover { box-shadow: 0 0 0 2px #ffd24a, 0 0 24px rgba(255,180,60,.5); }
.lb__x { top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; }
.lb__nav { top: 50%; width: 50px; height: 50px; margin-top: -25px; border-radius: 50%; font-size: 1.8rem; line-height: 1; }
.lb__nav--p { left: 18px; } .lb__nav--n { right: 18px; }
.lb__cap { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; padding: 6px 16px; border-radius: 999px; background: rgba(5,8,30,.9); box-shadow: inset 0 0 0 1px rgba(207,216,255,.4); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 900px) { .shots { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .shotc__cap { opacity: 1; translate: 0 0; font-size: .64rem; } .lb__nav { top: auto; bottom: 64px; margin: 0; } }

/* música */
.player { display: grid; gap: 18px; margin-top: 26px; padding: 26px 28px; }
.player__now { display: grid; gap: 4px; } .player__now b { font-size: 1.6rem; font-weight: 800; }
.player__ctl { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.player__ctl button { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(130,160,255,.2); box-shadow: inset 0 0 0 1.5px rgba(207,216,255,.6); font-size: 1rem; transition: transform .12s, background .12s; }
.player__ctl button:hover:not(:disabled) { transform: scale(1.1); background: rgba(255,210,74,.3); } .player__ctl button:disabled { opacity: .35; cursor: default; }
.player__play { width: 58px !important; height: 58px !important; font-size: 1.3rem !important; }
.player__ctl input[type="range"] { flex: 1 1 200px; accent-color: #ffd24a; }
#pl-viz { width: 100%; height: 60px; opacity: .85; }
.player__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.player__list button { width: 100%; text-align: left; padding: 10px 14px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; transition: background .12s; }
.player__list button:hover, .player__list .on button { background: rgba(130,160,255,.28); } .player__list .on button::before { content: "▶"; color: #ffd24a; margin-right: 10px; }

/* archivo */
.archive { margin-top: 26px; padding: 26px 28px; display: grid; gap: 16px; background: radial-gradient(60% 80% at 85% 0%, rgba(155,63,212,.35), transparent 70%), radial-gradient(50% 70% at 0% 100%, rgba(80,160,255,.18), transparent 70%), linear-gradient(180deg, rgba(10,14,48,.92), rgba(6,10,36,.97)); }
.archive__head { display: flex; justify-content: space-between; }
.archive__cat { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; padding-top: 10px; }
.archive .catty { position: relative; display: block; padding: 0; background: none; box-shadow: none; width: 120px; }
.archive .fiche { flex: 1 1 260px; }
.jugar { text-align: center; display: grid; justify-items: center; gap: 14px; } .jugar .lead { margin-inline: auto; } .jugar .ghero__cta { justify-content: center; }

@media (max-width: 900px) {
  .gnav__links { display: none; }
  .ghero__grid { grid-template-columns: 1fr; } .pcover { order: -1; }
  .party { grid-template-columns: 1fr 1fr; }
  .world { height: 360vh; } .facts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ghero__art { animation: none; } #embers { display: none; } }

/* rendimiento: nada de mezclas de pantalla completa */
#embers { mix-blend-mode: normal; }
.world__dusk { mix-blend-mode: normal; background: linear-gradient(180deg, rgba(255,120,40,0), rgba(255,90,30,.38)); }
.world__layer { will-change: opacity; }
html.lowfx #embers, html.lowfx .ghero__art { animation: none; }
