/* Top hero: 3D pyramid and its measured layer labels (index.html only).
   Everything is scoped to .hero-art--pyramid. Row positions: hero-controls.js sets --ty / --lead-w /
   --scale-* from the 3D projection; the fallbacks below match the poster framing (no-JS).

   Framing: desktop/tablet keep the original composition — pyramid in the left of the figure, labels
   to its right. Phones (labels below) centre the pyramid: the poster is the pre-shifted …-sp-*.webp
   and the canvas uses the camera view offset VIEW_SHIFT (hero-pyramid.js); the shadow moves 15% too. */

.hero-art--pyramid .hp-stage {
  position: relative;
  aspect-ratio: 6 / 5;
  container-type: inline-size;
}
.hero-art--pyramid .hp-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-art--pyramid .hp-shadow,
.hero-art--pyramid .hp-poster,
.hero-art--pyramid .hp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* One soft floor shadow for both the poster and the live canvas (the renders have none). The structure
   is open, so the shadow is light: it is seen through the frames and must read as floor, not as a fill. */
.hero-art--pyramid .hp-shadow {
  background:
    radial-gradient(28% 6% at 38% 87%, rgba(8, 34, 82, .16), rgba(8, 34, 82, 0) 100%),
    radial-gradient(42% 13% at 35% 79%, rgba(8, 34, 82, .08), rgba(8, 34, 82, 0) 100%);
}
.hero-art--pyramid .hp-poster {
  object-fit: contain;
  transition: opacity .35s var(--ease-soft);
}
.hero-art--pyramid .hp-canvas {
  opacity: 0;
  transition: opacity .35s var(--ease-soft);
}
.hero-art--pyramid .hp-canvas__gl {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-art--pyramid[data-hp-state="live"] .hp-canvas { opacity: 1; }
.hero-art--pyramid[data-hp-state="live"] .hp-poster { opacity: 0; }

/* ---------- Labels: a measured scale beside the pyramid ---------- */

.hero-art--pyramid .hp-index {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 68%;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-art--pyramid .hp-index::before {   /* the scale rule, from the first tick to the last */
  content: "";
  position: absolute;
  left: 0;
  top: var(--scale-top, 27%);
  height: calc(var(--scale-bottom, 59%) - var(--scale-top, 27%));
  width: 1px;
  background: var(--line-strong);
}
.hero-art--pyramid .hp-row {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--ty, var(--ty-fb));
}
/* Fallbacks for the 28° camera (projected tier centres ≈ 27 / 36 / 47 / 57%, spread for the two-line row). */
.hero-art--pyramid .hp-row--strategy   { --ty-fb: 27%; --lead-fb: calc(26cqw - 10px); }
.hero-art--pyramid .hp-row--pm         { --ty-fb: 36.5%; --lead-fb: calc(20cqw - 10px); }
.hero-art--pyramid .hp-row--execution  { --ty-fb: 47%; --lead-fb: calc(14cqw - 10px); }
.hero-art--pyramid .hp-row--enablement { --ty-fb: 59%; --lead-fb: calc(7cqw - 10px); }

.hero-art--pyramid .hp-row__ctl {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  margin-top: -22px;            /* the first line's centre sits on --ty */
  padding: 8px 4px 8px 22px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.hero-art--pyramid .hp-row__ctl::before {  /* tick on the scale */
  content: "";
  position: absolute;
  left: 0;
  top: 21.5px;
  width: 12px;
  height: 1px;
  background: #8ea3b8;
  transition: width .3s var(--ease-ui), background-color .3s;
}
.hero-art--pyramid .hp-row__lead {          /* leader from the tier's right edge to the scale */
  position: absolute;
  right: 100%;
  top: 21.5px;
  width: var(--lead-w, var(--lead-fb));
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 73, 180, .18), rgba(0, 73, 180, .42));
  pointer-events: none;
  transition: background .3s;
}
.hero-art--pyramid .hp-row__lead::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: -3px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  transition: background-color .3s, border-color .3s;
}
.hero-art--pyramid .hp-row__num {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  margin-top: 2px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--mark);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background-color .3s, border-color .3s, color .3s;
}
.hero-art--pyramid .hp-row__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.hero-art--pyramid .hp-row__name {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: .02em;
  transition: color .3s;
}
.hero-art--pyramid .hp-row__note {
  color: var(--sub);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0;
}

