/* --------------------------------------------------------------------------
   Enterprise Flow Interactive Component
   -------------------------------------------------------------------------- */
.enterprise-flow {
  /*--flow-ink: #28105e;*/
  --flow-ink: #fff;
  --flow-accent: #c000ff;

  /* glow-only controls remain here; the rectangle's own top/height are no
     longer fixed CSS values — they're computed in JS to exactly match the
     stage's rendered box, so the purple fill can never drift out of sync
     with the lines it sits behind. */
  --flow-glow-gap: 8px;        /* distance the outer glow extends above/below the rectangle */
  --flow-glow-blur: 70px;      /* glow softness */
  --flow-glow-color: rgba(192, 0, 255, .25);

  max-width: 1060px;
  margin: 54px auto 0;
}

.flow-switch {
  display: flex;
  justify-content: center;
  gap: 56px;
}

.flow-label {
  padding: 4px 2px;
  border: 0;
  color: var(--flow-ink);
  background: transparent;
  font: 500 15px var(--display);
  cursor: default;
  letter-spacing: .125rem;
  pointer-events: none;
  opacity: .42;
  text-transform: uppercase;
}

.flow-label.is-active {
  opacity: 1;
}

.flow-eye {
  position: relative;
  height: 4px;
  margin-top: 16px;
}

.flow-eye span {
  position: absolute;
  height: 4px;
  background: var(--flow-accent);
  transition: left .7s cubic-bezier(.5, 0, .15, 1), width .7s cubic-bezier(.5, 0, .15, 1);
}

.flow-stage {
  position: relative;
  height: 390px;
  margin-top: 38px;
  overflow: visible;
}

/* Lines — single consolidated rule (was duplicated across two patches) */
.flow-line {
  position: absolute;
  height: 7px;
  margin-top: -3.5px;
  background: rgba(40, 16, 94, .58);
  transform-origin: 0 50%;
  transition: transform .6s cubic-bezier(.16,1,.3,1),
              width .6s cubic-bezier(.16,1,.3,1),
              opacity .35s ease;
  z-index: 1;
}

.flow-stage.is-enterprise .flow-line {
  height: 3px;
  margin-top: -1.5px;
  filter: drop-shadow(0 0 6px rgba(192, 0, 255, .35));
  /* opacity is controlled entirely by JS inline styles during the burst
     animation — no opacity rule here, and no !important, so JS always wins */
}

.flow-stage.is-enterprise {
  background: radial-gradient(ellipse at 50% 50%, rgba(192, 0, 255, .11), rgba(18, 192, 255, .06) 38%, transparent 68%);
}

/* INNER rectangle fill — real element, positioned/sized entirely by JS
   (left/top/width/height inline styles) so it always matches the exact
   full-bleed width and true rendered height of the stage that holds the
   lines. Only the fade/scale transition lives in CSS now. */
.flow-rect-fill {
  position: absolute;
  z-index: 0;
  background: linear-gradient(135deg, #ff54c2 0%, #c000ff 48%, #5b00c2 100%);
  opacity: 0;
  transform: scaleY(.94);
  transform-origin: center;
  transition: opacity .7s ease, transform .7s ease;
  pointer-events: none;
}

/* OUTER glow — same full-bleed sizing as the fill, plus the configured gap,
   with the glow itself painted via box-shadow on the top/bottom edges. */
.flow-rect-glow {
  position: absolute;
  z-index: 0;
  background: transparent;
  box-shadow:
    0 calc(-1 * var(--flow-glow-gap)) var(--flow-glow-blur) var(--flow-glow-color),
    0 var(--flow-glow-gap) var(--flow-glow-blur) var(--flow-glow-color);
  opacity: 0;
  transform: scaleY(.94);
  transform-origin: center;
  transition: opacity .7s ease, transform .7s ease;
  pointer-events: none;
}

.flow-stage.is-enterprise .flow-rect-fill,
.flow-stage.is-enterprise .flow-rect-glow {
  /*opacity: .92;*/
  transform: scaleY(1.10);
  animation: flow-pulse 2.5s ease forwards; 
  transition-delay: .9s;
}

@keyframes flow-pulse {
  0%   { opacity: 0; }
  20%  { opacity: .92; }  /* fade in */
  70%  { opacity: .92; }  /* hold */
  100% { opacity: 0; }    /* fade back out */
}

.flow-stage.is-enterprise .flow-rect-glow {
  opacity: .2;
}

/* --------------------------------------------------------------------------
   Project-centric strip (formerly the .fragmentation row above the toggle)
   Lives inside .flow-stage and sits where the four "Individual …" labels used
   to be. The skewed bars come from the existing
   `.challenge-section .fragmentation span::before` rules (8px wide,
   skewX(-28deg) / skewX(28deg), 72% white) — deliberately NOT redefined
   here, so the angle and weight stay exactly as they were.
   Top is set by JS (just under the project lines); the stage grows to fit it.
   -------------------------------------------------------------------------- */
.enterprise-flow .flow-stage .fragmentation {
  position: absolute;
  left: 50%;
  width: min(1180px, 90vw);   /* matches .case-container so all five fit on one row */
  margin-top: 0;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .42s ease;
}

.flow-stage.is-project .fragmentation {
  opacity: 1;
  pointer-events: auto;
  transition-delay: .7s;      /* same hand-off timing the old labels used */
}

.flow-enterprise-label {
  position: absolute;
  width: auto;
  max-width: none;
  padding: 10px 20px;
  color: var(--flow-ink);
  font: 700 16px/1.3 var(--body);
  text-align: center;
  transform: translate(-50%, -50%);
  transition: opacity .42s ease;
  z-index: 2;
}

.flow-stage.is-enterprise .flow-enterprise-label {
  color: #fff;
  white-space: nowrap;
  font-size: 18px;
  /*border: 1px solid rgba(255, 255, 255, .5);*/
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 0 18px rgba(192, 0, 255, .35);
}

.flow-stage.is-enterprise .flow-enterprise-label:nth-child(even) {
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.flow-stage.is-enterprise .flow-enterprise-label:nth-child(odd) {
  border-top: 1px solid rgba(255, 255, 255, .5);
}
/* Full-bleed horizontal "laser" the six labels all tap into — reads as one
   connected system rather than six separate callouts. Expands from the
   center after the rectangle has settled in. */
.flow-spine {
  position: absolute;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95) 10%, rgba(255, 255, 255, .95) 90%, transparent);
  box-shadow: 0 0 10px 2px rgba(192, 0, 255, .55), 0 0 26px 6px rgba(192, 0, 255, .3);
  opacity: 0;
  transform: scaleX(.5);
  transform-origin: center;
  transition: opacity .5s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
  z-index: 1;
  pointer-events: none;
}

