@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/unbounded-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/jost-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/jost-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --fondo: #060920;
  --azul: #2565bf;
  --azul-claro: #4a83e3;
  --brillo: #8fb4f7;
  --texto: #eef2ff;
  --suave: #a9b4d8;
  --a: clamp(11rem, 46vw, 30rem);   /* ancho de cada haz */
  --y: 7.5rem;                      /* altura de la línea de luz */
}
@media (min-width: 700px) { :root { --y: 10rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--fondo); }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 400 17px/1.5 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, p { margin: 0; }
button, input { font: inherit; }
[hidden] { display: none !important; }
.oculto {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.escena {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

/* ── la lámpara: dos haces cónicos que se abren desde una línea ── */
.lampara {
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--y) + 26rem);
  z-index: 0;
  pointer-events: none;
}
.lampara > * { position: absolute; }

.cono {
  top: var(--y);
  width: var(--a);
  height: 15rem;
  filter: blur(10px);                         /* sin escalones en los degradados sobre fondo tan oscuro */
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 25%, transparent 95%);
}
.cono.izq {
  right: 50%;
  transform-origin: right top;
  background-image: conic-gradient(from 70deg at center top, var(--azul) 0deg, transparent 150deg);
}
.cono.der {
  left: 50%;
  transform-origin: left top;
  background-image: conic-gradient(from 290deg at center top, transparent 210deg, var(--azul) 360deg);
}
.sombra {                                    /* oscurece por debajo, para que la luz se apague */
  left: 0; width: 100%;
  top: calc(var(--y) + 10rem);
  height: 12rem;
  background: var(--fondo);
  transform: scaleX(1.5);
  filter: blur(40px);
}
.halo {
  left: 50%;
  top: calc(var(--y) - 2rem);
  width: calc(var(--a) * .93);
  margin-left: calc(var(--a) * -.465);
  height: 9rem;
  border-radius: 50%;
  background: var(--azul);
  opacity: .5;
  filter: blur(64px);
}
.foco {
  left: 50%;
  top: calc(var(--y) - 3.5rem);
  width: calc(var(--a) * .55);
  margin-left: calc(var(--a) * -.275);
  height: 9rem;
  border-radius: 50%;
  background: var(--azul-claro);
  filter: blur(40px);
}
.techo {                                     /* nada por encima de la línea */
  left: 0; width: 100%;
  top: calc(var(--y) - 14rem);
  height: 14rem;
  background: var(--fondo);
}
.linea {
  left: 50%;
  top: var(--y);
  width: var(--a);
  margin-left: calc(var(--a) / -2);
  height: 2px;
  background: var(--brillo);
}
.cono { z-index: 1; }
.sombra { z-index: 2; }
.foco { z-index: 3; }
.techo { z-index: 4; }
.halo { z-index: 5; }
.linea { z-index: 6; }

/* ── contenido ── */
.contenido {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--y) + 2.75rem) 16px max(48px, env(safe-area-inset-bottom));
}
.logo { display: block; width: 72px; height: 72px; }
@media (min-width: 700px) { .logo { width: 80px; height: 80px; } }

h1 {
  margin-top: 1.75rem;
  text-align: center;
  text-wrap: balance;
  font: 600 clamp(1.4rem, 5.6vw, 2.1rem)/1.2 'Unbounded', 'Jost', sans-serif;
  letter-spacing: -.01em;
  color: var(--texto);
}

.formulario {
  width: 100%;
  max-width: 22rem;
  margin-top: 2.25rem;
  display: grid;
  gap: 12px;
}
input {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: var(--texto);
  font-size: 17px;
}
input::placeholder { color: #7f8bb3; }
input:focus { outline: none; border-color: var(--brillo); background: rgba(255, 255, 255, .09); }
.codigo {
  text-align: center;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .35em;
  padding-left: calc(18px + .35em);
  font-variant-numeric: tabular-nums;
}
.codigo::placeholder { letter-spacing: .35em; }

.boton {
  appearance: none;
  border: 0;
  min-height: 54px;
  border-radius: 99px;
  background: var(--azul);
  color: #fff;
  font-weight: 500;
  font-size: 17px;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.boton:hover { opacity: .92; }
.boton:active { transform: scale(.98); }
.boton[disabled] { opacity: .55; cursor: default; }

.nota { text-align: center; color: var(--suave); margin-bottom: 4px; text-wrap: balance; }
.nota b { color: var(--texto); font-weight: 500; overflow-wrap: anywhere; }
.otras { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.enlace {
  appearance: none;
  border: 0;
  background: none;
  color: var(--suave);
  padding: 10px 10px;
  cursor: pointer;
  font-size: 16px;
}
.enlace:hover { color: var(--texto); }
.enlace[disabled] { opacity: .5; cursor: default; }

.mensaje { text-wrap: balance; min-height: 1.5em; margin-top: 16px; text-align: center; color: var(--suave); max-width: 22rem; }
.mensaje.error { color: #ffb3c0; }

:focus-visible { outline: 2.5px solid var(--brillo); outline-offset: 3px; }

/* ── al cargar, una sola vez: solo transform y opacity ── */
@keyframes abrir-haz { from { opacity: .5; transform: scaleX(.5); } to { opacity: 1; transform: none; } }
@keyframes abrir-ancho { from { transform: scaleX(.5); } to { transform: none; } }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cono { animation: abrir-haz .8s cubic-bezier(.45, 0, .55, 1) .3s both; }
.foco, .linea { animation: abrir-ancho .8s cubic-bezier(.45, 0, .55, 1) .3s both; }
.contenido > * { animation: subir .7s cubic-bezier(.2, .7, .2, 1) .45s both; }
.contenido > h1 { animation-delay: .55s; }
.contenido > .formulario, .contenido > .mensaje { animation-delay: .65s; }
.contenido > #f-codigo { animation: subir .35s cubic-bezier(.2, .7, .2, 1) both; }   /* al pasar al código: sin esperas */

@media (prefers-reduced-motion: reduce) {
  .cono, .foco, .linea, .contenido > *, .contenido > #f-codigo { animation: none; }
  .boton { transition: none; }
}
