/**
 * layout.css â€” page regions, grids, and vertical rhythm between major bands.
 */
.container {
  width: min(100% - var(--space-6), var(--max-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - var(--space-6), var(--max-width-narrow));
}

/* Header sticks to a clean bar; content gets breathing room below. */
.site-header {
  position: relative;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* Brand gold rule (decorative; meaning stays in text and headings). */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-brand-gold) 0%,
    var(--color-brand-gold-bright) 28%,
    transparent 100%
  );
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-5);
  padding: var(--space-5) 0;
  flex-wrap: wrap;
}

/* Hero: full-bleed band for homepage impact without decorative imagery. */
.hero {
  background: linear-gradient(
    165deg,
    var(--color-primary) 0%,
    var(--color-primary-active) 55%,
    #062a45 100%
  );
  color: var(--color-text-inverse);
  padding: var(--space-9) 0 var(--space-10);
  margin-bottom: 0;
  border-top: 4px solid var(--color-brand-gold);
}

.hero .container {
  max-width: var(--max-width);
}

.hero h1,
.hero .hero__lead {
  color: var(--color-text-inverse);
  max-width: 38ch;
}

.hero h1 {
  margin-bottom: var(--space-4);
}

.hero .hero__lead {
  font-size: var(--text-step-1);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-6);
  max-width: 42ch;
}

.hero__actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* Default main padding; when hero is first child, flush to header (no double gap). */
main {
  padding-top: var(--space-6);
  padding-bottom: var(--space-10);
}

main:has(> .hero) {
  padding-top: 0;
}

main > .section:first-of-type:not(.hero) {
  padding-top: var(--section-space-y);
}

.section {
  padding-block: var(--section-space-y);
}

.section--tight {
  padding-block: var(--space-7);
}

/* Home: text-first office finder below hero (utility band; not branded placard deck) */
.section--location-picker {
  padding-block: var(--space-7) var(--space-7);
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border);
}

.section--surface {
  background: var(--color-surface-subtle);
  border-block: 1px solid var(--color-border);
}

.section--elevated {
  background: var(--color-bg-elevated);
}

/* Responsive grids for cards and location layout */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Location summary cards: 1 â†’ 2 â†’ 4 columns */
.grid--locations {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .grid--locations {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .grid--locations {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Location template: main + aside on large screens */
.layout-location {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 56rem) {
  .layout-location {
    grid-template-columns: 1fr min(22rem, 32%);
  }
}

/* Footer: multi-column nav for wayfinding */
.site-footer {
  background: var(--color-text);
  color: var(--color-surface-subtle);
  border-top: 4px solid var(--color-brand-gold);
  padding: var(--space-8) 0 var(--space-6);
  margin-top: var(--space-8);
}

/* Footer nav links: cool white on navy (>=4.5:1 on --color-text / #15202b).
 * Specificity (0,3,1) beats global a:visited:not(.button):not(.button-link) so
 * visited links do not inherit body purple (--color-link-visited). Directive #33. */
.site-footer .footer-nav a {
  color: #dce8f7;
}

.site-footer .footer-nav a:visited {
  color: #dce8f7;
}

.site-footer .footer-nav a:hover {
  color: #ffffff;
}

.site-footer .footer-nav a:active {
  color: var(--color-brand-gold-bright);
}

/* Focus on dark footer: high-contrast ring (WCAG 2.4.7). */
.site-footer .footer-nav a:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.footer-brand__lockup:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus-ring);
  outline-offset: 3px;
  background-color: rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-meta {
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--text-step--1);
  color: #a8b8c8;
}

.footer-meta p {
  margin: 0;
  max-width: none;
}
/* Footer partner row: GHR logo + site Facebook (Directive #39). */
.footer-meta__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-3);
}

.footer-business-ref {
  margin: 0;
}

.footer-ghr-logo-link {
  display: inline-block;
  line-height: 0;
  border-radius: var(--radius-sm);
}

.footer-ghr-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 16rem);
  max-height: 2.75rem;
}

.footer-ghr-logo-link:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus-ring);
  outline-offset: 3px;
  background-color: rgba(255, 255, 255, 0.08);
}


.footer-brand__lockup {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
}

.footer-brand__lockup:hover {
  opacity: 0.95;
}

.footer-brand__mark {
  display: block;
  width: auto;
  height: auto;
  max-height: clamp(2.75rem, 6.5vw, 4.25rem);
  max-width: min(100%, 14rem);
}

.footer-brand__legal {
  margin: 0 0 var(--space-2);
  font-size: var(--text-step-1);
  color: #ffffff;
  font-weight: var(--font-weight-bold);
}

.footer-brand__legal strong {
  font-weight: var(--font-weight-bold);
}

.footer-brand__tagline {
  margin: 0;
  font-size: var(--text-step--1);
  color: #a8b8c8;
  max-width: 28rem;
}