.flow-stage.is-enterprise .flow-spine {
  opacity: 1;
  transform: scaleX(1);
  transition-delay: 1.05s;
}

/* Short tick connecting the spine up/down to each label's anchor point */
.flow-spine-tick {
  position: absolute;
  width: 2px;
  background: rgba(255, 255, 255, .65);
  box-shadow: 0 0 8px rgba(192, 0, 255, .5);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity .4s ease;
  z-index: 1;
  pointer-events: none;
}

.flow-stage.is-enterprise .flow-spine-tick {
  opacity: .9;
  transition-delay: 1.15s;
}

/* Glowing node marking where each tick meets the spine */
.flow-spine-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(192, 0, 255, .7), 0 0 20px 6px rgba(192, 0, 255, .35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.4);
  transition: opacity .4s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 2;
  pointer-events: none;
}

.flow-stage.is-enterprise .flow-spine-node {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 1.2s;
}

.flow-stage.is-project .flow-enterprise-label {
  opacity: 0;
}

.flow-stage.is-enterprise .flow-enterprise-label {
  opacity: 1;
  transition-delay: .7s;
}

/* Full-width blurred band behind both rows of enterprise labels */
.flow-label-band {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
  opacity: 0;
  transition: opacity .42s ease;
  transition-delay: .7s;
  z-index: 1;
  pointer-events: none;
}

.flow-stage.is-enterprise .flow-label-band {
  opacity: .5;
}

@media (max-width: 900px) {
  .flow-label {
    font: 600 12px var(--display);
    letter-spacing: .025rem;
  }

  .flow-stage.is-enterprise .flow-enterprise-label {
    white-space: nowrap;
    border: none;
  }
}

/* Mobile: the five items wrap onto several rows, so give each a shorter bar.
   Bar width (8px) and skew angle (±28deg) are untouched; only the row height
   changes. The stage grows automatically (see FRAG_BOTTOM_PADDING in the JS). */
@media (max-width: 760px) {
  html, body { overflow-x: clip; }
  /*.enterprise-flow { overflow-x: clip; }*/
  .enterprise-flow .flow-stage .fragmentation {
    width: 100%;
    gap: 6px 10px;
  }

  .enterprise-flow .flow-stage .fragmentation span:nth-child(n) {
    min-height: 44px;
    padding: 0 6px 0 34px;
    font-size: 13px;
  }
}

/* -------------------------------------------------------------------------- */
/* END - Enterprise flow                                                      */
/* -------------------------------------------------------------------------- */


/* ==========================================================================
   Experience panels — reusable component, used in multiple sections
   (07–08 Ecosystem & Account Experience, When Speed Mattered, etc.)
   ========================================================================== */

.experience-panels {
  display: grid;
  /* auto-fit: two panels sit side by side, then wrap to one column on
     narrow screens without needing a media query */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: clamp(28px, 4vw, 48px) 0 clamp(28px, 3vw, 40px);
}

.experience-panels article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.5vw, 32px);
  border: 1px solid rgba(20, 10, 60, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

/* Panel title */
.experience-panels article > b {
  display: block;
  margin: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.2;
}

/* Panel body copy */
.experience-panels article > p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* Flow label ("Strategy → Experience") pinned to the card bottom */
.experience-panels article > span {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(150, 40, 220, 0.08);
  color: #7a1fb8;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ==========================================================================
   When Speed Mattered — section-specific rules only
   (scoped to .case-pressure; panel styling now lives in the global block above)
   ========================================================================== */

.case-pressure .case-lede {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 44px);
}

/* Space between stat cards and the panels below */
.case-pressure .evidence-grid {
  margin-bottom: clamp(32px, 4vw, 48px);
}

/* Source note */
.case-pressure .evidence-caveat {
  margin: 0;
  max-width: 78ch;
  font-size: 0.85rem;
  line-height: 1.6;
}

.case-pressure .evidence-caveat a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}