.site-top { position: sticky; top: 0; z-index: 20; background: var(--paper); }
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 76px; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.hero { padding-top: clamp(3rem, 7vw, 7rem); padding-bottom: var(--section-space); }
.hero h1 { max-width: 20ch; }
.hero-bottom { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: 2.5rem; align-items: start; }
.hero-lead { grid-column: 1 / 8; max-width: 56ch; color: var(--muted); }
.hero-actions { grid-column: 9 / -1; display: flex; align-items: flex-start; flex-direction: column; }
.page-section { padding-block: var(--section-space); border-top: 1px solid var(--line); }
.section-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: clamp(2rem, 4vw, 4rem); align-items: start; }
.section-intro h2 { grid-column: 1 / 7; }
.section-intro p { grid-column: 8 / -1; max-width: 44ch; color: var(--muted); }
.works-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--mosaic-gap); width: 100%; }
/* Rows share the section edges; proportional columns share one image height. */
.works-row { display: grid; gap: var(--mosaic-gap); width: 100%; }
.work-card { min-width: 0; }
.service-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); border-top: 1px solid var(--line); padding-block: clamp(2rem, 4vw, 4rem); }
.service-number { grid-column: 1 / 2; padding-top: .5rem; }
.service-title { grid-column: 2 / 7; font-size: clamp(1.6rem, 2.2vw, 2.75rem); }
.service-detail { grid-column: 8 / -1; }
.capabilities { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); border-top: 1px solid var(--line); padding-top: 2rem; }
.capabilities h3 { grid-column: 1 / 7; }
.capabilities ul, .capabilities p { grid-column: 8 / -1; }
.process-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); list-style: none; }
.about-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem) var(--gap); align-items: start; }
.about-portrait { grid-column: 1 / 5; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.about-prose { grid-column: 6 / -1; min-width: 0; }
.about-detail { max-width: 48ch; margin-top: 2rem; }
.about-pillars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); list-style: none; }
.contact h2 { max-width: 17ch; font-size: clamp(2.25rem, 1rem + 3vw, 4rem); }
.contact .prose { margin-top: 2rem; }
.case-header { padding-top: clamp(2.5rem, 5vw, 5rem); padding-bottom: clamp(3rem, 6vw, 6rem); }
.case-header h1 { margin-top: 2rem; max-width: 20ch; }
.case-deck { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: 2rem; }
.case-tag { grid-column: 1 / 5; }
.case-summary { grid-column: 6 / -1; font-size: var(--text-lg); max-width: 55ch; }
.case-facts { display: grid; grid-template-columns: 1fr 2fr 2fr 2fr; gap: var(--gap); padding-block: 2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-facts.case-brief { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 0; }
.chapter { padding-top: var(--section-space); }
.chapter-copy { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 2.5rem; }
.chapter-heading { grid-column: 1 / 6; }
.chapter-prose { grid-column: 7 / -1; max-width: 65ch; }
.layout-text-only .chapter-copy { display: block; max-width: 65ch; margin-inline: auto; }
.layout-text-only .chapter-prose { margin-top: 1.75rem; }
.chapter-assets { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.layout-duo .chapter-assets, .layout-grid .chapter-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-grid .chapter-assets.assets-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-navigation { margin-top: var(--section-space); padding-block: 3rem; border-top: 1px solid var(--line); }
.case-neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 2rem; }
.site-footer { padding-block: 2rem; display: flex; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; gap: .5rem 1.5rem; }
  .site-nav { flex-basis: 100%; justify-content: flex-end; }
  .hero-lead { grid-column: 1 / 9; }
  .hero-actions { grid-column: 9 / -1; }
  .section-intro h2 { grid-column: 1 / 8; }
  .section-intro p { grid-column: 8 / -1; }
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-grid .chapter-assets.assets-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-header { min-height: 64px; flex-wrap: wrap; gap: 0; }
  .hero-bottom, .section-intro, .service-row, .capabilities, .case-deck, .chapter-copy { display: block; }
  .hero-actions { margin-top: 1.5rem; flex-direction: row; flex-wrap: wrap; gap: .5rem 1.5rem; }
  .section-intro p { margin-top: 1.25rem; }
  .service-number { display: block; margin-bottom: 1.5rem; }
  .service-detail, .capabilities ul, .case-summary, .chapter-prose { margin-top: 1.5rem; }
  .capabilities p { margin-top: 2rem; }
  .case-facts, .case-facts.case-brief { grid-template-columns: minmax(0, 1fr); }
  .fact { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; }
  .layout-duo .chapter-assets, .layout-grid .chapter-assets, .layout-grid .chapter-assets.assets-three { grid-template-columns: minmax(0, 1fr); }
  .chapter-heading h2 { max-width: 22ch; }
  .case-neighbors { grid-template-columns: minmax(0, 1fr); }
  .site-footer { flex-direction: column; }
}

