/* ==========================================================================
   TGBS Client Radar — the story page (/radar/)

   Loaded only on /radar/, after tgbs.css, whose tokens it uses throughout.

   The page is a sequence of chapters. Each one pairs a column of short text
   "beats" with a sticky stage: as a beat crosses the reading line, js/radar.js
   writes its index to the scene's data-beat and adds .on to every stage element
   whose data-at is at or below it. Everything visual keys off those two hooks,
   so the choreography lives here and the script stays a scroll reader.

   Nothing here hides content unless .js is present — a failed script leaves a
   fully readable page with every stage in its final state.
   ========================================================================== */

/* --------------------------------------------------------------- hero */

.rd-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-top: calc(var(--header-h) + clamp(24px, 5vw, 64px));
  padding-bottom: clamp(48px, 7vw, 96px);
  overflow: clip;
}

.rd-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  background: radial-gradient(50% 50% at 70% 40%, rgba(201, 162, 39, 0.13), transparent 70%);
  pointer-events: none;
}

.rd-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.rd-hero__title {
  font-size: clamp(2.5rem, 1.1rem + 5vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}

.rd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rd-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 900px) {
  .rd-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .rd-hero__visual {
    order: -1;
    max-width: 380px;
    margin-inline: auto;
    width: 100%;
  }
}

/* --------------------------------------------------------- the scope
   One CSS-animated radar, used full size in the hero and as a small portal on
   the TGBS home page. Both carry view-transition-name: radar-portal, which is
   what lets the browser morph one into the other between pages. */

.rd-scope {
  --sweep: 6s;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  view-transition-name: radar-portal;
  /* layout only: paint containment would clip the signal tags, which are
     allowed to extend past the scope's edge. */
  contain: layout;
  isolation: isolate;
}

.rd-scope__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 162, 39, 0.1), transparent 64%),
    var(--ink-2);
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.65),
    0 50px 140px -50px rgba(201, 162, 39, 0.3);
}

.rd-scope__rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--gold);
}

.rd-scope__beam {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* Bright leading edge at 0deg, trail behind it. Rotating clockwise, the edge
     reaches a contact at angle a after a/360 of a revolution — the delay each
     .rd-blip is given by the generator. */
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 280deg,
    rgba(201, 162, 39, 0.05) 300deg,
    rgba(201, 162, 39, 0.3) 356deg,
    rgba(245, 231, 188, 0.85) 359.4deg,
    transparent 360deg
  );
  animation: rd-sweep var(--sweep) linear infinite;
}

.rd-scope__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.16), 0 0 24px rgba(245, 231, 188, 0.6);
}

.rd-blip {
  position: absolute;
  left: calc(50% + var(--x));
  top: calc(50% + var(--y));
  width: clamp(6px, 1.4%, 9px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--gold-hi);
  opacity: 0.14;
  animation: rd-ping var(--sweep) linear infinite;
  animation-delay: var(--d);
}

.rd-blip--dim {
  background: var(--fg-3);
}

.rd-tag {
  position: absolute;
  left: calc(50% + var(--x));
  top: calc(50% + var(--y));
  translate: 14px -50%;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgba(8, 8, 11, 0.82);
  backdrop-filter: blur(6px);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold-hi);
  white-space: nowrap;
  opacity: 0;
  animation: rd-tag var(--sweep) linear infinite;
  animation-delay: var(--d);
}

.rd-tag--left {
  translate: calc(-100% - 14px) -50%;
}

.rd-tag small {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3ecf8e;
}

@keyframes rd-sweep {
  to {
    transform: rotate(1turn);
  }
}

@keyframes rd-ping {
  0% {
    opacity: 1;
    transform: scale(1.6);
    box-shadow: 0 0 0 0 rgba(245, 231, 188, 0.75);
  }
  28% {
    opacity: 0.55;
    transform: scale(1);
    box-shadow: 0 0 0 16px rgba(245, 231, 188, 0);
  }
  100% {
    opacity: 0.14;
    transform: scale(1);
  }
}

