/* ==========================================================================
   pages.css — page-level compositions
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Video overture — full-bleed film above the hero
   Everything stacks in a single grid cell so the video, the scrims and the
   overlay share one box and scale together. No absolute positioning, so
   nothing can drift out of alignment at an unusual aspect ratio.
   -------------------------------------------------------------------------- */

.video-hero {
  position: relative;
  z-index: var(--z-content);
  display: grid;
  height: 100vh;            /* fallback for engines without svh */
  height: 100svh;
  min-height: 460px;
  max-height: 1080px;
  overflow: hidden;
  overflow: clip;
  background: var(--bg-card);
  isolation: isolate;
}

.video-hero > * { grid-area: 1 / 1; }

/* --- The film ----------------------------------------------------------- */

.video-hero__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Favour the upper-middle of the frame — where a subject's face usually
     sits — when a wide file is cropped into a tall phone viewport. */
  object-position: center 38%;
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
}

.video-hero__media.is-ready { opacity: 1; }

/* The poster is a real element rather than the video's poster attribute, so
   it can cross-fade and still be visible when playback is suppressed. */
.video-hero__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

/* --- Legibility scrims -------------------------------------------------- */

.video-hero__scrim {
  pointer-events: none;
  background:
    /* keeps the fixed nav readable over a bright frame */
    linear-gradient(180deg, rgba(8, 8, 10, 0.82) 0%, rgba(8, 8, 10, 0) 22%),
    /* seats the copy */
    linear-gradient(180deg, rgba(8, 8, 10, 0) 45%, rgba(8, 8, 10, 0.72) 78%, var(--bg) 100%),
    /* a whisper of gold, so the film belongs to the brand */
    radial-gradient(90% 60% at 50% 46%, rgba(174, 147, 87, 0.1), transparent 70%);
}

/* --- Overlay ------------------------------------------------------------ */

/* Every child of .video-hero shares grid cell 1/1, and this block paints after
   the controls — so left interactive it would swallow every click aimed at
   them. It passes the pointer through; its own links opt back in. */
.video-hero__inner {
  pointer-events: none;
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(3rem, 2rem + 6vh, 5.5rem);
}

.video-hero__wordmark {
  font-family: var(--font-ivy-presto);
  font-weight: var(--font-weight-regular);
  font-size: clamp(2.5rem, 1rem + 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg-strong);
}

.video-hero__tagline {
  max-width: 34ch;
  font-size: clamp(0.9375rem, 0.85rem + 0.5vw, 1.125rem);
  font-weight: var(--font-weight-light);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
}

.video-hero__rule {
  width: clamp(120px, 22vw, 260px);
  height: 1px;
  background: var(--gilded);
}

/* --- Controls ----------------------------------------------------------- */

.video-hero__controls {
  position: relative;
  z-index: 3;
  align-self: start;
  justify-self: end;
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: calc(4.5rem + var(--gutter)) var(--gutter) 0;
  justify-content: flex-end;
  pointer-events: none;
}

.video-hero__btn {
  pointer-events: auto;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-full);
  background: rgba(4, 4, 6, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--fg);
  cursor: pointer;
  transition: color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}

.video-hero__btn:hover {
  color: var(--gold-bright);
  border-color: var(--line-gold-strong);
  background: rgba(4, 4, 6, 0.8);
}

.video-hero__btn svg { width: 18px; height: 18px; }
/* aria-pressed on this button means "sound is currently on". */
.video-hero__btn .icon-audible { display: none; }
.video-hero__btn[aria-pressed="true"] .icon-muted { display: none; }
.video-hero__btn[aria-pressed="true"] .icon-audible { display: block; }

/* Hidden until the script has a playable film to control. */
.video-hero__controls[hidden] { display: none; }

/* --- Scroll cue --------------------------------------------------------- */

.video-hero__cue {
  pointer-events: auto;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  font-size: 0.625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}

.video-hero__cue:hover { color: var(--gold-bright); }

.video-hero__cue span {
  position: relative;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  overflow: hidden;
}

.video-hero__cue span::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: var(--gold-light);
  animation: cue-run 2.4s var(--ease-out) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .video-hero__cue span::after { animation: none; opacity: 0.6; }
  .video-hero__media { transition: none; }
}

