/* ============================================================
   AGENT UI overrides. Loaded after main.css on purpose: every
   rule here intentionally wins over the base sheet.
   ============================================================ */

/* ---------- Header: main.css parks the identity block and the MAIN SITE
   pill in the same top-left corner. Identity keeps the corner, the pill
   drops below it with clear air. ---------- */
.back-home {
  top: 4.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}
.back-home svg { width: 11px; height: 11px; display: block; flex: none; }

/* ---------- Progress: an edge-to-edge stripe at the screen border reads
   as a rendering fault. The bar now lives as a compact scrub instrument in
   the top-right HUD cluster, under LOS ANGELES, CA: a short track with a
   warm fill and a playhead tip. boot.js keeps writing the fill width in
   percent, which now resolves against the track. ---------- */
.progress-track {
  position: fixed; top: 3.45rem; right: 1.9rem;
  width: 110px; height: 2px;
  background: rgba(243, 241, 234, 0.16);
  z-index: 8990; pointer-events: none;
}
.progress {
  position: absolute; top: 0; left: 0; height: 100%;
  background: linear-gradient(90deg, rgba(200, 162, 102, 0.75), rgba(122, 190, 152, 0.85));
}
.progress::after {
  content: ""; position: absolute; right: -2px; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  transform: translateY(-50%);
  background: #c8a266;
  box-shadow: 0 0 6px rgba(200, 162, 102, 0.8);
}

/* ---------- Caption scrims: a deep, calm field behind every caption no
   matter what the scene does. The panel gradient is markedly more opaque
   with a stronger blur, and a wide feathered halo extends the dark field
   well past the panel edge so it reads as graded light, not a box. ---------- */
