/* ============================================================
   DEEP PAGES — site-plan §7, depth per §11.2.
   Colour: the 13 semantic slots only (CLR-01). Zero raw values.
   Requires: the token pipeline plus src/spine.css, which already
   owns the shared chrome (nav, .section, .btn, .foot).

   Each page adopts its room with data-room on <body>, so the whole
   document resolves that division's tokens — the same mechanism the
   spine uses per section (styles/tokens/<division>.css).
   ============================================================ */

.page {
  padding-block-start: 3.5rem;
  padding-block-end: 5rem;
}

.page__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--face-mono);
  font-size: var(--fs-label);
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.page__title {
  margin: 0;
  max-inline-size: 18ch;
  font-family: var(--face-display);
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-hi);
}

.page__lede {
  margin: 1.25rem 0 0;
  max-inline-size: 58ch;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-dim);
}

.page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 2rem;
}

/* ---------- the athlete portrait (HANDOFF.md) --------------------- */

/* The component draws on a transparent canvas, so the room shows
   through: the panel is the page's surface and the avatar stands on
   it. Nothing here reaches into the render. */
.portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  /* The panel hugs the stage rather than spanning the measure: a
     figure this size stranded in the middle of a 60rem card reads as
     a layout accident. */
  max-inline-size: 29rem;
  margin-block-start: 2.5rem;
  margin-inline: auto;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
}

/* HANDOFF's reference framing is a ~3:2.8 slot. The component fills
   its host and resizes with it, so the slot only has to hold a shape
   and a ceiling — the camera does the rest. */
.portrait__stage {
  position: relative;
  inline-size: 100%;
  max-inline-size: 26rem;
  aspect-ratio: 3 / 2.8;
}

/* MTN-04: the scene appears rather than pops. Opacity only — the
   canvas must not be moved or scaled while it is drawing. The
   reduced-motion path never reaches this state, because it never
   creates a canvas at all. */
.portrait__stage > canvas { opacity: 0; transition: opacity var(--t-base) var(--e-out); }
.portrait.is-ready .portrait__stage > canvas { opacity: 1; }

/* The fallback: the same two-tone mark the hero falls back to, at the
   room's accent. No poster asset is invented to fill the space. */
.portrait__poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--interactive);
}

.portrait__poster svg { inline-size: 25%; block-size: auto; }

.portrait__label {
  margin: 0;
  font-family: var(--face-mono);
  font-size: var(--fs-label);
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- service lists ---------------------------------------- */

.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-block-start: 2rem;
  padding: 0;
  list-style: none;
}

.service {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
}

/* The light room cannot carry elevation in lightness (CLR-02), so it
   carries it in shadow. Falls back to nothing in the dark rooms,
   where --elevation-1 is not defined and a shadow would vanish. */
[data-room='nil'] .service,
[data-room='nil'] .path,
[data-room='nil'] .diagram { box-shadow: var(--elevation-1); }

.service__name {
  margin: 0;
  font-family: var(--face-display);
  font-size: var(--fs-display-md);
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-hi);
}

.service__detail {
  margin: 0.5rem 0 0;
  max-inline-size: 62ch;
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: var(--text-dim);
}

/* A service named by site-plan §7 but with no approved description
   yet renders as a name alone rather than as invented copy. */
.service--nameonly .service__name { font-size: var(--fs-body); font-weight: 500; }

/* ---------- audience paths (nil) --------------------------------- */

.paths {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-block-start: 2rem;
}

.path {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
}

.path__who {
  margin: 0;
  font-family: var(--face-mono);
  font-size: var(--fs-label);
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--link-gold, var(--interactive));
}

.path__body {
  margin: 0;
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: var(--text-dim);
}

.path__actions { margin-block-start: auto; padding-block-start: 0.75rem; }

/* ---------- the middle-market diagram ---------------------------- */

.diagram {
  margin-block-start: 2rem;
  padding: 1.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2);
}

.diagram__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}

.diagram__node {
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--face-mono);
  font-size: var(--fs-label);
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Advocate is the middle of the market, so it is the one node wearing
   the room's accent — §5 calls this the strategic centrepiece. */
.diagram__node--hub {
  border-color: var(--interactive);
  color: var(--link-gold, var(--interactive));
  font-weight: 500;
}

.diagram__link {
  font-family: var(--face-mono);
  font-size: var(--fs-body-sm);
  color: var(--text-dim);
}

.diagram__caption {
  margin: 1.25rem 0 0;
  max-inline-size: 60ch;
  margin-inline: auto;
  text-align: center;
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---------- the PuzzleMake door ---------------------------------- */

.door {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-block-start: 2rem;
  padding: 1.5rem;
  border: 2px solid var(--interactive);
  border-radius: 0.75rem;
  background: var(--surface-2);
}

.door__words { flex: 1 1 18rem; }

.door__title {
  margin: 0;
  font-family: var(--face-display);
  font-size: var(--fs-display-md);
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-hi);
}

.door__body {
  margin: 0.375rem 0 0;
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: var(--text-dim);
}

.door__host {
  display: block;
  margin-block-start: 0.5rem;
  font-family: var(--face-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- about ------------------------------------------------- */

.philosophy {
  margin: 0;
  max-inline-size: 30ch;
  font-family: var(--face-display);
  font-size: clamp(1.375rem, 3.2vw, 2rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-hi);
}

.philosophy__attrib {
  margin: 1rem 0 0;
  font-family: var(--face-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* A section whose structure is approved but whose copy is not yet
   written. It renders as an explicit gap, never as filler — §6.5's
   rule about placeholders applies to words as much as to proof. */
.pending {
  margin-block-start: 1.5rem;
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
}

.pending__label {
  margin: 0;
  font-family: var(--face-mono);
  font-size: var(--fs-label);
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pending__body {
  margin: 0.5rem 0 0;
  max-inline-size: 58ch;
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---------- >=48rem ---------------------------------------------- */

@media (min-width: 48rem) {
  .page {
    padding-block-start: 5rem;
    padding-block-end: 7rem;
  }

  .services { grid-template-columns: repeat(2, 1fr); }

  .paths { grid-template-columns: repeat(3, 1fr); }

  .diagram { padding: 2.5rem; }
}
