/* starksi.dev — identity gate (public): the #hud root, the eye-flash and visor layers, and the fingerprint scanner.
   The HUD's styles are injected by gate.js: the public portfolio's (portfolio.next.css) during the scan, the owner
   layer's (secure/hud.next.css, owner-only) once the server has confirmed the owner.
   Fan-inspired design. Not affiliated with Marvel or Disney. */
.hud {
  --hud-rgb: 127, 233, 255;        /* cyan (default); amber/white themes below */
  --warn-rgb: 255, 176, 64;        /* amber: warnings only */
  --welcome-rgb: 255, 214, 140;    /* warm gold: the guest welcome */
  --ink: rgba(var(--hud-rgb), .92);
  --ink-dim: rgba(var(--hud-rgb), .62);
  --line: rgba(var(--hud-rgb), .28);
  --line-strong: rgba(var(--hud-rgb), .55);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  position: absolute; inset: 0; overflow: hidden;
  font-family: var(--mono); color: var(--ink); -webkit-font-smoothing: antialiased;
  pointer-events: none;
}
.hud[data-color="amber"] { --hud-rgb: 255, 190, 92; }
.hud[data-color="white"] { --hud-rgb: 232, 240, 246; }
.hud *, .hud *::before, .hud *::after { box-sizing: border-box; }
.hud [hidden] { display: none !important; } /* class display rules (inline-flex buttons, badge) must not beat the hidden attribute */
.hud a { color: inherit; }
.hud button { font: inherit; color: inherit; }
.hud-label { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }
.hud-label--sm { font-size: 9.5px; letter-spacing: .2em; }
.hud-fp { flex: none; }

/* stage layers: the eye-flash and the helmet interior */
.hud-flash, .hud-visor { position: absolute; inset: 0; pointer-events: none; opacity: 0; will-change: opacity; }
/* the burst originates from the two eye slits: two radial glows whose radius (--r) grows until they merge and fill the
   frame; outside the radius the layer is fully transparent, so the black helmet and the red stay untouched until then */
