/* Remove unintended ultrawide side buffers while preserving the approved page layouts. */

/* About: second section only. */
main .firm-band .firm-card {
  width: calc(100% - (var(--page-gutter) * 2)) !important;
  max-width: none !important;
}

/* Services: allow the hero and service sections to use the available viewport width. */
main .services-hero .services-hero-grid,
main .service-section > .container {
  max-width: none !important;
}

/* White Papers: remove the fixed desktop caps from the hero and paper list. */
main .wp-hero .wp-hero-grid,
main .papers-section .paper-list {
  max-width: none !important;
}

/* News & Insights: keep page gutters, but remove the large centered side buffers. */
main .news-hero .hero-inner,
main .featured-section .featured-shell,
main .other-news .other-shell {
  width: calc(100% - (var(--page-gutter) * 2)) !important;
  max-width: none !important;
}

/* Contact: match the full-width treatment used by the approved hero pages. */
main .contact-hero .hero-inner,
main .contact-section .contact-grid {
  width: calc(100% - (var(--page-gutter) * 2)) !important;
  max-width: none !important;
}

/* Footer alignment now lives only in Footer.astro so later global fixes cannot move it. */

/* Homepage: the three-column proof band uses white text on navy. */
main .proof h2,
main .proof p:not(.eyebrow) {
  color: var(--color-white) !important;
}

/* Homepage: keep the scrolling focus-area strip visible beneath the proof cards. */
main .marquee-band {
  display: block !important;
  visibility: visible !important;
  overflow: hidden !important;
  min-height: 54px;
  padding: 1.05rem 0 !important;
  background: #d8d7d2 !important;
  color: rgba(26, 43, 70, 0.58) !important;
  text-transform: uppercase;
  white-space: nowrap;
}

main .marquee-band .marquee-track {
  display: flex !important;
  width: max-content !important;
  animation: mts-focus-marquee 42s linear infinite !important;
  will-change: transform;
}

main .marquee-band .marquee-track span {
  display: inline-flex !important;
  align-items: center;
}

main .marquee-band .marquee-track span::after {
  display: inline-block !important;
  margin: 0 0.9rem !important;
  color: rgba(69, 98, 142, 0.62) !important;
  content: "◆" !important;
}

@keyframes mts-focus-marquee {
  to { transform: translateX(-50%); }
}

/* White Papers: restore the label-to-title gap after the decorative rule was removed. */
main .wp-hero .eyebrow {
  margin-bottom: 1.8rem !important;
}

main .wp-hero h1 {
  text-wrap: balance;
}

/* About: tighten the hero label/title/body spacing to match the other page heroes. */
main .about-hero h1 {
  margin: 1.55rem 0 1.5rem !important;
  text-wrap: balance;
}

/* Services: the hero uses .section-heading, but must not inherit its large grid gap. */
main .services-hero .hero-copy {
  display: block !important;
}

main .services-hero .hero-copy .eyebrow {
  margin: 0 !important;
}

main .services-hero .hero-copy h1 {
  margin: 1.55rem 0 1.5rem !important;
  gap: 0 !important;
}

main .services-hero .hero-copy > p:last-child {
  margin: 0 !important;
}

/* News & Insights: remove the stray rule in the first hero and keep intentional spacing. */
main .news-hero .hero-rule {
  display: none !important;
}

main .news-hero .hero-copy h1 {
  margin-top: 1.55rem !important;
}

@media (min-width: 1081px) {
  /* About: give the title enough width to resolve to two balanced lines. */
  main .about-hero .about-hero-inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.5fr) !important;
  }

  main .about-hero .about-hero-copy,
  main .about-hero h1 {
    max-width: 1150px !important;
  }

  /* White Papers: keep “development seriously” together on the second title line. */
  main .wp-hero .wp-hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.35fr) !important;
    gap: clamp(2.5rem, 5vw, 5.5rem) !important;
  }

  main .wp-hero .wp-hero-copy,
  main .wp-hero h1 {
    max-width: 1260px !important;
  }
}

@media (max-width: 700px) {
  main .services-hero .hero-copy h1 {
    margin: 1.35rem 0 1.3rem !important;
  }

  main .news-hero .hero-copy h1 {
    margin-top: 1.3rem !important;
  }
}

@media (max-width: 620px) {
  main .about-hero h1 {
    margin: 1.4rem 0 1.4rem !important;
  }

  main .wp-hero .eyebrow {
    margin-bottom: 1.55rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  main .marquee-band .marquee-track {
    animation: none !important;
  }
}