/* Production responsive hardening layer */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { max-width: 100%; overflow-x: hidden; }
img, video, iframe, canvas, svg { max-width: 100%; }
img { height: auto; }
.container, .section, main, article { min-width: 0; }
.container { width: min(100% - 2rem, 1240px); margin-inline: auto; }
.project-card, .journal-card, figure { min-width: 0; }
.project-card img, .journal-card img, .pd-gallery img { display: block; width: 100%; object-fit: cover; }
.pd-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.6rem, 1.5vw, 1.2rem); }
.pd-gallery img { aspect-ratio: 4 / 3; }
.pd-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.pd-narrative, .pd-facts { min-width: 0; overflow-wrap: anywhere; }
.pd-narrative p, .pd-narrative li, .pd-facts { line-height: 1.75; }
pre, code, table { max-width: 100%; }
pre { overflow-x: auto; }
table { display: block; overflow-x: auto; }
input, select, textarea, button { max-width: 100%; font: inherit; }
textarea { resize: vertical; }
.hero-content, .hero h1, .section-header h2 { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .pd-body-grid { grid-template-columns: 1fr; }
  .pd-facts { order: -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
  .pd-facts .btn { grid-column: 1 / -1; width: fit-content; max-width: 100%; }
  .pd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid, .journal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { width: min(100% - 1.25rem, 1240px); }
  .section { padding-block: clamp(2.25rem, 6.5vw, 2.85rem); }
  .hero { min-height: min(760px, 100vh); min-height: min(760px, 100svh); }
  .hero h1 { font-size: clamp(2.25rem, 12vw, 4rem); line-height: .98; }
  .projects-grid, .journal-grid, .pd-gallery { grid-template-columns: 1fr; }
  .pd-facts { grid-template-columns: 1fr; }
  .pd-facts .btn { grid-column: auto; width: 100%; }
  .pd-gallery img { aspect-ratio: 16 / 11; }
  .site-header, .footer-top { min-width: 0; }
  .brand-name, .brand-title { max-width: 70vw; overflow-wrap: anywhere; }
  .btn, button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

/* Project detail footer copyright: keep the legal notice on one line. */
.project-detail-page .footer-copyright {
  display: inline !important;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
@media (max-width: 480px) {
  .project-detail-page .footer-copyright {
    font-size: .62rem !important;
    letter-spacing: .035em !important;
  }
}

@media (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .home-page .philosophy-section.parallax-bg,
  .about-page .philosophy-section.parallax-bg,
  .contact-page .philosophy-section.parallax-bg,
  .projects-page .philosophy-section.parallax-bg,
  .journal-archive-page .philosophy-section.parallax-bg,
  .project-detail-page .project-cta-parallax {
    background-image: none !important;
    background-attachment: scroll !important;
  }

  .home-page .philosophy-section.parallax-bg::before,
  .about-page .philosophy-section.parallax-bg::before,
  .contact-page .philosophy-section.parallax-bg::before,
  .projects-page .philosophy-section.parallax-bg::before,
  .journal-archive-page .philosophy-section.parallax-bg::before,
  .project-detail-page .project-cta-parallax::before {
    content: "" !important;
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    background-image: linear-gradient(rgba(18, 21, 23, .68), rgba(18, 21, 23, .76)), var(--parallax-image) !important;
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    clip-path: inset(var(--parallax-clip, 100% 0 100% 0)) !important;
    pointer-events: none !important;
  }

  .about-page .philosophy-section.parallax-bg::before {
    background-image: linear-gradient(rgba(18, 21, 23, .68), rgba(18, 21, 23, .76)), url('/assets/images/people/sr-architect-pallob-dhaka-bangladesh.webp') !important;
  }

  .home-page .philosophy-section.parallax-bg .philosophy-overlay,
  .about-page .philosophy-section.parallax-bg .philosophy-overlay,
  .contact-page .philosophy-section.parallax-bg .philosophy-overlay,
  .projects-page .philosophy-section.parallax-bg .philosophy-overlay,
  .journal-archive-page .philosophy-section.parallax-bg .philosophy-overlay,
  .project-detail-page .project-cta-parallax::after,
  .project-detail-page .project-cta-parallax .philosophy-overlay {
    background: transparent !important;
  }
}


/* Keep the compact homepage service eyebrow fully visible on narrow phones. */
@media (max-width: 380px) {
  .hero-eyebrow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    white-space: normal;
    column-gap: .35rem;
    row-gap: .25rem;
  }
  .hero-eyebrow > span { white-space: nowrap; }
  .hero-eyebrow-group {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    white-space: nowrap;
  }
}

/* Compact, consistent vertical rhythm across the complete site. */
:root { --section-space: clamp(2.25rem, 4vw, 3.75rem); }
.philosophy-section.parallax-bg { padding-block: clamp(2.25rem, 4vw, 3.5rem); }
