:root {
  color-scheme: light;
  --paper: #f5f3ed;
  --ink: #20241e;
  --text: #50534b;
  --dark: #171b17;
  --lime: #dfe8ac;
  --line: #dedfd4;
  --rail: clamp(1.25rem, 5.1vw, 5.75rem);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.04; letter-spacing: -.055em; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #72943d; outline-offset: 5px; }
.section-label { color: #555e44; }
.wrap { width: min(100% - 2 * var(--rail), 1440px); margin-inline: auto; }
.eyebrow { font-size: .875rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
.skip { position: fixed; z-index: 10; top: .5rem; left: .5rem; padding: .75rem; background: var(--paper); translate: 0 -150%; }
.skip:focus { translate: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header { position: relative; z-index: 2; background: var(--dark); color: var(--paper); }
.header-inner {
  width: min(100% - 2 * var(--rail), 1440px);
  min-height: 5rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; justify-self: start; font-size: 1.33rem; font-weight: 650; letter-spacing: -.045em; }
.brand-mark { width: .84rem; height: .84rem; margin-right: .6rem; border: 1.5px solid var(--lime); border-radius: 70% 0 70% 0; }
.brand-period { color: var(--lime); }
.global-nav { display: flex; gap: clamp(1rem, 3vw, 2.75rem); font-size: .875rem; }
.global-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #c2c8bd; }
.global-nav a:hover, .global-nav [aria-current] { color: white; }
.header-contact { justify-self: end; font-size: .875rem; border: 1px solid #6c7669; padding: .58rem 1rem; min-height: 44px; display: inline-flex; align-items: center; }
.header-contact:hover { border-color: var(--lime); color: var(--lime); }

.home-hero, .project-hero { position: relative; isolation: isolate; color: var(--paper); background: #3d463e; overflow: hidden; }
.home-hero > img, .project-hero > img, .hero-shade { position: absolute; inset: 0; z-index: -1; }
.hero-shade {
  background: linear-gradient(90deg, rgb(16 22 17 / .88), rgb(18 24 19 / .49) 44%, rgb(19 23 20 / .08) 86%),
    linear-gradient(0deg, rgb(15 21 17 / .48), transparent 50%);
}
.hero-inner { display: flex; align-items: center; min-height: clamp(35rem, 69svh, 54rem); padding-block: 4rem 4.8rem; }
.hero-copy { width: min(100%, 46rem); }
.accent-line { width: 1.8rem; height: 1px; background: var(--lime); display: inline-block; vertical-align: middle; margin-right: .65rem; }
.hero-copy .eyebrow, .project-hero .eyebrow { color: var(--lime); }
.hero-copy h1 { font-size: clamp(4rem, 9vw, 9rem); margin-block: .95rem 1.2rem; }
.hero-copy h1 em { font-weight: 400; }
.hero-copy > p:not(.eyebrow) { color: #f1f0e8; font-size: clamp(1rem, 1.55vw, 1.2rem); max-width: 27rem; margin-bottom: 1.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .75rem 1.4rem; border: 1px solid transparent; background: var(--lime); color: #202818; font-size: .9375rem; font-weight: 650; }
.button:hover { background: #edf2cb; }
.hero-index { position: absolute; right: var(--rail); bottom: 1.55rem; font-size: .875rem; color: #eeeae0; border-top: 1px solid #ffffff75; padding-top: .65rem; }

.collection { padding-block: clamp(3.5rem, 6vw, 7rem); }
.collection-header { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.2rem; }
.collection h2, .viewing h2 { font-size: clamp(2.9rem, 5.55vw, 5.9rem); margin-top: .55rem; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button { background: transparent; border: 1px solid #c4c7ba; border-radius: 100vw; padding: .55rem .9rem; min-height: 44px; font-size: .875rem; }
.filters button:hover { border-color: var(--ink); }
.filters [aria-pressed="true"] { background: var(--dark); color: var(--paper); border-color: var(--dark); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.2vw, 2rem); }
.project-card a { display: block; }
.card-photo { aspect-ratio: 4 / 3; overflow: hidden; background: #d9d9cb; }
.card-photo img { transition: scale .65s cubic-bezier(.2,.6,.35,1); }
.project-card a:hover img, .project-card a:focus-visible img { scale: 1.06; }
.card-text { padding-block: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.card-type { color: #505746; }
.card-type span, .scene-label span { opacity: .67; margin-inline: .24rem; }
.card-text h3 { font-size: clamp(1.85rem, 3vw, 3.25rem); margin-block: .45rem .65rem; }
.card-action { display: inline-block; color: var(--text); font-size: .875rem; border-bottom: 1px solid #939a88; padding-bottom: .12rem; }
.project-card a:hover .card-action { border-color: var(--ink); color: var(--ink); }

.viewing { background: #e7ebd7; padding-block: clamp(3.6rem, 7vw, 7rem); scroll-margin-top: 4rem; }
.viewing-inner { display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: clamp(1.4rem, 8vw, 8rem); }
.viewing-inner > div:last-child p { margin-bottom: 1.15rem; color: var(--text); max-width: 27rem; }
.viewing .button { background: var(--dark); color: var(--paper); }
.viewing .button:hover { background: #383f2f; }
.site-footer { background: var(--dark); color: var(--paper); }
.footer-inner { min-height: 6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.footer-brand { font-size: 1.25rem; font-weight: 650; }
.footer-inner small, .footer-inner > a:last-child { font-size: .875rem; color: #c8cbbc; }
.footer-inner > a:last-child:hover { text-decoration: underline; }

.project-hero-inner { min-height: clamp(33rem, 70svh, 52rem); position: relative; display: grid; align-items: end; padding-block: 7rem 3.6rem; }
.back-link { position: absolute; top: 1.75rem; left: 0; font-size: .9375rem; color: #f2f0e8; text-decoration: underline; text-underline-offset: .25rem; }
.project-hero h1 { font-size: clamp(3.45rem, 8.4vw, 8.3rem); margin-block: .6rem; }
.project-headline { font: italic clamp(1.48rem, 2.65vw, 2.9rem)/1.15 var(--serif); }
.project-description { max-width: 32rem; margin-block: .8rem 1.5rem; }
.chapter-nav { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.chapter-inner { display: flex; gap: clamp(.95rem, 3vw, 2.5rem); overflow-x: auto; scrollbar-width: thin; }
.chapter-inner a { flex: none; display: inline-flex; padding: 1rem 0 .86rem; min-height: 3.35rem; border-bottom: .19rem solid transparent; color: var(--text); font-size: .875rem; font-weight: 650; }
.chapter-inner a:hover, .chapter-inner [aria-current] { border-color: var(--project-accent, #58683b); color: var(--ink); }
.detail.tower { --project-accent: #3c686e; }
.detail.villa { --project-accent: #85543a; }
.detail.apartment { --project-accent: #58683b; }
.tour-scene { display: grid; align-items: center; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 6vw, 6rem); padding-block: clamp(2.5rem, 6vw, 6rem); border-bottom: 1px solid var(--line); scroll-margin-top: 3.65rem; }
.tour-scene:last-child { border-bottom: 0; }
.scene-label { color: var(--project-accent); }
.scene-copy h2 { font-size: clamp(2.45rem, 4.5vw, 5rem); margin-block: .7rem 1rem; }
.scene-copy h2:focus { outline: none; }
.scene-copy > p:not(.eyebrow) { color: var(--text); }
.scene-next { display: inline-flex; min-height: 44px; margin-top: .8rem; align-items: center; font-weight: 650; text-decoration: underline; text-underline-offset: .3rem; }
.scene-frame { position: relative; isolation: isolate; aspect-ratio: 3 / 2; background: #d9d9cb; }
.scene-media video { display: block; margin-top: 1rem; width: 100%; max-height: 70vh; background: var(--dark); }
.hotspot { position: absolute; z-index: 1; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: flex; width: max-content; max-width: 100%; align-items: center; min-height: 44px; gap: .5rem; padding: .34rem .7rem; border: 1px solid #ffffff85; border-radius: 100vw; background: #191f19; color: #fff; box-shadow: 0 .2rem 1rem #0004; font-size: .875rem; font-weight: 650; }
.hotspot:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.pin-dot { display: block; width: .73rem; height: .73rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 .2rem #dfe8ac44; }
.hotspot:hover .pin-dot { background: var(--ink); }
.next-project { padding-block: 2.6rem; }
.next-project a { font: clamp(1.8rem, 4vw, 3.6rem)/1.3 var(--serif); }
.next-project a:hover { text-decoration: underline; text-underline-offset: .25rem; }

dialog { position: fixed; width: min(33rem, 100% - 2.5rem); padding: 2.25rem; border: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #111a12b8; }
dialog h2 { font-size: clamp(2rem, 5vw, 3.25rem); margin-block: .7rem; }
.close-dialog { position: absolute; right: .65rem; top: .65rem; width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.6rem; }

@media (max-width: 830px) {
  .collection-header { align-items: start; flex-direction: column; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tour-scene { gap: 1.5rem; grid-template-columns: 1fr; }
  .scene-copy { max-width: 36rem; }
  .scene-media { order: -1; }
}
@media (max-width: 560px) {
  .header-inner { min-height: 4.4rem; grid-template-columns: 1fr auto; }
  .global-nav { gap: 1.05rem; }
  .header-contact { display: none; }
  .hero-inner { min-height: 35rem; }
  .hero-shade { background: linear-gradient(90deg, rgb(16 22 17 / .83), rgb(16 22 17 / .37)), linear-gradient(0deg, rgb(15 21 17 / .5), transparent 60%); }
  .project-grid { grid-template-columns: 1fr; gap: 1.65rem; }
  .viewing-inner { grid-template-columns: 1fr; }
  .footer-inner { align-items: start; flex-direction: column; }
  .project-hero-inner { min-height: 33rem; }
  .project-hero h1 { overflow-wrap: anywhere; }
  .hotspot { font-size: .8125rem; left: clamp(5.6rem, var(--x), 100% - 5.6rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-photo img { transition: none; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .scene-frame img {
      animation: scene-arrival linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    @keyframes scene-arrival {
      from { filter: brightness(.72); }
      to { filter: brightness(1); }
    }
  }
}

.tour-enhanced {
  --chapter-offset: 5rem;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 4.5rem);
  align-items: start;
}
.tour-stage {
  position: sticky;
  z-index: 1;
  top: 5rem;
  aspect-ratio: 3 / 2;
  margin-block: 2rem;
  background: var(--dark);
  isolation: isolate;
}
.tour-stage .scene-frame {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease;
}
.tour-stage .scene-frame.is-visible { opacity: 1; pointer-events: auto; }
.tour-stage .scene-frame img { animation: none; }
.tour-enhanced .tour-scene {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1.4rem;
  min-height: clamp(24rem, 67svh, 46rem);
  padding-block: 2.5rem;
  scroll-margin-top: var(--chapter-offset);
}
.tour-enhanced .scene-media:has(> .scene-frame:only-child), .tour-enhanced .scene-media > .scene-frame { display: none; }
.tour-enhanced .scene-media { order: 0; }
.tour-enhanced .scene-media video { margin-top: 0; }
.viewing-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 69rem;
  background: var(--paper);
}
.viewing-photo { min-height: 17rem; }
.viewing-copy { padding: clamp(1.5rem, 4vw, 4rem); }
.viewing-copy h2 { font-size: clamp(2.5rem, 4vw, 4.25rem); margin-bottom: 1.2rem; }
.viewing-project { font-weight: 650; }
.viewing-setting { color: var(--text); margin-bottom: 1.35rem; }
@media (max-width: 830px) {
  .tour-enhanced { display: block; }
  .tour-stage { top: 3.5rem; max-height: 44svh; margin-block: 0; }
  .tour-enhanced .tour-scene { min-height: 40svh; }
}
@media (max-width: 560px) {
  .viewing-card { grid-template-columns: 1fr; }
  .viewing-photo { min-height: 0; aspect-ratio: 3 / 2; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-stage .scene-frame { transition: none; }
}

.tour-instruction { margin-top: .8rem; color: #f1f0e8; font-size: .875rem; }
.tour-stage { overflow: clip; }
.tour-stage .scene-frame img {
  transform: scale(var(--scene-scale));
}
.tour-stage .scene-frame { --scene-scale: calc(1 + var(--scene-motion, 0) * .26); }
.tour-stage .hotspot {
  left: clamp(5.6rem, calc(50% + (var(--x) - 50%) * var(--scene-scale)), 100% - 5.6rem);
  top: clamp(1.5rem, calc(50% + (var(--y) - 50%) * var(--scene-scale)), 100% - 1.5rem);
}
.tour-stage .scene-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
.tour-stage .scene-frame video.has-frame.motion-enabled { opacity: 1; }
.tour-progress {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: .27rem;
  background: #171b1780;
  pointer-events: none;
}
.tour-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lime);
  transform-origin: left;
  transform: scaleX(var(--tour-progress, 0));
}
@media (prefers-reduced-motion: reduce) {
  .tour-stage .scene-frame img { transform: none; }
  .tour-stage .scene-frame video.has-frame.motion-enabled { display: none; }
}

.featured-tour {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  margin-bottom: clamp(3.5rem, 7vw, 7rem);
  background: var(--dark);
  color: var(--paper);
}
.featured-photo { min-height: 21rem; }
.featured-copy { align-self: center; padding: clamp(1.5rem, 4vw, 4rem); }
.featured-copy .eyebrow { color: var(--lime); }
.featured-copy h2 { font-size: clamp(2.65rem, 5vw, 5.5rem); margin-block: .65rem 1rem; }
.featured-copy > p:not(.eyebrow) { color: #e3e4da; margin-bottom: 1.3rem; }
.scene-actions { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .8rem; }
.scene-actions a { display: inline-flex; align-items: center; min-height: 44px; margin: 0; }
.scene-previous { color: var(--text); text-decoration: underline; text-underline-offset: .25rem; }
.scene-previous:hover { color: var(--ink); }
.viewing-email { margin-top: .85rem; overflow-wrap: anywhere; color: var(--text); }
.missing-page { min-height: 60vh; padding-block: clamp(3rem, 10vw, 8rem); }
.missing-page h1 { font-size: clamp(3rem, 8vw, 7rem); }
.missing-page p { margin-block: 1.15rem; }
@media (max-width: 700px) {
  .featured-tour { grid-template-columns: 1fr; }
  .featured-photo { min-height: 0; aspect-ratio: 3 / 2; }
}
@media (max-height: 510px) {
  .tour-stage { max-height: 41svh; }
}
