/* Desktop rhythm pass: preserve the mobile composition while making wide layouts feel intentional. */

@media (max-width: 1220px) {
  body > header .nav ul,
  body > header .nav > .cta {
    display: none;
  }

  body > header .burger {
    display: block;
  }
}

@media (min-width: 1221px) {
  body > header .wrap {
    width: min(1500px, 96vw);
  }

  body > header .nav {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: clamp(14px, 1.5vw, 26px);
    padding-block: 12px;
  }

  body > header .nav > nav {
    min-width: 0;
  }

  body > header .nav ul {
    align-items: center;
    justify-content: center;
    gap: clamp(9px, 1vw, 17px);
    flex-wrap: nowrap;
  }

  body > header .nav ul li {
    display: flex;
    align-items: center;
  }

  body > header .nav ul a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body > header .nav > .cta {
    padding-inline: 20px;
  }
}

@media (min-width: 901px) {
  /* Cap the display scale on wide screens. Mobile keeps the original type rules. */
  .route-page h1,
  .org-page h1,
  .nonprofit-page h1,
  .insights-page h1,
  .article-page h1 {
    font-size: clamp(46px, 4.25vw, 58px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em;
  }

  body > main#main > section h1,
  .masthead h1,
  .article-shell h1,
  .doula-page h1 {
    font-size: clamp(46px, 4.25vw, 58px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em;
  }

  .route-page:not([data-route="/privacy"]) > section h2,
  .route-page .page-hero h2,
  .route-page .methodology-teaser h2,
  .route-page .client-process-head h2,
  .route-page .recognition-head h2,
  .route-page .hb-booking-title,
  .nonprofit-page main h2,
  .org-page main > section h2,
  .insights-page main > section h2 {
    font-size: clamp(30px, 2.8vw, 38px) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.025em;
  }

  body > main#main > section h2,
  .doula-page main > section h2 {
    font-size: clamp(30px, 2.8vw, 38px) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.025em;
  }

  .route-page > section:not(.compact) {
    padding-top: clamp(60px, 5.5vw, 78px);
    padding-bottom: clamp(60px, 5.5vw, 78px);
  }

  .route-page[data-route="/"] #read-band > .wrap > .eyebrow,
  .route-page[data-route="/"] #read-band > .wrap > h2 {
    text-align: center;
  }

  .route-page[data-route="/"] #read-band .assessment {
    margin-inline: auto;
  }

  .route-page[data-route="/services"] .recognition-head,
  .route-page[data-route="/client-login"] .client-process-head {
    max-width: 820px;
    margin-inline: auto;
    text-align: center;
  }

  .route-page[data-route="/client-login"] .client-help {
    max-width: 900px;
    margin-inline: auto;
    margin-top: 28px;
  }

  .route-page[data-route="/"] .signal-intro,
  .route-page[data-route="/"] .recognition-head,
  .route-page[data-route="/audits"] .page-hero > .wrap > div:first-child,
  .route-page[data-route="/resources"] .page-hero > .wrap > div:first-child,
  .route-page[data-route="/about"] .page-hero > .wrap > div:first-child {
    max-width: 860px;
    margin-inline: auto;
  }

  .route-page[data-route="/"] .signal-intro,
  .route-page[data-route="/"] .recognition-head {
    text-align: center;
  }
}

@media (min-width: 1221px) {
  /* Keep the full desktop navigation on one line. The wider header container
     uses the space that was previously left empty at both sides. */
  body > header .brand {
    gap: 9px;
  }

  body > header .brand b {
    font-size: 18px;
  }

  body > header .brand em {
    font-size: .49rem;
    letter-spacing: .15em;
  }
}

@media (min-width: 1221px) and (max-width: 1460px) {
  body > header .nav ul {
    gap: clamp(7px, .7vw, 10px);
  }

  body > header .nav ul a {
    font-size: 12px;
  }

  body > header .nav > .cta {
    padding: 10px 14px;
    font-size: 12.5px;
  }
}

