/* Every motion follows the user's scroll; the document keeps native scrolling. */
.hero-sequence { position: relative; }
.hero-story,.hero-curtain { display: none; }
.motion-enabled .header::after {
  content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 1px;
  background: var(--gold2); transform: scaleX(var(--page-progress, 0)); transform-origin: left;
}
.motion-enabled .hero-portrait {
  transform-origin: 72% 38%;
}
.motion-pinned .hero-sequence { height: 180svh; }
.motion-pinned .hero {
  position: sticky; top: 0; height: 100svh; min-height: 0;
}
.motion-pinned .hero-layout { display: flex; align-items: center; padding-top: clamp(96px,13svh,125px); padding-bottom: 48px; }
.motion-pinned .hero-baseline { flex-shrink: 0; }
.motion-pinned .hero-copy {
  opacity: 1;
}
.motion-pinned .hero-copy:focus-within { opacity: 1; transform: none; }
.motion-pinned .hero-copy[inert] { pointer-events: none; }
.motion-pinned .hero-story {
  display: block; position: absolute; top: 33%; left: 0; pointer-events: none;
  opacity: 0;
}
.motion-pinned .hero-story>p { color: var(--gold2); font-size: 11px; margin-bottom: 23px; letter-spacing: .08em; }
.motion-pinned .hero-story h2 { font-size: clamp(68px,6.6vw,99px); line-height: 1; letter-spacing: -.035em; }
.motion-pinned .hero-story>span { display: block; margin-top: 29px; font-size: 12px; color: #bfc3bc; }
.motion-pinned .hero-copy:focus-within~.hero-story { opacity: 0; }
.motion-pinned .hero-curtain {
  display: block; position: absolute; inset: 0; background: var(--ink); z-index: -1;
  opacity: 0; pointer-events: none;
}
.motion-pinned .hero-baseline::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: var(--gold2); transform-origin: left; transform: scaleX(var(--scene-progress, 0));
}
.motion-enabled [data-ink] {
  color: transparent;
  background: linear-gradient(90deg,var(--white) var(--ink-fill,100%),#737d78 var(--ink-fill,100%));
  background-clip: text; -webkit-background-clip: text;
}
.process-steps { position: relative; }
.motion-enabled .process-steps::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--gold2); transform: scaleX(var(--path-progress,0)); transform-origin: left;
}
.motion-enabled .process-steps li h3 {
  opacity: calc(.55 + var(--step-progress,1) * .45);
}
.motion-enabled .process-steps li .step-count { opacity: calc(.4 + var(--step-progress,1) * .6); }
.region-map .map-river { stroke-dasharray: 1; stroke-dashoffset: 0; }
.motion-enabled .region-map .map-river { stroke-dashoffset: calc(1 - var(--map-progress,1)); }
@media(max-width:900px) {
  .motion-enabled .hero-portrait { transform-origin: 72% 0%; }
}
@media(max-width:650px) {
  .motion-pinned .hero-layout {
    display: block; padding-top: clamp(250px,40svh,360px); padding-bottom: 36px;
  }
  .motion-pinned .hero-story { top: clamp(250px,40svh,360px); right: 0; }
  .motion-pinned .hero-story h2 { font-size: clamp(42px,11vw,64px); }

  .motion-enabled .process-steps::before {
    top: 0; bottom: 0; right: auto; width: 1px; height: auto;
    transform: scaleY(var(--path-progress,0)); transform-origin: top;
  }
  .motion-enabled .process-steps li { padding-left: 12px; }
}
@media(max-width:650px) and (max-height:620px) {
  .motion-pinned .hero-layout { padding-top: 240px; padding-bottom: 20px; }
  .motion-pinned .hero-story { top: 240px; }
}
@media(prefers-reduced-motion:reduce) {
  .motion-pinned .hero-sequence { height: auto; }
  .motion-pinned .hero { position: relative; height: auto; }
  .motion-enabled .hero-portrait,.motion-enabled [data-motion-image]>img,.motion-pinned .hero-copy { transform: none; }
  .motion-pinned .hero-copy { opacity: 1; }
  .motion-pinned .hero-story,.motion-pinned .hero-curtain { display: none; }
  .motion-enabled [data-ink] { color: var(--white); background: none; }
  .motion-enabled .region-map .map-river { stroke-dashoffset: 0; }
}
@media(forced-colors:active) {
  .motion-enabled [data-ink] { color: CanvasText; background: none; }
}

/* The second portrait continues the camera movement, while the copy stays readable. */
[data-depth-line] { display: inline-block; }
.motion-enabled .philosophy-art>img { transform-origin: 70% 38%; }
.principles article { position: relative; }
.motion-enabled .principles article::before {
  content: ''; position: absolute; inset: -1px 0 auto; height: 1px;
  background: var(--gold2); transform-origin: left;
  transform: scaleX(var(--principle-progress,0));
}

.region-map .map-route { stroke-dasharray: 1; stroke-dashoffset: 0; }
.motion-enabled .region-map .map-route { stroke-dashoffset: calc(1 - var(--map-progress,1)); }
@media(prefers-reduced-motion:reduce) { .motion-enabled .region-map .map-route { stroke-dashoffset: 0; } }

/* Scroll-driven entrances share the controller's spring, not timed transitions. */
.motion-enabled .service-category,
.motion-enabled .section-heading,
.motion-enabled .region-copy,
.motion-enabled .contact-heading,
.motion-enabled .contact-invitation { transition: none; }
.motion-enabled .region-map .map-label-line {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--map-progress,1));
}
@media(prefers-reduced-motion:reduce) {
  .motion-enabled .region-map .map-label-line { stroke-dashoffset: 0; }
}
