/* citizen84 — live recognition overlay. turquoise glass, never neon. */

:root {
  --turq: #63c9bf;
  --turq-hi: #b4ece6;
  --turq-lo: rgba(99, 201, 191, .5);
  --glass: rgba(8, 30, 32, .46);
}

.hud-live {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none; overflow: hidden;
  font-family: var(--mono);
}
.hl-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hl-lines line {
  stroke: var(--turq-lo); stroke-width: 1;
  stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400);
  transition: stroke-dashoffset .3s ease, opacity .6s ease;
}
.hl-lines line.on { stroke-dashoffset: 0; }

/* face lock */
.hl-box {
  position: absolute; opacity: 0; transform: scale(1.7);
  transition: opacity .25s ease, transform .38s cubic-bezier(.2, .7, .1, 1);
}
.hl-box.on { opacity: 1; transform: none; }
/* corners only: nothing laid over the faces */
.hl-box i { position: absolute; width: 28%; height: 28%; max-width: 16px; max-height: 16px; border: 0 solid var(--turq); }
.hl-box i:nth-child(1) { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.hl-box i:nth-child(2) { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.hl-box i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.hl-box i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

/* the readout */
.hl-panel {
  position: absolute; opacity: 0; transform: translateY(5px);
  padding: .65em .9em .7em;
  font-size: var(--fs, 11px); line-height: 1.55; letter-spacing: .05em; white-space: pre;
  color: var(--turq-hi);
  background: var(--glass);
  border: 1px solid var(--turq-lo);
  backdrop-filter: blur(7px) saturate(1.15); -webkit-backdrop-filter: blur(7px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 28px rgba(99, 201, 191, .10);
  transition: opacity .25s ease, transform .35s ease;
}
.hl-panel.on { opacity: 1; transform: none; }
.hl-head {
  font-size: .8em; letter-spacing: .24em; text-transform: uppercase; color: var(--turq);
  padding-bottom: .35em; margin-bottom: .45em; border-bottom: 1px solid var(--turq-lo);
}
.hl-l .gh { visibility: hidden; }       /* reserves the line while it types */
.hl-l.m { color: #fff; }
.compact .hl-l.x { display: none; }     /* small screens: ID and match only */

/* him */
.hl-unfiled i { border-color: rgba(220, 216, 207, .45); border-style: dashed; }
.hl-unfiled.blink { animation: lost 1.4s ease-in-out 2 forwards; }
@keyframes lost { 0%, 100% { opacity: 1 } 50% { opacity: .15 } }
.hl-tag {
  position: absolute; opacity: 0; transition: opacity .3s;
  font-size: var(--fs, 11px); letter-spacing: .2em; color: rgba(236, 232, 224, .85);
  background: rgba(10, 10, 10, .55); padding: .35em .6em; white-space: nowrap;
}
.hl-tag.on { opacity: 1; }

.hud-live.fade .hl-box, .hud-live.fade .hl-panel, .hud-live.fade line, .hud-live.fade .hl-tag {
  opacity: 0 !important; transition: opacity .8s ease;
}

/* top-bar sound toggle */
.sound-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 1px solid var(--line-2); padding: 8px 11px;
  font: 400 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.sound-btn span { color: var(--bone-2); }
.sound-btn[aria-pressed="true"] { border-color: var(--turq-lo); color: var(--turq); }
.sound-btn[aria-pressed="true"] span { color: var(--turq); }
.spk { width: 13px; height: 13px; fill: currentColor; }
.spk .w { fill: none; stroke: currentColor; stroke-width: 1.3; opacity: 0; transition: opacity .25s; }
.sound-btn[aria-pressed="true"] .spk .w { opacity: 1; }
.sound-btn:hover { color: var(--bone); }

/* ───────── print scan on the product cards ───────── */
.scan-box {
  position: absolute; pointer-events: none; z-index: 3;
  opacity: 0; transform: scale(1.35);
  transition: opacity .2s ease, transform .32s cubic-bezier(.2, .7, .1, 1);
}
/* corners only: nothing laid over the print itself */
.scan-box i { position: absolute; width: 12px; height: 12px; border: 0 solid var(--turq); }
.scan-box i:nth-child(1) { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.scan-box i:nth-child(2) { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.scan-box i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.scan-box i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }
.scan-panel {
  position: absolute; z-index: 3; pointer-events: none; text-align: left;
  opacity: 0; transform: translateY(4px);
  padding: .6em .85em .65em;
  font: 400 10.5px/1.55 var(--mono); letter-spacing: .05em; white-space: pre;
  color: var(--turq-hi); background: var(--glass); border: 1px solid var(--turq-lo);
  backdrop-filter: blur(7px) saturate(1.15); -webkit-backdrop-filter: blur(7px) saturate(1.15);
  transition: opacity .25s ease .18s, transform .3s ease .18s;
}
.shot.scanning .scan-box { opacity: 1; transform: none; }
.shot.scanning .scan-panel { opacity: 1; transform: none; }
.shot.scanning .hud-box, .shot.scanning .hud-meta { opacity: .2 !important; }
.proof.scanning .hud-box { opacity: 0 !important; }

/* phones: the scan readout sits in the photo's lower-left corner, off the face, and never wider than the photo */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .scan-panel { left: 3% !important; right: auto; top: auto !important; bottom: 3%; max-width: 94%; overflow: hidden;
    font-size: 9.5px; letter-spacing: .03em; }
  .shot.scanning .hud-meta { opacity: 0 !important; }   /* the CAM / clock line would sit under it */
}
