/* The static layout stays readable without JavaScript or WebGL. */
.scroll-story {
  --story-header: 88px;
  --story-accent: #ff7a21;
  position: relative;
  margin-top: 45px;
  border-block: 1px solid #31414c;
  background: #0b151d;
  isolation: isolate;
}
.story-viewport { position: relative; padding-block: 36px; }
.story-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; position: relative; z-index: 3; }
.story-topline .eyebrow { color: #a4b3be; font-size: 15px; letter-spacing: .23em; }
.story-topline h2 { margin-top: 13px; font-size: 29.0px; letter-spacing: -.045em; }
.story-topline p { color: #899eae; font-size: 15px; margin-top: 9px; }
.story-skip { display: flex; align-items: center; gap: 15px; padding-top: 5px; color: #a0b2bf; font-size: 15px; white-space: nowrap; }
.story-skip:hover { color: var(--story-accent); }
.story-skip > span { font-size: 23.0px; color: var(--story-accent); }
.story-model { position: relative; max-width: 850px; margin: 30px auto; }
.story-fallback-image { width: 100%; max-height: 360px; border-radius: 12px; }
.story-copy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.story-chapter { padding: 24px; border: 1px solid #344650; border-radius: 12px; background: #12212b; }
.story-chapter-code { display: block; color: var(--story-accent); font-size: 15px; letter-spacing: .12em; font-weight: 700; }
.story-chapter h3 { font-size: 28.0px; line-height: 1.09; letter-spacing: -.045em; margin-top: 17px; }
.story-chapter > p { color: #b0bec8; font-size: 15px; line-height: 1.75; margin-top: 19px; }
.story-metric { display: flex; flex-direction: column; border-left: 2px solid var(--story-accent); padding-left: 14px; margin-top: 25px; }
.story-metric strong { font-size: 19.0px; font-weight: 700; letter-spacing: -.03em; }
.story-metric > span { margin-top: 4px; color: #8296a5; font-size: 15px; }
.story-chapter > .btn { margin-top: 27px; padding: 11px 17px; min-height: 44px; font-size: 15px; gap: 15px; }
.story-chapter > .btn .icon { width: 18px; height: 18px; }

/* Enhancement is enabled only after the 3D scene has successfully rendered. */
.page-home:has(.scroll-story.is-enhanced) .site-header { position: sticky; top: 0; }
.scroll-story.is-enhanced { height: var(--story-height, 350svh); }
.is-enhanced .story-viewport {
  position: sticky;
  top: var(--story-header);
  height: calc(100svh - var(--story-header));
  min-height: 580px;
  max-height: 1100px;
  overflow: hidden;
  padding-block: 30px;
  background: radial-gradient(ellipse at 68% 40%, #2438447a, transparent 58%), linear-gradient(120deg, #0a151c, #111f28 70%, #101920);
}
.is-enhanced .story-grid-backdrop {
  display: block;
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#9db4c208 1px, transparent 1px), linear-gradient(90deg, #9db4c208 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 70% 50%, #000b, transparent 75%);
}
.is-enhanced .story-topline h2 { font-size: 23.0px; }
.is-enhanced .story-model { position: absolute; left: 25%; right: 0; top: 9%; bottom: 15%; max-width: none; margin: 0; z-index: 1; }
.story-model > canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.is-enhanced .story-fallback-image { display: none; }
.is-enhanced .story-copy { position: absolute; inset: 25% 0 auto; display: block; height: 350px; pointer-events: none; z-index: 3; }
.is-enhanced .story-chapter { position: absolute; max-width: 335px; padding: 0; border: 0; background: none; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity .4s ease, transform .4s ease, visibility .4s; pointer-events: none; }
.is-enhanced .story-chapter.is-active { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.is-enhanced .story-chapter h3 { font-size: clamp(32px, 3.1vw, 47px); max-width: 350px; }
.is-enhanced .story-chapter > p { font-size: 15px; max-width: 310px; }
.is-enhanced .story-chapter-code { font-size: 15px; letter-spacing: .17em; }
.story-active-stage, .story-bottom { display: none; }
.is-enhanced .story-bottom { display: block; position: absolute; left: 0; right: 0; bottom: 23px; z-index: 4; }
.story-steps { display: grid; grid-template-columns: repeat(var(--story-count, 5), minmax(0, 1fr)); gap: 22px; }
.story-step { text-align: left; padding: 10px 0; min-width: 0; }
.story-step-track { display: block; height: 2px; background: #3e536077; margin-bottom: 14px; overflow: hidden; }
.story-step-track > i { display: block; width: 100%; height: 100%; background: var(--story-accent); transform: scaleX(var(--step-progress, 0)); transform-origin: left; }
.story-step-label { display: flex; gap: 11px; font-size: 15px; color: #708896; line-height: 1.4; transition: color .2s; }
.story-step-label > span { font-size: 15px; color: #4b687b; margin-top: 1px; }
.story-step:hover .story-step-label, .story-step.is-active .story-step-label { color: #f1f5f7; }
.story-step.is-active .story-step-label > span, .story-step.is-done .story-step-label > span { color: var(--story-accent); }
.story-bottom-caption { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 19px; color: #617d90; font-size: 15px; text-transform: uppercase; letter-spacing: .13em; }
.story-bottom-caption > span:first-child { display: flex; gap: 10px; align-items: center; }
.story-counter { font-size: 15px; letter-spacing: .05em; }
.story-counter > strong { color: var(--story-accent); font-size: 15px; font-weight: 500; }
.story-scroll-mouse { width: 12px; height: 18px; border: 1px solid #5b7586; border-radius: 7px; position: relative; display: inline-block; }
.story-scroll-mouse::after { content: ''; position: absolute; width: 2px; height: 5px; background: var(--story-accent); left: 4px; top: 4px; border-radius: 1px; }
.is-enhanced .story-dimension { display: block; position: absolute; left: 0; top: 0; padding: 3px 7px; border-radius: 3px; color: #e2b38d; background: #0a1722c9; font-size: 15px; letter-spacing: .06em; border: 1px solid #cd956650; opacity: var(--dimension-opacity, 0); pointer-events: none; white-space: nowrap; }
@media (min-width: 1600px) {
  .is-enhanced .story-copy { top: 28%; }
  .is-enhanced .story-chapter { max-width: 365px; }
  .is-enhanced .story-chapter > p { max-width: 340px; font-size: 15px; }
  .story-metric { margin-top: 30px; }
  .story-metric strong { font-size: 23.0px; }
  .story-chapter > .btn { margin-top: 30px; font-size: 15px; }
}
@media (max-width: 1100px) {
  .is-enhanced .story-copy { top: 25%; }
  .is-enhanced .story-chapter { max-width: 285px; }
  .is-enhanced .story-chapter h3 { font-size: 36.0px; }
  .is-enhanced .story-chapter > p { max-width: 270px; font-size: 15px; }
  .story-step-label { font-size: 15px; gap: 7px; }
  .story-step-label > span { font-size: 15px; }
  .story-steps { gap: 15px; }
  .is-enhanced .story-topline h2 { font-size: 21.0px; }
}
@media (max-width: 780px) {
  .scroll-story { --story-header: 68px; margin-top: 30px; }
  .story-topline h2 { font-size: 26.0px; }
  .story-copy { grid-template-columns: 1fr 1fr; gap: 13px; }
  .story-chapter { padding: 22px; }
  .story-chapter h3 { font-size: 25.0px; }
  .story-topline .eyebrow { font-size: 15px; letter-spacing: .17em; }
  .story-topline p { font-size: 15px; max-width: 330px; }
  .is-enhanced .story-viewport { padding-block: 23px; min-height: 660px; }
  .is-enhanced .story-topline h2 { font-size: 20.0px; }
  .story-skip { font-size: 15px; gap: 8px; }
  .is-enhanced .story-model { top: 21%; bottom: 17%; left: 14%; }
  .is-enhanced .story-copy { top: 20%; height: 285px; }
  .is-enhanced .story-chapter { max-width: 235px; }
  .is-enhanced .story-chapter h3 { font-size: 31.0px; }
  .is-enhanced .story-chapter > p { font-size: 15px; max-width: 220px; line-height: 1.6; margin-top: 15px; }
  .is-enhanced .story-chapter-code { font-size: 15px; }
  .story-metric { margin-top: 19px; }
  .story-metric strong { font-size: 17.0px; }
  .story-metric > span { font-size: 15px; }
  .story-chapter > .btn { font-size: 15px; margin-top: 22px; min-height: 40px; }
  .story-steps { gap: 10px; }
  .story-step-label { display: block; font-size: 15px; }
  .story-step-label > span { display: block; margin: 0 0 4px; font-size: 15px; }
  .story-bottom-caption { font-size: 15px; letter-spacing: .07em; gap: 12px; }
  .story-bottom-caption > span:nth-child(2) { display: none; }
}
@media (max-width: 560px) {
  .scroll-story { --story-header: 65px; }
  .story-viewport { padding-block: 27px; }
  .story-topline { gap: 14px; }
  .story-topline h2 { font-size: 24.0px; }
  .story-topline p { font-size: 15px; }
  .story-copy { grid-template-columns: 1fr; }
  .story-topline .eyebrow { font-size: 15px; letter-spacing: .15em; gap: 8px; }
  .story-topline .eyebrow::before { width: 19px; height: 3px; }
  .story-skip { font-size: 15px; gap: 5px; }
  .story-skip > span { font-size: 18.0px; }
  .is-enhanced .story-viewport { min-height: 580px; height: calc(100svh - var(--story-header)); padding-top: 18px; }
  .is-enhanced .story-topline h2 { font-size: 17.0px; max-width: 230px; margin-top: 10px; }
  .is-enhanced .story-topline p { display: none; }
  .is-enhanced .story-copy { top: 107px; height: 155px; }
  .is-enhanced .story-chapter { max-width: calc(100vw - 40px); }
  .is-enhanced .story-chapter-code { font-size: 15px; letter-spacing: .12em; }
  .is-enhanced .story-chapter h3 { font-size: 31.0px; margin-top: 11px; max-width: 320px; }
  .is-enhanced .story-chapter > p { font-size: 15px; margin-top: 12px; max-width: 330px; line-height: 1.6; }
  .is-enhanced .story-metric { display: none; }
  .is-enhanced .story-chapter > .btn { display: none; }
  .is-enhanced .story-model { left: -12%; right: -12%; top: 32%; bottom: 18%; }
  .is-enhanced .story-bottom { bottom: 17px; }
  .story-steps { gap: 8px; }
  .story-step-track { margin-bottom: 10px; }
  .story-step-label { font-size: 15px; line-height: 1.4; }
  .story-step-label > span { font-size: 15px; margin-bottom: 4px; }
  .story-bottom-caption { margin-top: 10px; font-size: 15px; letter-spacing: .03em; }
  .story-counter { font-size: 15px; }
  .story-counter > strong { font-size: 15px; }
  .story-scroll-mouse { width: 10px; height: 15px; }
  .story-scroll-mouse::after { left: 3px; width: 2px; height: 4px; }
  .is-enhanced .story-dimension { font-size: 15px; padding: 2px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-chapter { transition: none; }
}

@media (max-width: 780px) {
  .is-enhanced .story-viewport {
    display: grid;
    grid-template-rows: auto auto minmax(110px, 1fr) auto;
    gap: 10px;
    min-height: 0;
    padding-block: 12px;
  }
  .is-enhanced .story-topline { grid-row: 1; }
  .is-enhanced .story-topline p { display: none; }
  .is-enhanced .story-copy {
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    inset: auto;
    height: auto;
    display: grid;
  }
  .is-enhanced .story-chapter {
    grid-area: 1 / 1;
    position: relative;
    max-width: none;
    transform: none;
  }
  .is-enhanced .story-chapter h3 { margin-top: 4px; font-size: clamp(23px, 5vw, 30px); }
  .is-enhanced .story-chapter > p { margin-top: 6px; max-width: none; line-height: 1.45; }
  .is-enhanced .story-chapter-code, .is-enhanced .story-metric, .is-enhanced .story-chapter > .btn { display: none; }
  .is-enhanced .story-model {
    grid-row: 3;
    position: relative;
    inset: auto;
    min-width: 0;
    min-height: 0;
  }
  .is-enhanced .story-bottom { grid-row: 4; position: relative; inset: auto; }
  .story-active-stage { display: block; font-size: 15px; color: #f1f5f7; }
  .story-steps { gap: 7px; }
  .story-step { min-height: 44px; padding: 4px 0; }
  .story-step-track { margin-bottom: 3px; }
  .story-step-label { font-size: 0; line-height: 1; }
  .story-step-label > span { margin: 0; font-size: 14px; }
  .story-bottom-caption { display: none; }
}
@media (max-width: 780px) and (max-height: 540px) {
  .is-enhanced .story-topline .eyebrow, .is-enhanced .story-chapter > p { display: none; }
  .is-enhanced .story-viewport { gap: 5px; padding-block: 7px; }
}
