/* Extracted from customer-hub-demo.html */

  @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

  :root {
    --green: #3C9E76;
    --green-deep: #0F3D2C;
    --green-mid: #1F6B4D;
    --green-pale: #DDEDE4;
    --ink: #0B1A14;
    --ink-3: #56675F;
    --ink-4: #8A9892;
    --line: #C7DDD2;
    --paper: #FFFFFF;
    --paper-off: #E8F2EC;

    /* Tone variables — JS sets these per segment so circle colours
       darken smoothly across the timeline. CSS `transition: fill`
       on each consuming element interpolates the colour. */
    --circle-fill: #4A9F7C;
    --integration-fill: #76C2A0;
    --stream-color: #4A9F7C;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    width: 100%; height: 100%;
    font-family: 'IBM Plex Sans', sans-serif;
    background: var(--paper-off);
    color: var(--ink);
    overflow: hidden;
  }

  /* One-time page fade-in. Animation runs once on load; never re-triggers. */
  body { animation: pageIn 500ms ease both; }
  @keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

  /* Fixed-size stage that scales to fit the viewport. */
  #stage-wrap {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--paper-off);
  }
  #stage {
    width: 1600px; height: 900px;
    flex: none;
    background: var(--paper-off);
    position: relative;
    overflow: hidden;
    transform-origin: center;
    padding: 50px 80px 30px;
    display: flex;
    flex-direction: column;
  }

  /* ---------- Top-right counter ---------- */
  .status {
    position: absolute;
    top: 36px; right: 80px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    font-weight: 600;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 18px;
    z-index: 10;
  }
  .status .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(60,158,118,0.18);
  }
  .status .stat {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
  }
  .status .count {
    color: var(--ink);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    min-width: 32px;
    text-align: right;
    display: inline-block;
  }
  .status .sep {
    width: 1px;
    height: 14px;
    background: var(--line);
  }

  /* ---------- SVG canvas (the diagram) ---------- */
  .canvas-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }
  #canvas {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
  }
  /* One transform on one group — all flicker risk lives here, so we
     GPU-promote it explicitly. Transition is a single property, short
     duration, no overshoot. */
  #scene {
    transition: transform var(--scene-duration, 600ms) var(--scene-ease, cubic-bezier(0.55, 0, 0.25, 1));
    will-change: transform;
  }

  /* ---------- Circles ---------- */
  /* Every named or unnamed circle is the same visual primitive:
     white fill, thin green border. The .on toggle controls opacity
     via a single property — no transform, no background, no shadow
     animations. */
  .node {
    opacity: 0;
    transition: opacity 380ms ease;
    will-change: opacity;
  }
  .node.on { opacity: 1; }

  /* Embed mode — hide status badge + controls so the demo can be
     iframe'd into a slide as a pure visual. Toggled via #chrome=off. */
  body.embed-chromeless .status,
  body.embed-chromeless .controls {
    display: none !important;
  }
  body.embed-chromeless #stage {
    padding: 20px 40px;
  }
  body.embed-chromeless .canvas-wrap {
    margin-top: 0;
  }
     node once we reach Grow +6 (segment 11). The circles themselves
     stay — just the chrome inside disappears so the late segments read
     as a pure dot mesh. */
  /* Phantom labels — names rendered next to a subset of the inner-band
     phantoms. Same fade/hide rules as the other markings. */
  .phantom-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    fill: var(--green-deep);
    text-anchor: middle;
    pointer-events: none;
    opacity: 0;
    transition: opacity 380ms ease, fill 600ms ease;
  }
  /* Hard-guard: inactive labels are always at opacity 0 regardless of
     cascade order. !important beats any rule that might leak through
     during transitions or mid-frame state. */
  .phantom-label:not(.on) {
    opacity: 0 !important;
  }
  .phantom-label.on { opacity: 0.92; }

  body.markings-hidden .node-eyebrow,
  body.markings-hidden .node-name,
  body.markings-hidden .node image,
  body.markings-hidden .integration,
  body.markings-hidden .integration-line,
  body.markings-hidden .integration-label,
  body.markings-hidden .phantom-label {
    opacity: 0 !important;
    transition: opacity 600ms ease;
  }
  .node-eyebrow,
  .node-name,
  .node image {
    transition: opacity 600ms ease;
  }
  /* Logo images sit inside dark-green circles. They use transparent-background
     PNG variants (assets/customer-logos/tt/) so colours render at full
     opacity and any whites inside the logos (e.g. N1, Lego) are preserved. */
  .node image {
    mix-blend-mode: normal;
  }
  /* Company circles — every node, hub or supplier, shares one tone
     variable so the whole network darkens together segment-by-segment.
     Hubs distinguish themselves by size, not colour. */
  .node-circle {
    fill: var(--circle-fill);
    stroke: none;
    transition: fill 600ms ease;
  }
  .node-circle.is-hub {
    fill: var(--circle-fill);
    stroke: none;
  }

  .node-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    fill: rgba(255,255,255,0.85);
    font-weight: 700;
    text-transform: uppercase;
    text-anchor: middle;
  }
  .node-name {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    fill: #FFFFFF;
    text-anchor: middle;
  }
  .node-name.size-md { font-size: 18px; }
  .node-name.size-sm { font-size: 14px; }
  .node-name.size-hub { font-size: 16px; font-weight: 700; }

  /* Faint dashed orbit ring around hubs */
  .hub-ring {
    fill: none;
    stroke: rgba(15,61,44,0.45);
    stroke-width: 1;
    stroke-dasharray: 4 6;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 380ms ease;
  }
  .hub-ring.on { opacity: 1; }

  /* ---------- Connection lines ---------- */
  .stream {
    stroke: var(--stream-color);
    stroke-width: 1.4;
    fill: none;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 380ms ease, stroke 600ms ease;
    will-change: opacity;
  }
  .stream.on { opacity: 0.62; }
  .stream.thin { stroke-width: 0.8; }
  .stream.thin.on { opacity: 0.22; }

  /* Phantom circles for growth segments — share the same tone variable
     as the named circles, so they darken in lockstep. */
  .phantom {
    opacity: 0;
    transition: opacity 380ms ease, fill 600ms ease;
    fill: var(--circle-fill);
  }
  .phantom.on { opacity: 0.85; }

  /* Integration dots — slightly lighter than the company circles so
     they still read as smaller, dependent satellites at every tone. */
  .integration {
    opacity: 0;
    transition: opacity 380ms ease, fill 600ms ease;
    fill: var(--integration-fill);
  }
  .integration.on { opacity: 0.95; }
  .integration-line {
    stroke: var(--stream-color);
    stroke-width: 1.4;
    fill: none;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 380ms ease, stroke 600ms ease;
  }
  .integration-line.on { opacity: 0.55; }
  /* Integration label — small caps text next to each integration dot. */
  .integration-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    font-weight: 700;
    fill: var(--green-deep);
    opacity: 0;
    transition: opacity 380ms ease;
    pointer-events: none;
    text-transform: uppercase;
  }
  .integration-label.on { opacity: 0.85; }

  /* Concentric zone backgrounds — slightly darker green discs over the
     light-green page background. They stack so the centre darkens. */
  .zone {
    fill: rgba(15,61,44,0.06);
    opacity: 0;
    transition: opacity 450ms ease;
  }
  .zone.on { opacity: 1; }

  /* Arched zone labels (PARTNERS / CUSTOMERS / THE VALUE CHAIN /
     LETS MAKE AN IMPACT TOGETHER). Each follows a circular text-path. */
  .zone-label {
    opacity: 0;
    transition: opacity 450ms ease;
  }
  .zone-label.on { opacity: 1; }
  .zone-label text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    fill: var(--green-deep);
    letter-spacing: 0.22em;
  }
  .zone-label-outer text {
    fill: var(--ink);
    font-weight: 700;
  }

  /* Klappir centerpiece — white circle with logo. Drawn inside #scene
     but with a fixed *visual* size by inverse-scaling against the scene
     transform. JS sets `style.transform` on this group to undo the
     scene's scale so the Klappir disc looks the same size as in the
     reference image regardless of zoom level. */
  .klappir-center {
    opacity: 0;
    transition: opacity 450ms ease;
    transform-box: fill-box;
    transform-origin: center;
  }
  .klappir-center.on { opacity: 1; }

  /* ---------- Controls bar (below the canvas) ---------- */
  .controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 14px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--ink-3);
    border-top: 1px solid var(--line);
    margin-top: 12px;
  }
  .controls button {
    appearance: none;
    border: 1px solid #C9D5CF;
    background: white;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
    white-space: nowrap;
  }
  .controls button:hover {
    border-color: var(--green);
    color: var(--green);
  }
  .controls .btn-icon {
    min-width: 32px;
    padding: 6px 9px;
  }
  .controls .btn-seg.is-active {
    background: var(--green-deep);
    border-color: var(--green-deep);
    color: white;
  }
  .controls .seg-label {
    font-weight: 700;
    color: var(--ink-4);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0 6px 0 4px;
    font-size: 10px;
  }
  .controls .seg-divider {
    width: 1px;
    height: 16px;
    background: var(--line);
    margin: 0 4px;
  }
  .controls .phase-readout {
    margin-left: auto;
    font-size: 10px;
    color: var(--ink-4);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .controls .phase-readout b {
    color: var(--green-deep);
    margin-left: 6px;
    font-weight: 700;
  }
