/* QBD Power — shared interaction and responsive polish.
   Kept separate from the legacy stylesheet so future refinements stay auditable. */

:root {
  color-scheme: light;
  scroll-padding-top: 88px;
}

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  text-rendering: optimizeLegibility;
}

img, video, svg {
  max-width: 100%;
}

p, li, a, button, label {
  overflow-wrap: break-word;
}

button, .btn, .gallery-filter, .cap-card__toggle,
.hero-arrow, .hero-progress button, .mobile-close {
  touch-action: manipulation;
}

.btn, .gallery-filter, .cap-card__toggle {
  min-height: 44px;
}

.menu-btn, .mobile-close, .hero-arrow {
  min-width: 44px;
  min-height: 44px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.site-header,
.mobile-panel,
.site-footer {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .cap-card:hover,
  .about-contractor-card:hover,
  .project-detail-card:hover,
  .about-purpose-card:hover {
    box-shadow: var(--shadow-md);
  }
}

@media (hover: none), (pointer: coarse) {
  .btn:hover,
  .cap-card:hover,
  .about-contractor-card:hover,
  .project-detail-card:hover,
  .brand:hover {
    transform: none;
  }

  .cap-card:hover .cap-card__media img {
    transform: none;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 72px;
  }

  .section {
    padding-block: clamp(48px, 10vw, 60px);
  }

  .container {
    width: min(var(--max), calc(100% - 36px));
  }

  .btn-row {
    gap: 10px;
  }

  .btn-row .btn {
    min-height: 46px;
  }

  .section-title {
    line-height: 1.16;
    text-wrap: balance;
  }

  .section-subtitle {
    line-height: 1.65;
  }

  .gallery-filters {
    gap: 8px;
  }

  .gallery-filter {
    padding-inline: 14px;
  }

  .contact-detail a,
  .contact-detail span {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  .container {
    width: calc(100% - 32px);
  }

  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* Contractor-focused hierarchy: keep the first action obvious and service routes scannable. */
.home-page .hero-content {
  max-width: 900px;
}

.home-page .hero-kicker {
  letter-spacing: .16em;
}

.home-page .hero-content h1 {
  max-width: 15ch;
  text-wrap: balance;
}

.home-page .hero-content > p {
  max-width: 58ch;
  line-height: 1.7;
}

.home-page .hero-content .btn-row {
  margin-top: clamp(22px, 3vw, 32px);
  gap: 12px;
}

.services-page .services-intro__lead {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  align-items: end;
  gap: clamp(24px, 5vw, 64px);
}

.services-page .services-intro__lead > p {
  max-width: 46ch;
  margin: 0 0 5px;
  padding-left: 22px;
  border-left: 3px solid var(--gold);
  line-height: 1.75;
}

.services-page .services-quicklinks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(24px, 4vw, 38px);
}

.services-page .services-quicklinks a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--crimson);
  font: 700 .78rem/1.3 'Montserrat', sans-serif;
  letter-spacing: .04em;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.services-page .services-quicklinks a span {
  color: var(--charcoal);
  font: 600 .9rem/1.35 'Open Sans', sans-serif;
  letter-spacing: 0;
}

.services-page .services-quicklinks a:hover {
  border-color: var(--crimson);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.services-page .service-showcase__content h3 {
  text-wrap: balance;
}

.services-page .service-showcase__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.services-page .service-showcase__link,
.services-page .manpower-panel__content .btn {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .services-page .services-intro__lead {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .services-page .services-intro__lead > p {
    max-width: 60ch;
  }

  .services-page .services-quicklinks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .services-page .services-quicklinks a {
    gap: 8px;
    padding: 11px 10px;
    font-size: .72rem;
  }

  .services-page .services-quicklinks a span {
    font-size: .82rem;
  }

  .services-page .service-showcase__list {
    grid-template-columns: 1fr;
  }
}
