/* ========================================
   ENRICHMENT, ON SCROLL
   After the logo river. Two pinned panels driven by the scroll: first a navy scope, a bare address and the
   records it arrives in from every kind of system; then graph paper, where ipdata's layers land on it one by
   one, lighting the matching words of the sentence as they do. The script sets --t (0–1) and .is-in.
   The HUD language: corner brackets, uppercase mono readouts, dashed leaders, a reticle on the map.
   ======================================== */
.enrich { --nav: 60px; --enrich-paper: #fff; --enrich-glow: #fff; position: relative; height: 560vh; }   /* --nav: the fixed navbar's height; the stage pins beneath it. --enrich-paper: the card's and callouts' surface, --enrich-glow: the light at the scope's centre; both white on the light themes, the theme's own surfaces on the dark ones (2026-10-14) */
.enrich-stage { position: sticky; top: var(--nav); height: calc(100vh - var(--nav)); height: calc(100svh - var(--nav)); overflow: hidden; }
.enrich-panel {
  position: absolute; inset: 12px;
  border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 4vw, 4rem);
  overflow: hidden;
}
/* corner brackets: --hl the arm length, --hud the colour, --hin the inset */
.hud::before {
  content: ''; position: absolute; inset: var(--hin, 10px); pointer-events: none; z-index: 3;
  background:
    linear-gradient(var(--hud, currentColor) 0 0) top left / var(--hl, 14px) 1px no-repeat,
    linear-gradient(var(--hud, currentColor) 0 0) top left / 1px var(--hl, 14px) no-repeat,
    linear-gradient(var(--hud, currentColor) 0 0) top right / var(--hl, 14px) 1px no-repeat,
    linear-gradient(var(--hud, currentColor) 0 0) top right / 1px var(--hl, 14px) no-repeat,
    linear-gradient(var(--hud, currentColor) 0 0) bottom left / var(--hl, 14px) 1px no-repeat,
    linear-gradient(var(--hud, currentColor) 0 0) bottom left / 1px var(--hl, 14px) no-repeat,
    linear-gradient(var(--hud, currentColor) 0 0) bottom right / var(--hl, 14px) 1px no-repeat,
    linear-gradient(var(--hud, currentColor) 0 0) bottom right / 1px var(--hl, 14px) no-repeat;
}
.hud-s::before { --hin: -1px; --hl: 7px; }
.enrich-hud {
  position: absolute; z-index: 4;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
}
.enrich-hud-tl { top: 22px; left: 28px; }
.enrich-hud-tr { top: 22px; right: 28px; }
.enrich-hud-bl { bottom: 20px; left: 28px; }
.enrich-hud-br { bottom: 20px; right: 28px; }
.enrich-line {
  position: relative; z-index: 2;
  margin: 0;
  color: inherit;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3.1vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.22;
  text-align: center;
  text-wrap: balance;
}
.enrich-line em { font-style: normal; transition: color .4s ease; }

