:root {
    --shell-orange: #db5906;
    --shell-gutter: clamp(24px, 4vw, 60px);
    --shell-footer-gutter: clamp(24px, 8vw, 140px);
}

.mobile-menu-toggle,
.site-mobile-menu-toggle,
.mobile-nav-backdrop {
    display: none;
}

/* Shared header geometry. Page-specific positioning (fixed or absolute) is preserved. */
.site-header,
.home-site-header {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: start !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 30px var(--shell-gutter) !important;
}

.site-header .main-nav,
.home-site-header nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px !important;
    color: rgba(255, 255, 255, 0.42);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.site-header .main-nav a,
.home-site-header nav a {
    display: inline-flex;
    width: max-content;
    min-height: 12px;
    align-items: center;
    gap: 10px;
}

.site-header .main-nav a::before,
.home-site-header nav a::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 999px;
    background: var(--shell-orange);
    opacity: 0;
    transition: opacity 220ms ease;
}

.site-header .main-nav a:hover::before,
.site-header .main-nav a.is-active::before,
.home-site-header nav a:hover::before,
.home-site-header nav a[aria-current="page"]::before {
    opacity: 1;
}

.site-logo-link,
.home-site-header .home-header-logo-wrap {
    grid-column: 2;
    justify-self: center !important;
    align-self: start;
}

.site-logo,
.home-site-header .site-logo {
    display: block !important;
    width: clamp(48px, 3.8vw, 64px) !important;
    height: auto !important;
    max-width: 100%;
    aspect-ratio: 512 / 341;
    object-fit: contain;
}

.site-header .contact-link,
.home-site-header > .header-el.pointer-events-auto:last-child {
    grid-column: 3;
    justify-self: end !important;
}

.site-header .contact-link,
.home-site-header > .header-el.pointer-events-auto:last-child a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.site-header .contact-link span,
.home-site-header > .header-el.pointer-events-auto:last-child span {
    color: var(--shell-orange) !important;
}

/* One footer layout for every page. */
.site-footer {
    position: relative;
    z-index: 30;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    padding: clamp(76px, 8vw, 128px) var(--shell-footer-gutter) 34px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    background: #030303;
    color: #f5f5f5;
}

.site-footer *,
.site-footer *::before,
.site-footer *::after {
    box-sizing: border-box;
}

.footer-inner {
    position: relative;
    z-index: 2;
    width: min(100%, 1680px) !important;
    margin-inline: auto !important;
}

.footer-top {
    display: grid !important;
    grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr) !important;
    align-items: start !important;
    gap: clamp(48px, 6vw, 110px) !important;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(32px, 4vw, 56px);
    min-width: 0;
}

.footer-logo {
    display: block !important;
    width: clamp(76px, 8vw, 126px) !important;
    height: auto !important;
    max-width: 100%;
    aspect-ratio: 512 / 341;
    object-fit: contain !important;
    object-position: center;
    filter: brightness(0) invert(1);
}

.footer-manifesto {
    max-width: 430px !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: clamp(16px, 1.4vw, 21px) !important;
    line-height: 1.24 !important;
    font-weight: 650;
    letter-spacing: 0 !important;
}

.footer-columns {
    display: grid !important;
    grid-template-columns:
        minmax(108px, 0.75fr)
        minmax(176px, 1.15fr)
        minmax(176px, 1.15fr)
        auto !important;
    align-items: start;
    gap: clamp(24px, 2.8vw, 52px) !important;
    min-width: 0;
}

.footer-column {
    min-width: 0;
}

.footer-column-title {
    margin: 0 0 22px !important;
    color: rgba(255, 255, 255, 0.44) !important;
    font-size: 12px !important;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.28em !important;
    text-transform: uppercase;
}

.footer-link-list,
.footer-contact-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px !important;
}

.footer-contact-list {
    gap: 22px !important;
}

.footer-link {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 1.25vw, 20px);
    line-height: 1.15;
    font-weight: 700;
}

.footer-link-list.is-socials {
    flex-flow: row nowrap;
    align-items: center;
    gap: 12px !important;
}

.footer-link.is-social {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.035);
}

.footer-social-icon,
.footer-social-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.footer-contact-label {
    margin: 0 0 7px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 10px !important;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.24em !important;
    text-transform: uppercase;
}

