/* Tipografías de marca (licencia Nave / Envato): Standerd para texto, Lenia Mono para etiquetas */
@font-face { font-family: "Standerd"; src: url("fonts/StanderdVF.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Lenia Mono"; src: url("fonts/LeniaMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lenia Mono"; src: url("fonts/LeniaMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Lenia Mono"; src: url("fonts/LeniaMono-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lenia Mono"; src: url("fonts/LeniaMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lenia Mono"; src: url("fonts/LeniaMono-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --noche: #00131D; --espacio: #012436; --crema: #FFF5EE; --niebla: #D7E1E2;
  --ign: #E55C41; --ambar: #EFA441; --acero: #798E91;
  --sans: "Standerd", "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "Lenia Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --vidrio: rgba(0, 19, 29, .68);
  --borde: rgba(255, 245, 238, .16);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--noche); color: var(--crema); font-family: var(--sans); overflow: hidden; }
button { font: inherit; color: inherit; }

/* la película ocupa toda la pantalla; los controles flotan encima */
.app { position: fixed; inset: 0; background: var(--noche); }
.escena { position: absolute; inset: 0; overflow: hidden; background: var(--noche); }
.escena .pel { position: absolute; inset: 0; }
.toque { position: absolute; inset: 0; z-index: 4; background: none; border: 0; padding: 0; cursor: pointer; }
.destello { position: absolute; left: 50%; top: 50%; z-index: 4; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: rgba(0,19,29,.6); opacity: 0; pointer-events: none; }
.destello.on { animation: destello .5s ease-out; }
@keyframes destello { 0% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.3); } }

/* ── entrada ── */
.inicio { position: absolute; inset: 0; display: grid; place-items: center; z-index: 8; background: var(--noche); transition: opacity .5s ease, visibility .5s; }
.app:not([data-estado="inicio"]) .inicio { opacity: 0; visibility: hidden; pointer-events: none; }
.inicio__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.inicio__velo { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,19,29,.55), rgba(0,19,29,.92)); }
.inicio__caja { position: relative; text-align: center; padding: 24px; max-width: 560px; }
.inicio__marca { margin: 0 0 14px; font: 500 13px var(--mono); letter-spacing: .32em; color: var(--ambar); }
.inicio__titulo { margin: 0 0 28px; font-weight: 600; font-size: clamp(30px, 6vw, 56px); line-height: 1.04; letter-spacing: -.02em; }
.inicio__sub { margin: 0 0 14px; font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--niebla); }
.inicio__idiomas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.inicio__nota { margin: 18px 0 0; font: 12px/1.5 var(--mono); color: var(--acero); }
.btn-idioma { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 26px; border-radius: 999px; cursor: pointer;
  background: var(--ign); border: 1px solid var(--ign); color: var(--crema); font-weight: 600; font-size: 17px; transition: transform .15s, background .15s; }
.btn-idioma:hover { transform: translateY(-1px); background: #f06b50; }
.btn-idioma svg { width: 18px; height: 18px; fill: currentColor; }
.btn-idioma[disabled] { background: transparent; border-color: rgba(255,245,238,.25); color: var(--acero); cursor: not-allowed; transform: none; }
.btn-idioma small { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }

/* ── iconos y botones flotantes ── */
.i { width: 20px; height: 20px; fill: currentColor; stroke: none; display: block; }
.i .o, .i path.o { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fab { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: background .15s; }
.fab:hover { background: rgba(255, 245, 238, .14); }
.fab:focus-visible, .cta:focus-visible, .redes a:focus-visible, .btn-idioma:focus-visible, .idiomas button:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; }
.linea__rango:focus-visible + .linea__fondo { outline: 2px solid var(--ambar); outline-offset: 4px; }
.i-play { display: none; }
.app[data-pausa="1"] .i-pausa { display: none; }
.app[data-pausa="1"] .i-play { display: block; }
.i-mudo { display: none; }
.app[data-mudo="1"] .i-vol { display: none; }
.app[data-mudo="1"] .i-mudo { display: block; }

/* píldora de controles, abajo al centro */
.ctl { position: absolute; z-index: 6; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(540px, calc(100vw - 24px)); display: flex; align-items: center; gap: 4px; padding: 5px;
  background: var(--vidrio); border: 1px solid var(--borde); border-radius: 999px;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  transition: opacity .35s ease, transform .35s ease; }
.linea { position: relative; flex: 1 1 auto; height: 40px; min-width: 60px; margin: 0 6px; }
.linea__fondo { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: rgba(255,245,238,.22); pointer-events: none; }
.linea__avance { position: relative; height: 100%; width: 0; border-radius: 2px; background: var(--ign); }
.linea__avance::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--crema); }
.linea__rango { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; touch-action: none; }
.tiempo { flex: none; padding: 0 8px 0 2px; font: 500 11px var(--mono); color: var(--niebla); font-variant-numeric: tabular-nums; white-space: nowrap; }
.idiomas { flex: none; display: inline-flex; padding: 2px; border-radius: 999px; background: rgba(255,245,238,.1); }
.idiomas button { min-width: 36px; height: 32px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font: 600 11px var(--mono); letter-spacing: .08em; color: var(--niebla); }
.idiomas button[aria-pressed="true"] { background: var(--crema); color: var(--noche); }
.idiomas button[disabled] { opacity: .35; cursor: not-allowed; }

/* arriba a la derecha: acción y redes */
.flota { position: absolute; z-index: 6; top: calc(14px + env(safe-area-inset-top)); right: 14px; display: flex; align-items: flex-start; gap: 8px; }
.cta { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ign); color: var(--crema);
  text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; box-shadow: 0 6px 22px rgba(0, 0, 0, .28); transition: background .15s, transform .15s; }
.cta:hover { background: #f06b50; transform: translateY(-1px); }
.cta .i { width: 16px; height: 16px; }
.cta[hidden], .redes-caja[hidden] { display: none; }
.redes-caja { position: relative; }
.redes-caja .fab { background: var(--vidrio); border: 1px solid var(--borde); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.redes { position: absolute; right: 0; top: 48px; display: flex; flex-direction: column; gap: 8px; padding: 0; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; }
.redes-caja.abierta .redes { opacity: 1; visibility: visible; transform: none; }
.redes a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--crema); background: var(--vidrio); border: 1px solid var(--borde);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background .15s, color .15s; }
.redes a:hover { background: var(--crema); color: var(--noche); }
.redes svg { width: 18px; height: 18px; fill: currentColor; }

/* los controles se esconden solos mientras se reproduce; reaparecen al mover o tocar */
.app.ocultar .ctl { opacity: 0; pointer-events: none; transform: translate(-50%, 10px); }
.app.ocultar { cursor: none; }

@media (max-width: 560px) {
  .tiempo { display: none; }
  .ctl { width: calc(100vw - 20px); }
  .flota { right: 10px; top: calc(10px + env(safe-area-inset-top)); }
  .cta { padding: 0 14px; font-size: 13px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .ctl { left: auto; right: 10px; transform: none; bottom: calc(8px + env(safe-area-inset-bottom)); width: min(370px, calc(100vw - 20px)); }
  .app.ocultar .ctl { transform: translateY(10px); }
  .tiempo { display: none; }
  .inicio__titulo { margin-bottom: 16px; font-size: 30px; }
  .inicio__marca { margin-bottom: 6px; }
}
@media (orientation: portrait) and (max-width: 900px) { .inicio__poster { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
