/* GEOINT map menu (production) — ported from preview hybrid */

/* Hidden until world rest */
.home:not(.is-world-rest) .geo-halo,
.home:not(.is-world-rest) .quad-layer,
.home:not(.is-world-rest) .letter-field,
.home:not(.is-world-rest) .geo-svg,
.home:not(.is-world-rest) #geo-titles,
.home:not(.is-world-rest) #geo-aux,
.home:not(.is-world-rest) #geo-sites,
.home:not(.is-world-rest) .geo-status,
.home.geo-menu-hidden .geo-halo,
.home.geo-menu-hidden .quad-layer,
.home.geo-menu-hidden .letter-field,
.home.geo-menu-hidden .geo-svg,
.home.geo-menu-hidden #geo-titles,
.home.geo-menu-hidden #geo-aux,
.home.geo-menu-hidden #geo-sites,
.home.geo-menu-hidden .geo-status {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Soft vignette on engage — focuses the instrument */
.home.is-world-rest::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 75% 70% at 50% 48%,
    transparent 35%,
    rgba(4, 10, 12, 0.22) 100%
  );
  opacity: 0.65;
  transition: opacity 0.5s ease;
}

.home.is-nav.is-world-rest::after {
  opacity: 1;
  background: radial-gradient(
    ellipse 70% 65% at 50% 48%,
    transparent 28%,
    rgba(2, 8, 10, 0.45) 100%
  );
}

/*
 * Acquisition sweep — options are scanned for and populated one at a time,
 * only after the site has come fully to rest (triggered from the existing
 * onWorldRest hook — untouched). Before an element is marked "seen" during
 * the sweep, force it invisible regardless of any other state that would
 * otherwise reveal it early (DXVXNX, 2026-08-08).
 */
.home.geo-sweeping #geo-titles .geo-title:not(.is-seen),
.home.geo-sweeping #geo-sites .geo-site:not(.is-seen),
.home.geo-sweeping .geo-svg .geo-path:not(.is-seen),
.home.geo-sweeping .geo-svg .geo-pip:not(.is-seen),
.home.geo-sweeping .geo-svg .geo-building:not(.is-seen) {
  opacity: 0 !important;
}

.geo-title.is-seen {
  animation: geo-enter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.geo-title.is-offscreen {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Edge aux chips — non-highlighted options that left the frame during spin */
#geo-aux {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.geo-aux {
  position: fixed;
  z-index: 9;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  border: none;
  margin: 0;
  padding: 0.28rem 0.45rem 0.3rem;
  width: max-content;
  max-width: 9.5rem;
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 245, 230, 0.92);
  text-align: center;
  background: rgba(4, 12, 10, 0.78);
  backdrop-filter: blur(8px);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(143, 212, 168, 0.28),
    0 4px 14px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.geo-aux.is-on {
  opacity: 1;
}

.geo-aux:hover {
  background: rgba(8, 22, 16, 0.9);
  box-shadow:
    0 0 0 1px rgba(168, 230, 184, 0.45),
    0 6px 16px rgba(0, 0, 0, 0.45);
}

.geo-aux__code {
  display: block;
  font-size: 0.85em;
  letter-spacing: 0.14em;
  color: rgba(143, 212, 168, 0.85);
  margin-bottom: 0.08rem;
}

.geo-aux__name {
  display: block;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8.5rem;
}

@keyframes geo-enter {
  from {
    opacity: 0;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

/* System strip */
.geo-status {
  position: absolute;
  left: 50%;
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(143, 212, 168, 0.55);
  background: rgba(4, 10, 8, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  pointer-events: none;
  transition: color 0.3s ease, background 0.3s ease;
}

.home.is-nav .geo-status {
  color: rgba(168, 230, 184, 0.85);
  background: rgba(4, 14, 10, 0.5);
}

.geo-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(143, 212, 168, 0.45);
  box-shadow: 0 0 8px rgba(143, 212, 168, 0.35);
}

.home.is-nav .geo-status__dot {
  background: #8fd4a8;
  animation: status-pulse 1.8s ease-in-out infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.85);
  }
}

/* Legacy left cats rail — a11y fallback only (geo callouts are primary) */
.home.is-world-rest .cats {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

/* Large type is letter-field; retire old ghost stack on rest home */
.home.is-world-rest .ghost-field {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* HUD rings optional underlay — keep subtle if present */
.home.is-world-rest .hud-rings {
  opacity: 0.35;
}

.geo-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--lens-size) * 1.32);
  height: calc(var(--lens-size) * 1.32);
  margin: calc(var(--lens-size) * -0.66) 0 0 calc(var(--lens-size) * -0.66);
  z-index: 6;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(143, 212, 168, 0.38);
  box-shadow:
    0 0 0 1px rgba(143, 212, 168, 0.06),
    0 0 32px rgba(143, 212, 168, 0.16),
    inset 0 0 28px rgba(143, 212, 168, 0.05);
  opacity: 0.5;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.45s ease, transform 0.5s ease;
}

