@font-face {
  font-family: "Instrument Serif";
  src: url("./media/instrument-serif.ttf") format("truetype");
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("./media/instrument-serif-italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Instrument Sans", system-ui, sans-serif;
  color: #fff9ee;
  background: #101924;
  --cream: #fff9ee;
  --champagne: #efd0a3;
  --ink: #101924;
  --gutter: clamp(28px, 5.15vw, 92px);
  --display: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
button, summary { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 4px;
}

.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 360px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #1b293b;
}

.outside, .facade, .interior { position: absolute; inset: 0; }
.outside {
  overflow: hidden;
  background: linear-gradient(180deg, #263951, #485f7b 64%, #19232a);
}

.outside::before, .outside::after {
  position: absolute;
  content: "";
  inset: 0;
  pointer-events: none;
}

.outside::before {
  z-index: 1;
  background:
    linear-gradient(90deg, #0c1525ba, #0f1a2d7a 26%, #10192b24 48%, transparent 65%),
    linear-gradient(180deg, #0b142570, transparent 19%, transparent 76%, #0c14216b);
  transition: opacity 560ms ease;
}

.facade {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

.floor-zone {
  fill: #ffda9e;
  fill-opacity: 0;
  stroke: #ffdeb0;
  stroke-width: 1;
  stroke-opacity: 0;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  outline: none;
  transition: fill-opacity 175ms ease, stroke-opacity 175ms ease;
}

.floor-zone.is-active {
  fill-opacity: .29;
  stroke-opacity: .8;
}

.floor-marker {
  fill: #fff5df;
  stroke: #fff5df;
  stroke-width: 1;
  opacity: .36;
  pointer-events: none;
  transition: opacity 175ms ease, fill 175ms ease, stroke 175ms ease;
}

.floor-marker.is-active { opacity: .95; fill: #ffdda7; stroke: #ffdda7; }
.floor-marker-ring { fill: none; }
.floor-marker-line { stroke-dasharray: 2 2; }

.topbar {
  position: absolute;
  z-index: 4;
  inset: 0 var(--gutter) auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: env(safe-area-inset-top, 0px) 0;
  border-bottom: 1px solid #fff9ee35;
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #fcf4e5;
  font-size: .77rem;
  font-weight: 600;
  letter-spacing: .24em;
  line-height: 1;
}

.wordmark-icon { width: 28px; height: 31px; color: var(--champagne); }
.wordmark-secondary { display: block; margin-top: 6px; font-size: .54rem; letter-spacing: .46em; }
.floor-menu { position: relative; }

.floor-menu-toggle, .back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #fff9ee55;
  border-radius: 999px;
  background: #141e2d91;
  font-size: .81rem;
  font-weight: 550;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  transition: background 160ms ease, border-color 160ms ease;
}

.floor-menu-toggle { list-style: none; cursor: pointer; }
.floor-menu-toggle::-webkit-details-marker { display: none; }
.floor-menu-toggle:hover, .floor-menu[open] .floor-menu-toggle, .back-button:hover {
  border-color: #efd0a3bf;
  background: #243249ed;
}

.control-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.chevron { width: 12px; height: 12px; opacity: .78; }
.floor-menu[open] .chevron { transform: rotate(180deg); }

.floor-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 11px);
  width: 216px;
  padding: 9px;
  border: 1px solid #fff9ee37;
  border-radius: 15px;
  background: #111a28f5;
  box-shadow: 0 14px 40px #080e1a69;
  backdrop-filter: blur(18px);
}

.floor-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 0;
  margin: 0;
  max-height: 48dvh;
  overflow: auto;
  list-style: none;
}

.floor-choice {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff9ee0a;
  font-size: .76rem;
  white-space: nowrap;
}

.floor-choice:hover, .floor-choice:focus-visible { background: #fff9ee1d; }
.floor-choice.is-active, .floor-choice[aria-pressed="true"], .floor-choice[aria-current="true"] {
  border-color: #efd0a37d;
  color: var(--champagne);
  background: #efd0a322;
}
.floor-choice:focus-visible { outline-offset: -3px; }

.intro {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  bottom: clamp(62px, 12vh, 128px);
  pointer-events: none;
}

.intro h1 {
  width: min-content;
  font: 400 clamp(76px, 8.35vw, 145px)/.82 var(--display);
  letter-spacing: -.035em;
  text-shadow: 0 4px 38px #0c152245;
}

.intro em { color: var(--champagne); font-weight: 400; }

.explore-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 0 6px 0 0;
  border: 0;
  border-radius: 999px;
  background: none;
  pointer-events: auto;
  font-size: .85rem;
  font-weight: 600;
}

.explore-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid #fff9ee72;
  border-radius: 50%;
  color: var(--champagne);
  transition: background 175ms ease, border-color 175ms ease, color 175ms ease;
}

.explore-icon svg { width: 21px; height: 21px; }
.explore-button:hover .explore-icon {
  border-color: var(--champagne);
  color: #172030;
  background: var(--champagne);
}

.entry-wrap {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: max(37px, env(safe-area-inset-bottom, 0px));
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 175ms ease, transform 175ms ease, visibility 175ms;
}

.has-selection .entry-wrap {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.entry-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 19px;
  min-height: 50px;
  padding: 0 16px 0 20px;
  border: 1px solid #f6dbb4;
  border-radius: 999px;
  background: #f2d6ac;
  color: #202631;
  box-shadow: 0 4px 22px #070c1a52;
  font-size: .86rem;
  font-weight: 660;
  transition: background 175ms ease;
}

.entry-button:hover { background: #ffe8c7; }
.entry-button:disabled { opacity: .72; }
.entry-dot { padding-inline: 2px; }

.floor-tooltip {
  position: fixed;
  z-index: 6;
  top: 0;
  left: 0;
  padding: 6px 11px;
  border: 1px solid #efd0a38a;
  border-radius: 5px;
  opacity: 0;
  background: #141b26f5;
  color: #fbe2bd;
  pointer-events: none;
  white-space: nowrap;
  font-size: .76rem;
  font-weight: 650;
  transition: opacity 125ms ease;
}

.floor-tooltip.is-visible { opacity: 1; }
.outside-ui { transition: opacity 270ms ease; }
.stage:is(.is-entering, .is-inside, .is-returning) .outside-ui { opacity: 0; pointer-events: none; }
.stage:is(.is-entering, .is-inside, .is-returning) .outside { pointer-events: none; }
.stage:is(.is-entering, .is-inside) .outside::before { opacity: .1; }
.stage:is(.is-entering, .is-inside, .is-returning) .explore-button { pointer-events: none; }
.stage:is(.is-entering, .is-inside, .is-returning) .floor-marker { opacity: 0; }

.interior {
  z-index: 5;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  background: #21262a;
  transition: opacity 620ms ease;
}

.is-interior-visible .interior { opacity: 1; transition-duration: 645ms; }
.is-inside .interior { pointer-events: auto; }

.interior-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 57% 55%; }
.interior::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, #0e1620bf, transparent 29%), linear-gradient(0deg, #0b121b24, transparent 20%);
  pointer-events: none;
}

