/* A light architectural canvas frames the existing scroll sequence. */
.site-home .review-bar {
  position: relative;
  z-index: 41;
  min-height: 41px;
}

.site-home .site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  max-width: none;
  min-height: 104px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid #1a1a1812;
  color: var(--ink);
}

.site-home .review-bar:not([hidden]) + .site-header {
  top: 41px;
}

.site-home .site-header .brand {
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
}

.site-home .site-header .brand img {
  width: 38px;
  height: 47px;
}

.site-home .site-header .main-nav {
  gap: 30px;
  font-size: 13px;
  font-weight: 500;
}

.site-home .site-header .main-nav .nav-contact {
  gap: 20px;
  margin-left: 12px;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bone);
  font-size: 12px;
  font-weight: 600;
}

.site-home .site-header .main-nav .nav-contact::after {
  display: none;
}

.site-home .site-header a:focus-visible,
.site-home .site-header button:focus-visible,
.build-story a:focus-visible,
.build-story button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.build-story.hero,
.build-story.hero.without-image {
  display: block;
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  padding: 0;
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  isolation: isolate;
}

.build-story.story-active,
html.has-story-js .build-story {
  height: 560svh;
  overflow-anchor: none;
}

.build-story .story-pin {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  row-gap: 22px;
  height: 100svh;
  min-height: 0;
  padding: 150px var(--gutter) 22px;
  overflow: hidden;
  background: var(--bone);
}

.build-story.story-active .story-pin,
html.has-story-js .build-story:not(.reduced-motion):not(.scene-failed) .story-pin {
  position: sticky;
  top: 0;
}

.site-home .review-bar:not([hidden]) ~ main .build-story:not(.reduced-motion):not(.scene-failed) .story-pin {
  height: calc(100svh - 41px);
}

.build-story .story-canvas-wrap.hero-visual,
.build-story .reality-frame {
  position: absolute;
  inset: 148px var(--gutter) 146px 48%;
  width: auto;
  height: auto;
  max-width: none;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #8c73551c;
  border-radius: 24px;
  background: #e9e6de;
}

.build-story .story-canvas-wrap.hero-visual {
  pointer-events: none;
}

.build-story .story-canvas-wrap.hero-visual[hidden] {
  display: block;
}

.build-story #building-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: var(--scene-fade, 1);
}

.build-story .hero-visual > #story-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  opacity: .7;
}

.build-story.webgl-ready #story-fallback {
  display: none;
}

.build-story.scene-failed #story-fallback {
  display: block;
}

.build-story.scene-failed .scene-steps,
.build-story.scene-failed .scroll-cue,
.scene-vignette,
.scene-hud {
  display: none;
}

.build-story .reality-frame {
  z-index: 2;
  opacity: var(--reality-opacity, 0);
  clip-path: inset(0 round 24px);
}

.build-story .reality-frame[hidden],
.build-story #hero-image[hidden] {
  display: none;
}

.build-story .reality-frame > #hero-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 50%;
}

.build-story .story-copy {
  position: relative;
  grid-row: 1;
  z-index: 5;
  width: 43%;
  max-width: 540px;
  padding: 0;
}

.build-story .story-copy .eyebrow {
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.7;
}

.build-story .story-copy h1 {
  max-width: 17ch;
  margin: 23px 0 22px;
  font-size: clamp(44px, 4.4vw, 68px);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: 1.05;
  white-space: pre-line;
  text-wrap: balance;
}

.build-story .hero-description {
  max-width: 355px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.build-story .hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.build-story .story-contact {
  min-height: 48px;
  gap: 34px;
  padding: 15px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bone);
  font-size: 12px;
  font-weight: 600;
}

.build-story .story-contact:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: none;
}

.story-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
  line-height: 1.6;
}

.story-kicker > span {
  width: 30px;
  height: 1px;
  background: var(--gold);
}

.story-phase {
  position: relative;
  grid-row: 3;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
  width: 46%;
  max-width: 580px;
  pointer-events: none;
}

.phase-copy {
  min-width: 0;
}

.phase-index {
  min-width: 58px;
  padding-top: 6px;
  color: #9b978e;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  white-space: nowrap;
}