.footer-contact-value {
    display: block;
    max-width: 100%;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: clamp(15px, 1.2vw, 19px) !important;
    line-height: 1.2 !important;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.footer-bottom {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 24px;
    margin-top: clamp(82px, 10vw, 160px) !important;
    padding-top: 22px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.footer-copyright,
.footer-credit {
    position: relative;
    z-index: 2;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.42) !important;
    font-size: 10px !important;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: 0.16em !important;
    text-transform: uppercase;
}

.footer-credit {
    text-align: right;
}

.footer-bg-word {
    position: absolute !important;
    right: clamp(38px, 5vw, 110px) !important;
    bottom: -0.18em !important;
    color: rgba(255, 255, 255, 0.035) !important;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(132px, 20vw, 300px) !important;
    line-height: 0.75 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

@media (max-width: 1320px) {
    .footer-top {
        grid-template-columns: 1fr !important;
        gap: clamp(52px, 7vw, 76px) !important;
    }

    .footer-brand {
        max-width: 560px;
        gap: 28px;
    }

    .footer-columns {
        grid-template-columns:
            minmax(112px, 0.75fr)
            minmax(184px, 1.15fr)
            minmax(184px, 1.15fr)
            auto !important;
        column-gap: clamp(28px, 4vw, 54px) !important;
    }
}

@media (min-width: 1041px) {
    /*
     * Project pages keep the full vertical navigation on desktop.
     * Reserve its complete height before the project heading begins.
     */
    .project-hero {
        padding-top: clamp(236px, 14vw, 260px) !important;
    }
}

@media (max-width: 1040px) {
    :root {
        --shell-gutter: 24px;
    }

    .site-header,
    .home-site-header {
        z-index: 70 !important;
        align-items: center !important;
        padding: 30px 24px !important;
    }

    .mobile-menu-toggle,
    .site-mobile-menu-toggle {
        position: relative;
        z-index: 3;
        display: inline-flex;
        pointer-events: auto;
        grid-column: 1;
        grid-row: 1;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        justify-self: start;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 50%;
        background: rgba(5, 5, 5, 0.72);
        color: #fff;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        cursor: pointer;
    }

    .mobile-menu-toggle span,
    .site-mobile-menu-toggle span {
        position: absolute;
        width: 16px;
        height: 1.5px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 240ms ease, top 240ms ease;
    }

    .mobile-menu-toggle span:first-child,
    .site-mobile-menu-toggle span:first-child {
        top: 17px;
    }

    .mobile-menu-toggle span:last-child,
    .site-mobile-menu-toggle span:last-child {
        top: 24px;
    }

    .site-header.is-menu-open .mobile-menu-toggle,
    .site-header.is-menu-open .site-mobile-menu-toggle,
    .home-site-header.is-menu-open .mobile-menu-toggle {
        border-color: rgba(219, 89, 6, 0.62);
        background: rgba(20, 20, 20, 0.96);
    }

    .site-header.is-menu-open .mobile-menu-toggle span:first-child,
    .site-header.is-menu-open .site-mobile-menu-toggle span:first-child,
    .home-site-header.is-menu-open .mobile-menu-toggle span:first-child {
        top: 21px;
        transform: rotate(45deg);
    }

    .site-header.is-menu-open .mobile-menu-toggle span:last-child,
    .site-header.is-menu-open .site-mobile-menu-toggle span:last-child,
    .home-site-header.is-menu-open .mobile-menu-toggle span:last-child {
        top: 21px;
        transform: rotate(-45deg);
    }

    .site-header .main-nav,
    .home-site-header nav {
        position: fixed;
        z-index: 2;
        top: 86px;
        right: 18px;
        left: 18px;
        display: flex !important;
        width: auto !important;
        padding: 14px;
        gap: 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        background: rgba(7, 7, 7, 0.95);
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
    }

    .site-header.is-menu-open .main-nav,
    .home-site-header.is-menu-open nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-header .main-nav a,
    .home-site-header nav a {
        width: 100% !important;
        min-height: 48px !important;
        padding: 0 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.64);
        font-size: 11px !important;
    }

    .site-header .main-nav a:last-child,
    .home-site-header nav a:last-child {
        border-bottom: 0;
    }

    .mobile-nav-backdrop {
        position: fixed;
        z-index: 1;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, 0.42);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 220ms ease, visibility 220ms ease;
    }

    .site-header.is-menu-open .mobile-nav-backdrop,
    .home-site-header.is-menu-open .mobile-nav-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.has-mobile-menu-open {
        overflow: hidden;
    }
}

@media (max-width: 920px) {
    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        column-gap: clamp(40px, 8vw, 72px) !important;
        row-gap: 56px !important;
    }
}

