/* Astrion · intro: el gato (Morfeo) presenta dos pastillas y la persona elige a dónde ir.
   El video es vertical (9:16): se muestra a todo el alto de la pantalla con los bordes esfumados contra un fondo oscuro que
   REACCIONA al video (partículas que aceleran con el acercamiento del gato, luz roja/azul de las pastillas),
   así no se nota que es un video insertado. intro.js actualiza las variables --p (progreso), --pl (luz de las pastillas),
   --lx/--rx/--ty/--ph (posición y tamaño de las pastillas, medidas sobre el video). */
@font-face { font-family: "Orbitron"; src: url("../fonts/Orbitron.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #050504; --gold: #d2b48c; --gold-hi: #e6cfa8; --text: #f0f0f0; --muted: #a9a39a;
  --red: #ff6a4d; --blue: #4aa3ff;
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --fx: 22%; /* cuánto se esfuman los costados del video */
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
body { color: var(--text); font-family: "Outfit", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage { --p: 0; --pl: 0; position: relative; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }

/* Fondo que prolonga la escena: neblina azulada + piso oscuro. Se aviva con el progreso del video (--p). */
.beam { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; animation: bg-in 1.6s ease .1s forwards;
  background:
    radial-gradient(ellipse 46% 62% at 50% 46%, rgba(38, 56, 76, calc(.35 + var(--p) * .3)), transparent 78%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(10, 14, 20, .9), transparent 70%); }
#dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; animation: bg-in 2.2s ease .3s forwards; }
@keyframes bg-in { to { opacity: 1; } }

.vbox { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; height: 100vh; height: 100svh; width: calc(100vh * 9 / 16); width: calc(100svh * 9 / 16); flex: none; --lx: 28.5; --rx: 74.8; --ty: 41; --ph: 15.6; }
.vinner { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease, transform .75s cubic-bezier(.5, 0, .75, 0); }
.is-ready .vinner { opacity: 1; }
.vinner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fx), #000 calc(100% - var(--fx)), transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fx), #000 calc(100% - var(--fx)), transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 88%, transparent 100%);
  mask-composite: intersect; }

/* Luz de cada pastilla: se suma sobre el video (screen) y se derrama sobre el fondo de la página */
.aura { position: absolute; z-index: 2; width: 150%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; transform: translate(-50%, -50%); animation: breathe 3.8s ease-in-out infinite; }
.aura-l { left: calc(var(--lx) * 1%); top: calc(var(--ty) * 1% + var(--ph) * .5svh + 4%); opacity: calc(var(--pl) * .85); background: radial-gradient(circle, rgba(255, 90, 60, .5), rgba(255, 70, 40, .16) 22%, transparent 45%); }
.aura-r { left: calc(var(--rx) * 1%); top: calc(var(--ty) * 1% + var(--ph) * .5svh + 4%); opacity: calc(var(--pl) * .9); background: radial-gradient(circle, rgba(60, 150, 255, .55), rgba(40, 120, 255, .18) 22%, transparent 45%); animation-delay: -1.9s; }
@keyframes breathe { 0%, 100% { filter: brightness(.88); } 50% { filter: brightness(1.12); } }

/* Los dos caminos: el texto FLOTA sobre cada pastilla y la sigue; aparece cuando el gato ya las presentó */
.choices { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.choice { position: absolute; top: calc(var(--ty) * 1%); transform: translate(-50%, -100%); width: 36%; max-width: 250px; display: flex; justify-content: center; text-decoration: none; color: var(--text);
  opacity: 0; visibility: hidden; pointer-events: none; filter: blur(8px);
  transition: opacity 1s ease, filter 1s ease, visibility 0s linear 1s; }
.choice-music { left: calc(var(--lx) * 1%); --c: var(--red); --c-rgb: 255, 106, 77; }
.choice-apps { left: calc(var(--rx) * 1%); --c: var(--blue); --c-rgb: 74, 163, 255; transition-delay: .25s, .25s, 1s; }
.show-choices .choice { opacity: 1; visibility: visible; pointer-events: auto; filter: none; transition-delay: 0s; }
.show-choices .choice-apps { transition-delay: .25s, .25s, 0s; }
/* zona de toque: del texto hasta la pastilla completa */
.choice::after { content: ""; position: absolute; left: 4%; right: 4%; top: 100%; height: calc(var(--ph) * 1svh + 26px); }
.lbl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; animation: float 3.6s ease-in-out infinite; }
.choice-apps .lbl { animation-delay: -1.8s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.lbl small { font-family: "Orbitron", sans-serif; font-size: .58rem; letter-spacing: .4em; text-indent: .4em; text-transform: uppercase; color: var(--gold-hi); opacity: .9; text-shadow: 0 0 12px rgba(0, 0, 0, .9); }
.lbl b { font-family: "Orbitron", sans-serif; font-weight: 700; font-size: clamp(1.35rem, 3.6vh, 2rem); letter-spacing: .14em; text-indent: .14em; text-transform: uppercase; line-height: 1.05; color: #fff;
  text-shadow: 0 0 10px rgba(var(--c-rgb), .95), 0 0 28px rgba(var(--c-rgb), .75), 0 0 56px rgba(var(--c-rgb), .5), 0 2px 18px rgba(0, 0, 0, .9); transition: text-shadow .35s, transform .45s var(--ease-out-expo); }
.lbl i { font-style: normal; font-size: .74rem; line-height: 1.25; font-weight: 300; color: #d8d3ca; max-width: 18ch; text-shadow: 0 1px 12px rgba(0, 0, 0, .95); }
/* flechita luminosa que señala la pastilla */
.lbl em { display: block; width: 14px; height: 14px; margin-top: 2px; border-right: 2px solid var(--c); border-bottom: 2px solid var(--c); transform: rotate(45deg); filter: drop-shadow(0 0 8px rgba(var(--c-rgb), .9)); animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0) rotate(45deg); opacity: .65; } 50% { transform: translateY(5px) rotate(45deg); opacity: 1; } }
.choice:hover .lbl b, .choice:focus-visible .lbl b { transform: scale(1.07); text-shadow: 0 0 12px rgba(var(--c-rgb), 1), 0 0 36px rgba(var(--c-rgb), .95), 0 0 80px rgba(var(--c-rgb), .8), 0 2px 18px rgba(0, 0, 0, .9); }
.choice:focus-visible { outline: none; }
.choice:focus-visible .lbl { outline: 2px solid var(--gold-hi); outline-offset: 8px; border-radius: 12px; }

/* Saltar intro */
.skip { position: fixed; z-index: 5; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); appearance: none; background: transparent; color: var(--muted); border: 0; font-family: "Orbitron", sans-serif; font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; padding: 12px 18px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.can-skip:not(.show-choices) .skip { opacity: .75; pointer-events: auto; }
.skip:hover, .skip:focus-visible { color: var(--gold-hi); opacity: 1 !important; }

/* Salida: se entra por la pastilla elegida (zoom + fundido a negro).
   Todo se apaga con la MISMA curva y termina junto: la página siguiente arranca recién cuando la pantalla ya está en negro (intro.js).
   .beam y #dust entraron con una animación "forwards" que gana sobre cualquier transición, por eso su salida es otra animación. */
.is-leaving .vinner { transform: scale(1.22); opacity: 0; transition: opacity 1.05s cubic-bezier(.4, 0, .6, 1), transform 1.25s cubic-bezier(.35, 0, .25, 1); will-change: transform, opacity; }
.is-leaving .choices, .is-leaving .skip { opacity: 0; transition: opacity .55s ease; }
.is-leaving .aura { opacity: 0; transition: opacity 1s cubic-bezier(.4, 0, .6, 1); }
.is-leaving #dust, .is-leaving .beam { animation: bg-out 1.05s cubic-bezier(.4, 0, .6, 1) forwards; }
@keyframes bg-out { from { opacity: 1; } to { opacity: 0; } }
.is-leaving .choice { pointer-events: none; }

/* Pantallas anchas: el video queda como columna; los costados se esfuman más */
@media (min-aspect-ratio: 1 / 1) { :root { --fx: 30%; } }
/* Celulares: el video se recorta un poco a los lados (cubre la altura), esfumado más corto para no perder las patas */
@media (max-aspect-ratio: 9 / 16) { :root { --fx: 14%; } .choice { width: 40%; } .lbl i { font-size: .7rem; } }
/* Pantallas muy bajas (celular apaisado): se oculta la frase chica */
@media (max-height: 520px) { .lbl i, .lbl em { display: none; } .lbl b { font-size: 1rem; } }

@media (prefers-reduced-motion: reduce) {
  .choice { transition: opacity .3s ease, filter 0s, visibility 0s; filter: none; }
  .lbl, .lbl em, .aura { animation: none; }
  .vinner { transition: opacity .3s ease; }
  .beam, #dust { animation-duration: .01s; }
}