/* Image scenes stay full width; real chapter artwork retains its own geometry. */
.slideshow { position: relative; height: calc(100vh - var(--top-height)); height: calc(100svh - var(--top-height)); min-height: 560px; isolation: isolate; overflow: hidden; background: var(--scene-dark); color: var(--scene-light); touch-action: pan-y pinch-zoom; }
.slideshow-stage, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; z-index: 0; pointer-events: none; }
.slide.is-active { opacity: 1; z-index: 1; pointer-events: auto; }
.scene-image { width: 100%; height: 100%; object-fit: cover; }
.slide > .scene-image, .case-header-scene > .scene-image { position: absolute; inset: 0; height: 100%; }
.scene-copy { --copy-bottom: 7.5rem; position: absolute; z-index: 1; bottom: var(--copy-bottom); left: var(--gutter); width: min(64rem, calc(100% - var(--gutter) * 2)); color: var(--scene-light); text-shadow: 0 1px 3px rgb(0 0 0 / .18); }
/* Protect the copy on the left; leave the scene untinted from 62% onward.
   The transparent upper edge follows the eyebrow as the copy height changes. */
.scene-copy::before { content: ''; position: absolute; z-index: -1; pointer-events: none; left: calc(-1 * var(--gutter)); bottom: calc(-1 * var(--copy-bottom)); width: 100vw; height: calc(100% + var(--copy-bottom) + 6rem); background: linear-gradient(to top, rgb(0 0 0 / .78), rgb(0 0 0 / .72) calc(100% - 6rem), transparent); -webkit-mask-image: linear-gradient(to right, #000 0%, #000 38%, transparent 62%); mask-image: linear-gradient(to right, #000 0%, #000 38%, transparent 62%); }
.scene-copy .eyebrow { color: inherit; margin-bottom: .8rem; letter-spacing: .035em; }
.scene-title { font-size: clamp(3.5rem, 8vw, 8rem); line-height: .98; }
.slide-summary { max-width: 52ch; margin-top: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.scene-copy .text-link { margin-top: .8rem; }
.scene-note { color: inherit; letter-spacing: .015em; text-transform: none; }
.slideshow-label { position: absolute; top: 1.5rem; left: var(--gutter); z-index: 2; display: flex; align-items: center; gap: .8rem; text-shadow: 0 1px 4px rgb(0 0 0 / .7); }
.slideshow-label::before { content: ''; width: 2rem; height: 1px; background: currentColor; }
.slideshow-footer { position: absolute; bottom: 1.5rem; left: var(--gutter); right: var(--gutter); z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.slideshow-footer .scene-note { max-width: 60ch; }
.slideshow-controls { display: flex; align-items: center; flex-shrink: 0; gap: .25rem; }
.slideshow-status { display: flex; flex-direction: column; gap: .65rem; width: clamp(5rem, 11vw, 10rem); padding-inline: .75rem; }
.slideshow-progress { display: flex; gap: 4px; }
.progress-track { flex: 1; height: 2px; background: rgb(255 250 242 / .35); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: var(--scene-light); transform-origin: left; }
.slideshow-button { border: 0; padding: .5rem .75rem; min-width: 44px; color: inherit; font: .75rem/1.4 var(--mono); }
.slideshow :focus-visible, .case-header-scene :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.hero { padding-block: var(--section-space); }
.hero h1 { max-width: 21ch; }
.section-intro h2 { max-width: 13ch; }
.case-header-scene { position: relative; isolation: isolate; overflow: hidden; width: calc(100% + var(--gutter) * 2); margin-inline: calc(-1 * var(--gutter)); height: 70vh; height: 70svh; min-height: 480px; padding: 0; color: var(--scene-light); background: var(--scene-dark); }
.case-header-scene .scene-copy { --copy-bottom: 5.5rem; }
.case-header-scene h1 { margin-top: 0; font-size: clamp(3.5rem, 8vw, 8rem); }
.case-header-scene .scene-note { position: absolute; z-index: 2; bottom: 1.5rem; left: var(--gutter); max-width: calc(100% - var(--gutter) * 2); }
.case-breadcrumbs { padding-block: 1rem; }
.scene-badge { display: inline-block; margin-right: .75rem; text-transform: uppercase; }
.case-header-scene + .case-deck { margin-block: clamp(3rem, 6vw, 6rem); }
.case-page { max-width: none; }
.case-page > :not(.case-header-scene) { max-width: calc(var(--page-max) - var(--gutter) * 2); margin-inline: auto; }
.about-lead { font: 400 clamp(1.35rem, 1.9vw, 2.1rem)/1.35 var(--serif); letter-spacing: -.02em; }
.process-step h3 { font-family: var(--serif); font-size: clamp(1.35rem, 1.7vw, 2rem); }
@media (min-width: 701px) {
  .scene-copy > * { max-width: 100%; }
  .scene-title, .case-header-scene h1 { overflow-wrap: normal; word-break: normal; }
  /* Keep small text within the opaque part of the copy scrim. */
  .scene-copy .eyebrow, .slide-summary { max-width: min(52ch, 34vw); }
  /* Only the bottom edge supports the controls and simulation note. */
  .slideshow::after, .case-header-scene::after { content: ''; position: absolute; z-index: 2; pointer-events: none; inset: auto 0 0; height: 72px; background: linear-gradient(to top, rgb(0 0 0 / .72), rgb(0 0 0 / .64) 48px, transparent); }
  .slideshow-footer, .case-header-scene .scene-note { text-shadow: 0 1px 3px rgb(0 0 0 / .65); }
  .case-header-scene .scene-note { z-index: 3; }
  .progress-track { box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
}
@media (prefers-reduced-motion: no-preference) {
  .slide { transition: opacity var(--dur-slide) var(--ease-in-out); }
}
.slideshow.is-instant .slide { transition: none; }
.slideshow.is-instant .text-enter { animation: none; }
@media (max-width: 900px) {
  .scene-note { font-size: .65rem; }
  .scene-copy { --copy-bottom: 9rem; }
  .slideshow-footer { flex-wrap: wrap; gap: .5rem; }
  .slideshow-status { width: 7rem; }
}
@media (max-width: 700px) {
  .works-row { display: flex; flex-direction: column; }
  .works-row .work-card { width: 100%; }
  .about-body { grid-template-columns: minmax(0, 1fr); }
  .about-portrait { grid-column: 1; max-width: 80%; }
  .about-prose, .about-pillars { grid-column: 1; }
  .about-pillars { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .slideshow { height: auto; min-height: 0; background: var(--paper); color: var(--ink); }
  .slideshow-stage { position: relative; }
  .slide { position: relative; display: none; opacity: 1; }
  .slide.is-active { display: block; }
  .slide > .scene-image, .case-header-scene > .scene-image { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: var(--scene-aspect) !important; object-fit: cover; object-position: var(--scene-position-mobile) !important; }
  .scene-copy, .case-header-scene .scene-copy { position: relative; bottom: auto; left: auto; width: auto; padding: 1.75rem var(--gutter) 0; color: var(--ink); text-shadow: none; }
  .scene-copy::before { display: none; }
  .scene-title, .case-header-scene h1 { font-size: clamp(2.6rem, 12vw, 4.75rem); }
  .scene-copy .eyebrow { color: var(--muted); font-size: .65rem; }
  .slide-summary { display: block; overflow: visible; font-size: 1rem; }
  .slideshow-label { position: relative; top: auto; left: auto; order: -1; padding: 1rem var(--gutter); font-size: .65rem; text-shadow: none; }
  .slideshow { display: flex; flex-direction: column; }
  .slideshow-footer { position: relative; inset: auto; padding: 1rem var(--gutter) 1.5rem; flex-direction: column; align-items: stretch; gap: 1rem; }
  .slideshow-footer .scene-note { order: 1; }
  .slideshow-controls { justify-content: space-between; border-block: 1px solid var(--line); padding-block: .25rem; }
  .slideshow-status { flex: 1; max-width: 12rem; }
  .progress-track { background: var(--line); }
  .progress-fill { background: var(--ink); }
  .case-header-scene { height: auto; min-height: 0; background: var(--paper); color: var(--ink); }
  .case-header-scene .scene-note { position: relative; bottom: auto; left: auto; max-width: none; padding: 1.25rem var(--gutter) 0; }
}
