/* Keep full-width section backgrounds while the content follows a readable grid. */
:root {
    --content-width: 1440px;
    --page-gutter: max(clamp(24px, 5vw, 76px), calc((100vw - var(--content-width)) / 2));
}

html {
    scroll-padding-top: 90px;
}

.nav-wrap {
    position: fixed;
    border-bottom: 1px solid transparent;
    transition: background-color .2s ease, border-color .2s ease;
}

.nav-wrap.is-scrolled {
    border-color: var(--line);
    background: rgba(241, 240, 234, .96);
    backdrop-filter: blur(14px);
}

.section-pad,
.nav-wrap,
.case-hero-image {
    padding-inline: var(--page-gutter);
}

@media (min-width: 901px) {
    .hero {
        min-height: min(100svh, 920px);
    }
}

.hero::before {
    right: var(--page-gutter);
    width: min(55vw, 820px);
    height: min(55vw, 820px);
}

/* A calmer finish for the sections beyond the hero. */
.service-row > a {
    border-radius: 3px;
}

.service-row > a:hover {
    transform: translate(2px, -2px);
}

.process-grid span {
    display: block;
    width: auto;
    height: auto;
    background: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
}

.process-grid h3 {
    margin-top: 36px;
}

.product-placeholder strong {
    max-width: 80%;
    overflow-wrap: anywhere;
}

.product-meta span,
.footer small {
    font-size: 11px;
}

.case-index-grid article:nth-child(even) {
    margin-top: 72px;
}

.contact-banner {
    background: #e1e8e8;
    border-top: 1px solid var(--line);
    text-align: left;
}

.contact-banner::before,
.contact-banner::after {
    content: none;
}

.contact-banner h2 {
    max-width: 900px;
    font-size: clamp(52px, 7vw, 104px);
}

.contact-banner .button-light {
    background: var(--ink);
    color: #fff;
}

/* Keep the full navigation available when the desktop links no longer fit. */
.mobile-nav {
    display: none;
}

.mobile-nav summary {
    cursor: pointer;
    list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
    display: none;
}

.mobile-nav summary span {
    display: inline-block;
    margin-left: 5px;
    transition: transform .2s ease;
}

.mobile-nav[open] summary span {
    transform: rotate(45deg);
}

.mobile-nav nav {
    position: absolute;
    top: calc(100% - 4px);
    right: var(--page-gutter);
    display: grid;
    width: min(320px, calc(100vw - 2 * var(--page-gutter)));
    padding: 12px 22px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 18px 40px rgba(16, 17, 15, .12);
}

.mobile-nav nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.mobile-nav nav a:last-child {
    border-bottom: 0;
}

:where(a, button, summary, input, select, textarea):focus-visible {
    outline: 2px solid var(--slate);
    outline-offset: 4px;
}

.products :where(a, button):focus-visible,
.footer a:focus-visible,
.service-proof a:focus-visible {
    outline-color: var(--accent);
}

@media (max-width: 900px) {
    .nav-wrap {
        gap: 14px;
    }

    .mobile-nav {
        display: block;
        margin-left: auto;
        font-size: 13px;
        font-weight: 700;
    }
}

@media (max-width: 760px) {
    .case-index-grid article:nth-child(even) {
        margin-top: 0;
    }
}

@media (max-width: 620px) {
    .contact-banner {
        padding-block: 90px;
    }
}

@media (max-width: 380px) {
    .nav-wrap > .nav-cta {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-wrap,
    .mobile-nav summary span {
        transition: none;
    }
}
