/* ==========================================================================
   CAMERA HUD (2026-11-19) — home page only
   · hero viewfinder with camera readouts (takes over from the aperture.js
     entrance viewfinder at the same spot, fades before the hero aperture)
   · chapter HUD bottom-left (number / total, progress bar, section name)
   · chapter numbers in the eyebrows (.ch-no)
   Purely visual: no cursor change, no blend modes, pointer-events: none.
   Remove css/camera-hud.css + js/camera-hud.js from index.html to revert;
   backup without it: _backup/pre-camera-hud-20261119/
   ========================================================================== */

.ch-no { color: var(--orange); }

/* ---------- hero viewfinder ---------- */
.vf {
  position: absolute; top: 96px; left: clamp(14px, 3.2vw, 40px); right: clamp(14px, 3.2vw, 40px);
  bottom: clamp(14px, 3.2vw, 40px); z-index: 2; pointer-events: none;
  --vf-s: clamp(18px, 2.4vw, 30px);
  opacity: 0; transition: opacity 0.6s ease;
}
.vf.is-on { opacity: var(--vf-scroll, 1); }
.vf.is-scrolling { transition: none; }
.vf-c { position: absolute; width: var(--vf-s); height: var(--vf-s); border: 0 solid rgba(242, 238, 250, 0.5); }
.vf-tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 5px; }
.vf-tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 5px; }
.vf-bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; border-bottom-left-radius: 5px; }
.vf-br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 5px; }
.vf-read {
  position: absolute; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(242, 238, 250, 0.55); white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
}
.vf-read-tl { top: 12px; left: calc(var(--vf-s) + 10px); }
.vf-read-tr { top: 12px; right: calc(var(--vf-s) + 10px); }
.vf-read-bl { bottom: -4px; left: calc(var(--vf-s) + 10px); }
.vf-read-br { bottom: -4px; right: calc(var(--vf-s) + 10px); }
.vf-read-bl .vf-state { color: #34D399; }
.vf-rec { width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 10px rgba(255, 59, 59, 0.8); animation: vf-blink 1.6s steps(2, start) infinite; }
@keyframes vf-blink { to { visibility: hidden; } }
.vf-meter { display: inline-flex; gap: 3px; align-items: flex-end; height: 10px; }
.vf-meter i { width: 2px; background: rgba(242, 238, 250, 0.5); height: 4px; }
.vf-meter i:nth-child(3) { height: 10px; background: var(--orange); }
.vf-meter i:nth-child(2), .vf-meter i:nth-child(4) { height: 7px; }
@media (max-width: 640px) { .vf { top: 76px; } }
@media (max-width: 760px) {
  .vf-read-tr, .vf-read-br .vf-hide-m { display: none; }
  .vf-read { font-size: 9px; letter-spacing: 0.16em; }
}

/* ---------- chapter HUD (desktop) ---------- */
.ch-hud {
  position: fixed; left: clamp(16px, 2.6vw, 40px); bottom: clamp(16px, 2.6vw, 34px); z-index: 60;
  display: flex; align-items: center; gap: 14px; pointer-events: none;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(242, 238, 250, 0.6);
  opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s ease;
}
.ch-hud.is-on { opacity: 1; transform: none; }
.ch-hud-no { color: var(--orange); min-width: 2ch; }
.ch-hud-total { opacity: 0.45; }
.ch-hud-bar { position: relative; width: 64px; height: 1px; background: rgba(242, 238, 250, 0.18); overflow: hidden; }
.ch-hud-bar i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--violet-soft), var(--orange)); transform-origin: 0 50%; transform: scaleX(0); }
.ch-hud-name { display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.ch-hud-name span { display: block; transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.4s ease; }
.ch-hud-name.is-swap span { transform: translateY(-110%); opacity: 0; }
@media (max-width: 960px) { .ch-hud { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .vf-rec { animation: none; }
  .ch-hud, .ch-hud-name span { transition: none; }
}

/* ---------- hero flash FX (2026-11-22, driven by js/hero-tease.js) ----------
   studio light: each flash briefly lights the room around its card;
   viewfinder: SHOT counter + the REC dot snapping on every flash */
.hero-flashlight {
  position: absolute;
  left: 0; top: 0;
  width: 70vmax; height: 70vmax;
  margin: -35vmax 0 0 -35vmax;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(240, 234, 255, 0.13) 0%,
    rgba(196, 181, 253, 0.08) 18%,
    rgba(168, 85, 247, 0.05) 36%,
    transparent 64%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.vf-shot { color: var(--text, #F2EEFA); font-weight: 500; }
.vf-rec { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.vf-rec.is-snap {
  animation: none;
  opacity: 1;
  transform: scale(1.6);
  box-shadow: 0 0 16px rgba(255, 59, 59, 1), 0 0 4px #fff;
  transition: transform 0.08s ease-out;
}

/* 2026-11-22 — phones: the bottom viewfinder row + SCROLL hint sit a bit
   higher, clear of the browser's bottom bar / Android button navigation
   (plus the iPhone home-indicator inset where the browser exposes it) */
@media (max-width: 640px) {
  .vf { bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
  .scroll-hint { bottom: calc(46px + env(safe-area-inset-bottom, 0px)); }
}
