/* Native scrolling drives a small number of transform/opacity layers. */
@view-transition { navigation: none; }
.immersive { padding-top: var(--bar-h); }
.motion-scene { position: relative; }
.motion-stage { position: relative; overflow: clip; min-height: calc(100svh - var(--bar-h)); }
.motion-intro { background: var(--paper); }
.motion-intro .motion-stage { padding: 28px var(--gutter); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; isolation: isolate; }
.motion-intro__top, .motion-intro__bottom { display: flex; justify-content: space-between; align-items: start; gap: 24px; position: relative; z-index: 2; }
.motion-intro__top .label { color: var(--muted); }
.motion-intro__top > *, .motion-intro__bottom > * { background: var(--paper); box-shadow: 0 0 0 8px var(--paper); }
.motion-intro h1 { position: relative; z-index: 2; color: var(--ink); font: 800 clamp(3.4rem,8.4vw,9.4rem)/.91 var(--sans); letter-spacing: -.06em; font-variation-settings: "wdth" 112; transform-origin: 0 30%; }
.motion-intro h1 > span { display: block; }
.motion-intro h1 > span:nth-child(2) { padding-left: 8vw; }
.motion-intro__last { display: flex !important; gap: 3vw; align-items: center; }
.motion-intro__last i { font-style: normal; color: var(--signal); font-weight: 400; }
.motion-intro__bottom { align-items: end; }
.motion-intro__bottom > div { display: grid; gap: 18px; justify-items: start; }
.motion-intro__bottom p { font-size: 1rem; }
.motion-scroll { display: flex; align-items: center; gap: 30px; min-height: 48px; text-decoration: none; font-size: .875rem; }
.motion-scroll > span:last-child { font-size: 2.5rem; }
.motion-fan { position: absolute; right: 9%; bottom: 11%; width: 28%; aspect-ratio: 1.425; z-index: 1; pointer-events: none; perspective: 1000px; }
.motion-fan__card { position: absolute; inset: 0; border: 5px solid var(--paper); box-shadow: 0 10px 28px #0003; transform: translate(calc((var(--card) - 1)*24%),calc((var(--card) - 1)*-8%)) rotate(calc((var(--card) - 1)*9deg)); }
.motion-fan__card img { width: 100%; height: 100%; object-fit: cover; }
.motion-fan__card:first-child { z-index: 3; }
.motion-fan__card:nth-child(2) { z-index: 2; }
.motion-chapter { --scene-color: #172f30; --signal: var(--on-dark); background: var(--scene-color); color: var(--on-dark); }
.motion-chapter--1 { --scene-color: #34302d; }
.motion-chapter--2 { --scene-color: #20373c; }
.motion-chapter .motion-stage { padding: 26px var(--gutter); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; isolation: isolate; }
.motion-chapter__eyebrow, .motion-chapter__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; z-index: 3; font-size: .8125rem; }
.motion-chapter .label { color: #eeeae1; }
.motion-chapter__footer a { display: inline-flex; align-items: center; min-height: 44px; gap: 20px; text-underline-offset: 4px; }
.motion-chapter__footer > *, .motion-chapter__eyebrow > * { background: #17181a; padding: 4px 10px; }
.motion-art { position: absolute; left: 36%; top: 14%; width: 68%; transform-origin: 50% 50%; z-index: 1; }
.motion-screen { display: block; position: relative; color: var(--ink); text-decoration: none; border: 7px solid #f1eee7; border-radius: 3px; box-shadow: 0 30px 80px #0005; transform: perspective(1400px) rotateY(-10deg) rotateZ(4deg); transform-origin: 50% 50%; }
.motion-screen img { width: 100%; aspect-ratio: 1.425; object-fit: cover; }
.motion-screen__label { display: flex; justify-content: space-between; background: var(--paper); padding: 12px 16px; font-weight: 650; min-height: 44px; }
.motion-caption { position: relative; z-index: 2; max-width: 31rem; display: grid; justify-items: start; gap: 18px; margin: 4vh 0; padding: 24px; background: #17181a; border-left: 2px solid var(--signal); }
/* Limit heading growth by viewport height as well as width so laptop scenes still fit. */
.motion-caption h2 { color: var(--on-dark); font: 750 clamp(2.3rem,min(4.2vw,calc(3rem + (100svh - 720px)*.1)),4.7rem)/.99 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.motion-caption > p:not(.label) { max-width: 30rem; font-size: 1rem; color: #d3cfc6; }
.motion-caption .btn { text-align: left; line-height: 1.3; max-width: 100%; }
/* Each project reads as one composition, with a solid reading area. */
.motion-chapter .motion-stage::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, var(--scene-color) 0, var(--scene-color) calc(var(--gutter) + 31rem), transparent calc(var(--gutter) + 42rem)); }
.motion-chapter .motion-caption { background: transparent; border-left-color: transparent; }
.motion-chapter .motion-caption .btn { background: var(--paper); color: var(--scene-color); }
.motion-chapter .motion-caption .btn:hover { background: var(--on-dark); }
.motion-chapter .motion-chapter__eyebrow > *, .motion-chapter .motion-chapter__footer > * { background: var(--scene-color); }
.motion-deep { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; text-underline-offset: 4px; }
.motion-number { position: absolute; z-index: 0; right: 2%; bottom: -5%; font: 800 40vw/.75 var(--sans); letter-spacing: -.1em; opacity: .09; pointer-events: none; }
.motion-meter { position: absolute; z-index: 3; bottom: 0; left: 0; right: 0; height: 3px; background: #ffffff24; }
.motion-meter span { display: block; height: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; }
.motion-bridge { padding: clamp(56px,7vw,100px) var(--gutter) clamp(32px,4vw,56px); overflow: clip; background: var(--paper-2); display: grid; gap: 30px; }
.motion-bridge h2 { font: 760 clamp(2.7rem,9vw,10rem)/1.02 var(--sans); color: var(--ink); letter-spacing: -.055em; }
.motion-bridge h2 span { display: block; }
.motion-bridge h2 span:last-child { text-align: right; color: var(--muted); font-family: var(--serif); font-style: italic; font-weight: 450; }
.motion-bridge a { justify-self: start; }
.page-home:has(.immersive) #work { padding-top: clamp(40px,4vw,56px); }
.motion-active .motion-scene.is-motion { height: 170svh; }
.motion-active .motion-intro.is-motion { height: 150svh; }
.motion-active .is-motion .motion-stage { position: sticky; top: var(--bar-h); height: calc(100svh - var(--bar-h)); min-height: 0; }
.motion-active .is-motion h1, .motion-active .is-motion .motion-fan, .motion-active .is-motion .motion-art { will-change: transform; }
.page-home:has(.immersive) .dock { display: none; }
.page-home:has(.immersive) #services { background: #dad3c4; }
.page-home:has(.immersive) #about { background: #f1eee7; }
.page-home:has(.immersive) .page-summary { min-height: 72svh; align-items: center; overflow: clip; }
.page-home:has(.immersive) .page-summary h2 { font-size: clamp(2.8rem,6vw,6rem); }
@media (min-width: 701px) and (max-height: 720px) {
  .motion-intro h1 { font-size: min(8.4vw,15vh); }
  .motion-caption { margin: 4vh 0; gap: 12px; max-width: 28rem; }
  .motion-caption h2 { font-size: 3rem; }
}
@media (max-width: 700px) {
  .motion-intro .motion-stage { padding: 22px var(--gutter) 26px; gap: 24px; }
  .motion-intro__top > span { display: none; }
  .motion-intro h1 { font-size: clamp(2.9rem,11.5vw,5rem); line-height: 1; }
  .motion-intro h1 > span:nth-child(2) { padding-left: 3vw; }
  .motion-intro__last i { display: none; }
  .motion-intro__bottom { align-items: start; flex-direction: column; gap: 14px; }
  .motion-intro__bottom p { font-size: .9375rem; }
  .motion-intro__bottom .btn { font-size: .875rem; }
  .motion-scroll { gap: 24px; }
  .motion-scroll > span:last-child { font-size: 1.8rem; }
  .motion-intro__top { order: 0; }
  .motion-intro h1 { order: 1; margin-bottom: 0; }
  .motion-fan { position: relative; right: auto; bottom: auto; width: 42%; margin: 0 18% 0 auto; flex-shrink: 0; order: 2; }
  .motion-intro__bottom { order: 3; }
  .motion-chapter .motion-stage { padding: 18px var(--gutter) 10px; gap: 18px; }
  .motion-chapter__eyebrow { align-items: start; font-size: .75rem; gap: 12px; }
  .motion-chapter__eyebrow > span:last-child { text-align: right; max-width: 9rem; }
  .motion-art { position: relative; width: 100%; left: auto; top: auto; margin: 12px 0 0; }
  .motion-screen { border-width: 4px; transform: rotate(3deg); }
  .motion-screen img { aspect-ratio: 1.7; object-position: top; }
  .motion-screen__label { font-size: .8125rem; padding: 9px 10px; }
  .motion-caption { max-width: none; margin: 0; padding: 16px; gap: 12px; }
  .motion-caption h2 { font-size: clamp(2rem,8vw,3rem); }
  .motion-caption > p:not(.label) { font-size: .875rem; }
  .motion-caption .btn { font-size: .875rem; }
  .motion-caption .label { font-size: .75rem; }
  .motion-chapter .motion-stage::before { display: none; }
  .motion-chapter__footer { font-size: .75rem; gap: 8px; }
  .motion-chapter__footer a { font-size: .8125rem; flex-shrink: 0; }
  .motion-active .motion-scene.is-motion { height: 145svh; }
  .motion-active .motion-intro.is-motion { height: 130svh; }
  .motion-active .motion-chapter .motion-stage { justify-content: start; }
  .motion-active .motion-chapter__footer { margin-top: auto; }
  .motion-active .motion-intro h1 { margin-bottom: 0; }
  /* Phones: a compact sticky scene so the whole project fits the visible height and can move as on desktop. */
  .motion-active .motion-chapter.is-motion .motion-stage { padding: 12px var(--gutter) 10px; gap: 10px; }
  .motion-active .motion-chapter.is-motion .motion-art { margin: 2px 0 0; }
  .motion-active .motion-chapter.is-motion .motion-screen img { aspect-ratio: 2.05; }
  .motion-active .motion-chapter.is-motion .motion-screen__label { padding: 6px 10px; min-height: 34px; }
  .motion-active .motion-chapter.is-motion .motion-caption { padding: 2px 0 0; gap: 8px; }
  .motion-active .motion-chapter.is-motion .motion-caption h2 { font-size: clamp(1.75rem,7.2vw,2.6rem); }
  .motion-active .motion-chapter.is-motion .motion-caption .btn { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
}
@media (max-width: 700px) and (max-height: 760px) {
  /* Shorter phones (browser bars visible): a wider crop of the same screen keeps the scene inside the view. */
  .motion-active .motion-chapter.is-motion .motion-screen img { aspect-ratio: 2.6; }
  .motion-active .motion-chapter.is-motion .motion-caption > p:not(.label) { font-size: .8125rem; }
}
/* All content stays in normal flow when motion cannot comfortably fit. */
.motion-intro:not(.is-motion) .motion-fan { display: none; }
.immersive:not(.motion-active) .motion-intro h1 { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) {
  .immersive *, .motion-reveal { animation: none !important; transition: none !important; transform: none !important; }
}