.phase-index > #scene-step-number {
  color: var(--gold-dark);
}

.story-phase h2 {
  max-width: 620px;
  color: var(--ink);
  font-size: clamp(24px, 2.15vw, 34px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.16;
  text-wrap: balance;
}

.story-phase p {
  max-width: 520px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.story-bottom {
  position: relative;
  grid-row: 4;
  z-index: 8;
  min-width: 0;
}

.story-bottom-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
}

.scroll-cue-mark {
  color: var(--gold-dark);
  font-size: 18px;
  line-height: 1;
}

.scene-caption {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
}

.scene-caption > span[aria-hidden] {
  padding: 0 9px;
  color: #b3aea2;
}

#scene-percent {
  display: inline-block;
  min-width: 34px;
  color: var(--gold-dark);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.scene-progress {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: var(--stone);
}

.scene-progress-line {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(var(--scene-progress, 0));
  transform-origin: left center;
}

.scene-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.scene-steps li {
  min-width: 0;
}

.scene-steps button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.scene-steps button:hover {
  border-color: var(--stone);
  color: var(--ink);
}

.scene-steps button[aria-current="step"] {
  border-color: #8c735533;
  background: #e9e4da;
  color: var(--ink);
}

.scene-steps .step-number {
  color: #9b978e;
  font-size: 9px;
}

.scene-steps button[aria-current="step"] .step-number {
  color: var(--gold-dark);
}

.build-story.reduced-motion,
.build-story.story-active.reduced-motion,
.build-story.scene-failed,
.build-story.story-active.scene-failed {
  height: auto;
  min-height: 100svh;
}

.build-story.reduced-motion .story-pin,
.build-story.scene-failed .story-pin {
  position: relative;
  height: auto;
  min-height: 100svh;
}

.build-story.reduced-motion .scroll-cue-mark {
  display: none;
}

@media (min-width: 1650px) {
  .build-story .story-copy {
    max-width: 620px;
  }

  .build-story .story-copy h1 {
    font-size: 76px;
  }

  .build-story .hero-description {
    max-width: 400px;
    font-size: 16px;
  }
}

@media (min-width: 801px) and (max-height: 820px) {
  .build-story .story-pin {
    row-gap: 16px;
    padding-top: 135px;
  }

  .build-story .story-copy h1 {
    margin: 18px 0;
    font-size: clamp(42px, 4.1vw, 60px);
  }

  .build-story .hero-description {
    font-size: 13px;
    line-height: 1.7;
  }

  .build-story .hero-actions {
    margin-top: 22px;
  }

  .story-kicker {
    margin-top: 22px;
  }

  .build-story .story-canvas-wrap.hero-visual,
  .build-story .reality-frame {
    top: 135px;
  }
}

@media (max-width: 1100px) and (min-width: 801px) {
  .site-home .site-header .main-nav {
    gap: 20px;
    font-size: 11px;
  }

  .site-home .site-header .main-nav .nav-contact {
    margin-left: 0;
    gap: 12px;
    padding: 12px 16px;
    font-size: 11px;
  }

  .build-story .story-copy {
    width: 45%;
  }

  .build-story .story-copy h1 {
    font-size: 45px;
  }

  .build-story .story-canvas-wrap.hero-visual,
  .build-story .reality-frame {
    left: 49%;
  }

  .scene-steps button {
    gap: 8px;
    padding-right: 9px;
    padding-left: 9px;
    font-size: 10px;
  }
}

@media (max-width: 800px) {
  .site-home .site-header {
    min-height: 86px;
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .site-home .site-header .brand {
    padding: 8px 12px;
    border-radius: 10px;
  }

  .site-home .site-header .brand img {
    width: 32px;
    height: 40px;
  }

  .site-home .site-header .menu-toggle {
    min-height: 44px;
    color: var(--ink);
    font-size: 12px;
  }

  .site-home .site-header .main-nav {
    gap: 12px;
    border-color: var(--stone);
    background: var(--bone);
    color: var(--ink);
    font-size: 14px;
  }

  .site-home .site-header .main-nav .nav-contact {
    margin-left: 0;
  }

  .build-story .story-pin {
    grid-template-rows: auto minmax(230px, 1fr) auto auto;
    row-gap: 18px;
    min-height: 0;
    padding-top: 115px;
    padding-bottom: 18px;
  }

  .build-story .story-copy {
    width: 100%;
    max-width: 610px;
  }

  .build-story .story-copy h1 {
    max-width: 22ch;
    margin: 15px 0;
    font-size: clamp(38px, 5.3vw, 48px);
  }

  .build-story .hero-description {
    max-width: 540px;
    font-size: 13px;
    line-height: 1.7;
  }

  .build-story .hero-actions {
    margin-top: 18px;
  }

  .story-kicker {
    display: none;
  }

  .build-story .story-canvas-wrap.hero-visual,
  .build-story .reality-frame {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    min-height: 230px;
    border-radius: 20px;
  }

  .build-story .reality-frame {
    clip-path: inset(0 round 20px);
  }

  .build-story .reality-frame > #hero-image {
    position: absolute;
    inset: 0;
  }

  .story-phase {
    gap: 14px;
    width: 100%;
    max-width: none;
  }

  .phase-index {
    min-width: 48px;
    padding-top: 3px;
    font-size: 11px;
  }

  .story-phase h2 {
    max-width: 540px;
    font-size: 25px;
  }

  .story-phase p {
    margin-top: 7px;
    font-size: 11px;
  }

  .scene-steps {
    gap: 4px;
  }

  .scene-steps button {
    gap: 8px;
    padding: 7px 8px;
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  .site-home .site-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .build-story .story-pin {
    grid-template-rows: auto minmax(205px, 1fr) auto auto;
    row-gap: 14px;
    min-height: 0;
    padding: 108px 20px max(14px, env(safe-area-inset-bottom));
  }

  .build-story .story-copy .eyebrow {
    font-size: 8px;
    letter-spacing: .1em;
  }

  .build-story .story-copy h1 {
    max-width: 18ch;
    margin: 13px 0 14px;
    font-size: clamp(33px, 9.25vw, 42px);
    line-height: 1.05;
  }

  .build-story .hero-description {
    max-width: 330px;
    font-size: 12px;
    line-height: 1.6;
  }

  .build-story .hero-actions {
    margin-top: 16px;
  }

  .build-story .story-contact {
    min-height: 44px;
    padding: 12px 18px;
    font-size: 11px;
  }

  .build-story .story-canvas-wrap.hero-visual,
  .build-story .reality-frame {
    min-height: 205px;
    border-radius: 16px;
  }

  .build-story .reality-frame {
    clip-path: inset(0 round 16px);
  }

  .story-phase {
    gap: 10px;
  }

  .phase-index {
    min-width: 42px;
    font-size: 10px;
  }

  .story-phase h2 {
    font-size: 21px;
  }

  .story-phase p {
    max-width: 290px;
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.6;
  }

  .story-bottom-topline {
    gap: 10px;
    margin-bottom: 8px;
  }

  .scroll-cue {
    gap: 8px;
    font-size: 10px;
  }

  .scroll-cue-mark {
    font-size: 16px;
  }

  .scene-caption {
    font-size: 8px;
  }

  .scene-caption > span[aria-hidden] {
    padding: 0 4px;
  }

  #scene-percent {
    min-width: 26px;
  }

  .scene-steps {
    gap: 3px;
    margin-top: 7px;
  }

  .scene-steps button {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-height: 44px;
    padding: 5px 2px;
    border-radius: 10px;
    font-size: 8px;
    line-height: 1.3;
  }

  .scene-steps .step-number {
    font-size: 8px;
  }
}

@media (max-width: 800px) and (max-height: 760px) {
  .build-story .story-pin {
    grid-template-rows: auto minmax(170px, 1fr) auto auto;
    row-gap: 10px;
    min-height: 0;
    padding-top: 102px;
    padding-bottom: 12px;
  }

  .build-story .story-copy h1 {
    font-size: 32px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .build-story .hero-description {
    display: none;
  }

  .build-story .hero-actions {
    margin-top: 12px;
  }

  .build-story .story-canvas-wrap.hero-visual,
  .build-story .reality-frame {
    min-height: 170px;
  }

  .story-phase h2 {
    font-size: 20px;
  }

  .story-phase p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .build-story,
  .build-story * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
