/* Desktop section boundaries only. Heroes and the first content section's
   top edge are deliberately excluded. Footer internals are not styled here.
   Content boundaries aim for 160px; the existing footer panel opens at 120px. */
@media (min-width: 1200px) {
    /* Homepage: preserve the fixed-height team composition and its children. */
    .home-page .hox-mo { margin-top: 12px; }
    /* Approximately 100px from the visible upper/lower Team lettering edges. */
    .home-page .hox-tw { margin-top: 65px; }
    .home-page .faq-section { margin-top: 8px; }
    .home-page .hox-bn { margin-top: -16px; }

    /* The preceding Bootstrap mb-5 is 48px. These adjacent margins collapse:
       112px replaces that 48px, adding the intended 64px of visible space. */
    .services-page .svc-offer-block { margin-top: 112px; margin-bottom: 96px; }

    /* Team: the only other page that closes on the "Send the brief" CTA
       (see footer.blade.php's $showClosingAsk). Matches the 96px the CTA
       gets on approach everywhere else it appears, replacing the roster
       grid's plain Bootstrap mb-5 (48px). */
    .team-page .tm-roster { margin-bottom: 96px !important; }

    /* The work viewport and contact form each retain 40px of trailing air. */
    .portfolio-page .wk--split { margin-bottom: -40px; }
    .contact-page .contact-body { margin-bottom: -40px !important; }

    /* Careers: the CV hero and the benefits block's top stay untouched. */
    .careers-page > .container.py-lg-5 { padding-bottom: 106px !important; }
    .careers-page > .container.d-sm-block:not(.py-lg-5) { margin-bottom: -35px; }

    /* Academy hub: retain the first topic's top and the decorative background. */
    .academy-page .ac-topic + .ac-topic { margin-top: 32px; }
    /* Later modal sections mean the last topic is not :last-of-type. */
    .academy-page .ac-topic:not(:has(~ .ac-topic)) { padding-bottom: 0 !important; }
    .academy-page .ac-art + .ac-more { margin-top: 42px; }

    /* Outsourcing: remove doubled outer padding, without changing card gaps. */
    .outsource-page.os-page > .os-section:not(.os-section--brief) {
        padding-top: 80px;
        padding-bottom: 80px;
    }
    .outsource-page.os-page > .os-section--brief {
        margin-top: -30px;
        padding-bottom: 0 !important;
    }

    /* Service detail cards already have 160px between them; only the closing
       panel and the collapsed margin above the footer need correction. */
    .service-detail-page .sd-says + .sd-close { margin-top: 128px; }
    .service-detail-page .sd-covers + .sd-close,
    .service-detail-page .sd-open + .sd-close { margin-top: 80px; }
    .service-detail-page .sd-close { margin-bottom: 0; }

    /* Case studies: preserve the overview's top and all gallery image gaps. */
    .case-page > [data-cs-reveal] {
        margin-top: calc(160px - clamp(3.5rem, 8vw, 7.5rem));
    }
    /* Writing interleaved with galleries is a separate section boundary;
       leave spacing between images inside each gallery unchanged. */
    .case-page > [data-cs-reveal] > .container + .cs-sec,
    .case-page > [data-cs-reveal] > .cs-sec + .cs-sec {
        padding-top: 160px;
        padding-bottom: 0;
    }
    .case-page > [data-cs-reveal] > .cs-sec + .container { margin-top: 160px; }
    .case-page .cs-more { padding-top: 160px; }
    .case-page .cs-cta { padding-top: 48px; padding-bottom: 0; }

    /* Profiles retain the hero and About intro's top. The agency artwork has
       its own inset, so that boundary uses less outer padding. */
    .team-profile-page .tp-section { padding-bottom: 80px; }
    .team-profile-page .tp-section + .tp-section { padding-top: 80px; }
    .team-profile-page .tp-section + .tp-about { padding-top: 48px; padding-bottom: 64px; }
    .team-profile-page .tp-section + .tp-contact { padding-top: 64px; padding-bottom: 0; }

    /* Legal documents: clear only trailing child margins, which otherwise
       duplicate the next section's outer padding. Preserve the opening top. */
    .legal-page .legal-section { padding-bottom: 80px; }
    .legal-page .legal-section ~ .legal-section { padding-top: 80px; }
    .legal-page .legal-pull { padding-top: 80px; padding-bottom: 80px; }
    .legal-page .legal-copy > :last-child { margin-bottom: 0; }
    .legal-page .legal-section:last-child { padding-bottom: 0; }

    /* The 80vh minimum added empty space below the final card at 1280px.
       Its children stay in normal flow; only the unused trailing space goes. */
    .blog-page > .blog-featured { min-height: 0; padding-bottom: 0 !important; }
    .blog-detail-page .blog-content .related-blogs { margin-top: 128px; }
    .blog-detail-page .blog-content { margin-bottom: 80px; }
    .blog-detail-page:has(> footer.pt-5) .blog-content { margin-bottom: -16px; }
}
