/* Hero 06: four short scenes driven by native scroll, not a wheel lock.
   The unenhanced page remains a readable introduction plus three small cards. */
.hero-journey {
  position: relative;
  height: auto;
  overflow: visible;
}
.hero-journey .journey-scenes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.hero-journey .journey-panel {
  --scene-opacity: 1;
  --scene-y: 0px;
  --scene-scale: 1;
  min-width: 0;
}
.hero-journey .journey-intro { grid-column: 1 / -1; }
.hero-journey .journey-panel:not(.journey-intro) {
  position: relative;
  padding: 23px 24px;
  margin-top: 16px;
  border: 1px solid #b5a1d5;
  border-radius: 20px;
  background: #ffffff7a;
}
.hero-journey .journey-title {
  margin: 0;
  font-family: var(--hero-display);
  font-size: clamp(28px, 2.5vw, 41px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.015em;
  text-transform: uppercase;
}
.hero-journey .journey-line { display: block; }
.hero-journey .journey-line + .journey-line { margin-top: 3px; }
.hero-journey .journey-ink {
  display: block;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  background: linear-gradient(110deg, #6740cd 3%, #c4268b 44%, #486cd0 78%, #266d9d);
  background-size: 180% 100%;
  background-position: calc(var(--journey-progress, 0) * 100%) 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-journey .journey-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 18px;
}
.hero-journey .journey-description {
  max-width: 710px;
  color: #51435f;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.015em;
}
.hero-journey .journey-description strong {
  display: block;
  margin-top: 3px;
  color: #332040;
  font-weight: 600;
}
.hero-journey .journey-panel:not(.journey-intro) .journey-bottom { display: block; }
.hero-journey .journey-diagram { display: none; }
.hero-journey .journey-controls { display: none; }
.journey-supported:not(.journey-ready) .hero-journey .journey-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
}
.journey-supported:not(.journey-ready) .hero-journey .journey-pagination,
.journey-supported:not(.journey-ready) .hero-journey .journey-hint { display: none; }
.hero-journey .journey-motion-toggle {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #977ab7;
  border-radius: 999px;
  background: #ffffff80;
  color: #48335e;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.hero-journey .journey-motion-toggle:hover { background: #f9f5ff; border-color: #695096; }
.hero-journey .journey-motion-toggle:disabled { opacity: .7; cursor: default; }

[data-theme='dark'] .hero-journey .journey-panel:not(.journey-intro) {
  background: #251c328c;
  border-color: #76528e;
}
[data-theme='dark'] .hero-journey .journey-ink {
  background-image: linear-gradient(110deg, #cfadff 3%, #ff90d5 44%, #a6b8ff 78%, #88dcef);
}
[data-theme='dark'] .hero-journey .journey-description { color: #d0c0df; }
[data-theme='dark'] .hero-journey .journey-description strong { color: #f1e1fa; }
[data-theme='dark'] .hero-journey .journey-motion-toggle {
  background: #271d35;
  border-color: #9772b1;
  color: #e9d6f7;
}
[data-theme='dark'] .hero-journey .journey-motion-toggle:hover {
  background: #352544;
  border-color: #c59be1;
}

/* Only the script enables this layout, after checking viewport and motion.
   The sticky box has a finite 1.2-screen travel; the project link can bypass it. */
@media (min-width: 1001px) and (min-height: 600px) {
  .journey-ready .hero-journey { height: 220svh; }
  .journey-ready .hero-journey > .hero {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 0;
    padding-top: 96px;
    padding-bottom: 18px;
    overflow: clip;
  }
  .journey-ready .hero-journey .hero-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 16svh;
    align-items: center;
    gap: 12px;
    flex: none;
    min-height: 0;
    padding: 0 2vw 0 0;
  }
  .journey-ready .hero-journey .hero-stage .hero-actions {
    grid-row: 1;
    grid-column: 1;
    align-items: center;
    justify-self: start;
    margin: 0;
    max-width: none;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .journey-ready .hero-journey .hero-art {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    inset: auto;
    width: clamp(260px, 25vw, 420px);
    height: 16svh;
    max-height: none;
    max-width: none;
    justify-self: end;
    align-self: center;
    transform: translate3d(var(--journey-logo-x, 0px), var(--journey-logo-y, 0px), 0)
      rotate(var(--journey-logo-turn, 0deg));
    transform-origin: 50% 50%;
    transition: none;
    /* The vector symbol is painted at its real expanded dimensions in hero-world.css,
       instead of enlarging a permanently promoted small compositing layer. */
    will-change: auto;
  }
  .journey-ready .hero-journey .hero-art .monogram-wrap {
    inset: 7% 20%;
    transform: none;
  }
  .journey-ready .hero-journey .orbits { opacity: .5; }
  .journey-ready .hero-journey #hero-title .hero-line { transform: none; }
  .journey-ready .hero-journey .journey-scenes {
    position: relative;
    display: block;
    flex: 1;
    min-height: 0;
    margin-top: 9px;
  }
  .journey-ready .hero-journey .journey-panel,
  .journey-ready .hero-journey .journey-panel:not(.journey-intro) {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    opacity: var(--scene-opacity, 0);
    transform: translate3d(0, var(--scene-y, 0px), 0) scale(var(--scene-scale, 1));
    transform-origin: center center;
    transition: opacity 190ms ease, transform 450ms cubic-bezier(.16, 1, .3, 1);
    pointer-events: none;
    /* Let the browser promote the short transitions when they occur;
       do not reserve four full-screen text layers throughout the page. */
    will-change: auto;
  }
  .journey-ready .hero-journey .journey-panel.is-current { pointer-events: auto; }
  /* Words travel through each scroll window, not only at a slide boundary.
     Opposing directions make the relationship to scrolling visible. */
  .journey-ready .hero-journey .journey-panel {
    --journey-type-travel: min(clamp(64px, 6.1vw, 92px), calc(var(--gutter) * 2 - 16px));
  }
  .journey-ready .hero-journey .journey-line:first-child,
  .journey-ready .hero-journey #hero-title .hero-line-one {
    transform: translate3d(calc(var(--scene-distance, 0) * var(--journey-type-travel)),
      calc(var(--scene-distance, 0) * -8px), 0);
    transform-origin: left center;
  }
  .journey-ready .hero-journey .journey-line:nth-child(2),
  .journey-ready .hero-journey #hero-title .hero-line-two {
    transform: translate3d(calc(var(--scene-distance, 0) * var(--journey-type-travel) * -1),
      calc(var(--scene-distance, 0) * 8px), 0);
    transform-origin: right center;
  }
  .journey-ready .hero-journey .journey-ink,
  .journey-ready .hero-journey #hero-title .hero-ink {
    background-position: calc(50% + var(--scene-distance, 0) * 42%) 50%;
  }
  .journey-ready .hero-journey .journey-line:nth-child(2) .journey-ink,
  .journey-ready .hero-journey #hero-title .hero-line-two .hero-ink {
    background-position: calc(50% - var(--scene-distance, 0) * 42%) 50%;
  }
  /* A new benefit visibly unfolds inside its own glyph-safe mask. The outer
     line continues following scroll; the inner ink owns this finite reveal. */
  .journey-ready .hero-journey .journey-panel:not(.journey-intro) .journey-line {
    clip-path: inset(-.22em -.065em -.19em -.065em);
  }
  .journey-ready .hero-journey .journey-panel:not(.journey-intro).is-current
    .journey-line:first-child .journey-ink {
    animation: journeyHeadingRise 780ms cubic-bezier(.16, 1, .3, 1) both;
    transform-origin: left bottom;
  }
  .journey-ready .hero-journey .journey-panel:not(.journey-intro).is-current
    .journey-line:nth-child(2) .journey-ink {
    animation: journeyHeadingFall 850ms 70ms cubic-bezier(.16, 1, .3, 1) both;
    transform-origin: right top;
  }
  .journey-ready .hero-journey .hero-line-one {
    font-size: min(18.7vw, 25svh);
  }
  .journey-ready .hero-journey .hero-line-two {
    font-size: min(22.4vw, 29svh);
    margin-top: 12px;
  }
  .journey-ready .hero-journey .hero-bottom { margin-top: 18px; gap: 24px; }
  .journey-ready .hero-journey .hero-description > p { font-size: 17px; line-height: 1.5; }
  .journey-ready .hero-journey .hero-proof strong { font-size: 26px; }
  .journey-ready .hero-journey .hero-proof .scroll-cue { display: none; }
  .journey-ready .hero-journey .journey-title { font-size: min(22vw, 24svh); }
  .journey-ready .hero-journey .journey-line { line-height: .82; white-space: nowrap; }
  .journey-ready .hero-journey .journey-line + .journey-line {
    margin-top: 12px;
    font-size: min(32vw, 29svh);
    text-align: right;
  }
  .journey-ready .hero-journey [data-scene='2'] .journey-title {
    font-size: min(16.6vw, 24svh);
  }
  .journey-ready .hero-journey [data-scene='2'] .journey-line + .journey-line {
    font-size: min(36vw, 32svh);
  }
  .journey-ready .hero-journey [data-scene='3'] .journey-title {
    font-size: min(20vw, 26svh);
  }
  .journey-ready .hero-journey [data-scene='3'] .journey-line + .journey-line {
    font-size: min(14.7vw, 27svh);
  }
  .journey-ready .hero-journey .journey-bottom,
  .journey-ready .hero-journey .journey-panel:not(.journey-intro) .journey-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    gap: 24px;
    min-height: 75px;
  }
  .journey-ready .hero-journey .journey-description {
    font-size: 19px;
    line-height: 1.55;
    max-width: 710px;
  }
  .journey-ready .hero-journey .journey-diagram {
    display: flex;
    position: relative;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 290px;
    height: 75px;
    margin-right: 18px;
  }
  .journey-ready .hero-journey .build-sheet {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 156px;
    height: 76px;
    margin: -38px 0 0 -78px;
    border: 1px solid #8a60ba;
    border-radius: 10px;
    background: #f5eeff;
    box-shadow: 0 4px 12px #7c50b51c;
  }
  .journey-ready .hero-journey .build-sheet::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    height: 4px;
    border-radius: 5px;
    background: #cbb9e5;
  }
  .journey-ready .hero-journey .build-sheet::after {
    content: '';
    position: absolute;
    top: 24px;
    left: 12px;
    width: 78px;
    height: 34px;
    border-radius: 5px;
    background: linear-gradient(120deg, #9b74de, #edb2d5);
  }
  .journey-ready .hero-journey .sheet-back {
    transform: translate3d(calc(-28px - (1 - var(--scene-activity, 1)) * 64px),
      calc(-10px - (1 - var(--scene-activity, 1)) * 25px), 0)
      rotate(calc(-6deg - (1 - var(--scene-activity, 1)) * 12deg));
    background: #d9c9ee;
  }
  .journey-ready .hero-journey .sheet-mid {
    transform: translate3d(calc(24px + (1 - var(--scene-activity, 1)) * 64px),
      calc(8px + (1 - var(--scene-activity, 1)) * 18px), 0)
      rotate(calc(5deg + (1 - var(--scene-activity, 1)) * 10deg));
    background: #eccfe5;
  }
  .journey-ready .hero-journey .sheet-front {
    transform: translate3d(0, calc((1 - var(--scene-activity, 1)) * 22px), 0)
      scale(calc(.86 + var(--scene-activity, 1) * .14));
  }
  .journey-ready .hero-journey .sheet-front > span {
    display: block;
    position: relative;
    z-index: 1;
    margin: 10px 12px 0;
    color: #6c3b9c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
  }
  .journey-ready .hero-journey .sheet-front::before { display: none; }
  .journey-ready .hero-journey .sheet-front::after { top: 33px; height: 27px; }
  .journey-ready .hero-journey .journey-panel.is-current .sheet-front > span {
    animation: journeyCodeReveal 850ms steps(14, end) both;
  }
  .journey-ready .hero-journey .journey-panel.is-current .sheet-front::after {
    transform-origin: left center;
    animation: journeyInterfaceBuild 700ms 120ms cubic-bezier(.16, 1, .3, 1) both;
  }
  .journey-ready .hero-journey .journey-node {
    display: grid;
    place-items: center;
    flex: none;
    width: 49px;
    height: 49px;
    border: 1px solid #b267a0;
    border-radius: 14px;
    background: #fcecf6;
    color: #a42879;
    font-size: 25px;
    transform: translateY(calc((1 - var(--scene-activity, 1)) * -12px))
      rotate(calc((1 - var(--scene-activity, 1)) * -8deg));
  }
  .journey-ready .hero-journey .journey-node:nth-of-type(3) {
    background: #bc388c;
    border-color: #bc388c;
    color: #fff;
    transform: translateY(calc((1 - var(--scene-activity, 1)) * 12px))
      rotate(calc((1 - var(--scene-activity, 1)) * 8deg));
  }
  .journey-ready .hero-journey .journey-connection {
    display: block;
    position: relative;
    width: 51px;
    height: 2px;
    background: #c993b8;
    overflow: visible;
  }
  .journey-ready .hero-journey .journey-connection::after {
    content: '';
    position: absolute;
    left: calc(var(--journey-progress, 0) * 85%);
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a72480;
    box-shadow: 0 0 0 4px #d65ba01a;
  }
  .journey-ready .hero-journey .journey-panel.is-current .journey-connection::after {
    animation: journeyDataPacket 1400ms 3 linear;
  }
  .journey-ready .hero-journey .journey-panel.is-current .journey-connection:nth-child(4)::after {
    animation-delay: 440ms;
  }
  .journey-ready .hero-journey .journey-panel.is-current .node-center {
    animation: journeyConnectionPulse 1000ms 2 ease-out;
  }
  .journey-ready .hero-journey .journey-diagram.journey-opt {
    flex-direction: column;
    gap: 7px;
  }
  .journey-ready .hero-journey .opt-track {
    display: flex;
    align-items: center;
    width: 210px;
    margin-top: 1px;
    color: #326b60;
    font-size: 13px;
    line-height: 1.2;
  }
  .journey-ready .hero-journey .opt-row {
    display: block;
    position: relative;
    flex: none;
    width: 210px;
    height: 8px;
    border-radius: 10px;
    background: #cae8df;
    transform: translateX(calc((1 - var(--scene-activity, 1)) * -35px))
      rotate(calc((1 - var(--scene-activity, 1)) * -4deg));
  }
  .journey-ready .hero-journey .opt-row::before {
    content: '';
    display: block;
    width: 88%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3e877c, #74bea8);
    transform-origin: left center;
    transform: scaleX(calc(.48 + var(--scene-activity, 1) * .52));
  }
  .journey-ready .hero-journey .opt-row:nth-child(2)::before { width: 60%; }
  .journey-ready .hero-journey .opt-row:nth-child(3)::before { width: 76%; }
  .journey-ready .hero-journey .opt-row:nth-child(2) {
    transform: translateX(calc((1 - var(--scene-activity, 1)) * 31px))
      rotate(calc((1 - var(--scene-activity, 1)) * 4deg));
  }
  .journey-ready .hero-journey .journey-panel.is-current .opt-row::before {
    animation: journeyPathResolve 760ms cubic-bezier(.16, 1, .3, 1) both;
  }
  .journey-ready .hero-journey .journey-panel.is-current .opt-row:nth-child(2)::before {
    animation-delay: 90ms;
  }
  .journey-ready .hero-journey .journey-panel.is-current .opt-row:nth-child(3)::before {
    animation-delay: 180ms;
  }

  .journey-ready .hero-journey .journey-controls {
    position: relative;
    z-index: 4;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #9b80bf60;
    min-height: 55px;
  }
  .journey-ready .hero-journey .journey-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .journey-ready .hero-journey .journey-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #6b557c;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 500;
  }
  .journey-ready .hero-journey .journey-pagination button:hover {
    background: #ffffff6b;
    color: #362344;
  }
  .journey-ready .hero-journey .journey-pagination button[aria-current='step'],
  .journey-ready .hero-journey .journey-pagination button.is-current {
    background: #ffffff85;
    border-color: #b99ed7;
    color: #4e297b;
  }
  .journey-ready .hero-journey .journey-hint {
    color: #6b557c;
    font-size: 13px;
    line-height: 1.5;
    margin-left: auto;
  }
  .journey-ready .hero-journey .journey-motion-toggle { background: transparent; }

  [data-theme='dark'].journey-ready .hero-journey .journey-panel:not(.journey-intro) {
    background: none;
  }
  [data-theme='dark'].journey-ready .hero-journey .build-sheet {
    border-color: #b58acb;
    background: #352244;
    box-shadow: 0 4px 12px #0003;
  }
  [data-theme='dark'].journey-ready .hero-journey .build-sheet::before { background: #78608e; }
  [data-theme='dark'].journey-ready .hero-journey .build-sheet::after {
    background: linear-gradient(120deg, #8665b9, #dc99c4);
  }
  [data-theme='dark'].journey-ready .hero-journey .sheet-front > span { color: #deb9fc; }
  [data-theme='dark'].journey-ready .hero-journey .sheet-back { background: #4a355e; }
  [data-theme='dark'].journey-ready .hero-journey .sheet-mid { background: #604163; }
  [data-theme='dark'].journey-ready .hero-journey .journey-node {
    background: #382039;
    border-color: #ae729e;
    color: #f199cd;
  }
  [data-theme='dark'].journey-ready .hero-journey .journey-node:nth-of-type(3) {
    background: #c63b97;
    color: #fff;
  }
  [data-theme='dark'].journey-ready .hero-journey .journey-connection { background: #95638b; }
  [data-theme='dark'].journey-ready .hero-journey .journey-connection::after { background: #ff96d5; }
  [data-theme='dark'].journey-ready .hero-journey .opt-track {
    color: #9fd5c4;
  }
  [data-theme='dark'].journey-ready .hero-journey .opt-row { background: #345a4f; }
  [data-theme='dark'].journey-ready .hero-journey .opt-row::before {
    background: linear-gradient(90deg, #66bca6, #a2d6c5);
  }
  [data-theme='dark'].journey-ready .hero-journey .journey-controls { border-top-color: #c99be34d; }
  [data-theme='dark'].journey-ready .hero-journey .journey-pagination button,
  [data-theme='dark'].journey-ready .hero-journey .journey-hint { color: #c5acd7; }
  [data-theme='dark'].journey-ready .hero-journey .journey-pagination button:hover {
    background: #382743;
    color: #f4e5ff;
  }
  [data-theme='dark'].journey-ready .hero-journey .journey-pagination button[aria-current='step'],
  [data-theme='dark'].journey-ready .hero-journey .journey-pagination button.is-current {
    background: #36243e;
    border-color: #ac7bc6;
    color: #f3d9ff;
  }
}

@media (min-width: 1001px) and (min-height: 600px) and (max-height: 780px) {
  .journey-ready .hero-journey > .hero { padding-top: 92px; }
  .journey-ready .hero-journey .hero-stage { grid-template-rows: auto 14svh; }
  .journey-ready .hero-journey .hero-art { height: 14svh; }
  .journey-ready .hero-journey .hero-line-one { font-size: min(18.7vw, 21.5svh); }
  .journey-ready .hero-journey .hero-line-two { font-size: min(22.4vw, 25svh); }
  .journey-ready .hero-journey .journey-title { font-size: min(22vw, 20svh); }
  .journey-ready .hero-journey .journey-line + .journey-line { font-size: min(32vw, 23svh); }
  .journey-ready .hero-journey [data-scene='2'] .journey-title { font-size: min(16.6vw, 20svh); }
  .journey-ready .hero-journey [data-scene='2'] .journey-line + .journey-line {
    font-size: min(36vw, 23svh);
  }
  .journey-ready .hero-journey [data-scene='3'] .journey-title { font-size: min(20vw, 20svh); }
  .journey-ready .hero-journey [data-scene='3'] .journey-line + .journey-line {
    font-size: min(14.7vw, 22svh);
  }
  .journey-ready .hero-journey .journey-bottom,
  .journey-ready .hero-journey .journey-panel:not(.journey-intro) .journey-bottom {
    min-height: 62px;
    margin-top: 14px;
  }
  .journey-ready .hero-journey .journey-description { font-size: 17px; line-height: 1.5; }
  .journey-ready .hero-journey .journey-diagram { scale: .82; width: 220px; height: 62px; }
  .journey-ready .hero-journey .journey-hint { display: none; }
}

@media (min-width: 1001px) and (min-height: 600px) and (max-height: 680px) {
  .journey-ready .hero-journey > .hero { padding-top: 88px; padding-bottom: 14px; }
  /* Keep explanatory copy clear of the controls while the ink reveals above it. */
  .journey-ready .hero-journey .journey-panel { transform: none; }
  .journey-ready .hero-journey .hero-stage { grid-template-rows: auto 14svh; gap: 9px; }
  .journey-ready .hero-journey .hero-art { height: 14svh; }
  .journey-ready .hero-journey .hero-line-one { font-size: min(18.7vw, 20svh); }
  .journey-ready .hero-journey .hero-line-two { font-size: min(22.4vw, 23svh); margin-top: 9px; }
  .journey-ready .hero-journey .hero-bottom { margin-top: 12px; }
  .journey-ready .hero-journey .hero-description > p { font-size: 16px; line-height: 1.4; }
  .journey-ready .hero-journey .hero-proof { gap: 18px; }
  .journey-ready .hero-journey .hero-proof strong { font-size: 23px; }
  .journey-ready .hero-journey .journey-title { font-size: min(22vw, 20svh); }
  .journey-ready .hero-journey .journey-line + .journey-line { font-size: min(32vw, 23svh); }
  .journey-ready .hero-journey [data-scene='2'] .journey-title { font-size: min(16.6vw, 20svh); }
  .journey-ready .hero-journey [data-scene='2'] .journey-line + .journey-line {
    font-size: min(36vw, 23svh);
  }
  .journey-ready .hero-journey [data-scene='3'] .journey-title { font-size: min(20vw, 20svh); }
  .journey-ready .hero-journey [data-scene='3'] .journey-line + .journey-line {
    font-size: min(14.7vw, 22svh);
  }
  .journey-ready .hero-journey .journey-bottom,
  .journey-ready .hero-journey .journey-panel:not(.journey-intro) .journey-bottom {
    min-height: 50px;
    margin-top: 10px;
  }
  .journey-ready .hero-journey .journey-diagram { scale: .7; height: 50px; }
  .journey-ready .hero-journey .journey-controls { padding-top: 6px; margin-top: 6px; }
}

@media (max-width: 1000px) {
  .hero-journey .journey-scenes { gap: 12px; }
  .hero-journey .journey-panel:not(.journey-intro) { padding: 19px 18px; }
  .hero-journey .journey-title { font-size: clamp(26px, 3.6vw, 35px); }
  .hero-journey .journey-description { font-size: 15px; line-height: 1.55; }
  .hero-journey .journey-bottom { margin-top: 12px; }
}
@media (max-width: 760px) {
  .hero-journey .journey-scenes { grid-template-columns: 1fr; gap: 10px; }
  .hero-journey .journey-panel:not(.journey-intro) {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 15px;
    margin-top: 0;
    padding: 16px;
    border-radius: 15px;
  }
  .hero-journey .journey-panel:not(.journey-intro)[data-scene='1'] { margin-top: 16px; }
  .hero-journey .journey-title { font-size: 24px; line-height: .98; }
  .hero-journey [data-scene='2'] .journey-title { font-size: 23px; }
  .hero-journey .journey-line { overflow-wrap: normal; }
  .hero-journey .journey-description { font-size: 15px; line-height: 1.5; }
  .hero-journey .journey-description strong { display: none; }
  .hero-journey .journey-panel:not(.journey-intro) .journey-bottom { margin: 0; }
}
@media (max-width: 360px) {
  .hero-journey .journey-panel:not(.journey-intro) { grid-template-columns: 1fr; gap: 7px; padding: 15px; }
  .hero-journey .journey-title { font-size: 25px; }
  .hero-journey .journey-line { display: inline; }
  .hero-journey .journey-line + .journey-line { margin: 0; }
  .hero-journey .journey-line + .journey-line::before { content: ' '; }
}

/* If CSS is loaded but enhancement is absent, never keep a hidden panel. */
:root:not(.journey-ready) .hero-journey .journey-panel {
  opacity: 1;
  transform: none;
}
:root:not(.journey-ready) .hero-journey .hero-art { will-change: auto; }
.journey-starting .hero-journey .journey-panel { transition: none !important; }
.journey-ready .hero-journey .hero-motion-paused .hero-art { will-change: auto; }
@keyframes journeyCodeReveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes journeyHeadingRise {
  from { opacity: 0; transform: translate3d(0, 85%, 0) rotate(-1deg); }
  35% { opacity: 1; }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes journeyHeadingFall {
  from { opacity: 0; transform: translate3d(0, -85%, 0) rotate(1deg); }
  35% { opacity: 1; }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes journeyInterfaceBuild {
  from { transform: scaleX(.08); opacity: .25; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes journeyDataPacket {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes journeyConnectionPulse {
  0%, 100% { box-shadow: 0 0 0 0 #bd388c00; }
  40% { box-shadow: 0 0 0 8px #bd388c33; }
}
@keyframes journeyPathResolve {
  from { transform: scaleX(.08); opacity: .35; }
  to { transform: scaleX(calc(.48 + var(--scene-activity, 1) * .52)); opacity: 1; }
}
/* Background/occluded hero details freeze with the existing motion controls. */
.hero-journey .hero-motion-paused .journey-diagram,
.hero-journey .hero-motion-paused .journey-diagram *,
.hero-journey .hero-motion-paused .journey-diagram *::before,
.hero-journey .hero-motion-paused .journey-diagram *::after {
  animation-play-state: paused !important;
}
.motion-off .hero-journey .journey-diagram,
.motion-off .hero-journey .journey-diagram *,
.motion-off .hero-journey .journey-diagram *::before,
.motion-off .hero-journey .journey-diagram *::after {
  animation: none !important;
}
.journey-ready .hero-journey .hero-motion-paused .journey-ink {
  animation: none !important;
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-journey, .hero-journey > .hero { height: auto; }
  .hero-journey > .hero { position: relative; }
}