.interior-bar { opacity: 0; transform: translateY(-6px); transition: opacity 220ms ease, transform 220ms ease; }
.is-inside .interior-bar { opacity: 1; transform: none; }
.back-button { padding-inline: 12px 16px; }
.interior-caption { text-align: right; text-shadow: 0 2px 12px #0b1220; }
.interior-caption > span { color: var(--champagne); font-size: .71rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
.interior-caption h2 { font: 400 clamp(30px, 3.2vw, 46px)/.94 var(--display); margin-top: 4px; }

.scene-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.scene-status.is-error, .noscript-note {
  position: absolute;
  z-index: 8;
  bottom: 12px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 26px);
  height: auto;
  padding: 9px 14px;
  clip-path: none;
  border-radius: 7px;
  background: #141b26f5;
  white-space: normal;
  font-size: .8rem;
  transform: translateX(-50%);
}

@media (max-width: 740px) and (orientation: portrait) {
  :root { --gutter: clamp(16px, 5vw, 31px); }
  .stage { min-height: 480px; }
  .outside { background: linear-gradient(#171f33 4%, #384c70 35%, #39465c 68%, #101924 93%); }
  .outside::before {
    background: linear-gradient(180deg, #121b2f 0%, #1b2639 11%, #111b3000 34%, #10192400 70%, #101924 93%);
  }
  .topbar { min-height: 67px; }
  .wordmark { gap: 7px; }
  .wordmark-icon { width: 23px; height: 26px; }
  .intro { inset: max(84px, calc(env(safe-area-inset-top, 0px) + 75px)) var(--gutter) 0; }
  .intro h1 { width: auto; font-size: clamp(51px, 14vw, 80px); line-height: .9; }
  .explore-button { position: absolute; bottom: max(23px, calc(env(safe-area-inset-bottom, 0px) + 12px)); left: 0; margin: 0; }
  .explore-icon { width: 41px; height: 41px; }
  .entry-wrap { right: var(--gutter); left: var(--gutter); bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 13px)); }
  .entry-button { width: 100%; min-height: 46px; }
  .has-selection .explore-button { visibility: hidden; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .topbar { min-height: 62px; }
  .intro { bottom: 26px; }
  .intro h1 { font-size: clamp(59px, 10vw, 80px); }
  .explore-button { margin-top: 16px; }
  .entry-wrap { bottom: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
  .interior { transition-duration: 140ms !important; }
}

/* Main navigation and information pages */
html { scrollbar-gutter: stable; }
html.tower-immersive { overflow: hidden; }
.tower-immersive .stage { touch-action: none; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--champagne); outline-offset: 4px; }
[hidden] { display: none !important; }

site-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 7;
  background: #101924e8;
  backdrop-filter: blur(14px);
}

.home-page site-header {
  position: fixed;
  inset: 0 0 auto;
  background: #101924d9;
  transition: opacity 270ms ease;
}
.tower-immersive site-header { opacity: 0; pointer-events: none; }

.site-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: clamp(22px, 3vw, 54px);
  min-height: 86px;
  margin-inline: var(--gutter);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid #fff9ee35;
}

.site-bar .wordmark { justify-self: start; text-decoration: none; }
.site-menu, .site-language { display: flex; align-items: center; }
.site-menu { gap: clamp(18px, 2.4vw, 42px); }
.site-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  font-size: .85rem;
  font-weight: 570;
  text-decoration: none;
}