/* Short landscape phones: give the film less of the viewport so the copy
   underneath is still reachable in one thumb-scroll. */
@media (max-height: 520px) and (orientation: landscape) {
  .video-hero { height: 88svh; min-height: 320px; }
  .video-hero__tagline { display: none; }
}

/* --------------------------------------------------------------------------
   1. Home hero
   -------------------------------------------------------------------------- */

/* When the overture precedes it, the hero no longer needs to reserve space
   for the fixed nav, and no longer needs to fill the viewport on its own. */
.video-hero + .hero {
  padding-block: clamp(3.5rem, 2rem + 6vw, 6rem) clamp(3rem, 2rem + 4vw, 5rem);
  min-height: 0;
}

.hero {
  position: relative;
  z-index: var(--z-content);
  padding-block: clamp(7rem, 5rem + 9vw, 10.5rem) clamp(3rem, 2rem + 4vw, 5rem);
  min-height: min(100svh, 940px);
  display: flex;
  align-items: center;
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 6vw, 4.5rem);
  align-items: center;
  width: 100%;
}

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    gap: 4rem;
  }
}

.hero__copy { display: grid; gap: 1.75rem; align-content: center; }

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.02;
}

.hero__lead {
  max-width: 46ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--fg-subtle);
  font-weight: var(--font-weight-light);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero__assurance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: var(--fs-xs);
  color: var(--fg-faint);
  margin-top: 0.25rem;
}

.hero__assurance span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* --- The sigil stage ---------------------------------------------------- */

.sigil-stage {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 540px);
  margin-inline: auto;
  display: grid;
  place-items: center;
  isolation: isolate;
}

/* The stage is a centring grid, so its absolutely-positioned children need
   place-self: stretch — otherwise `inset: 0` is overridden by place-items and
   they collapse to their intrinsic size. */
.sigil-stage__canvas,
.sigil-stage__ring {
  place-self: stretch;
}

.sigil-stage__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.sigil-stage__img {
  position: relative;
  z-index: 2;
  width: 84%;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.65))
          drop-shadow(0 0 44px rgba(174, 147, 87, 0.16));
  animation: float-slow 9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .sigil-stage__img { animation: none; }
}

/* Concentric aperture rings — the "operating picture" around the principal. */
.sigil-stage__ring {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.55;
}

.sigil-stage__ring:nth-of-type(1) { inset: 2%;  border-color: rgba(174, 147, 87, 0.16); }
.sigil-stage__ring:nth-of-type(2) { inset: 12%; border-color: rgba(174, 147, 87, 0.1); }
.sigil-stage__ring:nth-of-type(3) { inset: 24%; border-color: rgba(255, 255, 255, 0.045); }

/* --- Scroll cue --------------------------------------------------------- */

.scroll-cue {
  display: none;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-decoration: none;
  margin-top: 2.5rem;
  transition: color var(--dur) var(--ease-out);
}

@media (min-width: 980px) { .scroll-cue { display: inline-flex; } }

.scroll-cue:hover { color: var(--gold-bright); }

.scroll-cue__line {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 14px;
  background: var(--gold-light);
  animation: cue-run 2.4s var(--ease-out) infinite;
}

@keyframes cue-run {
  0%   { translate: -100% 0; opacity: 0; }
  35%  { opacity: 1; }
  100% { translate: 330% 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line::after { animation: none; opacity: 0.6; }
}

/* --------------------------------------------------------------------------
   2. Proof strip
   -------------------------------------------------------------------------- */

.proof-strip {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  padding-block: clamp(2rem, 1rem + 3vw, 3rem);
  border-top: 1px solid var(--line);
}

.proof {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.proof__value {
  font-family: var(--font-ivy-presto);
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
}

.proof__label {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--fg-subtle);
  max-width: 26ch;
}

/* --------------------------------------------------------------------------
   3. Compact page hero (interior pages)
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  z-index: var(--z-content);
  padding-block: clamp(7.5rem, 6rem + 7vw, 11rem) clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.page-hero__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .page-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
    align-items: end;
  }
}

.page-hero__title { font-size: var(--fs-h1); }

.page-hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--fg-subtle);
  font-weight: var(--font-weight-light);
  max-width: 52ch;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--fs-xs);
  color: var(--fg-faint);
  margin-bottom: 1.5rem;
}

.crumbs a { text-decoration: none; transition: color var(--dur) var(--ease-out); }
.crumbs a:hover { color: var(--gold-bright); }
.crumbs [aria-current] { color: var(--fg-subtle); }

/* --------------------------------------------------------------------------
   4. Split — copy beside a visual
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 940px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--wide-left  { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .split--wide-right { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .split--flip > :first-child { order: 2; }
}

/* --------------------------------------------------------------------------
   5. Compression engine scene (home)
   -------------------------------------------------------------------------- */

.compression {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  background:
    linear-gradient(180deg, rgba(18, 19, 23, 0.5), rgba(4, 4, 6, 0.9));
  overflow: hidden;
}

.compression__canvas {
  display: block;
  width: 100%;
  height: clamp(300px, 42vw, 460px);
}

.compression__legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  border-top: 1px solid var(--line);
}

