/* SCENE 05 — HOW WE WORK. Base layout is the stacked vertical route
   (mobile at any width, and the body.is-static fallback everywhere):
   a vertical survey line links the stations down the left edge. The
   pinned horizontal track applies at 900px+ in motion mode only, so
   reduced-motion viewers always get the fully readable stack. */

.s05 {
  --s05-line-y: clamp(150px, 24vh, 210px);
  position: relative;
  overflow: clip;
}

.s05-pin {
  padding-block: clamp(110px, 16vh, 160px) clamp(90px, 13vh, 130px);
}

.s05-head { margin-bottom: clamp(72px, 10vh, 112px); }
.s05-h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  max-width: 22ch;
}

/* stage padding mirrors the container's left edge (grid law) so the
   track departs from the same grid line as the head above it */
.s05-stage {
  padding-inline: max(var(--pad), calc((100% - var(--container)) / 2 + var(--pad)));
}

.s05-track {
  position: relative;
  padding-left: 44px;
}

/* the survey line linking stations: hairline route, gold drawn fill.
   transform-origin left top serves both axes (scaleX on the pinned
   horizontal track, scaleY on the stacked vertical route). */
.s05-connector {
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--hair);
}
.s05-connector-fill {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--gold);
  transform-origin: left top;
}

.s05-stations {
  display: flex;
  flex-direction: column;
  gap: clamp(64px, 9vh, 88px);
}

.s05-station { position: relative; }

/* oversized stroke-only index numeral — the slower parallax layer */
.s05-num {
  display: block;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 340;
  font-size: clamp(2.8rem, 10vw, 3.9rem);
  line-height: .9;
  letter-spacing: .02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(189, 154, 95, .48);
  margin-bottom: 18px;
  will-change: transform;
  pointer-events: none;
}

/* crosshair node where the station meets the survey line */
.s05-node {
  position: absolute;
  left: -36px;
  top: 10px;
  width: 0;
  height: 0;
}
.s05-node::before,
.s05-node::after {
  content: "";
  position: absolute;
  background: var(--gold);
  opacity: .75;
}
.s05-node::before { width: 13px; height: 1px; left: -6px; top: 0; }
.s05-node::after { width: 1px; height: 13px; left: 0; top: -6px; }

.s05-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 340;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -.005em;
  text-wrap: balance;
  max-width: 18ch;
}

.s05-copy {
  margin-top: 14px;
  font-weight: 300;
  font-size: .95rem;
  line-height: 1.65;
  max-width: 52ch;
  color: color-mix(in srgb, var(--bone) 72%, transparent);
}

/* compliance footnote — visible, small, at the end of the route */
.s05-footnote {
  margin-top: clamp(72px, 10vh, 96px);
  max-width: 46ch;
  font-size: .74rem;
  font-weight: 300;
  letter-spacing: .05em;
  line-height: 1.7;
  color: color-mix(in srgb, var(--bone) 62%, transparent);
}

/* ---------- the pinned horizontal track (motion mode, 900px+) ---------- */

@media (min-width: 900px) {
  body:not(.is-static) .s05-pin {
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    padding-block: 0;
    padding-top: clamp(96px, 14vh, 150px);
  }
  body:not(.is-static) .s05-head { margin-bottom: 0; }

  body:not(.is-static) .s05-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-inline: 0;
  }

  body:not(.is-static) .s05-track {
    display: flex;
    align-items: flex-start;
    padding-left: max(var(--pad), calc((100% - var(--container)) / 2 + var(--pad)));
    padding-right: max(var(--pad), calc((100% - var(--container)) / 2 + var(--pad)));
    will-change: transform;
  }

  body:not(.is-static) .s05-connector {
    left: 0;
    right: 0;
    width: auto;
    top: var(--s05-line-y);
    bottom: auto;
    height: 1px;
  }

  body:not(.is-static) .s05-stations {
    flex-direction: row;
    gap: 0;
  }

  body:not(.is-static) .s05-station {
    flex: none;
    width: clamp(330px, 30vw, 430px);
    margin-right: clamp(90px, 10vw, 170px);
    padding-top: calc(var(--s05-line-y) + 56px);
  }

  body:not(.is-static) .s05-num {
    position: absolute;
    left: -6px;
    top: 0;
    height: calc(var(--s05-line-y) - 24px);
    display: flex;
    align-items: flex-end;
    margin-bottom: 0;
    font-size: clamp(6.2rem, 9vw, 9rem);
    -webkit-text-stroke-color: rgba(189, 154, 95, .38);
  }

  body:not(.is-static) .s05-node {
    left: 0;
    top: var(--s05-line-y);
  }

  body:not(.is-static) .s05-footnote {
    flex: none;
    width: 300px;
    margin-top: 0;
    padding-top: calc(var(--s05-line-y) + 56px);
  }
}