.site-menu a:hover, .site-menu a[aria-current="page"] { color: var(--champagne); }
.site-menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: .5em; }
.site-language {
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid #fff9ee55;
  border-radius: 999px;
  background: #141e2d91;
  font-size: .73rem;
  font-weight: 660;
  letter-spacing: .045em;
}

.site-language > :is(a, [aria-current]) {
  display: grid;
  min-width: 33px;
  min-height: 38px;
  place-items: center;
  text-decoration: none;
}

.site-language a:hover, .site-language [aria-current] { color: var(--champagne); }
.language-divider { color: #e7e4dd87; }

.skip-link {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: var(--gutter);
  padding: 10px 14px;
  border-radius: 6px;
  background: #151f2c;
  transform: translateY(calc(-100% - 14px));
}

.skip-link:focus { transform: none; }
.floor-controls {
  position: absolute;
  z-index: 4;
  top: calc(102px + env(safe-area-inset-top, 0px));
  right: var(--gutter);
}

.home-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.45vw, 38px);
  max-width: 1540px;
  padding: clamp(34px, 5.4vw, 86px) var(--gutter);
  margin-inline: auto;
}

.home-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #fff9ee29;
  border-radius: 16px;
  background: #15202d;
  scroll-margin-top: calc(108px + env(safe-area-inset-top, 0px));
}

.home-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: center 55%;
}

.home-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(22px, 3.1vw, 44px);
}

.home-card h2 { font: 400 clamp(33px, 3.4vw, 58px)/1 var(--display); letter-spacing: -.016em; }
.home-card p, .page-intro p, .content-card p, .content-empty {
  color: #d2d8df;
  font-size: .96rem;
  line-height: 1.65;
}

.home-card p { max-width: 52ch; margin-bottom: 10px; }
.section-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: auto;
  padding: 0 15px;
  border: 1px solid #fff9ee55;
  border-radius: 999px;
  background: #141e2d91;
  font-size: .83rem;
  font-weight: 620;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.section-button span { color: var(--champagne); font-size: 1.14em; }