.hud-flash { --ex1: 35%; --ey1: 50%; --ex2: 65%; --ey2: 50%; --r: 0px; z-index: 3; background-blend-mode: screen; /* both glows add up instead of one covering the other */
  background:
    radial-gradient(circle at var(--ex1) var(--ey1), #ffffff 0, #ffffff calc(var(--r) * .26), #e6fcff calc(var(--r) * .5), rgba(127, 233, 255, .85) calc(var(--r) * .78), rgba(127, 233, 255, 0) var(--r)),
    radial-gradient(circle at var(--ex2) var(--ey2), #ffffff 0, #ffffff calc(var(--r) * .26), #e6fcff calc(var(--r) * .5), rgba(127, 233, 255, .85) calc(var(--r) * .78), rgba(127, 233, 255, 0) var(--r)); }
.hud-visor { z-index: 0; box-shadow: inset 0 0 22vmin 4vmin rgba(0, 0, 0, .78); }
.hud-visor::before, .hud-visor::after {
  content: ""; position: absolute; top: -14vh; bottom: -14vh; width: 34vw; border-radius: 50%;
  background: radial-gradient(ellipse at 0% 50%, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, 0) 70%);
}
.hud-visor::before { left: -22vw; }
.hud-visor::after { right: -22vw; transform: scaleX(-1); }

/* identity gate: fingerprint scanner + status, shown over the dark visor; the HUD boots behind it only for the owner */
.hud-gate { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.hud-gate.is-on { opacity: 1; pointer-events: auto; }
.hud-gate__box { display: grid; justify-items: center; gap: 12px; text-align: center; width: min(92vw, 440px); user-select: none; }
.hud-gate__scan { width: min(30vh, 220px, 56vw); height: auto; overflow: visible; }
.hud-gate__scan circle, .hud-gate__scan line, .hud-gate__scan path { fill: none; stroke: rgba(var(--hud-rgb), .9); vector-effect: non-scaling-stroke; }
.hud-gate__scan .hg-outer { stroke-width: 1.2; stroke-dasharray: .09 .035; opacity: .55; transform-box: fill-box; transform-origin: center; transition: opacity .6s; }
.hud-gate.is-scanning .hg-outer { animation: hgRot 50s linear infinite; }
.hud-gate__scan .hg-ticks line { stroke-width: 1; opacity: .4; transition: opacity .6s; }
.hud-gate__scan .hg-disc { stroke: rgba(var(--hud-rgb), .22); fill: rgba(var(--hud-rgb), .03); transition: stroke .6s, fill .6s; }
.hud-gate__scan .hg-ridges path { stroke-width: 1.5; opacity: .5; transition: opacity .6s, stroke .6s; }
.hud-gate__scan .hg-dot { fill: rgba(var(--hud-rgb), .8); stroke: none; transition: fill .6s; }
.hud-gate__scan .hg-stop { stop-color: rgb(var(--hud-rgb)); }
.hud-gate__scan .hg-sweep { opacity: 0; fill: url(#hgSweep); }
.hud-gate.is-scanning .hg-sweep { opacity: 1; animation: hgSweep 1.5s ease-in-out infinite alternate; }
@keyframes hgRot { to { transform: rotate(360deg); } }
@keyframes hgSweep { from { transform: translateY(-64px); } to { transform: translateY(64px); } }
.hud-gate__title { margin-top: 2px; transition: color .6s; }
.hud-gate__status { font-size: 13px; letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; min-height: 1.4em; color: var(--ink); text-shadow: 0 0 10px rgba(var(--hud-rgb), .4); transition: color .4s, text-shadow .4s; }
.hud-gate__sub { font-size: 11.5px; letter-spacing: .08em; color: var(--ink-dim); min-height: 1.3em; }
.hud-gate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 34px; }
/* "Owner? Verify with Touch ID": a quiet link under the status, there during the scan and the welcome */
.hud .hud-gate__owner { display: inline-flex; align-items: center; gap: 7px; padding: 6px 4px; border: 0; background: none;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(var(--hud-rgb), .5); cursor: pointer; transition: color .2s; }
.hud-gate__owner span { border-bottom: 1px dotted rgba(var(--hud-rgb), .35); padding-bottom: 1px; }
.hud-gate__owner:hover, .hud-gate__owner:focus-visible { color: var(--ink); outline: none; }
.hud-gate__owner:hover span, .hud-gate__owner:focus-visible span { border-bottom-color: rgba(var(--hud-rgb), .8); }
.hud-gate__note { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(var(--warn-rgb), .9); min-height: 1.2em; margin-top: -4px; }
.hud-gate__note:empty { visibility: hidden; }
.hud-gate__hint { margin-top: 10px; font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: rgba(var(--hud-rgb), .36); opacity: 0; transition: opacity .6s; }
.hud-gate.is-guest .hud-gate__hint { opacity: 1; }

/* confirmed: the ridges resolve and glow */
.hud-gate.is-ok .hg-ridges path { opacity: 1; stroke: rgba(var(--hud-rgb), 1); filter: drop-shadow(0 0 3px rgba(var(--hud-rgb), .9)); }
.hud-gate.is-ok .hg-disc { fill: rgba(var(--hud-rgb), .08); }

/* guest: a warm welcome. The print settles (no match, no alarm), the status glows gold, the ring keeps turning slowly */
.hud-gate.is-guest .hud-gate__status { color: rgba(var(--welcome-rgb), .97); text-shadow: 0 0 14px rgba(var(--welcome-rgb), .4); }
.hud-gate.is-guest .hud-gate__title { color: rgba(var(--welcome-rgb), .6); }
.hud-gate.is-guest .hud-gate__sub { color: rgba(var(--hud-rgb), .78); }
.hud-gate.is-guest .hg-ridges path { opacity: .72; }
.hud-gate.is-guest .hg-disc { stroke: rgba(var(--welcome-rgb), .4); fill: rgba(var(--welcome-rgb), .05); }
.hud-gate.is-guest .hg-dot { fill: rgba(var(--welcome-rgb), .95); }
.hud-gate.is-guest .hg-outer { stroke: rgba(var(--welcome-rgb), .8); opacity: .6; animation: hgRot 90s linear infinite; }

/* reduced motion: no sweep or rotation, no cross-fade */
.hud[data-motion="reduced"] .hud-gate .hg-sweep, .hud[data-motion="reduced"] .hud-gate .hg-outer { animation: none; }
.hud[data-motion="reduced"] .hud-gate { transition: none; }

/* phones / narrow */
@media (max-width: 720px), (max-height: 520px) {
  .hud-gate__box { gap: 10px; }
  .hud-gate__status { font-size: 12px; letter-spacing: .22em; text-indent: .22em; }
}
