/* ================================================================
   DESIGN MODULES — V7 · THE BUILDING (home experience)
   You enter on the roof and descend to the foundation.
   ================================================================ */

/* ---------- the lift rail: fixed level indicator + altitude ---------- */

.lift {
  position: fixed;
  right: clamp(0.9rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 96;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.lift a {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--paper);
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}

.lift a:hover { transform: translateX(-3px); }

.lift a.on { background: var(--ink); color: var(--paper); }

.lift__alt {
  margin-top: 0.6rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  writing-mode: vertical-rl;
}

@media (max-width: 900px) { .lift { display: none; } }

/* ---------- slab lines: each level begins with a floor plate ---------- */

.slab {
  display: flex;
  align-items: baseline;
  gap: 1.6rem;
  padding: 1.1rem 0 0;
  border-top: 3px solid var(--ink);
  flex-wrap: wrap;
}

.slab b {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slab span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
}

.slab em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--stone);
  font-variant-numeric: tabular-nums;
}

/* ---------- ROOF · split hero: type block + photo shaft ---------- */

.roof {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: end;
}

.roof__type {
  padding: clamp(9rem, 16vh, 12rem) 0 clamp(3.5rem, 7vh, 5.5rem) var(--pad);
}

.roof__tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--stone);
}

.roof h1 {
  margin-top: 1.6rem;
  font-size: clamp(3rem, 7.2vw, 7.4rem);
  line-height: 0.94;
  /* sitewide h1s are monumental caps; the hero breaks that on purpose —
     natural sentence case, with TIMELESS/SUSTAINABLE typed in full caps
     in the markup to read like a construction-document callout */
  text-transform: none;
}

.roof h1 .line { display: block; overflow: hidden; }

/* emphasized single words run tight against the column width at this
   scale — give them headroom rather than let them ride the edge */
.roof h1 em { font-size: 0.82em; }

html.js .roof h1 .line > span { display: inline-block; transform: translateY(112%); }

body.loaded .roof h1 .line > span { animation: roofRise 1.2s var(--ease) forwards; }
body.loaded .roof h1 .line:nth-child(2) > span { animation-delay: 0.1s; }
body.loaded .roof h1 .line:nth-child(3) > span { animation-delay: 0.2s; }
body.loaded .roof h1 .line:nth-child(4) > span { animation-delay: 0.3s; }

@keyframes roofRise { to { transform: translateY(0); } }

.roof .dimline { margin-top: 2.2rem; max-width: 34rem; }

.roof .lede { margin-top: 2rem; max-width: 30rem; }

/* years-of-experience emphasis: a big drafting numeral + spec label */
.roof__stat {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: clamp(2rem, 4vh, 3rem);
}

.roof__stat b {
  font-size: clamp(3.4rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.roof__stat span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--stone);
  padding-left: 1.4rem;
  border-left: 2px solid var(--ink);
}

.roof__shaft {
  position: relative;
  height: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: #141310;
  opacity: 0;
  transition: opacity 1.2s ease 0.45s;
}

body.loaded .roof__shaft { opacity: 1; }

.roof__shaft-track { position: absolute; left: 0; right: 0; top: -6%; height: 112%; will-change: transform; }

.roof__shaft .hslide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease; }
.roof__shaft .hslide.is-active { opacity: 1; }

/* whole buildings, never cropped — while a blurred copy of the same
   photo fills the letterbox so the panel reads full-bleed */
.roof__shaft img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
  transform: scale(1);
}

.roof__shaft img.bg {
  object-fit: cover;
  filter: blur(28px) brightness(0.5) saturate(0.85);
  transform: scale(1.18);
}

.roof__shaft .hslide.is-active img { animation: shaftDrift 12s var(--ease) forwards; }

@keyframes shaftDrift { from { transform: scale(1.05); } to { transform: scale(1); } }

.roof__shaft::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 72%, rgba(12, 11, 9, 0.5));
  pointer-events: none;
}

