/* ============================================================
   EXPERIMENTAL WORKFLOW  —  static/workflow.css

   The six-step integration workflow on the Proof of Concept
   page. Every step is present from the start, dimmed and
   desaturated; each one lights up as the sequence advances.

   Nothing is ever hidden, so the graphic never reserves empty
   space waiting to be filled — a reader who scrolls past
   without touching it still sees all six stages.

   Everything is prefixed iw- and scoped to .iw-wrap, so nothing
   here can reach Bootstrap (.panel, .label, .step, .arrow and
   .wrap are names Bootstrap or the template already use), the
   nav, the footer, the rail's ir- rules or the homepage's ih-.

   Sized to sit inside the rail's reading column without a
   horizontal scrollbar. No web fonts.
   ============================================================ */

.iw-wrap {
  --iw-surface: #FFFFFF;
  --iw-fg:      #0C074E;
  --iw-line:    #D9D4EE;
  --iw-accent:  #0C074E;
  --iw-accent-fg: #FFFFFF;
  --iw-glow:    rgba(12, 7, 78, .18);

  --iw-icon: clamp(72px, 9vw, 190px);
  --iw-gap:  clamp(28px, 4.5vw, 100px);

  color: var(--iw-fg);
  width: 100%;
  margin: 0 auto;
  padding-block: 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
:root[data-theme="dark"] .iw-wrap {
  --iw-surface: #15113A;
  --iw-fg:      #F6EAFF;
  --iw-line:    #2C2660;
  --iw-accent:  #FFD7FF;
  --iw-accent-fg: #0C074E;
  --iw-glow:    rgba(255, 215, 255, .22);
}

/* light / dark artwork */
.iw-wrap .iw-dark { display: none; }
:root[data-theme="dark"] .iw-wrap .iw-light { display: none; }
:root[data-theme="dark"] .iw-wrap .iw-dark  { display: block; }

/* ---------- the track ---------- */
.iw-scroll { overflow-x: auto; max-width: 100%; padding: 8px; }
.iw-track {
  display: grid;
  grid-template-columns:
    var(--iw-icon) var(--iw-gap) var(--iw-icon) var(--iw-gap) var(--iw-icon) var(--iw-gap);
  row-gap: 40px;
  align-items: start;
  margin: 0 auto;
  padding-left: var(--iw-gap);
}

.iw-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.iw-node {
  width: var(--iw-icon);
  height: var(--iw-icon);
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
}
.iw-node:focus-visible,
.iw-arrow:focus-visible { outline: 2px solid var(--iw-accent); outline-offset: 4px; }
.iw-node img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* every step is present; the ones not yet reached are quiet */
.iw-pics {
  display: block;
  width: 100%;
  height: 100%;
  opacity: .22;
  filter: grayscale(.5);
  transform: scale(.92);
  transition: opacity .5s ease, filter .5s ease,
              transform .6s cubic-bezier(.2, 1.4, .4, 1);
}
.iw-step.is-on .iw-pics {
  opacity: 1;
  filter: none;
  transform: none;
}

.iw-label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.3;
  text-align: center;
  color: var(--iw-fg);
  text-wrap: balance;
  max-width: var(--iw-icon);
  opacity: .38;
  transition: opacity .5s ease;
}
.iw-step.is-on .iw-label { opacity: 1; }

/* ---------- the connectors ---------- */
.iw-link {
  height: var(--iw-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.iw-link::before {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  top: 50%;
  border-top: 2px solid var(--iw-line);
  transition: border-color .45s ease;
}
.iw-link.is-done::before { border-top-color: var(--iw-accent); }
.iw-link.iw-turn::before { display: none; }

.iw-arrow {
  position: relative;
  z-index: 1;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--iw-accent);
  color: var(--iw-accent-fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(.4);
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.iw-arrow svg { width: 20px; height: 20px; }
.iw-link.is-ready .iw-arrow {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  animation: iw-pulse 1.8s ease-in-out infinite;
}
.iw-link.is-ready .iw-arrow:hover { animation: none; transform: translateX(3px); }
.iw-link.is-done .iw-arrow { opacity: 0; pointer-events: none; }
@keyframes iw-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--iw-glow); }
  50%      { box-shadow: 0 0 0 10px transparent; }
}

/* ---------- the caption panel ---------- */
.iw-panel {
  width: 100%;
  background: var(--iw-surface);
  border: 1px solid var(--iw-line);
  border-radius: 14px;
  padding: 22px 26px;
}
.iw-panel p { margin: 0; }
.iw-fade { animation: iw-fade .45s ease; }
@keyframes iw-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .iw-wrap *,
  .iw-wrap *::before { animation: none !important; transition: none !important; }
  .iw-pics  { opacity: 1 !important; filter: none !important; transform: none !important; }
  .iw-label { opacity: 1 !important; }
  .iw-link::before { border-top-color: var(--iw-accent); }
}