/* v19 Neural Visor: an AR visor over a pro's eyes. Cyan holograms, a magenta chromatic edge, scanlines.
   Tokens + the parts every page shares (stage, screen, the visor frame, the forward button). */
:root {
  --void: #010b0e;
  --deep: #03181e;
  --deep-2: #062731;
  --holo: #5ef2ff;
  --holo-hi: #c4fbff;
  --holo-dim: rgba(94, 242, 255, .62);
  --holo-faint: rgba(94, 242, 255, .16);
  --holo-line: rgba(94, 242, 255, .3);
  --glass: rgba(3, 26, 33, .82);
  --ink: #e8fdff;
  --ink-dim: rgba(232, 253, 255, .72);
  --ink-faint: rgba(232, 253, 255, .45);
  --mag: #ff4fd8;
  --sync: #7dffb0;
  --miss: #ff6b8a;
  --disp: "DIN Condensed", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --lab: "DIN Alternate", "Avenir Next", "Roboto", system-ui, sans-serif;
  --body: "Avenir Next", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, "Roboto Mono", monospace;
  --ease: cubic-bezier(.2, .8, .1, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--ink); }
body {
  font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(120% 70% at 50% 0%, var(--deep-2) 0%, var(--deep) 45%, var(--void) 100%) fixed var(--void);
}
/* the hologram room: a perspective grid floor behind every page (the stage covers it during play) */
body::before {
  content: ''; position: fixed; left: -50%; right: -50%; bottom: -10vh; height: 60vh; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--holo-faint) 1px, transparent 1px), linear-gradient(90deg, var(--holo-faint) 1px, transparent 1px);
  background-size: 56px 56px; transform: perspective(420px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  opacity: .7;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---- the stage (engine canvas + the HUD) ---- */
.stage { position: fixed; inset: 0; z-index: 1; }
.stage.is-off { visibility: hidden; }

/* ---- every page ---- */
.screen { position: fixed; inset: 0; z-index: 10; overflow-x: clip; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen.is-empty { pointer-events: none; }
.page { min-height: 100%; position: relative; overflow-x: clip; }
.page.is-leaving { animation: vz-out .26s steps(4, end) forwards; }
@keyframes vz-out {
  0% { opacity: 1; transform: none; }
  40% { opacity: .8; transform: translateX(-6px) skewX(4deg); filter: hue-rotate(60deg); }
  70% { opacity: .4; transform: translateX(5px) scaleY(.96); }
  100% { opacity: 0; transform: scaleY(.02); }
}

/* entrances: opacity + translate only (tap targets keep their real size) */
.in { animation: vz-in .4s var(--ease) both; animation-delay: calc(var(--d, 0) * .7ms); }
h1, h2, h3, .hud__q { text-wrap: balance; }
@keyframes vz-in {
  0% { opacity: 0; transform: translateY(14px); }
  60% { opacity: 1; }
  70% { transform: translateY(0) translateX(2px); }
  85% { transform: translateX(-1px); }
  100% { opacity: 1; transform: none; }
}

/* ---- the visor frame: corner brackets, scanlines, a soft edge, the scan sweep on every state change ---- */
.visor { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.visor__c { position: absolute; width: 26px; height: 26px; border: 2px solid var(--holo-dim); opacity: .8; }
.visor__c--tl { top: calc(8px + var(--sat)); left: calc(8px + var(--sal)); border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.visor__c--tr { top: calc(8px + var(--sat)); right: calc(8px + var(--sar)); border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
.visor__c--bl { bottom: calc(8px + var(--sab)); left: calc(8px + var(--sal)); border-right: 0; border-top: 0; border-bottom-left-radius: 10px; }
.visor__c--br { bottom: calc(8px + var(--sab)); right: calc(8px + var(--sar)); border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.visor__lines {
  position: absolute; inset: 0; will-change: transform;
  background: repeating-linear-gradient(to bottom, rgba(94, 242, 255, .045) 0 1px, transparent 1px 3px),
    radial-gradient(130% 100% at 50% 50%, transparent 72%, rgba(0, 18, 24, .42) 100%);
}
.visor__sweep {
  position: absolute; left: 0; right: 0; top: 0; height: 90px; opacity: 0; will-change: transform, opacity;
  background: linear-gradient(to bottom, transparent, rgba(94, 242, 255, .1) 70%, rgba(196, 251, 255, .7) 98%, transparent);
}
.visor__sweep.is-on { animation: vz-sweep .8s cubic-bezier(.4, 0, .6, 1) both; }
@keyframes vz-sweep { 0% { opacity: 1; transform: translateY(-90px); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(100vh); } }
body.is-booting .visor::after {
  content: ''; position: absolute; inset: 0; animation: vz-boot .65s ease-out both;
  background: radial-gradient(70% 50% at 50% 50%, rgba(196, 251, 255, .55), rgba(94, 242, 255, .12) 60%, transparent);
}
@keyframes vz-boot { 0% { opacity: 0; transform: scaleY(.02); } 35% { opacity: 1; transform: scaleY(1); } 100% { opacity: 0; } }

/* ---- small type ---- */
.tagline {
  margin: 0; display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--lab); letter-spacing: .2em;
  text-transform: uppercase; color: var(--holo);
}
.tagline.is-red { color: var(--miss); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: vz-blink 1.4s steps(2, jump-none) infinite; }
@keyframes vz-blink { 50% { opacity: .25; } }

/* ---- the one forward button: a hologram slab with cut corners ---- */
.cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 58px; width: 100%; max-width: 380px; padding: 0 26px; border: 0; cursor: pointer;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  background: linear-gradient(180deg, var(--holo-hi), var(--holo) 55%, #2bd2e6);
  color: #01161c; font: 700 19px/1 var(--disp); letter-spacing: .12em; text-transform: uppercase;
  transition: transform .16s var(--ease), filter .2s, opacity .3s;
}
.cta .arr { width: 22px; height: 12px; transition: transform .2s var(--ease); }
.cta:hover .arr { transform: translateX(4px); }
.cta:active, .cta.is-tapped { transform: scale(.97); filter: brightness(1.25); }
.cta[disabled] { cursor: default; }
.cta.is-arming[disabled] { opacity: .55; }
.cta[disabled]:not(.is-arming) {
  background: rgba(94, 242, 255, .1); color: var(--holo); box-shadow: inset 0 0 0 1px var(--holo-line);
}
.cta.is-pulse { animation: vz-pulse 1.3s ease-in-out infinite; }
@keyframes vz-pulse { 50% { filter: brightness(1.25) drop-shadow(0 0 14px rgba(94, 242, 255, .7)); } }
.cta__load { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--holo-faint); border-top-color: var(--holo); animation: vz-spin .8s linear infinite; }
.cta[disabled]:not(.is-arming) .cta__load { display: inline-block; }
@keyframes vz-spin { to { transform: rotate(360deg); } }

.ghost {
  min-height: 48px; padding: 0 22px; border: 1px solid var(--holo-line); background: rgba(94, 242, 255, .08); color: var(--holo);
  font: 700 15px/1 var(--lab); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}

/* ---- mute ---- */
.mute {
  position: fixed; z-index: 40; top: calc(12px + var(--sat)); right: calc(14px + var(--sar)); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--holo-line); background: rgba(1, 15, 19, .7); color: var(--holo); display: grid; place-items: center; cursor: pointer;
}
.mute .mute__off { display: none; }
.mute[aria-pressed="true"] .mute__on { display: none; }
.mute[aria-pressed="true"] .mute__off { display: inline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
