/* CoreServe Partners — Mobile-first responsive reconstruction
   Scoped override layer for header, navigation, typography, density, and card flow.
   No new colors, frameworks, icon libraries, forms, or claims. */

/* Desktop refinement: clearer zones and less compression. */
@media (min-width: 1181px) {
  .site-header {
    min-height: 88px;
    height: 88px;
    gap: 40px;
  }

  .brand {
    flex: 0 0 auto;
  }

  .brand img {
    --brand-lockup-h: 60px;
  }

  .nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: clamp(18px, 1.45vw, 26px);
  }

  .nav-link {
    font-size: 12px;
  }

  .header-phone {
    margin-left: 6px;
    font-size: 10px;
  }

  .nav .button.small {
    min-height: 44px;
    padding-inline: 18px;
  }
}

/* Convert the entire header to a true compact navigation system before labels compress. */
@media (max-width: 1180px) {
  .site-header {
    height: 76px;
    padding-inline: clamp(18px, 4vw, 34px);
    gap: 18px;
  }

  .brand {
    flex: 0 1 auto;
    min-width: 0;
  }

  .brand img {
    --brand-lockup-h: 50px;
    max-width: min(40vw, 120px);
  }

  .nav-toggle {
    position: relative;
    z-index: 104;
    display: inline-grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border: 1px solid rgba(238,241,245,.24);
    background: rgba(238,241,245,.035);
    color: transparent;
    font-size: 0;
  }

  .nav-toggle::before,
  .nav-toggle::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    height: 1px;
    background: var(--bright-silver);
    transition: transform 220ms var(--ease), top 220ms var(--ease), bottom 220ms var(--ease);
  }

  .nav-toggle::before {
    top: 17px;
    box-shadow: 0 7px 0 var(--bright-silver);
  }

  .nav-toggle::after {
    bottom: 16px;
  }

  .nav-toggle[aria-expanded="true"]::before {
    top: 23px;
    box-shadow: none;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"]::after {
    bottom: 23px;
    transform: rotate(-45deg);
  }

  .nav {
    position: fixed;
    inset: 76px 0 0 0;
    z-index: 102;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 20px clamp(20px, 5vw, 36px) max(28px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ink-navy) !important;
    border-top: 1px solid rgba(238,241,245,.10);
    border-bottom: 0;
    box-shadow: 0 24px 60px rgba(0,0,0,.38);
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0;
    border-bottom: 1px solid rgba(238,241,245,.09);
    color: var(--core-silver);
    font-size: 17px;
    font-weight: 560;
    letter-spacing: -.01em;
    line-height: 1.2;
  }

  .nav-link::after {
    left: auto;
    right: 0;
    bottom: 50%;
    width: 28px;
    transform: translateY(50%) scaleX(0);
    transform-origin: right center;
  }

  .nav-link:hover::after,
  .nav-link.active::after,
  .nav-link[aria-current="page"]::after {
    transform: translateY(50%) scaleX(1);
  }

  .header-phone {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    margin-top: 18px;
    padding: 0;
    color: var(--core-silver);
    font-size: 12px;
    letter-spacing: .08em;
    border: 0;
  }

  .nav .button.small {
    width: 100%;
    min-height: 52px;
    margin-top: 8px;
    padding-inline: 22px;
  }

  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }

  .page-hero {
    padding-top: 140px;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .feature-list,
  .feature-list.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --type-hero: clamp(40px, 11.3vw, 58px);
    --type-section: clamp(30px, 8.3vw, 42px);
  }

  body {
    font-size: 16px;
    line-height: 1.66;
  }

  p {
    line-height: 1.66;
  }

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

  .site-header {
    height: 70px;
    padding-inline: 16px;
  }

  .brand img {
    --brand-lockup-h: 46px;
    max-width: calc(100vw - 110px);
  }

  .nav {
    inset: 70px 0 0 0;
    padding-inline: 20px;
  }

  .nav-link {
    min-height: 56px;
    font-size: 18px;
  }

  .page-hero,
  .hero-home {
    padding-top: 112px;
  }

  .page-hero {
    min-height: auto;
    padding-bottom: 64px;
  }

  .page-hero .container,
  .page-hero .narrow {
    width: min(calc(100% - 36px), 760px);
  }

  .page-hero h1,
  .hero h1,
  .hero-home h1 {
    max-width: 13ch;
    font-size: clamp(38px, 10.8vw, 54px);
    line-height: .98;
    letter-spacing: -.038em;
  }

  .page-hero .lead,
  .hero .lead,
  .hero-home .lead {
    max-width: 34em;
    font-size: 16px;
    line-height: 1.62;
  }

  .section,
  .section.silver-wash,
  .section--image,
  .final-cta,
  .section.final-cta {
    padding-block: 68px;
  }

  .section-head {
    gap: 18px;
    margin-bottom: 32px;
  }

  .section-head h2,
  .section h2,
  .final-cta h2 {
    max-width: 16ch;
    line-height: 1.02;
  }

  /* An h3 promoted to h2 for the outline keeps its h3 presentation. */
  .credential-card h2 {
    max-width: none;
    line-height: 1.08;
  }

  .section-head > p,
  .section-head > div + p {
    max-width: 38em;
    font-size: 16px;
  }

  .feature-list,
  .feature-list.is-three,
  .card-grid,
  .card-grid.three,
  .bullet-grid,
  .pricing,
  .process,
  .timeline,
  .outcomes.columns,
  .logo-grid,
  .logo-grid.compact {
    grid-template-columns: 1fr !important;
  }

  .feature-list,
  .bullet-grid,
  .card-grid,
  .pricing,
  .process,
  .timeline {
    gap: 1px;
  }

  .feature-card,
  .card,
  .bullet-card,
  .tier,
  .process-step,
  .credential-card {
    min-height: auto;
    padding: 26px 24px;
  }

  .feature-card h3,
  .card h3,
  .bullet-card h3,
  .tier h3,
  .process-step h3 {
    font-size: 20px;
    line-height: 1.22;
  }

  .feature-card p,
  .card p,
  .bullet-card p,
  .tier p,
  .process-step p {
    font-size: 15.5px;
    line-height: 1.67;
  }

  .kicker,
  .service-label,
  .eyebrow {
    font-size: 10px;
    letter-spacing: .16em;
  }

  .feature-card:nth-child(even),
  .feature-card.featured {
    background: var(--surface-panel);
  }

  .feature-card + .feature-card,
  .bullet-card + .bullet-card,
  .card + .card {
    border-top-color: rgba(238,241,245,.12);
  }

  .process-step b {
    margin-bottom: 28px;
  }

  .hero-actions,
  .cta-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .button,
  .cta-actions .button,
  .hero-actions .text-link,
  .cta-actions .text-link {
    width: 100%;
    min-height: 50px;
    justify-content: center;
    text-align: center;
  }

  .site-footer {
    padding-top: 66px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-bottom {
    display: grid;
    gap: 12px;
    text-align: left;
  }
}

