/* Final Citadel polish layer: mobile Safari navigation containment, shared subpage rhythm,
   and responsive safeguards for the supplied project imagery. */

.subpage-brand .brand img,
.site-header .brand img {
  flex: 0 0 auto;
}

.page-hero {
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(34vw, 360px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 155, 98, 0.7));
}

.page-intro {
  max-width: 42ch;
}

.project-strip-media {
  position: relative;
  aspect-ratio: 1 / 1;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.project-strip-media::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.project-strip-copy .button {
  margin-top: 12px;
}

.detail-block > .button:last-child {
  margin-top: 12px;
}

.site-footer .footer-brand-wrap {
  min-width: 0;
}

.site-footer .footer-brand-wrap > div {
  min-width: 0;
}

@media (max-width: 760px) {
  /* Safari/WebKit creates a containing block for fixed descendants of a filtered
     ancestor. Removing header blur while the mobile nav is in use keeps the menu
     fixed to the viewport instead of the 72px sticky header. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-nav {
    min-height: 100dvh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: calc(96px + env(safe-area-inset-top));
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  body.nav-open .mobile-call {
    opacity: 0;
    pointer-events: none;
  }

  .page-hero::after {
    width: 46vw;
  }

  .project-strip {
    margin-bottom: 76px;
  }

  .project-strip-media {
    width: min(620px, 100%);
    margin-inline: auto;
  }

  .project-strip-copy h2 {
    font-size: clamp(2.45rem, 11vw, 3.8rem);
  }

  .footer-brand-wrap {
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .brand-text small {
    max-width: 18ch;
    line-height: 1.15;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 26px;
  }

  .site-nav a {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .site-nav .nav-call {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    text-align: center;
  }

  .page-hero {
    padding-top: 54px;
  }

  .page-intro {
    font-size: 1rem;
    line-height: 1.6;
  }

  .content-grid {
    padding-block: 58px;
  }

  .contact-item a,
  .footer-contact a {
    overflow-wrap: anywhere;
  }
}
