:root {
  --terracotta: #a83f15;
  --ink: #111111;
  --body: #1a1a1a;
  --secondary: #707070;
  --small-text: #777777;
  --white: #ffffff;
  --page-width: 1024px;
  --side-space: clamp(24px, 7vw, 96px);
  --section-gap: clamp(28px, 2.8vw, 40px);
  --media-gap: clamp(12px, 1.4vw, 20px);
  --composition-width: min(66%, 940px);
  --composition-half: min(33%, 470px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--white);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Heebo", Arial, sans-serif;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
figure {
  margin: 0;
}

.page-width {
  width: var(--composition-width);
  margin-inline: auto;
}

.flow-labeled {
  position: relative;
}

.flow-label {
  position: absolute;
  top: 50%;
  right: calc(100% + clamp(18px, 2.1vw, 34px));
  width: clamp(92px, 9vw, 138px);
  color: var(--ink);
  font-size: clamp(9px, 0.66vw, 11px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: normal;
  opacity: 0;
  transform: translate(-10px, -50%);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.flow-labeled.is-in-view .flow-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.opening {
  min-height: calc(100svh - var(--section-gap));
}

.hero {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  height: auto;
  overflow: hidden;
  background: var(--white);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: calc(50% - var(--composition-half) + 1px);
  background: var(--terracotta);
}

.hero::before {
  left: 0;
}

.hero::after {
  right: 0;
}

.hero img {
  position: relative;
  z-index: 1;
  width: var(--composition-width);
  height: auto;
  object-fit: contain;
  object-position: center;
}

.intro {
  padding-top: 16px;
}

h1 {
  font-size: clamp(38px, 3.6vw, 52px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.project-information {
  margin-top: 24px;
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
}

.project-information p + p {
  margin-top: 8px;
}

.project-description {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--media-gap);
  margin-top: var(--section-gap);
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 300;
  line-height: 1.55;
  color: var(--secondary);
}

figcaption {
  margin-top: 7px;
  font-size: clamp(11px, 0.8vw, 13px);
  font-weight: 300;
  line-height: 1.4;
  color: var(--secondary);
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--media-gap);
  align-items: start;
  margin-top: var(--section-gap);
}

.location-grid .wide-media {
  aspect-ratio: 2.55 / 1;
  overflow: hidden;
}

.location-grid .wide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.wide-media {
  display: flex;
  align-items: start;
}

.wide-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.plans-composite-section {
  margin-top: var(--section-gap);
}

.plans-highres-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--media-gap);
  aspect-ratio: 724 / 505;
  align-items: stretch;
}

.plan-source {
  min-width: 0;
  height: 100%;
}

.plan-source-existing {
  grid-column: 1;
  overflow: hidden;
}

.plan-source-existing,
.plan-source-proposal {
  position: relative;
  z-index: 1;
  background: #f4f3f2;
  border: 1px solid rgba(92, 92, 88, 0.18);
  box-shadow: 0 8px 22px rgba(35, 35, 35, 0.09);
}

.plan-source-proposal {
  grid-column: 2;
  overflow: hidden;
}

.plan-source-existing img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  max-width: none;
  height: 78%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.plan-source-proposal img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  max-width: none;
  height: 78%;
  object-fit: contain;
  clip-path: inset(3px 0 0 0);
  transform: translate(-65.6%, -50%);
}

.section-cut-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  color: #999b9c;
}

.cut-arrow {
  position: absolute;
  display: block;
  width: 3.6%;
  aspect-ratio: 1;
  background: currentColor;
  opacity: 0.9;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.cut-arrow-vertical-top {
  left: 42%;
  top: 7%;
  transform: rotate(180deg);
}

.cut-arrow-vertical-bottom {
  left: 42%;
  top: auto;
  bottom: 7%;
  transform: rotate(180deg);
}

.cut-arrow-horizontal-left,
.cut-arrow-horizontal-right {
  top: 50.2%;
  transform: rotate(-90deg);
}

.cut-arrow-horizontal-left {
  left: 7%;
}

.cut-arrow-horizontal-right {
  right: 7%;
  left: auto;
}

.cut-label {
  position: absolute;
  display: block;
  font-size: clamp(8px, 0.95vw, 14px);
  font-weight: 500;
  line-height: 1;
  color: currentColor;
}

.cut-label-a-left,
.cut-label-a-right {
  top: 55.1%;
  transform: translateX(-50%);
}

.cut-label-a-left {
  left: 10%;
}

.cut-label-a-right {
  right: 10%;
  left: auto;
  transform: translateX(50%);
}

.cut-label-b-top,
.cut-label-b-bottom {
  left: 46%;
  transform: rotate(90deg);
  transform-origin: center;
}

.cut-label-b-top {
  top: 7%;
}

.cut-label-b-bottom {
  top: auto;
  bottom: 7%;
}

.plans-composite-captions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--media-gap);
  margin-top: 16px;
  font-size: clamp(11px, 0.8vw, 13px);
  font-weight: 300;
  line-height: 1.4;
  color: var(--secondary);
}