.roof__cred {
  position: absolute;
  z-index: 2;
  right: clamp(1.4rem, 3vw, 2.6rem);
  bottom: 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  text-align: right;
  color: #fff;
}

.hero__slideindex { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.2em; }

.hero__slidecap {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: opacity 0.45s;
}

.roof__cred.swapping .hero__slidecap { opacity: 0; }

.hero__slidebar { width: 140px; height: 2px; background: rgba(255, 255, 255, 0.3); position: relative; overflow: hidden; }

.hero__slidebar i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }

.hero--live.running .hero__slidebar i { animation: slidebar 7s linear infinite; }

@keyframes slidebar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* the scan line that wipes between slides */
.roof__shaft .wipeline {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 2px;
  background: var(--paper);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}

.roof__shaft .wipeline.on { animation: wipeline 1.15s cubic-bezier(0.76, 0, 0.24, 1) forwards; }

@keyframes wipeline {
  0% { left: 0; opacity: 0.9; }
  92% { opacity: 0.9; }
  100% { left: 100%; opacity: 0; }
}

.roof__shaft .hslide.wiping {
  opacity: 1;
  z-index: 2;
  transition: none;
  clip-path: inset(0 100% 0 0);
  animation: slideWipe 1.15s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes slideWipe { to { clip-path: inset(0 0 0 0); } }

@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  /* phones, and portrait tablets up to the 13" iPad Pro: the split hero
     would leave a tall empty column, so the type stacks over the photo */
  .roof { grid-template-columns: 1fr; align-items: start; }
  .roof__type { padding: clamp(7.5rem, 14vh, 9rem) var(--pad) 3rem; }
  .roof__shaft { min-height: 54vh; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .roof h1 .line > span { transform: none; }
  .roof__shaft { opacity: 1; transition: none; }
  .roof__shaft .hslide.is-active img { animation: none; }
  .roof__shaft .hslide.wiping { animation: none; clip-path: none; }
  .roof__shaft .wipeline { display: none; }
  .hero--live.running .hero__slidebar i { animation: none; transform: scaleX(1); }
}

/* ---------- title block strip under the roof ---------- */

.meta-band {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin: 0 var(--pad);
  border: 2px solid var(--ink);
  color: var(--ink);
}

.meta-band span {
  padding: 0.85rem 1.1rem;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-band span:last-child { border-right: none; }

.meta-band b {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--stone);
}

@media (max-width: 900px) {
  .meta-band { grid-auto-flow: row; grid-auto-columns: unset; grid-template-columns: 1fr 1fr; }
  .meta-band span { border-bottom: 1px solid var(--hairline); }
  .meta-band span:nth-last-child(-n+2) { border-bottom: none; }
}

/* ---------- LEVEL 04 · the works corridor ---------- */

.corridor { position: relative; }

.corridor__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.corridor__track {
  display: flex;
  align-items: center;
  gap: clamp(2.2rem, 4.5vw, 5rem);
  padding: 0 var(--pad);
  will-change: transform;
}

.corridor__lead { flex: 0 0 auto; min-width: 32vw; padding-right: 2vw; }

.corridor__lead h2 { font-size: clamp(2.5rem, 5.4vw, 5rem); margin-top: 1.2rem; }

.corridor__hint {
  margin-top: 2.2rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
}

.corridor__track .work { flex: 0 0 auto; margin-top: 0; }

.corridor__track .work__well { width: var(--w, 34vw); height: var(--h, 58vh); }

.corridor__end { flex: 0 0 auto; padding: 0 10vw 0 4vw; display: flex; align-items: center; }

@media (max-width: 900px) {
  .corridor__pin { position: static; height: auto; overflow: visible; }
  .corridor__track { flex-direction: column; align-items: stretch; gap: 2.6rem; }
  .corridor__lead { min-width: 0; padding: 0; }
  .corridor__track .work__well { width: 100%; height: 300px; }
  .corridor__end { padding: 1rem 0 0; }
}

/* work panels (shared with any grid use) */

.work { display: block; }

.work__well {
  display: block;
  position: relative;
  overflow: hidden;
  height: var(--h, 420px);
  background: #e6e3da;
}

.work__well img {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 116%;
  object-fit: cover;
  scale: 1.001;
  transition: scale 1.1s var(--ease);
  will-change: transform;
}

.work:hover .work__well img { scale: 1.05; }

.work__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.4rem;
  margin-top: 0.85rem;
}