.compression__stage {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem 1.35rem;
  border-right: 1px solid var(--line);
}

.compression__stage:last-child { border-right: 0; }

.compression__stage-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.compression__stage-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.compression__stage-value {
  font-family: var(--font-ivy-presto);
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
}

.compression__stage-note {
  font-size: var(--fs-xs);
  color: var(--fg-faint);
  line-height: 1.5;
}

.compression__controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   6. Role grid — the private C-suite functions
   -------------------------------------------------------------------------- */

.role-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.role {
  position: relative;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: clamp(1.35rem, 1rem + 1.2vw, 2rem);
  background: var(--bg-card);
  min-height: 200px;
  transition: background var(--dur-slow) var(--ease-out);
}

.role:hover { background: #0a0a0d; }

.role::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--gilded);
  scale: 0 1;
  transform-origin: left center;
  transition: scale 520ms var(--ease-out);
}

.role:hover::after { scale: 1 1; }

.role__index {
  font-size: 0.625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.18em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.role__title {
  font-family: var(--font-inter);
  font-size: 1.0625rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.022em;
  color: var(--fg-strong);
  line-height: 1.3;
}

.role__body {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--fg-subtle);
}

/* --------------------------------------------------------------------------
   7. The Standard — four outcome cards
   -------------------------------------------------------------------------- */

.standard-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.standard {
  position: relative;
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--dur-slow) var(--ease-out);
}

.standard:hover { border-color: var(--line-gold); }

.standard__word {
  font-family: var(--font-inter);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}

.standard__title {
  font-family: var(--font-ivy-presto);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--fg-strong);
}

.standard__body {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--fg-subtle);
}

/* A quiet meter that fills when the card enters view. */
.standard__meter {
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.standard__meter i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gilded);
  scale: 0 1;
  transform-origin: left center;
  transition: scale 1200ms var(--ease-out);
}

.standard.is-revealed .standard__meter i { scale: var(--fill, 0.8) 1; }

/* --------------------------------------------------------------------------
   8. Command-structure scene (model page)
   -------------------------------------------------------------------------- */

.structure {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  background: radial-gradient(120% 120% at 50% 0%, rgba(18, 19, 23, 0.75), rgba(4, 4, 6, 0.95));
  overflow: hidden;
}

.structure__canvas {
  display: block;
  width: 100%;
  height: clamp(360px, 52vw, 560px);
}

.structure__toggle {
  position: absolute;
  left: 1rem;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  z-index: 2;
}

.structure__readout {
  border-top: 1px solid var(--line);
  padding: 1.25rem 1.35rem;
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--fg-subtle);
  min-height: 5.5rem;
}

.structure__readout strong {
  display: block;
  color: var(--fg-strong);
  font-weight: var(--font-weight-medium);
  margin-bottom: 0.25rem;
}

/* --------------------------------------------------------------------------
   9. Comparison — siloed vs. coordinated
   -------------------------------------------------------------------------- */

.compare {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  overflow: hidden;
}