.home.is-nav .geo-halo {
  opacity: 1;
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px rgba(143, 212, 168, 0.14),
    0 0 42px rgba(143, 212, 168, 0.32),
    inset 0 0 32px rgba(143, 212, 168, 0.08);
}

.geo-halo::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(143, 212, 168, 0.12);
  opacity: 0.7;
}

.geo-halo::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(143, 212, 168, 0.16);
  animation: halo-dash 48s linear infinite;
}

@keyframes halo-dash {
  to {
    transform: rotate(360deg);
  }
}

/* SVG path layer: dial center → map locations */
.geo-svg {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.geo-path {
  fill: none;
  /* Rest: whisper-thin so the map stays clean (not a star of wires) */
  stroke: rgba(168, 230, 184, 0.14);
  stroke-width: 1;
  stroke-linecap: round;
  filter: none;
  transition:
    stroke 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    stroke-opacity 0.32s ease,
    stroke-width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.32s ease;
}

.geo-path.is-active {
  stroke: rgba(168, 230, 184, 0.72);
  stroke-width: 1.65;
  filter: drop-shadow(0 0 4px rgba(143, 212, 168, 0.35));
}

.home.is-nav .geo-path.is-active {
  stroke: rgba(168, 230, 184, 0.96);
  stroke-width: 2.15;
  filter: drop-shadow(0 0 8px rgba(143, 212, 168, 0.65));
}

.geo-path.is-shooting {
  stroke-dasharray: 10 8;
  animation: path-dash 0.7s linear infinite;
}

.geo-path.is-draw {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: path-draw var(--draw-ms, 260ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Sweep-reveal draw — same mechanic, its own duration source */
.geo-path.is-draw-sweep {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: path-draw var(--draw-ms, 240ms) cubic-bezier(0.3, 0.1, 0.2, 1) forwards;
}

@keyframes path-dash {
  to {
    stroke-dashoffset: -36;
  }
}

@keyframes path-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Pencil point — bright tip that leads a solid trail (JS drives cx/cy + dashoffset) */
.geo-tip {
  fill: #eafff2;
  stroke: rgba(220, 255, 230, 0.95);
  stroke-width: 1.25;
  opacity: 0;
  pointer-events: none;
  filter:
    drop-shadow(0 0 5px rgba(210, 255, 230, 1))
    drop-shadow(0 0 14px rgba(143, 212, 168, 0.9));
  transition: opacity 0.12s ease;
}

.geo-tip.is-tracing {
  opacity: 1;
  /* No CSS offset-path animation — position is set each frame in JS */
  animation: none;
}

/* While the pencil is drawing, keep the trail bright and solid */
.geo-path.is-drawing {
  stroke: rgba(190, 255, 220, 0.95) !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(143, 212, 168, 0.65)) !important;
  opacity: 1 !important;
}

/*
 * Building / site footprints — every menu option is tied to a real structure
 * on the plate. Rest is quiet ink; active lock lights the selected mass
 * (photography hand-trace + soft outlines for the rest, DXVXNX 2026-08-09).
 */
.geo-building {
  fill: rgba(143, 212, 168, 0.04);
  stroke: rgba(168, 230, 184, 0.28);
  stroke-width: 1;
  stroke-linejoin: round;
  filter: none;
  transition: fill 0.3s ease, stroke 0.3s ease, filter 0.3s ease, stroke-width 0.3s ease;
}

.geo-building.is-tied {
  opacity: 1;
}

.geo-building.is-active {
  fill: rgba(168, 230, 184, 0.14);
  stroke: rgba(220, 255, 230, 0.92);
  stroke-width: 1.85;
  filter: drop-shadow(0 0 10px rgba(143, 212, 168, 0.55));
}

/* Sharp quick flash on arrival, before the reticle chrome populates */
.geo-building.is-flash {
  animation: building-flash 0.14s ease-out;
}

@keyframes building-flash {
  0% {
    fill: rgba(235, 255, 240, 0.95);
    stroke: #ffffff;
    filter: drop-shadow(0 0 24px rgba(220, 255, 230, 1));
  }
  100% {
    fill: rgba(168, 230, 184, 0.16);
    stroke: rgba(220, 255, 230, 0.95);
    filter: drop-shadow(0 0 10px rgba(143, 212, 168, 0.65));
  }
}

.geo-pip {
  fill: rgba(8, 14, 10, 0.35);
  stroke: rgba(143, 212, 168, 0.4);
  stroke-width: 1.25;
  transition: stroke 0.2s, fill 0.2s, filter 0.2s;
}

.geo-pip.is-active,
.geo-pip.is-scan-pulse {
  fill: rgba(168, 230, 184, 0.95);
  stroke: rgba(220, 255, 230, 1);
  filter: drop-shadow(0 0 8px rgba(143, 212, 168, 0.75));
}

/* Building / acquisition site highlight — compact; left/top from JS every frame */
.geo-site {
  position: fixed;
  z-index: 4;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  pointer-events: none;
  opacity: 0.42;
  /* Do not transition left/top — spin must track plate instantly */
  transition: opacity 0.2s ease, filter 0.2s ease;
  transform: scale(1);
}

/* Available (rest): readable but not a field of big reticles */
.geo-site.is-available {
  opacity: 0.55;
  transform: scale(1);
}

/* Dial-selected: brighter only — keep size fixed so spin stays clean */
.geo-site.is-active,
.geo-site.is-scan-pulse {
  opacity: 0.92;
  z-index: 5;
  filter: drop-shadow(0 0 8px rgba(143, 212, 168, 0.4));
}

.home.is-nav .geo-site.is-active {
  opacity: 1;
}

.geo-site__glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(143, 212, 168, 0.35) 0%,
    rgba(143, 212, 168, 0.12) 42%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

.geo-site.is-active .geo-site__glow,
.geo-site.is-scan-pulse .geo-site__glow {
  background: radial-gradient(
    circle,
    rgba(168, 230, 184, 0.55) 0%,
    rgba(143, 212, 168, 0.22) 40%,
    transparent 72%
  );
  animation: site-glow-pulse 1.6s ease-in-out infinite;
}

@keyframes site-glow-pulse {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

.geo-site__ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(143, 212, 168, 0.4);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.geo-site.is-active .geo-site__ring,
.geo-site.is-scan-pulse .geo-site__ring {
  border-color: rgba(200, 255, 220, 0.95);
  box-shadow:
    0 0 12px rgba(143, 212, 168, 0.55),
    inset 0 0 10px rgba(143, 212, 168, 0.15);
  animation: site-ring-spin 8s linear infinite;
}

@keyframes site-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Dashed outer acquisition ring (active only) */
.geo-site__ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(143, 212, 168, 0.25);
  opacity: 0;
  transition: opacity 0.25s;
}

.geo-site.is-active .geo-site__ring-outer,
.geo-site.is-scan-pulse .geo-site__ring-outer {
  opacity: 1;
  animation: site-ring-pulse 1.4s ease-out infinite;
}

@keyframes site-ring-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* Corner brackets — lock mark on the structure */
.geo-site__bracket {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(143, 212, 168, 0.35);
  border-style: solid;
  opacity: 0.5;
}

.geo-site.is-active .geo-site__bracket,
.geo-site.is-scan-pulse .geo-site__bracket {
  border-color: rgba(200, 255, 220, 0.95);
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(143, 212, 168, 0.5));
}

.geo-site__bracket--tl {
  top: 4px;
  left: 4px;
  border-width: 1.5px 0 0 1.5px;
}
.geo-site__bracket--tr {
  top: 4px;
  right: 4px;
  border-width: 1.5px 1.5px 0 0;
}
.geo-site__bracket--bl {
  bottom: 4px;
  left: 4px;
  border-width: 0 0 1.5px 1.5px;
}
.geo-site__bracket--br {
  bottom: 4px;
  right: 4px;
  border-width: 0 1.5px 1.5px 0;
}

.geo-site__cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  opacity: 0.4;
}

