/* ================= BOOT SCREEN (pass 5 look, pass 6 behaviour): olive / sage poster, no lime until the hand-off ================= */
.boot {
  --field: var(--boot-field, #111111); --ink: rgb(var(--boot-ink-rgb, 190, 200, 180)); --ink-dim: rgba(var(--boot-ink-rgb, 190, 200, 180), 0.55);
  position: fixed; inset: 0; z-index: 100; background: var(--field); color: var(--ink);
  font: 400 12px/1.4 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.06em;
  overflow: hidden; display: none;
}
.booting .boot, .handoff .boot { display: block; }
.booting .hud { visibility: hidden; }
/* rings/grid never leak into the boot; they fade in with the panels during the hand-off */
.booting .rings, .booting .grid, .handoff .rings, .handoff .grid { opacity: 0 !important; transition: opacity 600ms ease; }
.boot.is-cut { display: none !important; }
/* the HUD figure's breathing waits for the swap so it starts at scale 1 (no jump) */
.booting .stack, .booting .regions, .booting .hits,
.handoff .stack, .handoff .regions, .handoff .hits { animation: none !important; }

/* CRT, restrained: 2 px scanlines at 4%, a soft sage glow behind the figure */
.boot::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(207, 217, 195, 0.04) 0 1px, transparent 1px 2px); }
.boot::after { transition: opacity 420ms ease; }
.boot.no-crt::after { opacity: 0; }
.boot__glow { position: absolute; left: 50%; top: 48%; width: 46vh; height: 46vh; transform: translate(-50%, -50%); border-radius: 50%; /* placed by boot.js on the figure */
  background: radial-gradient(circle, rgba(207, 217, 195, 0.18) 0%, rgba(207, 217, 195, 0.06) 40%, transparent 70%); pointer-events: none; }

/* centre figure: the HUD's 2048² anatomy stack, placed by boot.js on the HUD figure's exact rect (never moves).
   Same transform-origin as the HUD .stack so the wake-up breath is a pure scale about the same point. */
.boot__fig { position: absolute; left: calc(50% - 17vh); top: calc(48% - 17vh); width: 34vh; height: 34vh; margin: 0; transform-origin: 50% 85%; pointer-events: none; }
.bstack { position: absolute; inset: 0; }
.bstack .bl, .bstack .breg { position: absolute; inset: 0; opacity: 0; }
.bstack img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* sage tint on the lime line art until the hand-off */
.bstack .bl:not([data-l="silhouette"]):not([data-l="visor"]) img, .bstack .breg img { filter: saturate(0.3) brightness(0.9); }
.bstack .bl:not([data-l="silhouette"]):not([data-l="visor"]), .bstack .breg { mix-blend-mode: screen; }
/* reveal band: a bright copy of the silhouette clipped to a 6% band (same look as the HUD scan wipe), driven by --beam */
.bstack .beam { position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen; filter: brightness(1.35);
  clip-path: inset(calc(var(--beam, 0%) - 6%) 0 calc(100% - var(--beam, 0%)) 0); }
.bstack--head { display: none; clip-path: inset(0 0 64% 0); transform-origin: 50.5% 36%; }
.bstack--head.is-on { display: block; }        /* NudgeHead.turn (js/headturn.js) */
#bootStack.is-headturn { clip-path: inset(36% 0 0 0); }