.plans-composite-captions span:nth-child(1) {
  grid-column: 1;
}

.plans-composite-captions span:nth-child(2) {
  grid-column: 2;
}

.partitions-grid {
  width: var(--composition-width);
  margin-top: var(--section-gap);
  padding-bottom: 0;
}

.partitions-visual {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  column-gap: var(--media-gap);
  align-items: stretch;
}

.partitions-left-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
}

.partition-diagrams-group {
  grid-column: 1;
  position: relative;
  min-height: 0;
  aspect-ratio: auto;
}

.partition-combined-diagram {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.partition-top-diagrams {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--media-gap);
  width: 100%;
  height: 100%;
  align-items: stretch;
}

.partition-hierarchy-diagram {
  min-width: 0;
  min-height: 0;
}

.partition-hierarchy-diagram img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.partition-diagrams-group figcaption {
  position: absolute;
  top: 100%;
  left: 0;
  font-family: "Heebo", sans-serif;
}

.partition-context-render-group {
  grid-column: 2;
}

.partition-render-group {
  grid-column: 3;
}

.partitions-copy {
  width: 100%;
  margin: 0;
  color: var(--secondary);
  font-size: clamp(9px, 0.72vw, 11px);
  font-weight: 300;
  line-height: 1.5;
}

.partition-slice {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.partition-diagrams-slice {
  height: 100%;
}

.partition-diagrams-slice::before,
.partition-diagrams-slice::after {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 1;
  display: block;
  content: "";
  background: var(--white);
}

.partition-diagrams-slice::before {
  top: 0;
  height: 10.5%;
}

.partition-diagrams-slice::after {
  bottom: 0;
  height: 6%;
}

.partition-diagrams-slice img {
  position: absolute;
  top: -10%;
  left: -75.7%;
  width: auto;
  max-width: none;
  height: 132.4%;
}

.partition-diagram-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  font-family: "Heebo", sans-serif;
  font-weight: 300;
  color: var(--secondary);
  pointer-events: none;
}

.partition-diagram-title,
.partition-diagram-state {
  position: absolute;
  display: block;
  white-space: nowrap;
  transform: translateX(-50%);
}

.partition-diagram-title {
  top: 1.5%;
  font-size: clamp(10px, 0.85vw, 14px);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.partition-diagram-title-private {
  left: 23.4%;
}

.partition-diagram-title-public {
  left: 78.6%;
}

.partition-diagram-state {
  bottom: 1.3%;
  font-size: clamp(8px, 0.64vw, 11px);
  line-height: 1;
}

.partition-diagram-state-private-close {
  left: 7.9%;
}

.partition-diagram-state-private-open {
  left: 35%;
}

.partition-diagram-state-public-close {
  left: 60.1%;
}

.partition-diagram-state-public-open {
  left: 88.3%;
}

.partition-context-render-group,
.partition-render-group {
  overflow: hidden;
  aspect-ratio: 0.76 / 1;
}

.partition-context-render-group > img,
.partition-render-group > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.partition-context-render-group > img {
  object-position: 30% center;
}

.uncaptioned {
  align-self: end;
}

.sections {
  margin-top: var(--section-gap);
}

.sections img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.section-crop {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--white);
}

.section-a-crop {
  aspect-ratio: 1800 / 585;
}

.section-b-crop {
  aspect-ratio: 2020 / 590;
}