@keyframes rd-tag {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  4% {
    opacity: 1;
    transform: none;
  }
  40% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 520px) {
  .rd-tag {
    display: none;
  }
}

/* ------------------------------------------------------------ chapters */

.rd-chapter {
  position: relative;
  padding-top: var(--section-y);
}

.rd-chapter__head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: clamp(8px, 2vw, 24px);
}

.rd-chapter__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(3.4rem, 2rem + 5vw, 6.5rem);
  line-height: 0.8;
  background: var(--gold-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rd-scene {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  column-gap: clamp(28px, 5vw, 88px);
}

.rd-stage {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 3svh);
  height: calc(100svh - var(--header-h) - 6svh);
  display: grid;
  place-items: center;
}

/* The stage centres its content, which makes a child shrink to fit — and the
   map and board have no intrinsic width (their parts are absolutely placed),
   so without an explicit width they collapse to nothing. */
.rd-stage > * {
  width: min(100%, 560px);
}

.rd-beats {
  grid-column: 1;
  grid-row: 1;
  padding-bottom: 18svh;
}

.rd-beat {
  min-height: 74svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  max-width: 46ch;
}

.js .rd-beat {
  opacity: 0.22;
  transition: opacity var(--t) var(--ease);
}

.js .rd-beat.is-active {
  opacity: 1;
}

.rd-beat__time {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-lite);
}

.rd-beat__title {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}

.rd-beat p {
  color: var(--fg-2);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

/* On a phone the stage sits above the text instead of beside it. Both stay in
   the same grid cell: a sticky element cannot outlive its own grid area, so a
   stage in a row of its own would scroll away with that row. The beats are
   padded down to start below it and scroll up underneath its gradient. */
@media (max-width: 900px) {
  .rd-scene {
    grid-template-columns: minmax(0, 1fr);
  }
  .rd-stage {
    grid-column: 1;
    grid-row: 1;
    z-index: 2;
    top: var(--header-h);
    height: 64svh;
    place-items: start center;
    padding-block: 8px 20px;
    background: linear-gradient(180deg, var(--ink) 90%, transparent);
    overflow: hidden;
  }
  .rd-beats {
    grid-column: 1;
    grid-row: 1;
    padding-top: 64svh;
    padding-bottom: 10svh;
  }

  /* The stage has roughly half a phone screen, so every frame is compacted
     to fit inside it: supporting detail lines and captions give way, the
     facts and the score stay. */
  .rd-frame__bar {
    padding: 9px 14px;
  }
  .rd-caption,
  .rd-ev__detail,
  .rd-card__meta {
    display: none;
  }
  .rd-card__head {
    padding: 8px 14px;
  }
  .rd-card__name {
    font-size: 1.1rem;
  }
  .rd-score {
    width: 52px;
    height: 52px;
  }
  .rd-score__num {
    font-size: 0.95rem;
  }
  .rd-score__band {
    font-size: 0.5rem;
  }
  .rd-section__head {
    padding: 6px 14px;
    font-size: 0.6rem;
  }
  .rd-ev {
    padding: 6px 14px;
  }
  .rd-ev__label {
    font-size: var(--fs-xs);
  }
  .rd-ai {
    padding: 8px 14px 10px;
  }
  .rd-ai p {
    font-size: var(--fs-xs);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .rd-ai__match {
    margin-top: 6px;
  }
  .rd-ai__match .pill {
    padding: 4px 10px;
  }
  .rd-list__row {
    padding: 9px 14px;
  }
  .rd-list__verdict {
    inset: auto 10px 10px;
    padding: 10px 12px;
    font-size: var(--fs-xs);
  }
  .rd-map {
    aspect-ratio: 4 / 3;
  }
  /* Short beats: the text only has the strip below the stage to be read in,
     so each beat must hand over to the next before it slides underneath. */
  .rd-beat {
    min-height: 40svh;
    justify-content: flex-start;
    padding-top: 3svh;
  }
}

/* Shared stage frame */
.rd-frame {
  position: relative;
  width: min(100%, 560px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    var(--ink-2);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.rd-frame__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--fg-3);
}

.rd-caption {
  margin-top: 12px;
  font-size: 0.7rem;
  color: var(--fg-4);
  text-align: center;
}

.rd-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ------------------------------------------------ chapter 1 — the list */

.rd-list__row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 70px 54px;
  gap: 14px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  transition:
    opacity 0.6s var(--ease),
    filter 0.6s var(--ease),
    background-color 0.35s var(--ease);
}

.rd-list__row:last-child {
  border-bottom: 0;
}

.rd-list__box {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-3);
  border-radius: 4px;
}