@media (max-width: 640px) {
    .site-header,
    .home-site-header {
        padding: max(20px, env(safe-area-inset-top)) 18px 12px !important;
    }

    .site-header .main-nav,
    .home-site-header nav {
        top: max(82px, calc(env(safe-area-inset-top) + 62px));
    }

    .site-logo,
    .home-site-header .site-logo {
        width: 46px !important;
    }

    .site-header .contact-link,
    .home-site-header > .header-el.pointer-events-auto:last-child a {
        min-height: 44px;
        gap: 7px;
        font-size: 9px !important;
        letter-spacing: 0.2em !important;
    }

    .site-footer {
        padding: 72px 24px 28px !important;
    }

    .footer-brand {
        gap: 28px;
    }

    .footer-logo {
        width: 72px !important;
    }

    .footer-manifesto {
        max-width: 26rem !important;
        font-size: clamp(16px, 4.6vw, 18px) !important;
        line-height: 1.35 !important;
    }

    .footer-columns {
        grid-template-columns: 1fr !important;
        gap: 44px !important;
    }

    .footer-column-title {
        margin-bottom: 16px !important;
    }

    .footer-link-list {
        gap: 12px !important;
    }

    .footer-link {
        min-height: 44px;
        font-size: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start !important;
        margin-top: 72px !important;
        gap: 12px;
    }

    .footer-credit {
        text-align: left;
    }

    .footer-bg-word {
        right: auto !important;
        left: 18px !important;
        bottom: 86px !important;
        font-size: 132px !important;
    }

    /* Secondary pages keep their editorial character without desktop-height pauses. */
    .works-hero {
        min-height: min(540px, 66svh) !important;
        padding: 112px 18px 44px !important;
        place-items: end start !important;
    }

    .works-hero .works-title {
        font-size: clamp(62px, 18vw, 82px) !important;
        line-height: 0.84 !important;
    }

    .works-sticky-title {
        display: none !important;
    }

    .works-list {
        width: calc(100% - 36px) !important;
        padding-top: 32px !important;
        padding-bottom: 84px !important;
    }

    .works-grid {
        gap: 52px !important;
    }

    .work-media {
        aspect-ratio: 4 / 5 !important;
    }

    .journal-archive-hero {
        padding: 112px 18px 66px !important;
    }

    .journal-archive-title {
        font-size: clamp(66px, 19vw, 88px) !important;
        line-height: 0.86 !important;
    }

    .journal-archive-intro {
        max-width: 33rem !important;
        font-size: clamp(17px, 5vw, 20px) !important;
        line-height: 1.35 !important;
    }

    .journal-sticky-title {
        margin-bottom: 34px !important;
    }

    .journal-sticky-title h2 {
        font-size: clamp(64px, 19vw, 88px) !important;
        line-height: 0.86 !important;
    }

    .journal-featured,
    .journal-archive-grid-section {
        width: calc(100% - 36px) !important;
    }

    .project-hero,
    .article-hero,
    .legal-hero,
    .audit-hero {
        padding-right: 18px !important;
        padding-left: 18px !important;
    }

    .project-title,
    .article-title,
    .legal-title,
    .audit-title {
        overflow-wrap: normal;
        word-break: normal;
        hyphens: auto;
    }
}

@media (hover: none), (pointer: coarse) {
    .cursor,
    .cursor-ring,
    .project-hover-cursor,
    .work-hover {
        display: none !important;
    }
}

/* Keep compact editorial labels while giving every recurrent link a reliable hit area. */
.site-header .main-nav a,
.site-header .contact-link,
.site-logo-link,
.home-site-header nav a,
.home-site-header > .header-el.pointer-events-auto:last-child a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
}

.footer-contact-value {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
}

.article-toc a {
    display: flex;
    min-height: 32px;
    align-items: center;
}

@media (max-width: 1040px), (hover: none), (pointer: coarse) {
    .site-header .main-nav a,
    .site-header .contact-link,
    .site-logo-link,
    .home-site-header nav a,
    .home-site-header > .header-el.pointer-events-auto:last-child a,
    .footer-link,
    .footer-contact-value,
    .hero-offer-cta,
    .cookie-button {
        min-width: 44px;
        min-height: 44px;
    }

    .article-toc a {
        min-height: 44px;
    }
}

@media (max-width: 640px), (hover: none), (pointer: coarse) {
    .site-header .main-nav a,
    .site-header .contact-link,
    .site-logo-link,
    .home-site-header nav a,
    .home-site-header > .header-el.pointer-events-auto:last-child a,
    .footer-contact-value {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-toggle span,
    .site-mobile-menu-toggle span,
    .site-header .main-nav,
    .home-site-header nav,
    .mobile-nav-backdrop {
        transition-duration: 1ms !important;
    }
}