/* lockup under the silhouette */
.boot__lockup { position: absolute; left: 24px; top: 60%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.boot__name { font-size: 13px; letter-spacing: 0.12em; opacity: 0; animation: bootin 500ms ease 80ms forwards; }
.boot__name span { text-transform: none; }
@keyframes bootin { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
/* diagnostics sit BESIDE the figure (left of the hips), left-aligned like a terminal log; all lines stay visible */
.boot__diag { list-style: none; margin: 0; padding: 0; color: rgba(207, 217, 195, 0.78); font-size: 13px; line-height: 19px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  display: flex; flex-direction: column; align-items: flex-start; min-width: 240px; }
.boot__diag li { flex: none; }
.boot__diag li { animation: bootin 260ms ease both; }
.boot__diag li b { font-weight: 400; color: var(--ink); margin-right: 6px; }
.boot__diag .ready { color: var(--ink); }
.boot__diag .cursor { animation: cursor 1s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }

/* corners */
.boot__corner { position: absolute; top: 24px; width: 48px; height: 48px; border: 1px solid var(--ink); display: grid; place-items: center; overflow: hidden; }
.boot__corner--tl { left: 24px; }
.boot__corner--tr { right: 24px; background: var(--ink); }
/* negative stamp: the full plain silhouette knocked out of the sage box in field colour.
   Figure content is .935 of the 2048² asset's height, so 41px of asset ≈ 80% of the 48px box; it's ~centred in the asset. */
.boot__neg { width: 100%; height: 100%; background: var(--field);
  -webkit-mask: url("./assets/Nudge/silhouette.png") 50% 50% / 41px 41px no-repeat;
  mask: url("./assets/Nudge/silhouette.png") 50% 50% / 41px 41px no-repeat; }
/* corner crops use the solid silhouette (Sam: no outline) */
.boot__crop { width: 100%; height: 100%; background: var(--ink); -webkit-mask: url("./assets/Nudge/silhouette.png") no-repeat; mask: url("./assets/Nudge/silhouette.png") no-repeat; }
/* eye / visor line close-up ≈ x .44–.66, y .17–.39 (the stamp has no separate visor; this is the face seam detail) */
.boot__crop--visor { -webkit-mask-size: 218px 218px; mask-size: 218px 218px; -webkit-mask-position: -96px -37px; mask-position: -96px -37px; }

/* credit blocks */
.boot__bl, .boot__br { position: absolute; bottom: 24px; display: flex; flex-direction: column; gap: 0; font-size: 11.5px; line-height: 1.4; letter-spacing: 0.1em; }
.boot__bl { left: 24px; }
.boot__bl strong, .boot__br strong { font: 900 24px/0.9 "Wordmark", "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -0.03em; transform: scaleY(1.15); transform-origin: bottom left; margin: 8px 0 3px; }
.boot__br { right: 24px; align-items: flex-end; text-align: right; }
.boot__br strong { transform-origin: bottom right; }
.boot__date { border: 1px solid var(--ink-dim); padding: 0 5px; margin: 2px 0; }
/* start gate: shown only when sound is on and the browser still needs a gesture to unlock audio (first load) */
.boot__start { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-transform: uppercase; white-space: nowrap; }
.boot__btn { font: inherit; font-size: 14px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink); background: transparent; border: 1px solid var(--ink); padding: 12px 28px 12px 32px; cursor: pointer; transition: background 160ms ease, color 160ms ease; }
.boot__btn:hover { background: var(--ink); color: var(--field); }
.boot__btn:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--ink); }
.boot__btn .cursor { display: inline-block; width: 0.6em; text-align: left; }
.boot__hint { font-size: 10.5px; letter-spacing: 0.18em; color: var(--ink-dim); }
.boot__start[hidden] { display: none; }
.boot__start .cursor { animation: cursor 1s steps(1) infinite; }
.boot__bc { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); font-size: 11.5px; line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .boot__name, .boot__diag li { animation: none; opacity: 1; } .boot__diag .cursor { animation: none; } }

/* boot: same shadow in sage, positioned from the figure box by boot.js; fades in with the silhouette */
.boot .shadow--boot { position: absolute; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(207,217,195,.10) 0%, rgba(207,217,195,.04) 55%, transparent 80%); filter: blur(5px); }
.boot .shadow--boot::after { content: ""; position: absolute; left: 14%; right: 14%; top: 22%; bottom: 22%; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.7) 0%, rgba(0,0,0,.35) 50%, transparent 78%); filter: blur(6px); }