.work__title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work__meta {
  position: relative;
  overflow: hidden;
  text-align: right;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 1.6;
  height: 1.6em;
  min-width: 9rem;
}

.work__meta span { display: block; transition: transform 0.6s var(--ease); }

.work__meta .alt { position: absolute; inset: 0; transform: translateY(108%); color: var(--ink); }

.work:hover .work__meta .base { transform: translateY(-108%); }
.work:hover .work__meta .alt { transform: translateY(0); }

/* ---------- LEVEL 03 · the exhibit (drawing becomes building) ---------- */

.exhibit { position: relative; height: 320svh; }

.exhibit__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 2.2vh, 1.8rem);
  padding: clamp(5rem, 10vh, 7rem) var(--pad) clamp(1.6rem, 4vh, 3rem);
  overflow: hidden;
}

.exhibit__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.exhibit__head h2 { font-size: clamp(1.7rem, 3.6vw, 3.1rem); margin-top: 1rem; }

.exhibit__caption { max-width: 23rem; color: var(--stone); font-size: 0.88rem; text-align: right; }

.exhibit__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.exhibit__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.exhibit__shade { position: absolute; inset: 0; background: rgba(247, 245, 240, 0.06); opacity: 0; z-index: 1; }

.exhibit__svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  padding: clamp(0.6rem, 2vw, 2.2rem);
}

.exhibit__svg svg { width: 100%; height: 100%; max-width: 1050px; }

.exhibit__svg .a, .exhibit__svg .dim { opacity: 0; transition: opacity 0.5s; }

.exhibit.annotated .exhibit__svg .a,
.exhibit.annotated .exhibit__svg .dim { opacity: 0.9; }

.exhibit__plate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}

.exhibit__stages { display: flex; gap: clamp(1rem, 3vw, 2.4rem); }

.exhibit__stages span {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0.5;
  transition: opacity 0.3s, color 0.3s;
}

.exhibit__stages span.on { color: var(--ink); opacity: 1; }

.exhibit__progress { width: 140px; height: 2px; background: var(--hairline); position: relative; overflow: hidden; }

.exhibit__progress i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  .exhibit { height: auto; }
  .exhibit__pin { position: static; height: auto; }
  .exhibit__photo { opacity: 1 !important; }
  .exhibit__svg { position: relative; margin-top: 1rem; }
  .exhibit__svg .a, .exhibit__svg .dim { opacity: 1; }
}

/* ---------- LEVEL 02 · discipline tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.tile {
  position: relative;
  padding: clamp(1.8rem, 3.5vw, 3.2rem);
  min-height: clamp(240px, 34vh, 360px);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.9rem;
  overflow: hidden;
  transition: background 0.35s ease;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hatch);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.tile:nth-child(2n) { border-right: none; }
.tile:nth-child(n+3) { border-bottom: none; }

.tile__no {
  position: absolute;
  top: 0.6rem;
  right: 1.2rem;
  font-size: clamp(4.5rem, 9vw, 8.5rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--hairline);
  pointer-events: none;
  z-index: 1;
}

.tile__name { font-size: clamp(1.3rem, 2.4vw, 2rem); max-width: 14ch; z-index: 1; }

.tile__desc {
  color: rgba(20, 19, 16, 0.72);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 26rem;
  z-index: 1;
}

.tile__arrow { font-size: 1.2rem; z-index: 1; display: inline-block; transition: transform 0.5s var(--snap); }

.tile:hover { background: var(--ink); }
.tile:hover::before { opacity: 0.25; }
.tile:hover .tile__name, .tile:hover .tile__desc, .tile:hover .tile__arrow { color: var(--paper); }
.tile:hover .tile__no { -webkit-text-stroke-color: rgba(247, 245, 240, 0.4); }
.tile:hover .tile__arrow { transform: rotate(-45deg); }

@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { border-right: none; border-bottom: 1px solid var(--hairline); }
  .tile:nth-child(n+3) { border-bottom: 1px solid var(--hairline); }
  .tile:last-child { border-bottom: none; }
}

/* ---------- GROUND · break ground CTA ---------- */