.section-button:hover { border-color: #efd0a3bf; background: #243249; }

.content-page {
  min-height: calc(100dvh - 86px);
  background: radial-gradient(ellipse at 80% 4%, #23344a 0%, transparent 47%), var(--ink);
}

.content-shell { max-width: 1540px; padding: clamp(38px, 6vw, 90px) var(--gutter) clamp(54px, 8vw, 110px); margin-inline: auto; }
.page-intro { margin-bottom: clamp(30px, 4.5vw, 67px); }
.page-intro-split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 6vw, 88px); }
.page-intro h1 { margin-block: 0 18px; font: 400 clamp(45px, 5.7vw, 91px)/.95 var(--display); letter-spacing: -.025em; }
.page-intro p { max-width: 55ch; }
.page-image, .project-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #fff9ee29;
  border-radius: 14px;
}

.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.content-card, .content-empty {
  padding: clamp(19px, 2.6vw, 34px);
  border: 1px solid #fff9ee29;
  border-radius: 14px;
  background: #15202d;
}

.content-card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.content-card :is(h2, h3) { margin: 0; font: 400 clamp(27px, 3vw, 45px)/1.04 var(--display); }
.source-links { display: grid; align-items: start; gap: 9px; padding-top: 6px; margin-top: auto; }
.text-link { color: var(--champagne); font-size: .87rem; font-weight: 620; text-underline-offset: .25em; line-height: 1.5; }
.text-link:hover { color: #fff2da; }
.section-title { margin-bottom: 15px; font: 400 clamp(32px, 4vw, 52px)/1.05 var(--display); }
.project-image { margin-bottom: 5px; }
.content-card .project-location, .page-intro .project-location { color: var(--champagne); font-size: .88rem; }
.project-description { margin-top: 18px; max-width: 68ch; color: #d2d8df; line-height: 1.65; }
.project-card .section-button { margin-top: auto; }
[data-project-detail] > a { display: inline-block; margin-bottom: 24px; }
.project-facts { display: grid; width: 100%; gap: 10px; margin: 5px 0; }
.project-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; border-top: 1px solid #fff9ee29; padding-top: 8px; }
.project-facts dt { color: #d2d8df; font-size: .85rem; }
.project-facts dd { margin: 0; font-size: .9rem; }

@media (max-width: 820px) {
  .content-grid { grid-template-columns: 1fr; }
  .page-intro-split { grid-template-columns: 1fr; }
  .page-intro-split .page-image { max-height: 332px; }
}

@media (max-width: 740px) {
  .home-sections { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .site-bar { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; gap: 0 12px; padding-top: env(safe-area-inset-top, 0px); }
  .site-bar .wordmark { min-height: 55px; }
  .site-menu { grid-row: 2; grid-column: 1 / -1; gap: 25px; border-top: 1px solid #fff9ee1c; }
  .site-menu a { font-size: .8rem; }
  .site-language { grid-column: 2; grid-row: 1; }
  .floor-controls { top: calc(116px + env(safe-area-inset-top, 0px)); }
  .floor-menu-toggle { gap: 6px; padding-inline: 9px; font-size: .76rem; }
  .home-card { scroll-margin-top: calc(116px + env(safe-area-inset-top, 0px)); }
}

@media (max-width: 740px) and (orientation: portrait) {
  .home-page .intro { top: calc(140px + env(safe-area-inset-top, 0px)); }
  .home-page .intro h1 { font-size: clamp(44px, 13.4vw, 73px); }
  .home-card > img { aspect-ratio: 16 / 9; }
}

@media (max-width: 390px) and (max-height: 700px) and (orientation: portrait) {
  .home-page .intro { top: calc(133px + env(safe-area-inset-top, 0px)); }
  .home-page .intro h1 { font-size: 44px; }
}

@media (max-height: 500px) and (orientation: landscape) and (min-width: 621px) {
  .site-bar { min-height: 62px; }
  .floor-controls { top: calc(74px + env(safe-area-inset-top, 0px)); }
}
