/* ==========================================================================
   AlignIQx interactive presentation — version 2 additions
   Loaded after app.css. Only the pieces the second cut needs; everything else
   is inherited, so index.html is unaffected by anything in here.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Amending a responsibility in place (section 05)
   The old wording is struck and left on screen so the change is legible, and
   the replacement arrives in cyan beside it. A line-through, not a colour
   swap — there is no red or green in this system to carry "removed".
   -------------------------------------------------------------------------- */
.amend-old {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  color: var(--text-faint);
}
.amend-new {
  color: var(--signal-cyan);
  /* Wipes in from zero width, so no gap is held open before it arrives. */
  display: inline-block;
  overflow: hidden;
  white-space: pre;
  vertical-align: bottom;
  max-width: 0;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   The two-band figures (section 07)
   The representative's measures sit in the upper band; the work that has moved
   sits in a second band beneath, under the AlignIQx name.
   -------------------------------------------------------------------------- */
.bands { position: relative; flex: none; }

.band {
  position: absolute;
  left: 0; right: 0;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
}
.band.aiq { border-color: rgba(41,197,246,0.28); background: rgba(46,107,230,0.07); }

.band-label {
  position: absolute;
  left: 0;
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--size-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}
.band-label .who { color: var(--text-strong); }
.band-label.aiq .who { color: var(--signal-cyan); }
.band-label .of { color: var(--text-faint); letter-spacing: 0.1em; }

/* A measure row. Positioned rather than stacked, so a row can move from one
   band to the other while the rest close up behind it. */
.krow {
  position: absolute;
  left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr 236px 1fr;
  align-items: center;
  padding: 0 26px;
  will-change: transform;
}
.krow + .krow { border-top: none; }
.krow-rule { position: absolute; left: 26px; right: 26px; top: 0; height: 1px; background: var(--border-hairline); }

.krow .k-label { font-size: var(--size-body-sm); color: var(--text-body); }
.krow .k-label .sub {
  display: block;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint); margin-top: 5px;
}
.krow .k-nums { display: flex; align-items: center; justify-content: center; gap: 18px; }
.krow .k-from { font-family: var(--font-mono); font-size: 30px; color: var(--text-faint); }
.krow .k-dash { font-family: var(--font-mono); font-size: 15px; color: var(--navy-300); }
.krow .k-to { font-family: var(--font-mono); font-size: 36px; font-weight: 500; color: var(--signal-cyan); min-width: 86px; text-align: left; }
.krow .k-bar { height: 8px; background: rgba(143,163,188,0.12); position: relative; }
.krow .k-bar i { position: absolute; top: 0; bottom: 0; background: var(--chart-hero-gradient); display: block; }
/* The figure as it stood, so the bar shows the size of the change and not
   simply that every row reached its own maximum. */
.krow .k-bar i.ctx { left: 0; background: var(--chart-context); }

/* --------------------------------------------------------------------------
   Organisation chart (section 02)
   A company-wide chart that resolves onto the one role the system changes.
   Orthogonal connectors only — in this brand the 65 degree angle is an edge,
   never a drawn line, and a diagonal here would invent a second one.
   -------------------------------------------------------------------------- */
.org { position: relative; overflow: hidden; flex: 1; min-height: 0; }
.org-inner { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }

.org-node {
  position: absolute;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  padding: 9px 14px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  will-change: opacity;
}
.org-node .fn {
  font-size: 13px; line-height: 1.25; color: var(--text-body);
}
.org-node .lv {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint);
}
/* The line of report the role sits on. */
.org-node.on-path { border-color: var(--navy-300); background: var(--surface-raised); }
.org-node.on-path .fn { color: var(--slate-200); }
/* The role itself. */
.org-node.target { border-color: var(--signal-cyan); background: rgba(46,107,230,0.14); }
.org-node.target .fn { color: var(--text-strong); font-weight: 500; }
.org-node.target .lv { color: var(--signal-cyan); }

.org-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

/* Four large figures with a short caption each: centre them in their cells so
   the grid does not read as top-weighted with empty space beneath. */
.kpi-grid > * { justify-content: center; }

/* A clip behind a section obeys the same rule as a still: it is shaped by the
   65 degree mask on .photo and never sits raw behind type. */
.photo video { width: 100%; height: 100%; object-fit: cover; object-position: 26% 74%; display: block; }

/* The reversed fade, which the brand pack's PhotoFade also provides.

   The default anchors the picture lower-left and clears the upper right, which
   is right when the copy sits on the right. A section divider puts its copy on
   the left, so the picture has to anchor on the other side of the same 65
   degree cut — otherwise type ends up sitting on the photograph, which the
   standard does not allow. Same angle, same dissolve, mirrored. */
.photo.rev img,
.photo.rev video {
  object-position: 74% 26%;
  -webkit-mask-image: linear-gradient(245deg, #000 0%, #000 26%, rgba(0,0,0,0.55) 42%, transparent 56%);
          mask-image: linear-gradient(245deg, #000 0%, #000 26%, rgba(0,0,0,0.55) 42%, transparent 56%);
}
.photo.rev::after {
  background: linear-gradient(245deg, rgba(2,6,12,0.20) 0%, rgba(2,6,12,0.28) 32%, rgba(2,6,12,0.86) 60%, #02060C 78%);
  -webkit-mask-image: linear-gradient(245deg, #000 0%, #000 28%, rgba(0,0,0,0.6) 46%, transparent 60%);
          mask-image: linear-gradient(245deg, #000 0%, #000 28%, rgba(0,0,0,0.6) 46%, transparent 60%);
}
