html {
    --site-header-height: 86px;
    scroll-padding-top: calc(var(--site-header-height) + 8px);
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 24;
    background-color: var(--paper);
}
.site-header.is-stuck {
    background-color: color-mix(in srgb, var(--paper) 90%, transparent);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    box-shadow: 0 5px 18px rgb(24 27 23 / 9%);
}
.site-header .nav { height: var(--site-header-height); }
.site-header .mobilemenu nav {
    max-height: calc(100vh - var(--site-header-height) - 12px);
    max-height: calc(100dvh - var(--site-header-height) - 12px);
    overflow-y: auto;
    box-shadow: 0 9px 21px rgb(24 27 23 / 11%);
}
.skip { position: fixed; z-index: 25; }
.price-result { top: calc(var(--site-header-height) + 16px); }
@media (max-width: 760px) { html { --site-header-height: 66px; } }

.watermark-surface {
    position: relative;
    isolation: isolate;
    --watermark-ink: #725444;
    --watermark-opacity: .19;
}
.studio-watermark {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: var(--watermark-opacity);
    --watermark-art: url('watermarks/trace.svg?v=2');
}
.studio-watermark[data-watermark="planes"] { --watermark-art: url('watermarks/planes.svg?v=2'); }
.studio-watermark[data-watermark="signal"] { --watermark-art: url('watermarks/signal.svg?v=2'); }
.studio-watermark[data-watermark="orbit"] { --watermark-art: url('watermarks/orbit.svg?v=2'); }
@supports (overflow-x: clip) {
    #main { overflow-x: clip; }
    .studio-watermark {
        inset-inline: var(--watermark-start, var(--watermark-fallback, calc(50% - 50vw))) auto;
        inline-size: var(--watermark-span, 100vw);
        --watermark-edge: clamp(26px, 4.5vw, 124px);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--watermark-edge), #000 calc(100% - var(--watermark-edge)), transparent);
        mask-image: linear-gradient(to right, transparent, #000 var(--watermark-edge), #000 calc(100% - var(--watermark-edge)), transparent);
    }
    @media (min-width: 1001px) {
        .internal-hero--compact > .studio-watermark, .editorial-checklist > .studio-watermark {
            --watermark-fallback: min(-48px, calc((1440px - 100vw) / 2));
        }
    }
}
.studio-watermark::before {
    position: absolute;
    inset: -36px 0;
    background: var(--watermark-ink);
    -webkit-mask: var(--watermark-art) center / max(710px, 100%) auto no-repeat;
    mask: var(--watermark-art) center / max(710px, 100%) auto no-repeat;
    transform: translate3d(0, var(--watermark-offset, 0px), 0);
    content: "";
}
@supports not ((mask-image: url('watermarks/trace.svg')) or (-webkit-mask-image: url('watermarks/trace.svg'))) {
    .studio-watermark::before { background: var(--watermark-art) center / max(710px, 100%) auto no-repeat; filter: invert(1); }
    .closing .studio-watermark::before, .portfolio-group--product .studio-watermark::before { filter: none; }
}
.studio-watermark.is-moving::before { will-change: transform; }
.hero.watermark-surface, .internal-hero.watermark-surface { --watermark-opacity: .22; }
.editorial-block.watermark-surface { --watermark-opacity: .17; }
.editorial-block.watermark-surface .editorial-block__heading {
    background: color-mix(in srgb, var(--block-color) 66%, transparent);
}
.institution .watermark-surface, .home-government.watermark-surface { --watermark-ink: #49705d; }
.closing.watermark-surface, .portfolio-group--product.watermark-surface {
    --watermark-ink: #e6b49e;
    --watermark-opacity: .22;
}
.institution .closing.watermark-surface { --watermark-ink: #a9cfb6; }

:root {
    --motion-accent: var(--signal);
    --motion-wash: color-mix(in srgb, var(--signal) 8%, transparent);
    --motion-shadow: 0 10px 22px rgb(32 29 24 / 11%);
    --motion-ease: cubic-bezier(.2, .75, .25, 1);
}
.institution {
    --motion-accent: var(--signal);
    --motion-wash: color-mix(in srgb, #467761 12%, transparent);
}
.closing, .portfolio-group--product {
    --motion-accent: #efae96;
    --motion-wash: rgb(255 231 208 / 11%);
}
.institution .closing { --motion-accent: #cedeb8; --motion-wash: rgb(224 247 208 / 12%); }

:where(a[href], button, summary, input, textarea, select):focus-visible {
    outline: 2px solid var(--motion-accent);
    outline-offset: 3px;
}
:where(.service, .related-project, .case-link, .tool, .article-list a, .industry-card, .institution-project-list a, .portfolio-spotlight, .portfolio-entry-media, .portfolio-frame a):focus-within {
    box-shadow: inset 0 2px var(--motion-accent);
}
:where(.portfolio-entry-media, .portfolio-spotlight) { overflow: hidden; overflow: clip; }

@media (hover: hover) {
    .watermark-surface:hover > .studio-watermark { opacity: calc(var(--watermark-opacity) + .03); }
    :where(a[href]:not(:has(h2, h3, p, picture, img), .action, .back-top)):hover {
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: .28em;
    }
    :is(.site-header nav a, .internal-anchor-nav a, .footer a, .labtab, .institution-select a, .portfolio-system-nav a):hover {
        box-shadow: inset 0 -2px var(--motion-accent);
    }
    :where(.service, .related-project, .case-link, .tool, .article-list a, .industry-card, .institution-project-list a, .portfolio-spotlight, .portfolio-entry-media, .portfolio-frame a):hover {
        box-shadow: inset 0 2px var(--motion-accent), var(--motion-shadow);
    }
    :where(.spec-sheet, .lab, .institution-figure):hover { border-color: var(--motion-accent); }
    :where(.editorial-row, .tariff-row, .price-matrix > div, .institution-lines > div, .proof > div, .case-metrics > div):hover {
        background-color: var(--motion-wash);
        box-shadow: inset 2px 0 var(--motion-accent);
    }
    :where(button:not(:disabled), input[type=submit]:not(:disabled), .action, .back-top):hover {
        box-shadow: 0 5px 14px rgb(24 25 21 / 16%);
    }
    :where(summary, label:has(input[type=checkbox], input[type=radio])):hover { background-color: var(--motion-wash); }
    :is(input:not([type=hidden], [type=checkbox], [type=radio], [type=submit]), textarea, select):hover:not(:disabled) {
        border-color: var(--motion-accent);
    }
    :where(input[type=checkbox], input[type=radio]):hover { outline: 2px solid var(--motion-accent); outline-offset: 2px; }
    :where(.editorial-block:hover, .tool:hover, .service:hover, .industry-card:hover) :is(.line-art, .line-icon) {
        color: var(--motion-accent);
        opacity: 1;
    }
}

:where(.action, button:not(:disabled), summary, input[type=submit], .back-top, .tariff-choice, .related-project, .service):active {
    box-shadow: inset 0 0 0 1px var(--motion-accent);
}
@media (hover: none) {
    :where(a[href], button, summary, input, select) { -webkit-tap-highlight-color: var(--motion-wash); }
    :where(a[href]:not(.action, .service, .related-project), label):active { color: var(--motion-accent); }
}

@media (prefers-reduced-motion: no-preference) {
    .site-header { transition: background-color .22s ease, box-shadow .22s ease; }
    .studio-watermark { transition: opacity .28s ease; }
    :where(.action, .service, .related-project, .tool, .case-link, .article-list a, .industry-card, .institution-project-list a, .spec-sheet, .lab, .institution-figure, .back-top, button, summary, input, textarea, select, .editorial-row, .tariff-row, .price-matrix > div, .proof > div) {
        transition: background-color .2s ease, border-color .2s ease, box-shadow .24s ease, color .2s ease, translate .24s var(--motion-ease);
    }
    .ui-arrow, .line-art, .line-icon { transition: translate .28s var(--motion-ease), opacity .28s ease, color .2s ease; }
    :where(.related-project__media, .portfolio-entry-media, .portfolio-spotlight, .portfolio-frame) img {
        transition: scale .48s var(--motion-ease);
    }
    :where(.action, button:not(:disabled), input[type=submit], .back-top, .service, .related-project):active { translate: 0 1px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    :where(.action, .service, .related-project, .tool, .case-link, .article-list a, button:not(:disabled), .back-top):hover { translate: 0 -2px; }
    :where(a:hover, button:hover, .industry-card:hover) .ui-arrow { translate: 3px -3px; }
    :where(a:hover, button:hover) .ui-arrow--down { translate: 0 3px; }
    :where(a:hover, button:hover) .ui-arrow--up { translate: 0 -3px; }
    :where(a:hover, .tool:hover, .industry-card:hover) .line-icon { translate: 0 -3px; }
    .editorial-block:hover .line-art { translate: 4px -2px; }
    :where(.related-project:hover, .portfolio-entry-media:hover, .portfolio-spotlight:hover, .portfolio-frame a:hover) img { scale: 1.035; }
}
@media (prefers-reduced-motion: reduce) {
    .studio-watermark::before { transform: none; will-change: auto; }
}