.geo-site.is-active .geo-site__cross,
.geo-site.is-scan-pulse .geo-site__cross {
  opacity: 1;
}

.geo-site__cross::before,
.geo-site__cross::after {
  content: "";
  position: absolute;
  background: rgba(143, 212, 168, 0.75);
}

.geo-site.is-active .geo-site__cross::before,
.geo-site.is-active .geo-site__cross::after,
.geo-site.is-scan-pulse .geo-site__cross::before,
.geo-site.is-scan-pulse .geo-site__cross::after {
  background: rgba(220, 255, 230, 0.95);
  box-shadow: 0 0 4px rgba(143, 212, 168, 0.6);
}

.geo-site__cross::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  margin-left: -0.5px;
}

.geo-site__cross::after {
  top: 50%;
  left: 0;
  height: 1px;
  width: 100%;
  margin-top: -0.5px;
}

/*
 * Location callouts — mono / terminal GEOINT type.
 * Rest (non-primary): readable but subdued + smaller.
 * Primary (active + lens engage): lock-on scale, tracking, glow, lede expand.
 * Motion: stepped tech ease in, slightly snappier reverse out.
 */
.geo-title {
  --title-ease-in: cubic-bezier(0.16, 1, 0.3, 1);
  --title-ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  z-index: 5;
  transform: translate(-50%, calc(-100% - 12px)) scale(0.98);
  transform-origin: 50% 100%;
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  border: none;
  margin: 0;
  text-align: inherit;
  font: inherit;
  color: inherit;
  /* Computerized HUD mono — not consumer sans */
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(0.72rem, 1.35vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  /* Rest: clear but not screaming — primary lock still dominates */
  color: rgba(225, 248, 235, 0.9);
  text-shadow:
    0 0 14px rgba(143, 212, 168, 0.28),
    0 1px 10px rgba(0, 0, 0, 0.88),
    0 0 1px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  opacity: 0.9;
  /* Hug the visible label only (code + name). Collapsed lede/meta must not
     inflate width — they used to sit in-flow with max-height:0 and still
     force a wide plate, so short labels overlapped when the menu populated
     (DXVXNX, 2026-08-09). Cap only as a safety for long expanded copy. */
  display: block;
  box-sizing: border-box;
  width: max-content;
  /* Compact max so 10 options can share the frame without stacking */
  max-width: min(13.5rem, 36vw);
  padding: 0.28rem 0.42rem 0.32rem;
  background: rgba(4, 12, 10, 0.52);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(143, 212, 168, 0.06);
  /* Position (left/top) is set every frame from plate project — never
     transition left/top. Keep color/opacity soft; avoid long transform
     eases that lag behind spin (DXVXNX 2026-08-09 cleanup). */
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    text-shadow 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

/* When another option is locked on lens, quiet the rest — opacity only */
.geo-title.is-dimmed {
  opacity: 0.38;
  filter: none;
}

/* Expanded lede panel — only when dial-selected + lens engage (not option hover) */
.geo-title.is-expanded {
  white-space: normal;
  width: max-content;
  max-width: min(18rem, 48vw);
  padding: 0.48rem 0.62rem 0.55rem;
  background: rgba(4, 12, 10, 0.55);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(143, 212, 168, 0.035) 2px,
    rgba(143, 212, 168, 0.035) 4px
  );
}

/* Dial-selected: stronger plate, same transform base (no scale jump) */
.geo-title.is-active:not(.is-expanded) {
  color: rgba(220, 250, 232, 0.95);
  opacity: 0.95;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 10px rgba(143, 212, 168, 0.28),
    0 1px 8px rgba(0, 0, 0, 0.75);
  background: rgba(6, 14, 11, 0.5);
  box-shadow: 0 0 0 1px rgba(143, 212, 168, 0.12);
  z-index: 6;
}

/*
 * Primary lock (lens engage + active): clearer type + plate, still no
 * scale/lock animation — position stays plate-tied during spin.
 */
.home.is-nav .geo-title.is-active {
  color: #e8fff2;
  opacity: 1;
  z-index: 7;
  letter-spacing: 0.09em;
  text-shadow:
    0 0 14px rgba(143, 212, 168, 0.4),
    0 2px 10px rgba(0, 0, 0, 0.85);
  background: rgba(6, 16, 12, 0.58);
  box-shadow:
    0 0 0 1px rgba(143, 212, 168, 0.16),
    0 6px 20px rgba(0, 0, 0, 0.3);
  animation: none;
}

.geo-title.is-expanded {
  color: #e8fff2;
  opacity: 1;
  z-index: 7;
}

.geo-title__code {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.12rem;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.58em;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(143, 212, 168, 0.78);
  text-align: center;
  transition: color 0.28s ease, letter-spacing 0.32s ease;
}

.geo-title.is-active .geo-title__code,
.geo-title.is-expanded .geo-title__code {
  color: rgba(168, 230, 184, 0.95);
  letter-spacing: 0.18em;
}

.geo-title__name {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  line-height: 1.2;
  font-weight: inherit;
  font-variant-numeric: tabular-nums;
}

/* Service explanation — collapsed at rest; expands on primary lock.
   Out-of-flow when collapsed so long lede/meta never widen the rest plate. */
.geo-title__lede {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 0;
  margin: 0;
  padding: 0 0.48rem;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.55em;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-transform: none;
  color: rgba(200, 230, 215, 0.82);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
  transition:
    max-height 0.38s var(--title-ease-out),
    opacity 0.28s var(--title-ease-out),
    margin 0.28s var(--title-ease-out);
}

.geo-title.is-expanded .geo-title__lede {
  position: static;
  width: auto;
  max-width: none;
  max-height: 6rem;
  margin-top: 0.45rem;
  padding: 0;
  opacity: 1;
  pointer-events: auto;
  white-space: normal;
  transition-timing-function: var(--title-ease-in);
}

.geo-title__meta {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 0;
  margin: 0;
  padding: 0 0.48rem;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.48em;
  letter-spacing: 0.1em;
  color: rgba(143, 212, 168, 0.5);
  text-align: center;
  text-transform: uppercase;
  transition:
    max-height 0.32s var(--title-ease-out),
    opacity 0.25s var(--title-ease-out),
    margin 0.25s var(--title-ease-out);
}

.geo-title.is-expanded .geo-title__meta {
  position: static;
  width: auto;
  max-width: none;
  max-height: 2rem;
  margin-top: 0.35rem;
  padding: 0;
  opacity: 1;
  pointer-events: auto;
  white-space: normal;
  transition-timing-function: var(--title-ease-in);
}

/* Non-primary sites quieter when another is locked — opacity only */
.home.is-nav .geo-site.is-available:not(.is-active) {
  opacity: 0.4;
}

/*
 * Option hover — plain GEOINT select (DXVXNX 2026-08-09):
 * no world zoom/blur/AF, no pan, no size jump. Highlight + dim peers only.
 * Positions are frozen in JS; transform held fixed so the box stays still.
 */
.home.is-option-hover .world-bg {
  animation: none;
  filter: none;
  transition: none;
}

.home.is-option-hover .letter-field,
.home.is-option-hover .quad-layer,
.home.is-option-hover .geo-halo,
.home.is-option-hover .geo-status {
  animation: none;
  filter: none;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.home.is-option-hover .geo-path:not(.is-active),
.home.is-option-hover .geo-pip:not(.is-active) {
  filter: none;
  opacity: 0.28;
}

.home.is-option-hover .geo-title:not(.is-direct-hover) {
  filter: none;
  opacity: 0.32 !important;
  pointer-events: none;
  transition: opacity 0.18s ease;
  animation: none !important;
}

.home.is-option-hover .geo-site:not(.is-direct-hover) {
  filter: none;
  opacity: 0.3 !important;
  animation: none !important;
}

.home.is-option-hover .geo-title.is-direct-hover {
  filter: none !important;
  opacity: 1 !important;
  z-index: 30;
  pointer-events: auto;
  animation: none !important;
  /* Keep expanded lede readable; position frozen by JS — allow expand chrome */
  transform: translate(-50%, calc(-100% - 14px)) scale(1.02) !important;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.18s ease !important;
}

.home.is-option-hover .geo-site.is-direct-hover {
  filter: none !important;
  opacity: 1 !important;
  z-index: 29;
  animation: none !important;
  transition: none !important;
}

.home.is-option-hover .geo-path.is-active {
  animation: none !important;
}

.home.is-option-hover .geo-path.is-active,
.home.is-option-hover .geo-pip.is-active,
.home.is-option-hover .geo-building.is-active {
  filter: none;
  opacity: 1;
}

.home:not(.is-option-hover) .world-bg {
  animation: none;
  filter: none;
}

.home:not(.is-option-hover) .letter-field,
.home:not(.is-option-hover) .quad-layer,
.home:not(.is-option-hover) .geo-halo,
.home:not(.is-option-hover) .geo-status {
  animation: none;
  filter: none;
}

.geo-title:focus-visible {
  outline: 1px solid rgba(143, 212, 168, 0.65);
  outline-offset: 3px;
}

/* Active-only soft unlined box + typewriter — lives at map endpoint, off-lens */
.geo-box {
  position: fixed;
  z-index: 7;
  /* Default: sit below-right of callout point; flipped via data-side */
  transform: translate(8px, 10px);
  pointer-events: none;
  max-width: min(14rem, 38vw);
  padding: 0.55rem 0.75rem 0.65rem;
  border: none;
  outline: none;
  background: rgba(6, 12, 10, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  /* Scanline static — intel channel feel */
  box-shadow: inset 0 0 0 1px rgba(143, 212, 168, 0.06);
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(143, 212, 168, 0.03) 2px,
    rgba(143, 212, 168, 0.03) 4px
  );
}

.geo-box[data-side="right"] {
  transform: translate(calc(-100% - 8px), 10px);
}

.geo-box[data-side="left"] {
  transform: translate(8px, 10px);
}

.geo-box.is-on {
  opacity: 1;
  visibility: visible;
}

/* Corner ticks — selection / lock brackets (not a full border box) */
.geo-box::before,
.geo-box::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  opacity: 0.75;
}

.geo-box::before {
  top: 4px;
  left: 4px;
  border-top: 1px solid rgba(143, 212, 168, 0.7);
  border-left: 1px solid rgba(143, 212, 168, 0.7);
}

.geo-box::after {
  bottom: 4px;
  right: 4px;
  border-bottom: 1px solid rgba(143, 212, 168, 0.7);
  border-right: 1px solid rgba(143, 212, 168, 0.7);
}

.geo-box__status {
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  color: rgba(143, 212, 168, 0.75);
  margin-bottom: 0.25rem;
}

.geo-box__text {
  font-family: var(--pixel);
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  letter-spacing: 0.06em;
  color: rgba(235, 250, 240, 0.95);
  line-height: 1.35;
  min-height: 1.35em;
}

.geo-box__cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: rgba(143, 212, 168, 0.9);
  animation: blink 0.7s steps(1, end) infinite;
}