@media (min-width: 860px) {
  .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.compare__col {
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  background: var(--bg-card);
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.compare__col--accent { background: #0a0a0d; }

.compare__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.6875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.compare__col--muted .compare__head { color: var(--fg-faint); }
.compare__col--accent .compare__head { color: var(--gold); }

.compare__list { display: grid; gap: 0.7rem; }

.compare__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--fg-subtle);
}

.compare__item svg { margin-top: 0.28rem; flex: 0 0 auto; }
.compare__col--muted .compare__item svg { color: var(--color-smoke); }
.compare__col--accent .compare__item svg { color: var(--gold); }

/* --------------------------------------------------------------------------
   10. Capability matrix (capabilities page)
   -------------------------------------------------------------------------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.filter-bar__count {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--fg-faint);
  font-variant-numeric: tabular-nums;
}

.matrix {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.matrix__item {
  position: relative;
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--dur-slow) var(--ease-out),
              opacity 380ms var(--ease-out),
              scale 380ms var(--ease-out);
}

.matrix__item:hover { border-color: var(--line-gold); }

.matrix__item[hidden] { display: none; }

.matrix__item.is-filtering { opacity: 0; scale: 0.96; }

.matrix__domain {
  font-size: 0.625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.matrix__title {
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.02em;
  color: var(--fg-strong);
  line-height: 1.35;
}

.matrix__body {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--fg-subtle);
}

.matrix__empty {
  display: none;
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-cards);
  color: var(--fg-subtle);
}

.matrix__empty.is-visible { display: block; }

/* --------------------------------------------------------------------------
   11. Command Center console (platform page)
   -------------------------------------------------------------------------- */

.console {
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  background: var(--bg-card);
  overflow: hidden;
}

.console__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 19, 23, 0.5);
}

.console__id {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.6875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.console__clock {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--fg-faint);
  font-variant-numeric: tabular-nums;
}

.console__body { padding: clamp(1rem, 0.6rem + 1.4vw, 1.75rem); }

.console__tabs { padding: 1rem 1.15rem 0; }

.console__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.console__grid--2up { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.panel {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(18, 19, 23, 0.42);
  min-height: 0;
}

.panel--span2 { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .panel--span2 { grid-column: span 2; }
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel__title {
  font-size: 0.6875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.panel__meta {
  font-size: var(--fs-xs);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* --- Queue rows --------------------------------------------------------- */

.queue { display: grid; gap: 0.15rem; }

.queue__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.35rem;
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease-out);
}

.queue__row:last-child { border-bottom: 0; }
.queue__row:hover { background: rgba(174, 147, 87, 0.045); }

.queue__pri {
  width: 3px;
  height: 26px;
  border-radius: 2px;
  background: var(--color-smoke);
  flex: 0 0 auto;
}

.queue__pri[data-pri="critical"] { background: var(--danger); }
.queue__pri[data-pri="high"]     { background: var(--accent); }
.queue__pri[data-pri="standard"] { background: var(--gold-shadow); }

.queue__label {
  font-size: var(--fs-sm);
  color: var(--fg);
  line-height: 1.35;
  min-width: 0;
}

.queue__sub {
  display: block;
  font-size: 0.6875rem;
  color: var(--fg-faint);
  margin-top: 0.15rem;
}

.queue__val {
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

/* --- Sparkline / bars --------------------------------------------------- */

.spark { width: 100%; height: 64px; display: block; overflow: visible; }

.bars { display: grid; gap: 0.65rem; }

.bar__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--fs-xs);
  color: var(--fg-subtle);
  margin-bottom: 0.3rem;
}

.bar__head b {
  color: var(--fg);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
}

.bar__track {
  height: 4px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.bar__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--gilded);
  scale: 0 1;
  transform-origin: left center;
  transition: scale 900ms var(--ease-out);
}