/* Hover / focus: the row and its leader take the tier's blue. */
.hero-art--pyramid .hp-row__ctl:hover .hp-row__name,
.hero-art--pyramid .hp-row__ctl:focus-visible .hp-row__name { color: var(--blue); }
.hero-art--pyramid .hp-row__ctl:hover::before,
.hero-art--pyramid .hp-row__ctl:focus-visible::before { width: 16px; background: var(--blue); }
.hero-art--pyramid .hp-row__ctl:hover .hp-row__num,
.hero-art--pyramid .hp-row__ctl:focus-visible .hp-row__num { border-color: var(--blue); }
.hero-art--pyramid .hp-row__ctl:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* ---------- Pause / resume (shown by hero-pyramid.js once the scene runs) ---------- */

.hero-art--pyramid .hp-toggle {
  position: absolute;
  right: 0;
  bottom: 6%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--mark);
  cursor: pointer;
  transition: border-color .2s var(--ease-ui);
}
.hero-art--pyramid .hp-toggle:hover { border-color: var(--line-strong); }
.hero-art--pyramid .hp-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.hero-art--pyramid .hp-toggle__icon {
  width: 9px;
  height: 11px;
  border-inline: 2.5px solid currentColor;
}
.hero-art--pyramid .hp-toggle[aria-pressed="true"] .hp-toggle__icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-block: 6px solid transparent;
  border-inline: 10px solid currentColor;
  border-inline-end-width: 0;
}

@media (min-width: 1280px) and (max-width: 1439.98px) {
  .hero-art--pyramid .hp-row__name { font-size: 15px; }
}

/* ---------- Phones: pyramid centred, labels as a 2-column list below ---------- */

@media (max-width: 767.98px) {
  .hero-art--pyramid .hp-stage { aspect-ratio: auto; }
  .hero-art--pyramid .hp-scene {
    position: relative;
    inset: auto;
    aspect-ratio: 6 / 5;
    margin-block: -14% -6%;   /* the render leaves headroom above the apex and below the base */
  }
  .hero-art--pyramid .hp-shadow {
    background:
      radial-gradient(28% 6% at 53% 87%, rgba(8, 34, 82, .16), rgba(8, 34, 82, 0) 100%),
      radial-gradient(42% 13% at 50% 79%, rgba(8, 34, 82, .08), rgba(8, 34, 82, 0) 100%);
  }

  .hero-art--pyramid .hp-index {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding-inline: 20px;    /* .hero-art bleeds to the screen edge on phones */
  }
  .hero-art--pyramid .hp-index::before { display: none; }
  .hero-art--pyramid .hp-row { position: static; }
  .hero-art--pyramid .hp-row--execution,
  .hero-art--pyramid .hp-row--enablement { grid-column: 1 / -1; }
  .hero-art--pyramid .hp-row__ctl {
    align-items: center;
    min-height: 52px;
    margin-top: 0;
    padding: 9px 12px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .hero-art--pyramid .hp-row__ctl::before,
  .hero-art--pyramid .hp-row__lead { display: none; }
  .hero-art--pyramid .hp-row__num { margin-top: 0; }
  .hero-art--pyramid .hp-row__name { font-size: 15px; line-height: 1.5; }
  .hero-art--pyramid .hp-row__note { font-size: 13px; }

  .hero-art--pyramid .hp-toggle {
    top: 52px;   /* clear of the newsletter link's hit target above (≈11px gap at 320px): the scene's negative headroom pulls the stage up */
    right: 20px;
    bottom: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art--pyramid .hp-toggle { display: none; }
}