.station-caption {
  padding: 1.85rem 2rem 1.95rem;
  background: linear-gradient(180deg, rgba(10, 10, 8, 0.8) 0%, rgba(10, 10, 8, 0.64) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(1.05);
  backdrop-filter: blur(28px) saturate(1.05);
  border-color: rgba(232, 220, 196, 0.15);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(4, 4, 3, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.station-caption::before {
  content: ""; position: absolute; inset: -36px; z-index: -1;
  background: radial-gradient(closest-side, rgba(5, 5, 4, 0.5) 0%, rgba(5, 5, 4, 0.26) 55%, transparent 100%);
  border-radius: 52px;
  pointer-events: none;
}
/* the finale sits on the brightest glow cluster in the scene: deepest scrim */
#contact {
  background: radial-gradient(130% 130% at 50% 0%, rgba(5, 5, 4, 0.86) 0%, rgba(5, 5, 4, 0.7) 100%);
  -webkit-backdrop-filter: blur(30px) saturate(1.05);
  backdrop-filter: blur(30px) saturate(1.05);
  border-color: rgba(232, 220, 196, 0.18);
}

/* ---------- Type contrast and hierarchy: each layer of a caption (kicker,
   headline, role, body, stat, facts, chip) is a distinct register with its
   own spacing, so who/what/when scans in two seconds. ---------- */
.station-kicker {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.34em;
  color: rgba(248, 246, 240, 0.82); margin-bottom: 1rem;
}
.station-caption h3 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  line-height: 1.07; letter-spacing: -0.01em;
  color: #fbf9f4; margin-bottom: 0.2rem;
}
.station-role {
  font-weight: 600; font-size: 0.66rem; letter-spacing: 0.16em;
  color: #d9c49a; margin: 0.6rem 0 1rem;
}
.station-body {
  font-size: 0.95rem; line-height: 1.7;
  color: rgba(250, 249, 245, 0.95);
  max-width: 44ch;
}
.station-stat { margin-top: 1.15rem; font-size: 2.2rem; color: #fbf9f4; }
.station-stat small { color: rgba(248, 246, 240, 0.72); font-weight: 500; letter-spacing: 0.24em; }
.station-facts {
  font-weight: 500; font-size: 0.66rem; letter-spacing: 0.13em;
  color: rgba(248, 246, 240, 0.84); line-height: 2.15;
  margin-top: 1.15rem; padding-top: 1rem;
  border-top: 1px solid rgba(232, 220, 196, 0.2);
}
.sc-chip {
  color: #fbf9f4; font-weight: 500;
  background: rgba(200, 162, 102, 0.16); border-color: rgba(216, 190, 140, 0.55);
}

/* ---------- HUD corners, depth meter, sound toggle: crisp small mono over
   bright sky via weight and a layered dark text-shadow backing. boot.js
   fades the HUD to a 0.15 watermark in content; keep that recede but floor
   it so the corners never vanish over a bright scene. ---------- */
.hud { opacity: calc(0.42 + var(--hud-op, 1) * 0.58); }
.hud > div {
  font-size: 0.58rem; font-weight: 600; letter-spacing: 0.26em;
  color: rgba(250, 248, 242, 0.9);
  text-shadow: 0 1px 2px rgba(2, 4, 10, 0.9), 0 2px 14px rgba(2, 4, 10, 0.75), 0 0 28px rgba(2, 4, 10, 0.55);
}
.depth-meter {
  font-weight: 500; color: rgba(250, 248, 242, 0.88);
  text-shadow: 0 1px 2px rgba(2, 4, 10, 0.9), 0 2px 12px rgba(2, 4, 10, 0.7);
}
.snd-toggle {
  font-weight: 500; color: rgba(250, 248, 242, 0.85);
  text-shadow: 0 1px 2px rgba(2, 4, 10, 0.9), 0 2px 12px rgba(2, 4, 10, 0.7);
}
.scroll-hint {
  color: rgba(253, 251, 247, 0.85);
  text-shadow: 0 1px 2px rgba(2, 4, 10, 0.85), 0 2px 12px rgba(2, 4, 10, 0.6);
}
.chapter-card .cc-num { letter-spacing: 0.56em; text-indent: 0.56em; color: rgba(248, 246, 240, 0.7); }

/* ---------- Reliability over theatrics: caption children carry NO reveal
   state of their own (no masks, no staggers, no is-live dependency). The
   card fades as one unit from js/fx/ui.js, so content can never
   half-render, clip behind a mask, or lag its panel. ---------- */

/* ---------- Skills panel: the shared frosted slab is gone entirely; each
   of the three cards carries its own compact scrim (same family as the
   station captions) and the root scene reads between them. ---------- */
.beyond, .beyond:hover {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: transparent;
  box-shadow: none;
}
.beyond {
  width: min(960px, 94vw);
  padding: 0;
  margin: 18vh auto;
}
.beyond .section-label {
  margin-bottom: 1.9rem;
  text-shadow: 0 1px 2px rgba(2, 4, 10, 0.9), 0 2px 14px rgba(2, 4, 10, 0.7);
}
.beyond-grid { gap: 1.5rem; }
.beyond-card, .beyond-card:hover {
  background: linear-gradient(180deg, rgba(10, 10, 8, 0.8) 0%, rgba(10, 10, 8, 0.64) 100%);
  -webkit-backdrop-filter: blur(24px) saturate(1.05);
  backdrop-filter: blur(24px) saturate(1.05);
}
.beyond-card {
  padding: 1.8rem 1.6rem;
  border: 1px solid rgba(232, 220, 196, 0.15);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(4, 4, 3, 0.4);
}
.beyond p { color: rgba(250, 249, 245, 0.95); }

/* ---------- Act title cards: opacity and slide are now driven per frame by
   js/fx/ui.js so a title can never share the screen with a caption. The CSS
   transition must not fight the per frame values. ---------- */
.chapter-card { transition: none; will-change: opacity, transform; }

/* ---------- Scroll hint: drawn line instead of a unicode arrow ---------- */
.scroll-hint::after {
  content: ""; display: inline-block; width: 1px; height: 36px;
  margin-top: 12px;
  background: linear-gradient(to bottom, rgba(253, 251, 247, 0.75), rgba(253, 251, 247, 0));
}

/* ---------- Sound toggle: main.css pins it bottom-right where the vertical
   SCROLL hint lives (right: 7vw converges on it as the viewport narrows).
   It joins the bottom-left HUD column instead, stacked above PORTFOLIO. */
.snd-toggle { right: auto; left: 1.9rem; bottom: 3.6rem; }

/* ---------- Short viewports: keep late-screen captions fully on screen */
@media (max-height: 760px) and (min-width: 601px) {
  .station-caption { top: 48vh; }
  .sc-right { top: 24vh; }
  .sc-mid { top: 46vh; }
  .sc-center { top: 20vh; }
  .sc-world { top: 0; }
}

/* ---------- Mobile: the HUD corners are hidden, so the pill returns to the
   top-left and the sound toggle moves to the free top-right corner, clear of
   the vertical SCROLL hint at bottom-right. ---------- */
@media (max-width: 600px) {
  .back-home { top: 1.1rem; }
  .snd-toggle { bottom: auto; top: 1.45rem; left: auto; right: 1.4rem; }
  .progress-track { top: 3.4rem; right: 1.4rem; width: 84px; }
  .station-body { max-width: none; font-size: 0.98rem; line-height: 1.72; }
  .station-caption h3 { font-size: 1.7rem; }
  .station-caption { padding: 1.7rem 1.6rem 1.8rem; }
}
