.corporate-header,
.gallery-header,
.detail-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 241, 235, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-footer {
  display: block;
  width: 100%;
}

.gallery-header,
.gallery-hero {
  border-bottom: 0;
}

.gallery-grid figcaption {
  border-top: 0;
  margin-top: 10px;
  padding-top: 0;
}

/* Match the two main sub-page headers to the home-page visual language. */
.corporate-header,
.gallery-header,
.detail-header {
  height: 82px;
  color: #fff;
  background: rgba(23, 27, 26, 0.97);
  border-bottom: 0;
  box-shadow: 0 8px 28px rgba(10, 14, 13, 0.08);
}

.corporate-header nav .active,
.gallery-header nav .active {
  border-color: #c5cac8;
}

.corporate-header .header-cta,
.gallery-header .header-cta,
.detail-header .header-cta {
  color: #171b1a;
  background: #f3f1eb;
}

.detail-header .header-cta {
  padding: 14px 19px;
  font-size: 12px;
  font-weight: 700;
}

.detail-header nav,
.detail-header .header-cta,
.detail-title h1,
.project-overview h2,
.facts strong,
.next-project strong {
  font-family: Manrope, sans-serif;
}

.project-overview p,
.facts small,
.placeholder,
.next-project small {
  font-family: "DM Sans", sans-serif;
}

.subpage-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.subpage-menu-toggle i {
  display: block;
  width: 24px;
  height: 1px;
  margin: 7px auto;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.subpage-menu-open {
  overflow: hidden;
}

@media (max-width: 950px) {
  .corporate-header nav,
  .gallery-header nav,
  .detail-header nav,
  .corporate-header .header-cta,
  .gallery-header .header-cta,
  .detail-header .header-cta {
    display: none;
  }

  .subpage-menu-toggle {
    position: relative;
    z-index: 102;
    display: block;
    margin-left: auto;
    cursor: pointer;
  }

  .corporate-header nav.open,
  .gallery-header nav.open,
  .detail-header nav.open {
    position: fixed;
    z-index: 101;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
    height: 100dvh;
    margin: 0;
    padding: 92px 7vw 50px;
    color: #fff;
    background: #171b1a;
  }

  .corporate-header nav.open a,
  .gallery-header nav.open a,
  .detail-header nav.open a {
    font: 500 28px/1.2 Manrope, sans-serif;
    letter-spacing: -0.02em;
  }

  .subpage-menu-toggle[aria-expanded="true"] i:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .subpage-menu-toggle[aria-expanded="true"] i:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
}

/* Full-screen mobile menu with restrained typography. */
@media (max-width: 950px) {
  body.subpage-menu-open {
    overflow: hidden;
  }

  .corporate-header nav.open,
  .gallery-header nav.open,
  .detail-header nav.open {
    inset: 0;
    width: 100%;
    height: 100dvh;
    padding: 90px 7vw 50px;
    align-items: center;
    justify-content: center;
    gap: 22px;
    box-shadow: none;
  }

  .corporate-header nav.open a,
  .gallery-header nav.open a,
  .detail-header nav.open a {
    padding: 4px 0;
    border: 0;
    font: 500 20px/1.25 Manrope, sans-serif;
    text-align: center;
  }
}

.ui-arrow {
  position: relative;
  right: auto;
  bottom: auto;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 0.35em;
  vertical-align: -2px;
}

.ui-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 13L13 3M6 3h7v7' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 13L13 3M6 3h7v7' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ui-arrow::after {
  content: none;
}

@media (max-width: 950px) {
  body > nav.mobile-nav-panel {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    margin: 0;
    padding: 90px 7vw 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #fff;
    background: #171b1a;
  }

  body > nav.mobile-nav-panel a {
    padding: 4px 0;
    border: 0;
    color: #fff;
    font: 500 20px/1.25 Manrope, sans-serif;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .corporate-header,
  .gallery-header,
  .detail-header {
    height: 72px;
  }
}

@media (max-width: 950px) {
  body.subpage-menu-open {
    overflow: auto;
  }

  .corporate-header nav.open,
  .gallery-header nav.open,
  .detail-header nav.open {
    inset: 72px 0 auto;
    height: auto;
    padding: 12px 6vw 18px;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.2);
  }

  .corporate-header nav.open a,
  .gallery-header nav.open a,
  .detail-header nav.open a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font: 500 18px/1.2 Manrope, sans-serif;
    letter-spacing: 0;
    text-align: left;
  }
}

/* Final mobile-menu state: always full viewport with a solid background. */
@media (max-width: 950px) {
  body.subpage-menu-open {
    overflow: hidden;
  }

  .corporate-header nav.open,
  .gallery-header nav.open,
  .detail-header nav.open {
    position: fixed;
    inset: 0;
    z-index: 101;
    display: flex;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    padding: 90px 7vw 50px;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #fff;
    background: #171b1a;
    box-shadow: none;
  }

  .corporate-header nav.open a,
  .gallery-header nav.open a,
  .detail-header nav.open a {
    padding: 4px 0;
    border: 0;
    font: 500 20px/1.25 Manrope, sans-serif;
    text-align: center;
  }
}