@media (min-width: 1001px) {
  /* Desktop homepage hero: use both halves of the viewport. Mobile retains
     the original vertical reading order and full-width buttons. */
  .route-page[data-route="/"] .hero {
    padding-block: clamp(52px, 4.5vw, 68px);
  }

  .route-page[data-route="/"] .hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "eyebrow eyebrow"
      "title copy"
      "title actions";
    column-gap: clamp(48px, 6vw, 92px);
    row-gap: 22px;
    align-items: start;
  }

  .route-page[data-route="/"] .hero-main > .eyebrow {
    grid-area: eyebrow;
    margin-bottom: 0;
  }

  .route-page[data-route="/"] .hero-main > h1 {
    grid-area: title;
    align-self: center;
    max-width: 18ch;
  }

  .route-page[data-route="/"] .hero-main > .kick {
    grid-area: copy;
    margin-top: 0;
    max-width: 31ch;
    font-size: clamp(23px, 2.2vw, 30px);
  }

  .route-page[data-route="/"] .hero-main > .btns {
    grid-area: actions;
    margin-top: 4px;
    gap: 14px;
  }

  .route-page[data-route="/"] .hero-main > .btns .btn {
    padding-inline: 22px;
    font-size: 14px;
  }

  .route-page[data-route="/"] .hero-main .chips-line {
    flex-basis: 100%;
    width: 100%;
    margin-top: 4px;
  }

  /* Standard interior-page heroes share the same desktop rhythm: context at
     the top, promise on the left, explanation and action on the right. */
  .page-hero {
    padding-block: clamp(52px, 4.5vw, 68px);
  }

  .page-hero > .wrap:not(.client-hero-grid) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "crumb crumb"
      "eyebrow eyebrow"
      "title copy"
      "title actions";
    column-gap: clamp(48px, 6vw, 92px);
    row-gap: 20px;
    align-items: start;
  }

  .page-hero > .wrap:not(.client-hero-grid) > .crumb {
    grid-area: crumb;
    margin-bottom: 0;
  }

  .page-hero > .wrap:not(.client-hero-grid) > .eyebrow {
    grid-area: eyebrow;
    margin-bottom: 0;
  }

  .page-hero > .wrap:not(.client-hero-grid) > h1 {
    grid-area: title;
    align-self: center;
    max-width: 18ch;
    font-size: clamp(44px, 3.8vw, 54px) !important;
  }

  .page-hero > .wrap:not(.client-hero-grid) > .big,
  .page-hero > .wrap:not(.client-hero-grid) > .org-lede {
    grid-area: copy;
    align-self: start;
    max-width: 38ch !important;
    margin-top: 0 !important;
  }

  .page-hero > .wrap:not(.client-hero-grid) > .org-lede > :first-child {
    margin-top: 0 !important;
  }

  .page-hero > .wrap:not(.client-hero-grid) > .btns {
    grid-area: actions;
    margin-top: 2px;
  }

  /* Insights index and article mastheads use their wider desktop canvas while
     preserving the existing single-column mobile treatment. */
  .masthead {
    padding-block: clamp(52px, 4.5vw, 68px);
  }

  .masthead > .col {
    width: min(1180px, 90vw);
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    grid-template-areas:
      "kicker kicker"
      "title standfirst"
      "title byline";
    column-gap: clamp(48px, 6vw, 92px);
    row-gap: 18px;
    align-items: start;
  }

  .masthead > .col > .kicker {
    grid-area: kicker;
    margin-bottom: 0;
  }

  .masthead > .col > h1 {
    grid-area: title;
    align-self: center;
    max-width: 18ch;
  }

  .masthead > .col > .standfirst {
    grid-area: standfirst;
    max-width: 34ch;
    margin-top: 0;
  }

  .masthead > .col > .byline {
    grid-area: byline;
    margin-top: 0;
  }

  /* The booking page had a 980px desktop cap that left both sides underused. */
  .book-page-hero {
    padding-block: clamp(52px, 4.5vw, 68px);
  }

  .book-page-hero .inner {
    width: min(1180px, 90vw);
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "eyebrow eyebrow"
      "title copy";
    column-gap: clamp(48px, 6vw, 92px);
    row-gap: 18px;
    align-items: center;
  }

  .book-page-hero .inner > .eyebrow {
    grid-area: eyebrow;
    margin-bottom: 0;
  }

  .book-page-hero .inner > h1 {
    grid-area: title;
    margin-bottom: 0;
    font-size: clamp(44px, 3.8vw, 54px);
  }

  .book-page-hero .inner > p {
    grid-area: copy;
    max-width: 38ch;
  }

  /* The doula hero uses the same visual balance without changing its content
     order or its mobile presentation. */
  .doula-page .hero-story {
    max-width: none;
  }

  .doula-page .hero-story .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "image image"
      "eyebrow eyebrow"
      "title copy"
      "title actions";
    column-gap: clamp(48px, 6vw, 92px);
    row-gap: 18px;
    align-items: start;
  }

  .doula-page .hero-story .hero-image-line {
    grid-area: image;
    justify-self: start;
    margin-bottom: 0;
  }

  .doula-page .hero-story .eyebrow {
    grid-area: eyebrow;
    margin-bottom: 0;
  }

  .doula-page .hero-story h1 {
    grid-area: title;
    align-self: center;
    max-width: 18ch;
  }

  .doula-page .hero-story .hero-copy .lead {
    grid-area: copy;
    max-width: 38ch;
    margin-top: 0;
  }

  .doula-page .hero-story .btns {
    grid-area: actions;
    margin-top: 2px;
  }
}

@media (min-width: 901px) {
  /* Organizations pages: match the rhythm of the routed marketing pages. */
  .org-page main > section:not(.compact) {
    padding-top: clamp(60px, 5.5vw, 78px);
    padding-bottom: clamp(60px, 5.5vw, 78px);
  }
}
