/* Homepage pre-screen (Adam 2026-11-03): you arrive on an unstable transmission. Fix the frequency, or
   Not now. Works like the Mission Brief's gate. The picture is the real hero photo, glitched on the
   graphics card by PixiJS filters (prescreen.js); this file is the frame, the HUD and the fallback. */
html.ps-open, html.ps-open body { overflow: hidden; }
.ps { position: fixed; inset: 0; z-index: 3000; background: #050607; color: var(--cream); display: grid; place-items: center; isolation: isolate; }
.ps[hidden] { display: none; }
.ps-stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; transform-origin: 50% 50%;
  background: #050607 url("/assets/img/hero-beans.webp") center/cover no-repeat; }
.ps-stage.ps-gl { background-image: none; }
.ps-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
/* Without the graphics card effects (still loading, or reduced motion): a CSS flicker on the photo. */
.ps-stage:not(.ps-gl) { animation: ps-flicker 3.2s steps(1) infinite; filter: contrast(1.15) saturate(.7) brightness(.7); }
@keyframes ps-flicker { 0%, 100% { opacity: 1; } 47% { opacity: .82; } 48% { opacity: 1; } 71% { opacity: .9; } 72% { opacity: 1; } }
.ps-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(5, 6, 7, .2), rgba(5, 6, 7, .78) 80%); }
.ps-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; z-index: 6; background: #EAF9FF; box-shadow: 0 0 24px #24C9F1, 0 0 60px #24C9F1; transform: scaleX(0); opacity: 0; pointer-events: none; }

/* HUD readouts in the corners. */
.ps-hud { position: absolute; z-index: 4; font: 700 .66rem/1 var(--head); letter-spacing: .26em; text-transform: uppercase; color: rgba(245, 245, 242, .72); display: flex; align-items: center; gap: 10px; }
.ps-tl { top: 26px; left: 28px; }
.ps-tr { top: 26px; right: 28px; }
.ps-bl { bottom: 26px; left: 28px; font-variant-numeric: tabular-nums; }
.ps-br { bottom: 22px; right: 22px; }
.ps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(36, 201, 241, .6); animation: ps-ping 1.4s ease-out infinite; }
@keyframes ps-ping { 0% { box-shadow: 0 0 0 0 rgba(36, 201, 241, .55); } 100% { box-shadow: 0 0 0 14px rgba(36, 201, 241, 0); } }
.ps-logo { height: 26px; width: auto; opacity: .9; }
.ps-meter { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; }
.ps-meter i { width: 4px; background: rgba(36, 201, 241, .25); }
.ps-meter i:nth-child(1) { height: 4px; } .ps-meter i:nth-child(2) { height: 6px; } .ps-meter i:nth-child(3) { height: 9px; } .ps-meter i:nth-child(4) { height: 11px; } .ps-meter i:nth-child(5) { height: 14px; }
.ps-meter i.on { background: var(--cyan); box-shadow: 0 0 6px rgba(36, 201, 241, .7); }
.ps-freq { color: var(--cyan); }
.ps-sound { background: none; border: 1px solid rgba(245, 245, 242, .18); color: rgba(245, 245, 242, .6); border-radius: 4px; padding: 7px 10px; font: inherit; letter-spacing: inherit; cursor: pointer; }
.ps-sound:hover { color: var(--cream); border-color: rgba(245, 245, 242, .45); }

/* The ask: a solid panel so the words read clean over the moving picture. */
.ps-panel { position: relative; z-index: 5; text-align: center; padding: 34px 38px 26px; min-width: min(420px, calc(100vw - 40px));
  background: rgba(8, 10, 11, .86); border: 1px solid rgba(36, 201, 241, .28); border-radius: 10px;
  box-shadow: 0 0 60px rgba(36, 201, 241, .12), 0 30px 80px rgba(0, 0, 0, .7); backdrop-filter: blur(6px); }
.ps-panel::before, .ps-panel::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--orange-hi); }
.ps-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.ps-panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.ps-ask { margin: 0 0 22px; font: 600 clamp(1.5rem, 3.4vw, 2.1rem)/1.2 var(--head); letter-spacing: .06em; text-transform: uppercase; min-height: 1.2em; }
.ps-fix { display: inline-flex; align-items: center; gap: 12px; background: rgba(36, 201, 241, .06); color: var(--cyan); border: 1px solid var(--cyan); border-radius: 6px; padding: 15px 26px;
  font: 700 .8rem/1 var(--head); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: background .25s, box-shadow .25s, transform .2s; }
.ps-fix:hover, .ps-fix:focus-visible { background: rgba(36, 201, 241, .14); box-shadow: 0 0 30px rgba(36, 201, 241, .35); outline: none; }
.ps-fix:active { transform: scale(.97); }
.ps-not { display: block; margin: 18px auto 0; background: none; border: 0; color: rgba(245, 245, 242, .55); font: 600 .72rem/1 var(--head); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; padding: 6px 8px; transition: color .25s; }
.ps-not:hover, .ps-not:focus-visible { color: var(--cream); outline: none; text-decoration: underline; text-underline-offset: 5px; }
.ps-cap { position: absolute; z-index: 5; left: 50%; bottom: 14vh; transform: translateX(-50%); margin: 0; width: max-content; max-width: 86vw; text-align: center;
  background: rgba(8, 10, 11, .86); padding: 12px 20px; border-radius: 6px; font: 400 clamp(1.1rem, 2.2vw, 1.5rem)/1.4 var(--body); color: var(--cream); }
.ps-cap:empty { display: none; }
.ps[data-stage="tx"] .ps-panel, .ps[data-stage="tuning"] .ps-not { opacity: 0; pointer-events: none; transition: opacity .4s; }
.ps-skip { background: none; border: 0; color: rgba(245, 245, 242, .55); font: inherit; letter-spacing: inherit; cursor: pointer; padding: 6px; }
.ps-skip:hover { color: var(--cream); }
.ps[data-stage="ask"] .ps-skip, .ps[data-stage="tuning"] .ps-skip { display: none; }
/* The hero's quiet way back in. */
.ps-replay { display: block; margin: 22px auto 0; background: none; border: 0; color: rgba(245, 245, 242, .6); font: 600 .72rem/1 var(--head); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; padding: 6px; }
.ps-replay:hover { color: var(--cyan); }
@media (max-width: 600px) {
  .ps-tl { top: 18px; left: 16px; } .ps-tr { top: 16px; right: 16px; } .ps-bl { bottom: 18px; left: 16px; } .ps-br { bottom: 12px; right: 12px; }
  .ps-panel { padding: 28px 22px 22px; }
  .ps-cap { bottom: 12vh; }
}
@media (prefers-reduced-motion: reduce) { .ps-stage, .ps-dot { animation: none !important; } }