.bar__fill[data-tone="warn"] { background: linear-gradient(90deg, #b8724f, #d97c6a); }

/* --- Gauge ring --------------------------------------------------------- */

.gauge { display: grid; place-items: center; gap: 0.75rem; }

.gauge__ring { width: 132px; height: 132px; }

.gauge__ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.gauge__track { stroke: var(--line); }
.gauge__value { stroke: url(#gild); transition: stroke-dashoffset 1200ms var(--ease-out); }

.gauge__num {
  font-family: var(--font-ivy-presto);
  font-size: 1.85rem;
  fill: #ffffff;
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}

.gauge__unit { font-family: var(--font-inter); font-size: 0.6rem; fill: #9194a1; text-anchor: middle; letter-spacing: 0.16em; }

/* --- Relationship graph ------------------------------------------------- */

.graph { width: 100%; height: clamp(240px, 32vw, 320px); display: block; }

/* --------------------------------------------------------------------------
   12. Access lattice (confidentiality page)
   -------------------------------------------------------------------------- */

.lattice {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .lattice { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 2.5rem; }
}

.lattice__roles { display: grid; gap: 0.4rem; align-content: start; }

.role-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.role-btn:hover { border-color: var(--line-strong); }

.role-btn[aria-pressed="true"] {
  border-color: var(--line-gold-strong);
  background: rgba(174, 147, 87, 0.08);
}

.role-btn__key {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-control);
  font-size: 0.5625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  color: var(--fg-faint);
}

.role-btn[aria-pressed="true"] .role-btn__key { border-color: var(--gold); color: var(--gold-bright); }

.role-btn__name {
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-medium);
  color: var(--fg);
  line-height: 1.3;
}

.role-btn__sub { display: block; font-size: 0.6875rem; color: var(--fg-faint); margin-top: 0.1rem; }

.lattice__cells {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr));
  align-content: start;
}

.cell {
  position: relative;
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 0.85rem 0.9rem;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: opacity 420ms var(--ease-out),
              border-color 420ms var(--ease-out),
              background 420ms var(--ease-out);
}

.cell__name {
  font-size: 0.75rem;
  font-weight: var(--font-weight-medium);
  color: var(--fg);
  line-height: 1.35;
}

.cell__state {
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.cell.is-granted {
  border-color: var(--line-gold);
  background: rgba(174, 147, 87, 0.07);
}

.cell.is-granted .cell__state { color: var(--gold-bright); }

.cell.is-denied { opacity: 0.28; }

.cell__lock {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  color: var(--color-smoke);
  transition: color 420ms var(--ease-out);
}

.cell.is-granted .cell__lock { color: var(--gold); }

/* --------------------------------------------------------------------------
   13. Engagement tiers
   -------------------------------------------------------------------------- */

.tier-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  align-items: start;
}

.tier {
  position: relative;
  display: grid;
  gap: 1.25rem;
  align-content: start;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--dur-slow) var(--ease-out);
}

.tier:hover { border-color: var(--line-gold); }

.tier--feature {
  border-color: var(--line-gold);
  background: linear-gradient(180deg, rgba(174, 147, 87, 0.07), var(--bg-card) 42%);
}

.tier__flag {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.35rem 0.9rem;
  border-bottom-left-radius: var(--radius-lg);
  background: var(--gold-bright);
  color: #08080a;
  font-size: 0.625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tier__scale {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 26px;
}

.tier__scale i {
  flex: 1 1 auto;
  background: var(--line-strong);
  border-radius: 1px;
  transition: height 700ms var(--ease-out), background 700ms var(--ease-out);
}

.tier__scale i.is-on { background: var(--gilded); }

.tier__name {
  font-family: var(--font-ivy-presto);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--fg-strong);
}

.tier__pitch {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--fg-subtle);
}

.tier__list { display: grid; gap: 0.6rem; }

.tier__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--fg-muted);
}

.tier__item svg { margin-top: 0.3rem; color: var(--gold); flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   14. Process timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-gold), var(--line) 70%, transparent);
}

@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; }
  .timeline::before {
    left: 12px; right: 12px; top: 11px; bottom: auto;
    width: auto; height: 1px;
    background: linear-gradient(90deg, var(--line-gold), var(--line) 70%, transparent);
  }
}

.step {
  position: relative;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding: 0 0 2rem 2.5rem;
}

@media (min-width: 900px) {
  .step { padding: 2.25rem 1rem 0 0; }
}

.step__dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  background: var(--bg);
  font-size: 0.5625rem;
  font-weight: var(--font-weight-semibold);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  .step__dot { top: 0; }
}

.step__title {
  font-size: 0.9375rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}

.step__body { font-size: var(--fs-sm); line-height: 1.6; color: var(--fg-subtle); }

/* --------------------------------------------------------------------------
   15. Complexity Index (clients page)
   -------------------------------------------------------------------------- */

.gauge-panel {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 940px) {
  .gauge-panel { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 3rem; align-items: start; }
}

.factor {
  display: grid;
  gap: 0.6rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.factor__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.factor__label {
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-medium);
  color: var(--fg);
}

