/* Owner-entered words and URLs must reflow instead of widening the page. */
main,
.site-footer,
.services-menu,
#photo-viewer {
  overflow-wrap: anywhere;
}

.section-heading > .text-link {
  flex-shrink: 0;
}

.services-menu {
  position: relative;
  font-size: 14px;
}
.services-menu summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 0;
}
.services-menu summary:after {
  content: "⌄";
  margin-left: 8px;
}
.services-menu > div {
  position: absolute;
  top: 100%;
  left: -20px;
  width: 270px;
  max-height: 360px;
  overflow: auto;
  background: #fff;
  box-shadow: 0 14px 36px #173b4c20;
  border: 1px solid #dce2e0;
  padding: 10px;
  z-index: 25;
}
.services-menu > div a {
  display: block;
  padding: 11px;
  text-decoration: none;
}
.services-menu a:hover {
  background: #f0f4f5;
}
.services-menu small {
  display: block;
  color: #65736f;
}
.owner-link {
  opacity: 0.7;
}
.site-footer .site-credit {
  display: block;
  margin: 20px auto 0;
  color: rgb(255 255 255 / 65%);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.site-credit a {
  color: inherit;
  font-weight: 500;
  text-decoration-color: rgb(255 255 255 / 30%);
  text-underline-offset: 3px;
}
.site-credit a:hover,
.site-credit a:focus-visible {
  color: white;
  text-decoration-color: currentColor;
}
.managed-services {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.service-card h3 a {
  text-decoration: none;
}
.service-photo {
  display: block;
  margin: -32px -32px 24px;
  background: #f0f3f3;
}
.service-photo img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  display: block;
}
.availability {
  font-size: 13px;
  color: #8c511f;
  margin-bottom: 20px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.project-card {
  border: 1px solid #dce2e0;
  background: white;
  min-width: 0;
}
.project-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf0f1;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.project-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-card-copy {
  padding: 22px;
}
.project-card-copy h3 {
  font-size: 22px;
  margin: 6px 0 12px;
}
.project-card-copy h3 a {
  text-decoration: none;
}
.project-card-copy > span:last-child {
  font-size: 13px;
  color: #667873;
}
.quiet-empty {
  padding: 42px;
  border: 1px solid #dce2e0;
  background: #eff3f2;
}
.quiet-empty h3 {
  margin: 10px 0 14px;
}
.quiet-empty p {
  max-width: 530px;
  margin-bottom: 22px;
}
.page-heading {
  padding-top: 55px;
  padding-bottom: 45px;
}
.page-heading .back-link {
  font-size: 14px;
  display: inline-block;
  margin-bottom: 38px;
}
.page-heading h1 {
  max-width: 850px;
  font-size: clamp(38px, 5vw, 64px);
  margin-bottom: 23px;
}
.page-heading > p {
  max-width: 650px;
  font-size: 18px;
}
.collection-section {
  padding-bottom: 75px;
}
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 5px 0 30px;
}
.gallery-filters a {
  border: 1px solid #bdcbce;
  padding: 9px 18px;
  text-decoration: none;
  font-size: 14px;
  border-radius: 24px;
}
.gallery-filters a.selected {
  background: #173b4c;
  color: white;
  border-color: #173b4c;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 38px;
}
.detail-content {
  padding-bottom: 70px;
}
.detail-cover {
  margin-bottom: 35px;
  background: #eff3f2;
}
.detail-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 650px;
  object-fit: contain;
}
.detail-gallery {
  columns: 2;
  column-gap: 25px;
  margin-bottom: 40px;
}
.detail-gallery figure {
  break-inside: avoid;
  margin-bottom: 25px;
}
.detail-gallery img {
  display: block;
  width: 100%;
  height: auto;
}
.detail-gallery figcaption {
  padding-top: 10px;
  font-size: 14px;
  color: #586e72;
}
.prose {
  max-width: 800px;
  font-size: 18px;
  margin-bottom: 35px;
}
.prose p + p {
  margin-top: 20px;
}
.availability-notice {
  max-width: 720px;
  border-left: 3px solid #a97740;
  padding: 17px 22px;
  background: #fbf3e8;
  font-size: 16px;
}
.reviews-section {
  padding-block: 45px 70px;
}
.reviews-content > p {
  padding: 22px 0;
  color: #65736f;
  border-top: 1px solid #dce2e0;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.review-card {
  padding: 25px;
  border: 1px solid #dce2e0;
}
.review-card blockquote {
  margin: 20px 0;
  white-space: pre-wrap;
}
.review-person {
  display: flex;
  gap: 12px;
  align-items: center;
}
.review-person img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}
.review-card small {
  display: block;
  color: #65736f;
}
.review-source {
  font-size: 13px;
}
.google-attribution {
  display: block;
  width: 98px;
  height: 18px;
  margin: 20px 10px 10px;
}
.lightbox-count {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: white;
  font-size: 14px;
}
#photo-viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 60px 75px;
  border: 0;
  background: #10222af2;
  color: white;
}
#photo-viewer::backdrop {
  background: #10222a;
}
#photo-viewer[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
#photo-viewer figure {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
#photo-viewer img {
  max-width: 100%;
  max-height: calc(100% - 55px);
  object-fit: contain;
  min-height: 0;
}
#photo-caption {
  font-size: 15px;
  text-align: center;
}
#photo-viewer button {
  position: absolute;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  width: 52px;
  height: 52px;
  font-size: 42px;
  z-index: 1;
}
#photo-viewer .lightbox-close {
  top: 5px;
  right: 12px;
}
#photo-viewer .lightbox-previous {
  left: 10px;
  top: 45%;
}
#photo-viewer .lightbox-next {
  right: 10px;
  top: 45%;
}
@media (max-width: 1100px) {
  .header-inner nav {
    gap: 18px;
  }
  .project-grid {
    gap: 18px;
  }
  .project-card-copy {
    padding: 18px;
  }
}
@media (max-width: 760px) {
  .header-inner nav {
    max-height: var(--menu-available-height, calc(100dvh - 102px));
    overflow-y: auto;
  }
  .services-menu > div {
    position: static;
    box-shadow: none;
    border: 0;
    max-height: 240px;
    width: 100%;
    background: #f1f5f5;
  }
  .services-menu summary {
    font-size: 16px;
    padding: 15px 0;
  }
  .services-menu > div a {
    font-size: 15px;
  }
  .managed-services {
    grid-template-columns: 1fr;
  }
  .service-card + .service-card {
    border-left: 1px solid #dce2e0;
    border-top: 0;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .project-cover {
    aspect-ratio: 4/3;
  }
  .page-heading {
    padding-block: 35px;
  }
  .page-heading h1 {
    font-size: 39px;
  }
  .page-heading .back-link {
    margin-bottom: 28px;
  }
  .detail-gallery {
    columns: 1;
  }
  .detail-content .prose {
    font-size: 17px;
  }
  .gallery-filters {
    gap: 8px;
  }
  .gallery-filters a {
    padding: 8px 13px;
  }
  .quiet-empty {
    padding: 25px;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  #photo-viewer {
    padding: 60px 30px 75px;
  }
  #photo-viewer .lightbox-previous {
    left: 0;
    top: auto;
    bottom: 8px;
  }
  #photo-viewer .lightbox-next {
    right: 0;
    top: auto;
    bottom: 8px;
  }
}
.project-service-link {
  display: inline-block;
  margin: 0 0 25px;
  font-size: 15px;
  font-weight: 600;
}