.rd-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--fill-3);
}

.rd-list__verdict {
  position: absolute;
  inset: auto 18px 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: rgba(8, 8, 11, 0.9);
  backdrop-filter: blur(8px);
  font-size: var(--fs-sm);
  color: var(--fg-2);
}

.rd-list__verdict strong {
  color: var(--fg);
}

/* Beat 1: the eye jumps between identical rows, finding nothing to go on. */
.js .rd-scene[data-beat="1"] .rd-list__row {
  animation: rd-scan 2.4s var(--ease-in-out) infinite;
  animation-delay: calc(var(--i) * 0.3s);
}

@keyframes rd-scan {
  0%,
  100% {
    background-color: transparent;
  }
  12% {
    background-color: rgba(201, 162, 39, 0.08);
  }
  24% {
    background-color: transparent;
  }
}

/* Beat 2: the rows lose all meaning. */
.js .rd-scene[data-beat="2"] .rd-list__row {
  opacity: 0.35;
  filter: blur(2.5px);
}

.js .rd-list__verdict {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.js .rd-list__verdict.on {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------- chapter 2 — the sweep */

.rd-map {
  position: relative;
  aspect-ratio: 5 / 4;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 36px 36px,
    radial-gradient(70% 70% at 50% 50%, rgba(201, 162, 39, 0.08), transparent 70%),
    var(--ink-3);
}

.rd-map__streets {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--fg-4);
}

.rd-map__area {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px dashed var(--line-3);
  border-radius: 50%;
  scale: calc(0.6 + var(--p, 1) * 0.4);
  opacity: calc(0.3 + var(--p, 1) * 0.7);
}

.rd-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--gold-lite);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.16);
  transition:
    background-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}

.js .rd-dot {
  opacity: clamp(0, calc((var(--p, 0) - var(--t)) * 14), 1);
  scale: clamp(0.2, calc((var(--p, 0) - var(--t)) * 14), 1);
}

.rd-dot--dup.on {
  background: var(--fg-4);
  box-shadow: none;
}

.rd-dot--dup.on::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 1.5px;
  background: var(--fg-2);
  rotate: -35deg;
}

.rd-map__search {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgba(8, 8, 11, 0.85);
  backdrop-filter: blur(8px);
  font-size: var(--fs-xs);
  color: var(--fg-2);
}

.rd-map__search svg {
  width: 14px;
  height: 14px;
  color: var(--gold-lite);
}

.rd-map__count {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: rgba(8, 8, 11, 0.88);
  font-size: var(--fs-xs);
  color: var(--fg-3);
  line-height: 1.5;
}

.rd-map__count b {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------- chapter 3 — the evidence */

.rd-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.rd-card__name {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.1;
}

.rd-card__meta {
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--fg-3);
}

.rd-score {
  --score: 0;
  --tone: var(--fg-4);
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  text-align: center;
}

.rd-score svg {
  position: absolute;
  inset: 0;
  rotate: -90deg;
}

.rd-score__track {
  stroke: var(--fill-3);
}