/* ---- the scope: light paper, a glow, a fine grid, rings and a slow sweep ---- */
.enrich-dark {
  --hud: color-mix(in srgb, var(--text-primary) 55%, transparent);
  z-index: 2;
  background: radial-gradient(ellipse 72% 62% at 50% 56%, var(--enrich-glow) 0%, var(--bg-primary) 62%, color-mix(in srgb, var(--bg-primary) 94%, var(--text-primary)) 100%);
  color: var(--text-primary);
}
.enrich-dark::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--text-primary) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--text-primary) 7%, transparent) 1px, transparent 1px);
  background-size: 40px 40px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%); mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
}
.enrich-scope { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: color-mix(in srgb, var(--text-primary) 16%, transparent); }
.enrich-rings { width: min(118vmin, 1080px); height: auto; }
.enrich-sweep {
  position: absolute; width: min(118vmin, 1080px); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(51, 102, 255, .12) 0deg, rgba(51, 102, 255, .05) 14deg, rgba(51, 102, 255, .015) 30deg, transparent 48deg);   /* a soft trailing sweep */
  -webkit-mask-image: radial-gradient(circle, #000 0 43.5%, transparent 44%); mask-image: radial-gradient(circle, #000 0 43.5%, transparent 44%);
  animation: enrich-sweep 16s linear infinite;
}
@keyframes enrich-sweep { to { transform: rotate(360deg); } }
.enrich-dark .enrich-hud { color: var(--text-muted); }
.enrich-dark .enrich-hud b { font-weight: 500; color: var(--accent); }
.enrich-line-1 { max-width: 24ch; }
.enrich-line-1 em { color: inherit; }
.enrich-line-1.is-lit em { color: var(--accent); }
/* the records: one per kind of system, drifting into place */
.enrich-raw { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.enrich-contact {
  --t: 0;
  position: absolute; left: var(--x); top: var(--y);
  display: grid; gap: .22rem;
  padding: .55rem .8rem .6rem;
  background: color-mix(in srgb, var(--enrich-paper) 88%, transparent);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  max-width: calc(100% - var(--x) - 12px); overflow: hidden;
  color: var(--text-primary);
  opacity: var(--t);
  transform: translate(calc((1 - var(--t)) * var(--dx)), calc((1 - var(--t)) * var(--dy)));
}
.enrich-contact i { font-style: normal; font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.enrich-contact b { font-size: .82rem; font-weight: 500; white-space: nowrap; }
.enrich-contact small { font-size: .64rem; color: var(--text-muted); white-space: nowrap; }
.enrich-contact::after { content: ''; position: absolute; top: 50%; right: -25px; width: 24px; height: 1px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.enrich-contact.l::after { right: auto; left: -25px; }
.enrich-contact.n::after { display: none; }

/* the record cards in the lookup hero's toast dress (his pick, 2026-10-13): rounded frosted paper, a soft shadow, a blue dot before a grey label, no corner marks */
.enrich-contact { border-radius: 10px; padding: .75rem .9rem; gap: .35rem; background: color-mix(in srgb, var(--bg-primary) 72%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); border-color: color-mix(in srgb, var(--text-primary) 12%, transparent); box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary) 4%, transparent), 0 12px 32px color-mix(in srgb, var(--text-primary) 6%, transparent); }
.enrich-contact.hud::before { display: none; }
.enrich-contact i { display: flex; align-items: center; gap: 6px; font-size: .65rem; color: var(--text-muted); }
.enrich-contact i::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex: none; }
.enrich-contact b { font-size: .92rem; font-weight: 600; }
.enrich-contact small { font-size: .66rem; }