@media (max-width: 390px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand img {
    --brand-lockup-h: 42px;
  }

  .nav-toggle {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }

  .container,
  .narrow,
  .page-hero .container,
  .page-hero .narrow {
    width: min(calc(100% - 30px), var(--container));
  }

  .feature-card,
  .card,
  .bullet-card,
  .tier,
  .process-step,
  .credential-card {
    padding: 24px 20px;
  }
}

/* Reflow (WCAG 2.2 SC 1.4.10, audit item 18). At 320px - a desktop window at
   400% zoom - the credential rows' fixed 92px label column plus the ACE badge
   needed 323px inside a 290px container and scrolled sideways. Below 360px the
   label sits above its description instead of beside it. */
@media (max-width: 360px) {
  .credential-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 12px;
  }

  .credential-row > b {
    grid-column: 1 / -1;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Target size (WCAG 2.2 AA, 2.5.8 - minimum 24 x 24 CSS px)

   Standalone links were rendering at 15-23px tall. Links that sit inline
   inside a sentence are exempt under 2.5.8 and are deliberately untouched.
   ────────────────────────────────────────────────────────────────────────── */
.text-link,
.hero-tertiary,
.email-link,
.cs-inline-06 {
  min-height: 24px;
  padding-block: 5px;
}

.site-footer a:not(.button):not(.footer-brand) {
  min-height: 24px;
  padding-block: 4px;
}

.footer-bottom a {
  display: inline-block;
  min-height: 24px;
  padding-block: 4px;
}

@media (pointer: coarse) {
  .text-link,
  .hero-tertiary,
  .email-link,
  .cs-inline-06,
  .site-footer a:not(.button):not(.footer-brand),
  .footer-bottom a {
    min-height: 32px;
    padding-block: 8px;
  }
}

/* Header navigation links render at 12px tall on desktop. 2.5.8 applies at every
   viewport, so give them a compliant hit area without changing their position. */
.nav-link,
.header-phone {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
