/* Only the image layer changes; approved text/layout stays in normal flow. */
.photo-header { isolation: isolate; }
.header-photo-stage { position:absolute; inset:0; z-index:-2; overflow:hidden; pointer-events:none; background:#0c2022; }
.header-photo-frame { position:absolute; inset:0; opacity:0; transition:opacity 800ms ease; }
.header-photo-frame.is-visible { opacity:1; }
.header-photo-frame picture, .header-photo-frame img { display:block; width:100%; height:100%; }
.header-photo-frame img { object-fit:cover; object-position:center; }
.header-photo-frame.has-native-limit picture { position:absolute; right:0; top:50%; transform:translateY(-50%); width:min(100%,var(--photo-native-width)); height:min(100%,var(--photo-native-height)); }
.photo-header::before { z-index:-1; }
.photo-header.hero::before { background:linear-gradient(90deg,rgba(6,8,10,.94) 0%,rgba(6,8,10,.78) 45%,rgba(6,8,10,.30) 100%); }
.photo-header.page-hero::before { background:linear-gradient(90deg,rgba(4,6,7,.95),rgba(4,6,7,.45)); }
.photo-header.residential-hero::before { background:linear-gradient(90deg,rgba(4,6,7,.94),rgba(4,6,7,.38)); }
/* A single display preference lives in navigation, outside the photograph. */
.motion-page .background-motion-toggle { display:inline-flex; align-items:center; justify-content:center; min-height:44px; max-width:100%; padding:8px 10px; border:1px solid #75b4b5; border-radius:2px; background:transparent; color:#e7e9ea; font:inherit; font-size:.72rem; font-weight:800; line-height:1.3; white-space:normal; cursor:pointer; }
.motion-page .background-motion-toggle[hidden] { display:none; }
.motion-page .background-motion-toggle:focus-visible { outline:3px solid #a8d8d7; outline-offset:2px; }
.motion-page .background-motion-toggle:disabled { cursor:default; color:#c5d9d7; }
.photo-header .eyebrow { color:#a8d8d7; }
@media(min-width:901px) and (max-width:1100px) {
  .motion-page .nav-toggle { display:block; }
  .motion-page .nav-links { display:none; position:absolute; left:0; right:0; top:74px; padding:22px; background:#0d2426; flex-direction:column; align-items:flex-start; max-height:calc(100dvh - 74px); overflow-y:auto; }
  .motion-page .nav-links.open { display:flex; }
}
/* This is a one-time replacement of the old homepage scale, not a second reduction. */
.home-page .hero h1 { font-size:clamp(3.52rem,6.05vw,5.17rem); overflow-wrap:anywhere; }
.new-source-photo img { object-fit:contain; }
.new-source-photo.photo-small { width:100%; max-width:var(--source-width); justify-self:start; }
@media(max-width:600px) {
  /* One moderate, continuous mobile overlay; no separate text panel. */
  .photo-header.hero::before, .photo-header.page-hero::before, .photo-header.residential-hero::before {
    background:linear-gradient(110deg,rgba(4,6,7,.50) 0%,rgba(4,6,7,.43) 55%,rgba(4,6,7,.35) 100%);
  }
  /* The overlay separates the wording; one soft shadow avoids an outlined edge. */
  .photo-header .eyebrow, .photo-header h1, .photo-header > .wrap > p {
    text-shadow:0 1px 3px rgba(0,0,0,.28);
  }
  .photo-header.hero .btn-outline { background:rgba(4,6,7,.25); }
  /* The outgoing photo stays opaque below the incoming mobile fade, so the
     dark stage backing does not show through two half-transparent images. */
  .photo-header .header-photo-stage { isolation:isolate; }
  .photo-header .header-photo-frame { z-index:0; }
  .photo-header .header-photo-frame.is-visible { z-index:1; }
  .photo-header .header-photo-frame.is-underlay { opacity:1; }
  /* Retain version 69's mobile-only focal positions; desktop crops are unchanged. */
  .photo-header .header-photo-frame[data-photo-id="08_structural-demolition-wide-site"] img { object-position:center 70%; }
  .photo-header .header-photo-frame[data-photo-id="demolition-hero"] img { object-position:center 75%; }
  .photo-header .header-photo-frame[data-photo-id="sitework-concrete-curb"] img { object-position:center 65%; }
  .photo-header .header-photo-frame[data-photo-id="commercial-site-construction-grading"] img { object-position:center 65%; }
  .home-page .hero h1 { font-size:clamp(1.75rem,8.5vw,3.2rem); }
  .home-page .hero .wrap { min-width:0; }
  .home-page .hero .btn { max-width:100%; white-space:normal; text-align:center; overflow-wrap:anywhere; }
}
@media(prefers-reduced-motion:reduce) { .header-photo-frame { transition:none; } }
