/* Shared multi-page additions. Load after styles.css, content.css, and team.css. */

/* The supplied caption-free symbol keeps its native square proportions. */
.brand-logo {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
  background: var(--white);
}

.footer-brand .brand-logo {
  padding: 3px;
  border: 1px solid var(--silver);
}

/* Owner-provided completed-jobs figure replaces the former contact tile. */
.stat-grid > .jobs-stat {
  background: var(--blue);
  border-right: 0;
}

.stat-grid > .jobs-stat strong {
  color: var(--white);
}

.stat-grid > .jobs-stat strong span,
.stat-grid > .jobs-stat p {
  color: var(--silver-light);
}

/* Short inner-page banners retain the home page's navy architectural motif. */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 66px 0 78px;
  background: var(--navy);
  color: var(--white);
}

.page-hero .hero-grid-lines {
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow {
  margin-bottom: 24px;
}

.page-hero h1 {
  max-width: 960px;
  margin: 0 0 23px;
  font-size: clamp(48px, 6vw, 78px);
  line-height: 1.06;
  overflow-wrap: break-word;
}

.page-lede {
  max-width: 690px;
  margin: 0;
  color: #d8e1ea;
  font-size: 17px;
  line-height: 1.75;
}

/* A compact, ruled directory rather than a grid of oversized cards. */
.page-directory {
  background: var(--white);
}

.directory-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
  border-top: 1px solid var(--line);
}

.directory-link {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 26px;
  gap: 18px;
  align-items: center;
  min-height: 130px;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s;
}

.directory-link > div {
  min-width: 0;
}

.directory-number {
  align-self: start;
  padding-top: 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.directory-link h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: clamp(25px, 2.5vw, 33px);
  line-height: 1.1;
  letter-spacing: -.04em;
  transition: color .2s;
}

.directory-link p {
  margin: 0;
  color: #566a7e;
  font-size: 13px;
  line-height: 1.7;
}

.directory-arrow {
  justify-self: end;
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
  transition: transform .2s;
}

.directory-link:hover,
.directory-link:focus-visible {
  background: var(--paper);
}

.directory-link:hover h3,
.directory-link:focus-visible h3 {
  color: var(--blue);
}

.directory-link:hover .directory-arrow,
.directory-link:focus-visible .directory-arrow {
  transform: translateX(4px);
}

.directory-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

/* Keep the current page recognizable without relying on color alone. */
.site-nav > a[aria-current="page"]:not(.nav-cta) {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-nav > .nav-cta[aria-current="page"] {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-nav > a:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}

/* Optional seven-link navigation between footer-main and footer-bottom. */
.footer-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  padding: 19px 0;
  border-top: 1px solid rgba(255, 255, 255, .15);
  color: #c9d6e1;
  font-size: 11px;
  font-weight: 700;
}

.footer-pages a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.footer-pages a:hover,
.footer-pages a[aria-current="page"] {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-pages a:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 4px;
}

/* Also offset form and heading targets, not just section IDs. */
main[id],
main [id] {
  scroll-margin-top: 140px;
}

/* Existing styles cover <=1100px; extend that menu through 1200px. */
@media (min-width: 1101px) and (max-width: 1200px) {
  .site-nav {
    position: fixed;
    inset: 119px 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 28px 24px;
    background: var(--white);
    box-shadow: 0 15px 28px rgba(11, 31, 58, .13);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: .2s;
  }

  .site-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav > a:not(.nav-cta) {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 15px;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle.active span:nth-child(2) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(3) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(4) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Keep all menu destinations reachable on short screens. */
@media (max-width: 1200px) {
  .site-nav {
    max-height: calc(100vh - 119px);
    max-height: calc(100dvh - 119px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 900px) {
  .stat-grid > .jobs-stat {
    grid-column: 1 / -1;
  }

  .directory-links {
    column-gap: 32px;
  }

  .directory-link {
    grid-template-columns: 28px minmax(0, 1fr) 22px;
    gap: 13px;
  }
}

@media (max-width: 620px) {
  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .page-hero {
    padding: 44px 0 53px;
  }

  .page-hero .eyebrow {
    gap: 8px;
    margin-bottom: 20px;
    font-size: 9px;
    letter-spacing: .11em;
  }

  .page-hero .eyebrow span {
    flex-shrink: 0;
    width: 22px;
  }

  .page-hero h1 {
    margin-bottom: 20px;
    font-size: clamp(38px, 10.5vw, 56px);
  }

  .page-lede {
    font-size: 15px;
    line-height: 1.75;
  }

  .directory-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-link {
    min-height: 114px;
    padding: 24px 0;
  }

  .directory-link h3 {
    margin-bottom: 8px;
    font-size: 27px;
  }

  .directory-arrow {
    font-size: 22px;
  }

  .footer-pages {
    column-gap: 24px;
    row-gap: 5px;
    padding: 16px 0;
  }

  .footer-pages a {
    min-height: 40px;
  }

  main[id],
  main [id] {
    scroll-margin-top: 124px;
  }

  .site-nav {
    max-height: calc(100vh - 108px);
    max-height: calc(100dvh - 108px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .directory-link,
  .directory-link h3,
  .directory-arrow {
    transition: none;
  }

  .directory-link:hover .directory-arrow,
  .directory-link:focus-visible .directory-arrow {
    transform: none;
  }
}
