/* Mobile layout: shared by the home page, detail pages and quote form. */
@media (max-width: 1000px) {
  .site-header.scrolled { backdrop-filter: none; }
  .site-nav {
    height: 100dvh;
    padding-top: max(6rem, env(safe-area-inset-top));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
  }
  .site-nav.open { visibility: visible; }
  .site-nav a { flex-shrink: 0; max-width: 100%; overflow-wrap: anywhere; }
  .process, .about { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .ticker { padding-block: .5rem; }
  .hero { row-gap: 1.5rem; }
  .selected-projects-head { margin-bottom: 1.25rem; }
  .project-carousel-controls { justify-content: center; margin-bottom: 1rem; }
  .project-carousel > .selected-project { flex: 0 0 100%; min-width: 0; scroll-snap-stop: always; }
  .hero-copy, .section-head, .quote-fields > label { min-width: 0; }
  .hero h1, .section h2 { line-height: 1.05; overflow-wrap: anywhere; }
  .section-head.compact h2 { font-size: clamp(2.6rem, 11vw, 4rem); }
  .selected-projects-head { text-align: center; }
  .selected-projects-head > .eyebrow { justify-content: center; }
  .section-kicker { flex-wrap: wrap; gap: .5rem 1rem; }
  .eyebrow { font-size: .75rem; letter-spacing: .12em; }
  .selected-project-info h3, .selected-project-info p { overflow-wrap: anywhere; }
  .selected-project-info > span { display: block; overflow-wrap: anywhere; }
  .selected-project-info p { font-size: 1rem; }
  .hero-actions, .contact-actions, .detail-actions { gap: 1rem; }
  .hero-actions .button, .contact-email, .detail-actions .button, .quote-form .button {
    width: 100%; min-width: 0; max-width: 100%; align-items: center;
    gap: .75rem; font-size: .875rem;
  }
  .contact { min-height: auto; }
  .contact h2 { font-size: clamp(2.8rem, 11vw, 4rem); }
  .contact-email { overflow-wrap: anywhere; letter-spacing: 0; }
  .detail-main { padding-top: 6.5rem; }
  .detail-breadcrumb { flex-wrap: wrap; margin-bottom: 2rem; }
  .detail-intro, .process-list p, .footer-links a { overflow-wrap: anywhere; }
  .quote-form input, .quote-form select, .quote-form textarea { min-width: 0; max-width: 100%; font-size: 1rem; }
  .project-galleries { max-height: 90dvh; }
  .gallery-heading { align-items: flex-start; }
  .material-preview { height: clamp(120px, 35vw, 190px); }
  .footer-links { gap: .5rem 1.25rem; }
  .footer-identity { column-gap: 1rem; }
  .site-footer .brand-name { font-size: .8rem; }
}

@media (max-width: 1000px) and (max-height: 550px) {
  .site-nav { justify-content: flex-start; gap: 1rem; padding-top: 5rem; }
  .site-nav a { font-size: 1.7rem; }
}

@media (max-width: 700px), (max-height: 550px) {
  .lightbox { max-height: calc(100dvh - 6rem); }
  .lightbox img { height: max(80px, calc(100dvh - 11rem)); max-height: calc(100dvh - 11rem); }
  .lightbox-navigation { padding: .5rem 0; gap: 1rem; }
  .lightbox-close { top: max(.5rem, env(safe-area-inset-top)); right: max(.75rem, env(safe-area-inset-right)); }
}