/* Our Story extends the existing page and card patterns. */
.story-teaser-link { color: #d4dfe2; font-size: 14px; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.story-heading, .story-body, .story-company { overflow-wrap: anywhere; }
.story-heading { padding-bottom: 35px; }
.story-body { padding-bottom: 30px; }
.story-body .prose { max-width: 800px; }
.people-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; }
.person-card { min-width: 0; border: 1px solid var(--line); background: white; }
.person-photo { background: #edf1ef; }
.person-photo img { display: block; width: 100%; height: auto; max-height: 430px; object-fit: contain; }
.person-copy { padding: 24px; overflow-wrap: anywhere; }
.person-copy h3 { font-size: 24px; }
.person-role { color: var(--muted); margin-top: 6px; font-size: 14px; }
.person-bio { margin-top: 18px; font-size: 15px; }
.person-bio p + p { margin-top: 14px; }
.story-company .detail-gallery { margin: 0; }
@media(max-width:1000px) { .people-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .people-grid { grid-template-columns: minmax(0,1fr); } }

/* Repeated official seal, confined to the homepage hero. */
.window-hero-copy > .home-secondary-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  margin-top: 28px;
}
@media (max-width: 1100px) {
  .window-hero-copy > .home-secondary-logo { width: 150px; }
}
@media (max-width: 760px) {
  .window-hero-copy > .home-secondary-logo { width: 120px; margin-top: 24px; }
}