/* ---- the graph paper: the record building up ---- */
.enrich-light {
  --grid: color-mix(in srgb, var(--text-primary) 7%, transparent);
  --hud: color-mix(in srgb, var(--text-primary) 55%, transparent);
  background-color: var(--bg-primary);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  color: var(--text-primary);
  gap: clamp(1.25rem, 3vh, 2.25rem);
  opacity: 0;
}
.enrich-light .enrich-hud { color: var(--text-muted); }
.enrich-light .enrich-hud b { font-weight: 500; color: var(--accent); }
.enrich-line-2 { max-width: 40ch; opacity: calc(.18 + .82 * var(--t, 0)); }
.enrich-line-2 em.is-in { color: var(--accent); }
.enrich-curl {
  position: absolute; top: 24px; left: 28px; z-index: 3;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .55rem .75rem .55rem .55rem;
  background: var(--enrich-paper); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .74rem; color: var(--text-secondary);
  opacity: 0; transform: translateY(-6px); transition: opacity .35s ease, transform .35s var(--ease-out);
}
.enrich-curl.is-in { opacity: 1; transform: none; }
.enrich-curl-tag { padding: .15rem .4rem; border: 1px solid var(--border); font-size: .6rem; letter-spacing: .08em; color: var(--text-muted); }
.enrich-curl code { font: inherit; color: inherit; background: none; padding: 0; }
.enrich-curl b { font-weight: 500; color: var(--text-primary); }
.enrich-card {
  --hud: color-mix(in srgb, var(--text-primary) 70%, transparent);
  --hin: -1px; --hl: 12px;
  position: relative; z-index: 2;
  width: min(460px, 100%);
  background: var(--enrich-paper);
  border: 1px solid color-mix(in srgb, var(--text-primary) 22%, transparent);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary) 5%, transparent), 0 28px 60px -24px color-mix(in srgb, var(--text-primary) 30%, transparent);
  font-family: var(--font-mono);
}
.enrich-card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem;
  opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s var(--ease-out);
}
.enrich-card-head.is-in { opacity: 1; transform: none; }
.enrich-card-head b { font-size: 1.2rem; font-weight: 600; }
.enrich-card-head b::before { content: '▸ '; color: var(--accent); }
.enrich-card-meta { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.enrich-ok { color: #1a9f5a; }
/* a layer: the map strip, a row, a callout, the word in the sentence; each lands when its turn comes */
.enrich-layer { opacity: 0; transition: opacity .4s ease, transform .45s var(--ease-out), max-height .45s var(--ease-out); }
.enrich-layer.is-in { opacity: 1; }
/* the map: the geolocation card's blue city map as its own panel under the card (his pick, 2026-10-13); the callouts' script draws the arrow to it */
.enrich-map { --map-h: 112px; position: relative; flex-shrink: 0; width: min(500px, 100%); max-height: 0; overflow: hidden; background: #dde7ff; border: 1px solid color-mix(in srgb, var(--text-primary) 22%, transparent); border-radius: 4px; box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary) 5%, transparent), 0 18px 40px -16px color-mix(in srgb, var(--text-primary) 35%, transparent); color: var(--text-primary); }
.enrich-map.is-in { max-height: calc(var(--map-h) + 2px); }
.enrich-map:not(.is-in) { margin-top: calc(-1 * clamp(1.25rem, 3vh, 2.25rem)); border-width: 0; }   /* no gap under the card until the map lands */
.enrich-city { display: block; width: 100%; height: var(--map-h); }
.enrich-city-label { position: absolute; left: 12px; bottom: 10px; padding: .32rem .5rem; background: rgba(255, 255, 255, .92); border: 1px solid var(--border); font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-primary); white-space: nowrap; }
:root:is([data-theme="dark"]) .enrich-map { background: #16224a; }
:root:is([data-theme="dark"]) .enrich { --enrich-paper: var(--bg-secondary); --enrich-glow: color-mix(in srgb, var(--bg-primary) 84%, var(--text-primary)); }
:root:is([data-theme="dark"]) .enrich-city-label { background: color-mix(in srgb, var(--bg-primary) 92%, transparent); }
.enrich-lead-map { stroke: color-mix(in srgb, var(--accent) 80%, transparent); stroke-dasharray: 3 3; }
.enrich-lead-map[hidden] { display: none; }
.enrich-rows { display: flex; flex-direction: column; }
.enrich-row {
  display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; align-items: baseline;
  padding: 0 1.25rem; max-height: 0; overflow: hidden; border-top: 1px solid var(--border);
  font-size: .8rem; transform: translateY(6px);
}
.enrich-row.is-in { max-height: 4rem; padding: .6rem 1.25rem; transform: none; }
.enrich-k { color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; font-size: .66rem; }
.enrich-v { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enrich-v.t { color: var(--accent); }
.enrich-callouts { position: absolute; inset: 0; pointer-events: none; }
.enrich-callout {
  --hud: color-mix(in srgb, var(--accent) 70%, transparent);
  position: absolute; top: var(--cy);
  display: flex; flex-direction: column; gap: .2rem;
  padding: .55rem .75rem;
  background: color-mix(in srgb, var(--enrich-paper) 82%, transparent);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  transform: translateY(8px);
}
.enrich-callout.l { right: calc(50% + 254px); }   /* beside the card, never over the sentence */
.enrich-callout.r { left: calc(50% + 254px); }
.enrich-callout.is-in { transform: none; }

/* the callouts in spade.com's form (his pick, 2026-10-13): framed in ink, a second line, placed and led by the script */
.enrich-callout { --hud: var(--text-primary); min-width: 232px; max-width: max(232px, calc(45% - 282px));   /* never into the card: the panel's half less the card's half, the edge inset and a 24px gap */ padding: .85rem 1.05rem .9rem; gap: .3rem; border-color: color-mix(in srgb, var(--text-primary) 28%, transparent); }
.enrich-callout.hud-s::before { --hl: 10px; --hin: -1px; }
.enrich-callout i { font-size: .64rem; font-weight: 700; letter-spacing: .14em; color: var(--text-primary); }
.enrich-callout i::before { color: var(--text-primary); }
.enrich-callout b { font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.enrich-callout small { display: block; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; color: var(--text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.enrich-callout small[hidden] { display: none; }
.enrich-leads { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.enrich-leads[hidden] { display: none; }
.enrich-lead { fill: none; stroke: color-mix(in srgb, var(--accent) 60%, transparent); stroke-width: 1; stroke-dasharray: 3 3; }
.enrich-callout i { font-style: normal; font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.enrich-callout i::before { content: '▸ '; color: var(--accent); }
.enrich-callout b { font-size: .8rem; font-weight: 500; color: var(--text-primary); }

/* narrow and short screens */
@media (max-width: 999px) { .enrich-callout, .enrich-lead:not(.enrich-lead-map) { display: none; } }   /* the callouts and their leads go under 1000px; the layer stays for the arrow to a map set under the card */
@media (max-width: 719px) {
  .enrich-card-head { flex-wrap: wrap; row-gap: .2rem; }   /* the address on its own line, the status under it: the meta no longer runs past the card's edge */
  .enrich-card-head b { flex: 1 0 100%; }
  .enrich-contact:nth-child(3), .enrich-contact:nth-child(4), .enrich-contact:nth-child(9) { display: none; }
  .enrich-contact { padding: .45rem .6rem; }
  .enrich-contact b { font-size: .72rem; } .enrich-contact small { display: none; }
  .enrich-contact::after { display: none; }
  .enrich-contact { max-width: 58%; }
  .enrich-contact.l { left: auto; right: 14px; }   /* the right-hand records hug the edge and shorten */
  .enrich-contact b { display: block; overflow: hidden; text-overflow: ellipsis; }
  .enrich-curl, .enrich-hud-bl { display: none; }
  .enrich-hud { font-size: .58rem; }
  .enrich-hud-tl { left: 20px; } .enrich-hud-tr { right: 20px; }
}
@media (max-height: 860px) {   /* seven rows and a four-line sentence: the card gives first */
  .enrich-map { --map-h: 88px; }
  .enrich-row.is-in { padding: .5rem 1.25rem; }
}
@media (max-height: 760px) { .enrich-line { font-size: clamp(1.3rem, 2.6vw, 2.1rem); } }

/* no motion, or no script: everything shown, one panel after the other */
.enrich.enrich-static { height: auto; }
.enrich.enrich-static .enrich-stage { position: static; height: auto; overflow: visible; }
.enrich.enrich-static .enrich-panel { position: relative; inset: auto; margin: 12px; min-height: 70vh; opacity: 1 !important; transform: none !important; }
.enrich.enrich-static .enrich-contact { --t: 1; }
.enrich.enrich-static .enrich-line-2 { --t: 1; }
.enrich.enrich-static .enrich-layer, .enrich.enrich-static .enrich-curl, .enrich.enrich-static .enrich-card-head { opacity: 1; transform: none; }
.enrich.enrich-static .enrich-map { max-height: calc(var(--map-h) + 2px); margin-top: 0; }
.enrich.enrich-static .enrich-row { max-height: 4rem; padding: .6rem 1.25rem; }
.enrich.enrich-static .enrich-line-2 em { color: var(--accent); }
.enrich.enrich-static .enrich-line-1 em { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .enrich-sweep { animation: none; } .enrich-layer, .enrich-curl, .enrich-card-head, .enrich-callout { transition: none; } }