.section-crop > img {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.section-a-crop > img {
  left: 0;
}

.section-b-crop > img {
  left: 0;
}

.section-pair {
  display: grid;
  grid-template-columns: minmax(0, 3.25fr) minmax(0, 1fr);
  gap: var(--media-gap);
  align-items: start;
  margin-top: 0;
}

.section-hierarchy-figure {
  align-self: stretch;
  min-width: 0;
}

.section-hierarchy-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.section-b-full {
  margin-top: var(--media-gap);
}

.design-grid {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: var(--media-gap);
  align-items: start;
  margin-top: var(--section-gap);
}

.furniture-viewport {
  width: 100%;
  height: clamp(230px, 20.4vw, 292px);
  overflow: hidden;
  background: var(--white);
}

.furniture-track {
  display: flex;
  width: max(520%, 2280px);
  height: 100%;
  animation: furniture-film 24s linear infinite;
  will-change: transform;
}

.furniture-track img {
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  object-fit: contain;
}

.furniture-figure figcaption {
  text-align: left;
}

.furniture-render img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.furniture-render {
  align-self: start;
  aspect-ratio: 1.8 / 1;
  overflow: hidden;
}

@keyframes furniture-film {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.carousel {
  margin-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.sections > .flow-label {
  top: 50%;
}

.furniture-run {
  margin-top: var(--section-gap);
  padding-bottom: 0;
}

.furniture-run__viewport {
  width: 100%;
  height: auto;
  overflow: visible;
}

.furniture-run__track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--media-gap);
  width: 100%;
  align-items: end;
}

.furniture-run__track img {
  width: 100%;
  height: auto;
  max-height: clamp(90px, 10vw, 150px);
  object-fit: contain;
}

.furniture-run__track img:nth-child(n + 6) {
  display: none;
}

.carousel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--white);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 420ms ease;
  pointer-events: none;
}

.carousel-slide.is-active {
  z-index: 1;
  opacity: 1;
}

.carousel-control {
  position: absolute;
  z-index: 2;
  top: 50%;
  bottom: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  color: #ffffff;
  font: 400 20px / 1 "Heebo", Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 180ms ease;
}

.carousel-stage:hover .carousel-control,
.carousel-control:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.carousel-control:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: 2px;
}

.previous {
  left: clamp(10px, 1.2vw, 18px);
  text-align: center;
}

.next {
  right: clamp(10px, 1.2vw, 18px);
  text-align: center;
}

.carousel-indicators {
  position: absolute;
  bottom: clamp(10px, 1.4vw, 18px);
  left: 50%;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 180ms ease;
}

.carousel-stage:hover .carousel-indicators,
.carousel:focus-within .carousel-indicators {
  opacity: 1;
  pointer-events: auto;
}

.carousel-indicator {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.carousel-indicator.is-active {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.72);
  transform: scale(1.12);
}

.carousel-indicator:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .flow-labeled {
    padding-top: 24px;
  }

  .flow-label {
    top: 0;
    right: auto;
    left: 0;
    width: auto;
    font-size: 9px;
    transform: none;
  }
  :root {
    --side-space: 24px;
    --section-gap: clamp(32px, 6vw, 38px);
    --media-gap: 10px;
    --composition-width: 86%;
    --composition-half: 43%;
  }

  .hero {
    height: auto;
  }

  h1 {
    margin-top: 0;
  }

  .project-description {
    grid-template-columns: 1fr;
    gap: var(--section-gap);
  }

  .location-grid,
  .design-grid {
    grid-template-columns: 1fr;
  }

  .location-grid,
  .design-grid,
  .section-pair {
    gap: var(--media-gap);
  }

  .partitions-grid {
    width: 94%;
  }

  .partitions-visual {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-pair {
    grid-template-columns: 1fr;
  }

  .partition-diagrams-group,
  .partition-context-render-group,
  .partition-render-group,
  .partitions-copy {
    grid-column: 1;
  }

  .partition-diagrams-group {
    min-height: 0;
  }

  .partition-context-render-group,
  .partition-render-group {
    aspect-ratio: 0.69 / 1;
  }

  .wide-media {
    min-height: 0;
  }

  .plans-composite-captions {
    margin-top: 10px;
    font-size: clamp(8px, 2.4vw, 11px);
  }

  .furniture-viewport {
    height: clamp(208px, 64vw, 280px);
  }

  .furniture-track {
    width: 714%;
  }

  .furniture-render {
    aspect-ratio: 4 / 3;
  }

  .carousel-control {
    width: 24px;
    height: 40px;
    font-size: 18px;
    opacity: 1;
  }

  .carousel-indicators {
    bottom: 10px;
    gap: 6px;
  }

  .carousel-indicator {
    width: 8px;
    height: 8px;
  }
}

@media (hover: none) {
  .carousel-control,
  .carousel-indicators {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .furniture-run__track {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }

  .furniture-track {
    animation-play-state: paused;
  }

  .carousel-slide,
  .carousel-control,
  .carousel-indicator {
    transition: none;
  }
}