.rd-score__fill {
  stroke: var(--tone);
  stroke-dasharray: 201.06;
  stroke-dashoffset: calc(201.06 * (1 - var(--score) / 100));
  transition:
    stroke-dashoffset 0.9s var(--ease),
    stroke 0.4s var(--ease);
}

.rd-score__num {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.rd-score__band {
  display: block;
  margin-top: 3px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tone);
}

.rd-score[data-band="hot"] {
  --tone: #ff6b4a;
}
.rd-score[data-band="strong"] {
  --tone: #f5c451;
}
.rd-score[data-band="nurture"] {
  --tone: #5eb0ef;
}
.rd-score[data-band="low"] {
  --tone: #7d7d8a;
}

.rd-section {
  border-top: 1px solid var(--line);
}

.rd-section__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rd-section__head svg {
  width: 14px;
  height: 14px;
}

.rd-section--verified .rd-section__head {
  color: #3ecf8e;
  background: rgba(62, 207, 142, 0.07);
}

.rd-section--ai .rd-section__head {
  color: var(--gold-lite);
  background: rgba(201, 162, 39, 0.08);
}

.rd-ev {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 11px 22px;
  border-top: 1px solid var(--line);
}

.rd-ev:first-of-type {
  border-top: 0;
}

.rd-ev__label {
  font-size: var(--fs-sm);
  font-weight: 500;
}

.rd-ev__detail {
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--fg-3);
}

.rd-ev__pts {
  align-self: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--gold-lite);
  font-variant-numeric: tabular-nums;
}

.rd-ai {
  padding: 14px 22px 18px;
}

.rd-ai p {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--fg-2);
}

.rd-ai__match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: var(--fs-xs);
  color: var(--fg-3);
}

.rd-empty {
  padding: 16px 22px;
  font-size: var(--fs-xs);
  color: var(--fg-4);
}

/* Reveal: evidence rows grow in from nothing, so the card visibly assembles
   as the reader scrolls rather than swapping between finished states. */
.js .rd-grow {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.6s var(--ease),
    opacity 0.5s var(--ease);
}

.js .rd-grow > * {
  overflow: hidden;
  min-height: 0;
}

.js .rd-grow.on {
  grid-template-rows: 1fr;
  opacity: 1;
}

.js .rd-grow-out {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 0.5s var(--ease),
    opacity 0.4s var(--ease);
}

.js .rd-grow-out > * {
  overflow: hidden;
  min-height: 0;
}

.js .rd-grow-out.on {
  grid-template-rows: 0fr;
  opacity: 0;
}

/* -------------------------------------------- chapter 4 — the pipeline */

.rd-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  min-height: 300px;
}

.rd-col {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.015);
  padding: 10px 8px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.rd-col__name {
  padding: 0 4px 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.rd-ghost {
  height: 34px;
  border-radius: 10px;
  background: var(--fill-2);
}

.rd-mover {
  --col: 0;
  position: absolute;
  top: 48px;
  left: 14px;
  width: calc((100% - 28px - 24px) / 4);
  padding: 9px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: var(--ink-4);
  box-shadow: var(--shadow);
  translate: calc(var(--col) * (100% + 8px)) 0;
  transition:
    translate 0.8s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
  font-size: 0.68rem;
  line-height: 1.35;
}

.rd-mover b {
  display: block;
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rd-mover__score {
  display: inline-block;
  margin-top: 5px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 107, 74, 0.16);
  color: #ff6b4a;
  font-weight: 700;
}

.rd-mover__task {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--gold-lite);
}

.rd-mover__task svg {
  width: 11px;
  height: 11px;
  flex: none;
}

