/* ═══════════════════════════════════════════════════════════════
   FACE TAGGER — "Name everyone." signature hero
   Big reception frame + live detection boxes, a training moment,
   and a filmstrip where the trained person lights up.
   ═══════════════════════════════════════════════════════════════ */

.ft-hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(21rem, 0.8fr) 1.2fr;
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
  max-width: 92rem; margin: 0 auto; width: 100%;
}
.ft-demo {
  background: rgba(13 11 8 / 0.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1.2rem;
}
.ft-stage { position: relative; overflow: hidden; border-radius: 3px; border: 1px solid var(--line); }
.ft-stage > img { width: 100%; display: block; }
.ft-boxes { position: absolute; inset: 0; }
.ft-box {
  position: absolute; border: 1.5px solid var(--amber); border-radius: 2px;
  opacity: 0; transform: scale(1.3);
  transition: opacity 0.4s, transform 0.55s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}
.ft-box.is-on { opacity: 1; transform: scale(1); }
.ft-box.is-named { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 0 26px rgba(111 194 178 / 0.3); }
.ft-box .ft-name {
  position: absolute; left: -1.5px; top: calc(100% + 4px);
  font-family: var(--f-mono); font-size: 0.56rem; letter-spacing: 0.12em;
  background: var(--carbon); color: var(--dim);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 0.16rem 0.38rem; white-space: nowrap;
}
.ft-box.is-named .ft-name { color: var(--teal); border-color: rgba(111 194 178 / 0.4); }
/* labels that would fall outside the frame flip above the box */
.ft-box.label-up .ft-name { top: auto; bottom: calc(100% + 4px); }

/* training row */
.ft-train {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-soft);
}
.ft-refs { display: flex; gap: 0.45rem; }
.ft-refs figure {
  position: relative; width: 52px; height: 52px; overflow: hidden;
  border-radius: 3px; border: 1px solid var(--line);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ft-refs figure.is-read { border-color: var(--amber); box-shadow: 0 0 12px rgba(232 163 61 / 0.35); }
.ft-refs img { width: 100%; height: 100%; object-fit: cover; }
.ft-train-label { color: var(--dim); font-size: 0.58rem; letter-spacing: 0.16em; }
.ft-train-btn { padding: 0.6rem 1rem; font-size: 0.6rem; white-space: nowrap; }
.ft-train-btn[disabled] { background: transparent; border: 1px solid rgba(111 194 178 / 0.4); color: var(--teal); cursor: default; }
.ft-progress { color: var(--amber); font-size: 0.58rem; letter-spacing: 0.14em; min-width: 9rem; }
.ft-progress.is-done { color: var(--teal); }
.ft-meter {
  margin-left: auto; display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--dim); font-size: 0.56rem; letter-spacing: 0.18em;
}
.ft-meter .rec { width: 6px; height: 6px; }

/* keyword chips */
.ft-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; min-height: 1.7rem; }
.ft-chip {
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.72rem; color: var(--dim);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s, transform 0.4s var(--ease-out), color 0.3s, border-color 0.3s;
}
.ft-chip.is-on { opacity: 1; transform: none; }
.ft-chip.is-hot, .ft-chip:hover { color: var(--teal); border-color: var(--teal); }
.ft-chip::before { content: '# '; color: var(--amber); }

/* the filmstrip of other frames from the same night */
.ft-striprow {
  position: relative; z-index: 2;
  max-width: 92rem; margin: clamp(2rem, 4vh, 3rem) auto 0; width: 100%;
}
.ft-striprow > p { color: var(--dim); font-size: 0.6rem; letter-spacing: 0.22em; margin-bottom: 0.8rem; }
.ft-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.55rem;
  padding: 0.9rem 0;
  background:
    repeating-linear-gradient(to right, transparent 0 12px, var(--carbon-3) 12px 20px, transparent 20px 32px) top / 100% 6px no-repeat,
    repeating-linear-gradient(to right, transparent 0 12px, var(--carbon-3) 12px 20px, transparent 20px 32px) bottom / 100% 6px no-repeat;
}
.ft-frame { position: relative; overflow: hidden; border-radius: 3px; border: 1px solid var(--line); }
.ft-frame img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; filter: saturate(0.85) brightness(0.9); transition: filter 0.5s; }
.ft-frame.is-tagged img { filter: saturate(1) brightness(1); }
.ft-fbox {
  position: absolute; border: 1.5px solid var(--teal); border-radius: 2px;
  box-shadow: 0 0 18px rgba(111 194 178 / 0.3);
  opacity: 0; transform: scale(1.3);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
.ft-frame.is-tagged .ft-fbox { opacity: 1; transform: scale(1); }
.ft-ftag {
  position: absolute; left: 6px; bottom: 6px;
  font-family: var(--f-mono); font-size: 0.52rem; letter-spacing: 0.14em;
  background: rgba(13 11 8 / 0.78); color: var(--teal);
  border: 1px solid rgba(111 194 178 / 0.35); border-radius: 2px;
  padding: 0.14rem 0.4rem;
  opacity: 0; transition: opacity 0.4s 0.2s;
}
.ft-frame.is-tagged .ft-ftag { opacity: 1; }
.ft-fnum {
  position: absolute; right: 6px; top: 6px;
  font-family: var(--f-mono); font-size: 0.5rem; letter-spacing: 0.2em; color: var(--dim);
  background: rgba(13 11 8 / 0.6); padding: 0.12rem 0.35rem; border-radius: 2px;
}

@media (max-width: 1080px) {
  .ft-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .ft-strip { grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
  .ft-meter { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) {
  .ft-strip { grid-template-columns: repeat(3, 1fr); }
  .ft-frame:nth-child(n+4) { display: none; }
  .ft-refs figure { width: 44px; height: 44px; }
}
