/* ═══════════════════════════════════════════════════════════════
   MODEL surfaces.

   The visual system encodes the workshop's argument. DOCUMENT
   surfaces are light, ruled and photographic — today's state, already
   true. MODEL surfaces are dark and computational — the AI state,
   being derived. Moving between them IS the narrative.

   Tokens are re-pointed rather than overridden per rule, so every
   component inherits the inversion automatically.
   ═══════════════════════════════════════════════════════════════ */

.is-model {
  position: relative;
  background: var(--base);
  color: var(--ink);
}
/* A .view is absolutely positioned inside .view-port. The relative above
   was knocking any model view out of that layout and into normal flow,
   stacking it below the previous view. Restore it. */
.view.is-model { position: absolute; inset: 0; }

.is-model__field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; pointer-events: none;
}

/* Vignette keeps the isolines from competing with type at the edges.
   Single source — the earlier build stacked a shader vignette under a
   CSS one and crushed the corners to black. */
.is-model::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%,
              transparent 40%, var(--model-veil) 100%);
}

.is-model > *:not(.is-model__field):not(::after) { position: relative; z-index: 2; }

/* ── Kinetic type ────────────────────────────────────────────── */

/* Content is visible by DEFAULT. Only an element JS has actively armed
   is hidden, and JS arms it microseconds before animating it. This
   project shipped invisible content four times with the inverse rule. */
[data-kinetic].is-armed { visibility: hidden; }
.wd { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; will-change: opacity, transform, filter; }

@media (prefers-reduced-motion: reduce) {
  [data-kinetic] { visibility: visible !important; }
  .ch { opacity: 1 !important; filter: none !important; transform: none !important; }
}

/* ── Model section shell ─────────────────────────────────────── */

.model-sec { padding: clamp(46px, 8vh, 110px) 0; overflow: hidden; }

.model-sec__in {
  max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter);
}

.model-sec__eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--t-075); font-weight: 700;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--stone); margin-bottom: 18px;
}
.model-sec__eyebrow::before {
  content: ""; width: 7px; height: 7px; flex: none;
  background: var(--theme-tone, var(--ink));
}

.model-sec__h {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 76px);
  font-weight: 700; letter-spacing: -.03em; line-height: .99;
  margin: 0; max-width: 17ch; text-wrap: balance;
}

.model-sec__lede {
  margin-top: 20px; font-size: var(--t-400);
  color: var(--stone); max-width: 56ch;
}

/* ── Computed metric ─────────────────────────────────────────── */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(190px, 19vw, 280px), 1fr));
  margin-top: clamp(32px, 5vh, 64px);
  border-top: 1px solid var(--line-firm);
}
.metric {
  padding: clamp(20px, 3vh, 32px) clamp(18px, 1.8vw, 30px)
           clamp(22px, 3.4vh, 38px) 0;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }

.metric__v {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 54px); font-weight: 800;
  letter-spacing: -.035em; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--theme-tone, var(--ink));
  display: block; margin-bottom: 12px;
}
.metric__l { font-size: var(--t-200); color: var(--stone); line-height: 1.45; }

/* Never a bare number — always one humanising comparator
   (references §4, Stripe annual letters). */
.metric__anchor {
  display: block; margin-top: 8px;
  font-size: var(--t-050); letter-spacing: var(--tr-mid);
  text-transform: uppercase; color: var(--grey-2);
}

/* ── Readout: the interface showing its own measurements ─────── */

.readout {
  display: flex; flex-wrap: wrap; gap: 0 26px;
  margin-top: clamp(26px, 4vh, 44px);
  padding-top: 14px; border-top: 1px solid var(--line);
  font-size: var(--t-050); letter-spacing: var(--tr-mid);
  text-transform: uppercase; color: var(--grey-2);
  font-variant-numeric: tabular-nums;
}
.readout b { color: var(--stone); font-weight: 700; }

/* ── Overview on a model ground ──────────────────────────────── */

.overview.is-model { background: var(--base); }
.overview.is-model .ov-card { background: transparent; }
.overview.is-model .ov-card:hover,
.overview.is-model .ov-card.is-cursor { background: var(--model-hover); }
.overview.is-model .ov-card.is-cursor { outline-color: var(--ink); }
.overview.is-model .overview__grid { background: var(--line); border-color: var(--line); }
.overview.is-model::after { display: none; }
.overview__field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.overview.is-model .overview__hd,
.overview.is-model .overview__grid { position: relative; z-index: 2; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
}