.rd-scene[data-beat="1"] .rd-mover {
  --col: 1;
}
.rd-scene[data-beat="2"] .rd-mover {
  --col: 2;
}
.rd-scene[data-beat="3"] .rd-mover {
  --col: 3;
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

@media (max-width: 520px) {
  .rd-board {
    gap: 5px;
    padding: 10px;
  }
  .rd-mover {
    left: 10px;
    width: calc((100% - 20px - 15px) / 4);
    translate: calc(var(--col) * (100% + 5px)) 0;
    padding: 6px;
  }
  .rd-mover__meta {
    display: none;
  }
}

/* ---------------------------------------------------------- commitments */

.rd-promises {
  counter-reset: promise;
}

.rd-promise {
  display: grid;
  gap: 10px;
  align-content: start;
}

.rd-promise__title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.3;
}

.rd-promise__title svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  color: #3ecf8e;
}

.rd-promise p {
  color: var(--fg-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* ---------------------------------------------------------------- dock
   A persistent way in once the hero has scrolled away, withdrawn again when the
   final call to action is on screen so the two never compete. */

.rd-dock {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgba(11, 11, 16, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--shadow-lg);
  translate: -50% 0;
  transition:
    opacity var(--t) var(--ease),
    transform var(--t) var(--ease);
}

.js .rd-dock:not(.is-shown) {
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}

.rd-dock__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.rd-dock__label svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

@media (max-width: 620px) {
  .rd-dock {
    left: 12px;
    right: 80px;
    translate: none;
    justify-content: space-between;
    padding-left: 6px;
  }
  .rd-dock__label {
    display: none;
  }
  .rd-dock .btn {
    flex: 1;
    --btn-px: 12px;
  }
}

/* ------------------------------------------------------------ chapter rail */

.rd-rail {
  position: fixed;
  left: clamp(12px, 2vw, 28px);
  top: 50%;
  z-index: 40;
  display: grid;
  gap: 14px;
  translate: 0 -50%;
  transition: opacity var(--t) var(--ease);
}

.js .rd-rail:not(.is-shown) {
  opacity: 0;
  pointer-events: none;
}

.rd-rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-4);
  transition: color var(--t-fast) var(--ease);
}

.rd-rail a::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: width var(--t) var(--ease);
}

.rd-rail a span {
  opacity: 0;
  translate: -6px 0;
  transition:
    opacity var(--t) var(--ease),
    translate var(--t) var(--ease);
}

.rd-rail a.is-active,
.rd-rail a:hover {
  color: var(--gold-lite);
}

.rd-rail a.is-active::before {
  width: 28px;
}

.rd-rail a.is-active span,
.rd-rail a:hover span {
  opacity: 1;
  translate: 0 0;
}

@media (max-width: 1360px) {
  .rd-rail {
    display: none;
  }
}

/* -------------------------------------------------------- home-page portal
   The Client Radar teaser on the TGBS home page. Its scope shares the
   radar-portal transition name with the /radar/ hero. */

.rd-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 4.5vw, 64px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    radial-gradient(60% 80% at 85% 50%, rgba(201, 162, 39, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008)),
    var(--ink-2);
  overflow: hidden;
}

.rd-teaser__scope {
  width: min(100%, 340px);
  margin-inline: auto;
  transition: transform var(--t-slow) var(--ease);
}

@media (hover: hover) {
  .rd-teaser:hover .rd-teaser__scope {
    transform: scale(1.04);
  }
}

@media (max-width: 820px) {
  .rd-teaser {
    grid-template-columns: minmax(0, 1fr);
  }
  .rd-teaser__scope {
    order: -1;
    width: min(70%, 260px);
  }
}

/* -------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .rd-scope__beam {
    animation: none;
    opacity: 0.6;
    transform: rotate(40deg);
  }
  .rd-blip {
    animation: none;
    opacity: 0.85;
  }
  .rd-tag {
    animation: none;
    opacity: 1;
  }
  .rd-list__row {
    animation: none !important;
  }
}

/* -------------------------------------------------------------- waitlist
   The closing section while the app is closed. The CTA panel centres its
   content; the form itself reads left-aligned. */

.rd-waitlist__form {
  width: min(100%, 580px);
  margin-top: 8px;
  text-align: left;
}

.rd-waitlist__note {
  text-align: center;
}