.ground {
  position: relative;
  padding: clamp(6rem, 13vw, 11rem) var(--pad) 0;
  text-align: center;
}

.ground h2 { font-size: clamp(2.6rem, 7vw, 6.5rem); }

.ground__sub {
  color: var(--stone);
  margin-bottom: 2.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ground .btn { margin-top: 2.6rem; }

.ground__line {
  margin-top: clamp(4rem, 8vw, 7rem);
  height: 3px;
  background: var(--ink);
}

.ground__earth {
  height: clamp(90px, 14vh, 150px);
  background: var(--hatch);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
}

.ground__datum {
  position: absolute;
  right: var(--pad);
  bottom: clamp(100px, 15vh, 160px);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--stone);
  font-variant-numeric: tabular-nums;
}

.slab-wrap { padding: clamp(4.5rem, 9vw, 8rem) var(--pad) 0; }

/* the mission manifesto: long-form statement, sentence case, painted in */
.intro__statement.mission {
  text-transform: none;
  font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 2.3rem);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* ---------- client wall: the marks of the institutions we have built for ---------- */

.clientwall {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 0;
}

.clientwall li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}

/* a fixed-height slot keeps every mark optically centred on one line;
   the slot height is a custom property so the image caps below are
   absolute lengths (percentage max-heights fail inside auto grid rows) */
.clientwall { --slot: clamp(96px, 10vw, 136px); }

.clientwall__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--slot);
}

/* full-colour marks; wide marks are bounded by width, tall crests by
   height, so the row reads as one weight */
.clientwall img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(72%, 220px);
  max-height: calc(var(--slot) * 0.56);
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.05, 0.83, 0.52, 0.97), opacity 0.3s ease;
}

/* stacked crest + wordmark lockups get more height so the type stays legible */
.clientwall img.lockup { max-height: calc(var(--slot) * 0.84); }

.clientwall__name {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--stone);
  max-width: 22ch;
}

.clientwall li:hover img { transform: translateY(-3px); }

@media (max-width: 900px) {
  .clientwall { grid-template-columns: repeat(3, 1fr); }
  .clientwall { --slot: 110px; }
}

@media (max-width: 560px) {
  .clientwall { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .clientwall { --slot: 90px; }
  .clientwall img { max-width: 80%; }
}

/* ---------- phones held landscape (short, wide viewports) ----------
   Everything above is proportioned off the viewport height; at ~400px tall
   that pushes the hero headline below the fold, pins a 170px strip of the
   exhibit, and stacks the lift rail over the nav. Here the page simply flows. */

@media (max-height: 560px) and (orientation: landscape) {
  .lift { display: none; }

  .roof { min-height: 0; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .roof__type { padding: 5.5rem 0 2.2rem var(--pad); }
  .roof h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
  .roof .lede { margin-top: 1rem; font-size: 0.95rem; }
  .roof__stat { margin-top: 1.2rem; }
  .roof__stat b { font-size: 2.6rem; }
  .roof__shaft { min-height: 0; height: auto; align-self: stretch; }

  .corridor__pin { position: static; height: auto; overflow: visible; }
  .corridor__track { flex-direction: column; align-items: stretch; gap: 2.6rem; }
  .corridor__lead { min-width: 0; padding: 0; }
  .corridor__track .work__well { width: 100%; height: 300px; }
  .corridor__end { padding: 1rem 0 0; }

  .exhibit { height: auto; }
  .exhibit__pin { position: static; height: auto; overflow: visible; padding: 4rem var(--pad) 2rem; }
  .exhibit__stage { flex: none; aspect-ratio: 16 / 9; }

  .tile { min-height: 200px; }
}
