/* ZTY signature: static first; JavaScript enhances only suitable viewports. */
.growth-story {
  background: var(--deep);
  border-block: 1px solid var(--line);
  --story-header: 89px;
}
.story-pin { padding: 38px 0; overflow: hidden; }
.story-inner { max-width: 1180px; }
.story-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.story-heading .eyebrow { margin: 0; }
.story-skip { font-size: 10px; color: var(--muted); white-space: nowrap; }
.story-skip:hover { color: var(--blue-light); }
.story-scene { display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; gap: 25px; }
.story-building { display: block; width: 100%; max-height: 470px; overflow: visible; }
.story-ground { stroke: #496683; stroke-width: .8; opacity: .24; }
.story-foundation, .story-tier, .story-feedback { fill: none; stroke: #86a1be; stroke-width: 1; }
.story-foundation { stroke: var(--blue); stroke-width: 1.3; }
.story-accent { stroke: var(--blue); stroke-width: 1.7; }
.story-feedback { stroke: var(--blue-light); stroke-width: .8; opacity: .65; }
.story-feedback text { fill: #8aa5c5; stroke: none; font: 8px 'Segoe UI', sans-serif; letter-spacing: 2px; }
.story-stages { list-style: none; margin: 0; padding: 15px 0; }
.story-stages li { position: relative; display: flex; gap: 18px; align-items: center; padding: 12px 0; }
.story-stages li + li::before { content: ''; position: absolute; top: -8px; left: 10px; height: 16px; width: 1px; background: #087cfa66; }
.story-step-number { color: var(--blue-light); font: 10px Consolas, monospace; }
.story-stages strong { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.story-stages p { font-size: 11px; margin-top: 2px; }
.story-finale { text-align: center; max-width: 750px; margin: 0 auto; }
.story-finale h2 { font-size: clamp(26px, 3vw, 41px); line-height: 1.2; }
.story-finale h2 span { color: var(--blue); }
.story-finale > p { max-width: 610px; margin: 15px auto 0; font-size: 13px; line-height: 1.7; }
.story-track { height: 1px; background: #ffffff0d; margin-top: 24px; }
.story-track span { display: block; height: 100%; background: var(--blue); transform-origin: left; }

/* No timer, scroll trapping or autoplay: all values follow page position. */
.growth-story.is-scroll-story { height: 250svh; }
.is-scroll-story .story-pin {
  position: sticky;
  top: var(--story-header);
  height: calc(100svh - var(--story-header));
  padding-block: 22px;
}
.is-scroll-story .story-inner { height: 100%; display: flex; flex-direction: column; }
.is-scroll-story .story-scene { flex: 1; min-height: 0; }
.is-scroll-story .story-building { height: 100%; min-height: 0; }
.is-scroll-story .story-draw { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, 0)); }
.is-scroll-story .story-tier { opacity: var(--reveal, 0); transform: translateY(calc((1 - var(--reveal, 0)) * 8px)); }
.is-scroll-story .story-accent { opacity: var(--accent, .3); }
.is-scroll-story .story-foundation { opacity: var(--foundation, 0); --draw: var(--foundation, 0); }
.is-scroll-story .story-stages li { opacity: var(--reveal, 0); transform: translateY(calc((1 - var(--reveal, 0)) * 8px)); }
.is-scroll-story .story-stages strong { color: var(--stage-color, var(--text)); }
.is-scroll-story .story-feedback { opacity: var(--feedback, 0); --draw: var(--feedback, 0); }
.is-scroll-story .story-ground { opacity: calc(.06 + var(--progress, 0) * .18); }
.is-scroll-story .story-finale { opacity: var(--final, 0); transform: translateY(calc((1 - var(--final, 0)) * 12px)); }
.is-scroll-story .story-track span { transform: scaleX(var(--progress, 0)); }

@media (max-width: 900px) {
  .growth-story { --story-header: 78px; }
  .story-scene { grid-template-columns: 1.2fr 1fr; gap: 5px; }
  .story-stages strong { font-size: 15px; }
  .story-stages li { gap: 12px; }
}
@media (max-width: 900px) {
  .growth-story.is-scroll-story { height: 230svh; }
  .story-pin { padding-block: 28px; }
  .story-heading { gap: 12px; }
  .story-heading .eyebrow { font-size: 7px; letter-spacing: .1em; }
  .story-skip { font-size: 9px; white-space: normal; max-width: 95px; text-align: right; }
  .story-scene { display: flex; flex-direction: column; gap: 0; }
  .story-building { max-height: 290px; }
  .is-scroll-story .story-building { flex: 1; width: 100%; max-height: none; }
  .story-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; width: 100%; padding-block: 12px 18px; }
  .story-stages li { padding: 0; gap: 5px; align-items: flex-start; }
  .story-stages li + li::before { display: none; }
  .story-step-number { font-size: 8px; padding-top: 4px; }
  .story-stages strong { font-size: 10px; line-height: 1.3; display: block; }
  .story-stages p { display: none; }
  .story-finale h2 { font-size: clamp(23px, 5.7vw, 31px); }
  .story-finale > p { font-size: 11px; margin-top: 12px; }
  .story-track { margin-top: 16px; }
}
/* Short landscape screens and reduced motion keep the full static story. */
@media (prefers-reduced-motion: reduce), (max-height: 600px) {
  .growth-story.is-scroll-story { height: auto; }
  .is-scroll-story .story-pin { position: static; height: auto; }
  .story-skip { display: none; }
}

/* Desktop: independent left/right columns. Labels and message share the right
   slot, but their opacity intervals never overlap. Static fallback stays in flow. */
@media (min-width: 901px) {
  .is-scroll-story .story-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: clamp(35px, 4vw, 70px);
  }
  .is-scroll-story .story-heading,
  .is-scroll-story .story-track { grid-column: 1 / -1; }
  .is-scroll-story .story-heading { grid-row: 1; }
  .is-scroll-story .story-track { grid-row: 3; }
  .is-scroll-story .story-scene { display: contents; }
  .is-scroll-story .story-building {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    max-height: 610px;
    overflow: hidden;
    transform: translateX(calc(var(--handoff, 0) * -2%)) scale(calc(1 - var(--handoff, 0) * .12));
    transform-origin: center;
  }
  .is-scroll-story .story-stages {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    min-width: 0;
    opacity: calc(1 - var(--handoff, 0));
    transform: translateY(calc(var(--handoff, 0) * -8px));
  }
  .is-scroll-story .story-finale {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    text-align: left;
    transform: translateY(calc((1 - var(--final, 0)) * 14px));
  }
  .is-scroll-story .story-finale h2 { font-size: clamp(32px, 3vw, 44px); }
  .is-scroll-story .story-finale > p { margin: 24px 0 0; font-size: 14px; line-height: 1.85; }
}
/* On tablets/phones each piece owns a row; the six labels remain visible. */
@media (max-width: 900px) {
  .is-scroll-story .story-finale { flex: 0 0 auto; }
  .is-scroll-story .story-stages { flex: 0 0 auto; }
  .is-scroll-story .story-scene { overflow: hidden; }
}
