/**
 * CCC Pools — global links, focus, header/footer harmony (BEAD-GLOBAL-001)
 */

/* ——— Light-section body links ——— */
body.ccc-northstar-layout .site-main a:not(.ccc-btn):not(.ccc-area-chip):not(.ccc-related-services__pill):not(.ccc-hub-card):not(.ccc-brand-logo):not(.ccc-blog-card__link):not(.custom-logo-link),
body.ccc-northstar-layout .ccc-prose a:not(.ccc-btn),
body.ccc-northstar-layout .entry-content a:not(.ccc-btn) {
  color: var(--ccc-link-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(8, 120, 201, 0.35);
}

body.ccc-northstar-layout .site-main a:not(.ccc-btn):not(.ccc-area-chip):not(.ccc-related-services__pill):not(.ccc-hub-card):not(.ccc-brand-logo):not(.ccc-blog-card__link):not(.custom-logo-link):hover,
body.ccc-northstar-layout .ccc-prose a:not(.ccc-btn):hover,
body.ccc-northstar-layout .entry-content a:not(.ccc-btn):hover {
  color: var(--ccc-link-dark-hover);
  text-decoration-color: currentColor;
}

/* Navigation links — no underline, dark on light */
.ccc-site-header a:not(.ccc-btn),
.ccc-site-header__link,
.ccc-site-header__submenu a {
  text-decoration: none;
  color: var(--ccc-navy-800);
}

.ccc-site-header__link:hover,
.ccc-site-header__link:focus-visible,
.ccc-site-header__item.is-active > .ccc-site-header__link,
.ccc-site-header__submenu a:hover,
.ccc-site-header__submenu a[aria-current="page"] {
  color: var(--ccc-blue-600);
}

.ccc-site-header__item.is-active > .ccc-site-header__link,
.ccc-site-header__submenu a[aria-current="page"] {
  background: var(--ccc-soft-blue);
}

/* ——— Dark-section links ——— */
.ccc-footer a,
.ccc-site-footer a,
#wrapper-footer a:not(.ccc-btn),
.ccc-request-cta a:not(.ccc-btn):not(.ccc-request-cta__link),
.ccc-dark a:not(.ccc-btn) {
  color: var(--ccc-footer-link);
  text-decoration: none;
}

.ccc-footer a:hover,
.ccc-site-footer a:hover,
#wrapper-footer a:not(.ccc-btn):hover,
.ccc-request-cta a:not(.ccc-btn):not(.ccc-request-cta__link):hover,
.ccc-dark a:not(.ccc-btn):hover {
  color: var(--ccc-footer-link-hover);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.ccc-request-cta .ccc-request-cta__link {
  color: var(--ccc-aqua-200);
  text-decoration: underline;
}

.ccc-request-cta .ccc-request-cta__link:hover {
  color: #fff;
}

/* ——— Global focus-visible ——— */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.ccc-btn:focus-visible,
.ccc-site-header__link:focus-visible,
.ccc-site-header__toggle:focus-visible,
.ccc-footer a:focus-visible,
#wrapper-footer a:focus-visible {
  outline: 3px solid var(--ccc-focus-ring);
  outline-offset: 3px;
  border-radius: 8px;
}

.ccc-footer a:focus-visible,
#wrapper-footer a:focus-visible,
.ccc-request-cta a:focus-visible {
  outline-color: rgba(158, 234, 255, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  a,
  button,
  .ccc-btn,
  .ccc-site-header__link {
    transition: none !important;
  }
}

/* ——— CTA → footer transition ——— */
.ccc-request-cta {
  margin-bottom: 0;
}

#wrapper-footer {
  margin-top: 0;
  background: var(--ccc-footer-bg);
}

/* Light page ending before footer — subtle separation */
body.ccc-northstar-layout .site-main > section:last-child:not(.ccc-request-cta) {
  margin-bottom: 0;
}