.geo-box__cursor.is-done {
  display: none;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.geo-box__meta {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: rgba(143, 212, 168, 0.45);
}

/* C — screen-space quadrants (ambient, not nav) */
.quad-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.quad {
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.quad.is-hot {
  background: rgba(143, 212, 168, 0.035);
  border-color: rgba(143, 212, 168, 0.1);
  box-shadow: inset 0 0 48px rgba(143, 212, 168, 0.035);
}

.quad__tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(143, 212, 168, 0.22);
  transition: color 0.2s, opacity 0.2s;
  opacity: 0.65;
}

.quad--nw .quad__tag {
  top: 3.5rem;
  left: 0.75rem;
}
.quad--ne .quad__tag {
  top: 3.5rem;
  right: 0.75rem;
  text-align: right;
}
.quad--sw .quad__tag {
  bottom: 1rem;
  left: 0.75rem;
}
.quad--se .quad__tag {
  bottom: 1rem;
  right: 0.75rem;
  text-align: right;
}

.quad.is-hot .quad__tag {
  color: rgba(143, 212, 168, 0.75);
  opacity: 1;
}

.quad__class {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: rgba(230, 245, 235, 0.55);
  max-width: 11rem;
  line-height: 1.35;
}

.quad:not(.is-hot) .quad__class {
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.quad.is-hot .quad__class {
  opacity: 1;
  height: auto;
}

/*
 * Large lettering field — cascade populate on designation (rest: off).
 * Fills the viewport behind the lens; soft mint so map + paths still read.
 */
.letter-field {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  user-select: none;
  /* Soft hole so lens/halo stay clean */
  mask-image: radial-gradient(
    circle at 50% 50%,
    transparent 0%,
    transparent calc(var(--lens-size) * 0.42),
    #000 calc(var(--lens-size) * 0.72),
    #000 100%
  );
  -webkit-mask-image: radial-gradient(
    circle at 50% 50%,
    transparent 0%,
    transparent calc(var(--lens-size) * 0.42),
    #000 calc(var(--lens-size) * 0.72),
    #000 100%
  );
}

.home.is-nav .letter-field.is-on {
  opacity: 1;
}

.letter-field__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0;
  transform: translateY(-1%);
}

.letter-field__row {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(2.8rem, 14vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(168, 230, 184, 0.42);
  text-shadow:
    0 0 28px rgba(143, 212, 168, 0.28),
    0 2px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(0.3em) scale(0.96);
}

/* Alternate rows slightly dimmer / offset for scan-field depth */
.letter-field__row:nth-child(even) {
  color: rgba(168, 230, 184, 0.32);
  letter-spacing: 0.12em;
}

.home.is-nav .letter-field.is-on .letter-field__row {
  animation: letter-populate 0.55s cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.042s);
}

/* Re-fire cascade when designation changes */
.letter-field.is-repop .letter-field__row {
  animation: none;
  opacity: 0;
}

.letter-field.is-repop.is-on .letter-field__row {
  animation: letter-populate 0.5s cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.038s);
}

@keyframes letter-populate {
  0% {
    opacity: 0;
    transform: translateY(0.35em) scale(0.94);
    filter: blur(3px);
    letter-spacing: 0.22em;
  }
  50% {
    opacity: 0.95;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    letter-spacing: 0.06em;
  }
}

.home.is-nav .letter-field.is-on .letter-field__stack {
  animation: letter-flicker 3.2s steps(2, end) infinite;
  animation-delay: 0.6s;
}

@keyframes letter-flicker {
  0%,
  91%,
  100% {
    opacity: 1;
  }
  92% {
    opacity: 0.7;
  }
  94% {
    opacity: 1;
  }
  97% {
    opacity: 0.82;
  }
}
