.hero-with-visual {
  position: relative;
  isolation: isolate;
  width: min(calc(100vw - 2rem), 1380px);
  margin-left: 50%;
  transform: translateX(-50%);
  grid-template-columns: minmax(0, 0.78fr) minmax(500px, 1.22fr);
  gap: clamp(2rem, 3.5vw, 4rem);
  min-height: min(780px, calc(100svh - 24px));
  overflow: visible;
}

.hero-with-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 5%;
  right: -8%;
  width: min(62vw, 880px);
  height: min(62vw, 880px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 167, 189, 0.24), rgba(127, 167, 189, 0) 68%);
  pointer-events: none;
}

.hero-with-visual .hero-copy {
  max-width: 560px;
}

.hero-with-visual h1 {
  max-width: 560px;
  font-size: clamp(3.25rem, 5.15vw, 5.85rem);
}

.hero-building-visual {
  position: relative;
  width: min(100%, 780px);
  margin: 0;
  justify-self: end;
  transition: opacity 300ms ease;
}

.hero-building-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1rem 1.4rem 1.25rem -1.25rem;
  border: 1px solid rgba(54, 93, 114, 0.2);
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 32px 100%, 0 calc(100% - 32px));
}

.hero-building-frame {
  position: relative;
  aspect-ratio: 3 / 2;
  padding: clamp(0.35rem, 0.8vw, 0.58rem);
  overflow: hidden;
  background: linear-gradient(145deg, var(--graphite), var(--steel-dark));
  box-shadow: 0 34px 90px rgba(16, 24, 32, 0.25);
  clip-path: polygon(0 0, calc(100% - 52px) 0, 100% 52px, 100% 100%, 52px 100%, 0 calc(100% - 52px));
}

.hero-building-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(0deg, rgba(16, 24, 32, 0.18), transparent 32%);
}

.hero-building-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  clip-path: polygon(0 0, calc(100% - 45px) 0, 100% 45px, 100% 100%, 45px 100%, 0 calc(100% - 45px));
}

.hero-building-visual figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  padding: 0 0.2rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.hero-building-visual figcaption span {
  color: var(--graphite);
  font-family: Archivo, Inter, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hero-building-visual figcaption small {
  font-size: inherit;
  text-align: right;
}

.hero-building-intro[hidden] {
  display: none;
}

.hero-building-intro {
  position: fixed;
  z-index: 100;
  inset: 0;
  overflow: hidden;
  background: transparent;
}

.hero-building-intro::before,
.hero-building-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 820ms ease;
}

.hero-building-intro::before {
  background:
    radial-gradient(circle at 72% 30%, rgba(127, 167, 189, 0.22), transparent 42%),
    linear-gradient(145deg, #091018, #101820 55%, #172634);
}

.hero-building-intro::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.hero-building-intro-frame {
  position: fixed;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(94vw, 1560px, calc(88svh * 1.5));
  aspect-ratio: 3 / 2;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transform-origin: top left;
  background: #101820;
  box-shadow: 0 44px 130px rgba(0, 0, 0, 0.52);
  clip-path: polygon(0 0, calc(100% - 64px) 0, 100% 64px, 100% 100%, 64px 100%, 0 calc(100% - 64px));
  will-change: transform;
}

.hero-building-intro-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.1), transparent 26%),
    linear-gradient(0deg, rgba(5, 10, 15, 0.38), transparent 42%);
}

.hero-building-intro-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-building-intro-copy {
  position: absolute;
  z-index: 2;
  left: clamp(1.25rem, 3vw, 3rem);
  bottom: clamp(1.15rem, 2.8vw, 2.6rem);
  display: grid;
  gap: 0.28rem;
  color: white;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.72);
  transition: opacity 260ms ease;
}

.hero-building-intro-copy strong {
  font-family: Archivo, Inter, sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 2.2rem);
  letter-spacing: -0.045em;
}

.hero-building-intro-copy span {
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  font-weight: 650;
  opacity: 0.88;
}

.hero-building-intro-skip {
  position: fixed;
  z-index: 3;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 0.62rem 0.88rem;
  color: white;
  background: rgba(8, 15, 22, 0.62);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 260ms ease;
}

.hero-building-intro-skip:hover,
.hero-building-intro-skip:focus-visible {
  opacity: 1;
}

.hero-building-intro-skip:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

html.hero-intro-pending {
  overflow: hidden;
}

html.hero-intro-pending .site-header,
html.hero-intro-pending .hero-copy {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

html.hero-intro-pending .hero-building-visual {
  opacity: 0;
}

html.hero-intro-pending.hero-intro-settling .hero-building-intro::before,
html.hero-intro-pending.hero-intro-settling .hero-building-intro::after,
html.hero-intro-pending.hero-intro-settling .hero-building-intro-copy,
html.hero-intro-pending.hero-intro-settling .hero-building-intro-skip {
  opacity: 0;
}

html.hero-intro-pending.hero-intro-settling .site-header,
html.hero-intro-pending.hero-intro-settling .hero-copy {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 720ms ease 240ms,
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1) 240ms;
}

html.hero-intro-complete .hero-building-visual {
  animation: hero-building-target-reveal 380ms ease both;
}

@keyframes hero-building-target-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1080px) {
  .hero-with-visual {
    grid-template-columns: minmax(0, 0.86fr) minmax(460px, 1.14fr);
  }

  .hero-with-visual h1 {
    font-size: clamp(3.15rem, 5.8vw, 5.2rem);
  }
}

@media (max-width: 900px) {
  .hero-with-visual {
    width: 100%;
    margin-left: 0;
    transform: none;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 6vw, 3.5rem);
    min-height: auto;
    padding-top: clamp(1.25rem, 4vw, 2.5rem);
  }

  .hero-with-visual::before {
    top: -4rem;
    right: -18rem;
    width: 44rem;
    height: 44rem;
  }

  .hero-building-visual {
    grid-row: 1;
    width: min(100%, 860px);
    justify-self: center;
  }

  .hero-with-visual .hero-copy {
    grid-row: 2;
    max-width: 920px;
  }

  .hero-with-visual h1 {
    max-width: 920px;
    font-size: clamp(3.15rem, 9vw, 5.75rem);
  }
}

@media (max-width: 620px) {
  .hero-with-visual {
    gap: 2rem;
    padding-top: 0.75rem;
  }

  .hero-building-visual::before {
    inset: -0.55rem 0.75rem 0.7rem -0.7rem;
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  }

  .hero-building-frame {
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
  }

  .hero-building-frame img {
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  }

  .hero-building-visual figcaption {
    display: block;
    margin-top: 0.65rem;
  }

  .hero-building-visual figcaption small {
    display: block;
    margin-top: 0.2rem;
    text-align: left;
  }

  .hero-building-intro-frame {
    width: min(96vw, calc(82svh * 1.5));
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-building-intro {
    display: none !important;
  }

  html.hero-intro-pending .site-header,
  html.hero-intro-pending .hero-copy,
  html.hero-intro-pending .hero-building-visual {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