.factor__readout {
  font-size: var(--fs-xs);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.factor__hint { font-size: var(--fs-xs); color: var(--fg-faint); line-height: 1.5; }

.factor input[type="range"] {
  appearance: none;
  width: 100%;
  height: 44px; /* touch target */
  background: transparent;
  cursor: pointer;
}

.factor input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) var(--pct, 0%), var(--line) var(--pct, 0%));
}

.factor input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
}

.factor input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
}

.factor input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7.5px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 1px solid var(--gold);
  transition: scale 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.factor input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 1px solid var(--gold);
}

.factor input[type="range"]:hover::-webkit-slider-thumb { scale: 1.12; }
.factor input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(174, 147, 87, 0.28);
}

.index-result {
  position: sticky;
  top: 7rem;
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  text-align: center;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-cards);
  background: linear-gradient(180deg, rgba(174, 147, 87, 0.07), var(--bg-card) 55%);
}

.index-result__band {
  font-family: var(--font-ivy-presto);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  line-height: 1.15;
  color: var(--fg-strong);
}

.index-result__note {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--fg-subtle);
  max-width: 32ch;
}

/* --------------------------------------------------------------------------
   16. Client profile grid
   -------------------------------------------------------------------------- */

.profile-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.profile {
  position: relative;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1.4rem;
  background: var(--bg-card);
  min-height: 148px;
  transition: background var(--dur-slow) var(--ease-out);
}

.profile:hover { background: #0a0a0d; }

.profile__icon { color: var(--gold); }
.profile__title {
  font-size: 0.9375rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.02em;
  color: var(--fg-strong);
  line-height: 1.35;
}
/* --fg-subtle rather than --fg-faint: these cards can carry a gold tint,
   which lifts the background and would drag the faintest step under 4.5:1. */
.profile__body { font-size: var(--fs-xs); line-height: 1.6; color: var(--fg-subtle); }

/* --------------------------------------------------------------------------
   17. Contact — stepped inquiry
   -------------------------------------------------------------------------- */

.inquiry {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1000px) {
  .inquiry { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 4rem; align-items: start; }
}

.steps-rail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.steps-rail__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--fg-faint);
  white-space: nowrap;
}

.steps-rail__num {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.steps-rail__item.is-active { color: var(--fg-strong); }
.steps-rail__item.is-active .steps-rail__num { border-color: var(--gold); color: var(--gold-bright); }
.steps-rail__item.is-done .steps-rail__num { background: var(--gold-bright); border-color: var(--gold-bright); color: #08080a; }

.steps-rail__bar {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
  min-width: 12px;
}

@media (max-width: 560px) {
  .steps-rail__label { display: none; }
}

.form-step[hidden] { display: none; }

.form-step { display: grid; gap: 1.25rem; }

.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 620px) {
  .form-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-top: 0.5rem;
}

.form-nav .btn--quiet { margin-right: auto; }

.assurance-list { display: grid; gap: 1.15rem; }

.assurance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.assurance__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  flex: 0 0 auto;
}

.assurance__title {
  font-size: 0.875rem;
  font-weight: var(--font-weight-medium);
  color: var(--fg-strong);
  margin-bottom: 0.2rem;
}

.assurance__body { font-size: var(--fs-xs); line-height: 1.6; color: var(--fg-subtle); }

/* --------------------------------------------------------------------------
   18. CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  z-index: var(--z-content);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.cta-band__inner {
  position: relative;
  display: grid;
  gap: 2rem;
  padding-block: clamp(4rem, 2rem + 7vw, 7rem);
  text-align: center;
  justify-items: center;
}

.cta-band__title {
  font-size: var(--fs-h2);
  max-width: 18ch;
}

.cta-band__lead {
  max-width: 54ch;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--fg-subtle);
  font-weight: var(--font-weight-light);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto;
  height: 200%;
  background: radial-gradient(60% 42% at 50% 50%, rgba(174, 147, 87, 0.1), transparent 68%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   19. 404
   -------------------------------------------------------------------------- */

.notfound {
  min-height: 78svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 1.75rem;
  padding-block: 8rem 4rem;
  position: relative;
  z-index: var(--z-content);
}

.notfound__code {
  font-family: var(--font-ivy-presto);
  font-size: clamp(4rem, 2rem + 12vw, 8rem);
  line-height: 1;
  letter-spacing: 0.02em;
}
