.studio-header {
    --header-ink: #20382e;
    --header-paper: #fcfaf5;
    --header-edge: #e5dcc9;
    --header-accent: #d9bd83;
    position: sticky;
    z-index: 85;
    top: 0;
    color: var(--header-ink);
}

.studio-header__container {
    width: min(calc(100% - 32px), 1320px);
    margin-inline: auto;
}

.studio-header__top {
    background: #173228;
    color: #fff8e8;
    font-size: 1.3rem;
    line-height: 1.35;
}

.studio-header__top-inner,
.studio-header__contacts,
.studio-header__main-inner,
.studio-nav {
    display: flex;
    align-items: center;
}

.studio-header__top-inner {
    justify-content: space-between;
    gap: 16px;
}

.studio-header__signature {
    color: #f0dbad;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.studio-header__contacts i {
    color: var(--header-accent);
}

.studio-header__contacts {
    gap: 22px;
}

.studio-header__contacts a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    color: inherit;
    white-space: nowrap;
}

.studio-header__contacts a:hover {
    color: var(--header-accent);
}

.studio-header__email-label,
.studio-header__estimate-short {
    display: none;
}

.studio-header__main {
    position: relative;
    border-bottom: 1px solid var(--header-edge);
    background: #fcfaf5;
    box-shadow: 0 8px 24px rgb(43 35 20 / 7%);
}

.studio-header__main-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: clamp(12px, 1.6vw, 24px);
    min-height: 84px;
}

.studio-header__brand {
    display: flex;
    align-items: center;
    justify-self: start;
    gap: 11px;
    color: var(--header-ink);
}

.studio-header__brand-mark {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 58px;
    place-items: center;
    border: 1px solid #d8c7a7;
    border-radius: 26px 26px 6px 6px;
    background: #fffdf8;
}

.studio-header__brand img {
    display: block;
    width: 100%;
    height: 47px;
    object-fit: contain;
}

.studio-header__wordmark {
    display: grid;
    gap: 3px;
    padding-inline-start: 11px;
    border-inline-start: 1px solid #ceb187;
    color: var(--header-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    white-space: nowrap;
}

.studio-nav,
.studio-nav__sub {
    margin: 0;
    padding: 0;
    list-style: none;
}

.studio-nav {
    gap: clamp(3px, 0.65vw, 12px);
}

.studio-header__desktop > .studio-nav {
    gap: 3px;
    padding: 4px;
    border: 1px solid #e8dfcf;
    border-radius: 40px;
    background: #f6f1e7;
}

.studio-nav__link,
.studio-nav__sub a,
.studio-header__estimate,
.studio-header__menu-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 5px;
    color: var(--header-ink);
    font-size: 1.4rem;
    font-weight: 750;
    line-height: 1.3;
}

.studio-header summary {
    list-style: none;
    cursor: pointer;
}

.studio-header summary::-webkit-details-marker {
    display: none;
}

.studio-nav__link:hover,
.studio-nav__link--active,
.studio-nav__link[aria-current="page"],
.studio-nav__sub a:hover,
.studio-nav__sub a[aria-current="page"],
.studio-nav__group[open] > summary {
    background: #eee7d8;
    color: var(--header-ink);
}

.studio-header__desktop .studio-nav__link {
    padding-inline: clamp(10px, 1vw, 15px);
    border-radius: 32px;
    background: transparent;
}

.studio-header__desktop .studio-nav__link:hover,
.studio-header__desktop .studio-nav__group[open] > summary {
    background: #eee4d2;
}

.studio-header__desktop .studio-nav__link:is([aria-current="page"], .studio-nav__link--active) {
    background: var(--header-ink);
    color: #fff8e7;
}

.studio-nav__group {
    position: relative;
}

.studio-nav__chevron {
    width: 6px;
    height: 6px;
    margin: -4px 2px 0 0;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
}

.studio-nav__group[open] > summary .studio-nav__chevron {
    margin-top: 3px;
    transform: rotate(225deg);
}

.studio-header__desktop .studio-nav__sub {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 228px;
    max-height: calc(100vh - 145px);
    max-height: calc(100dvh - 145px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--header-edge);
    border-radius: 7px;
    background: var(--header-paper);
    box-shadow: 0 14px 28px rgb(45 36 19 / 14%);
}

.studio-header__estimate {
    flex: 0 0 auto;
    justify-content: center;
    justify-self: end;
    gap: 10px;
    padding: 6px 7px 6px 15px;
    border: 1px solid #b99c66;
    border-radius: 32px;
    background: #fffdf7;
    color: var(--header-ink);
    text-align: center;
}

.studio-header__estimate:hover {
    background: #f4e9d2;
    color: var(--header-ink);
}

.studio-header__estimate-arrow {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #e9d3a3;
    color: #3a2c16;
    font-size: 1.5rem;
    line-height: 1;
}

.studio-header__mobile {
    display: none;
}

.studio-header :is(a, summary):focus-visible {
    outline: 2px solid #957035;
    outline-offset: 2px;
}

.studio-header__top a:focus-visible {
    outline-color: var(--header-accent);
}

@media (max-width: 1199px) {
    .studio-header__desktop {
        display: none;
    }

    .studio-header__main-inner {
        display: flex;
        min-height: 68px;
        justify-content: flex-start;
    }

    .studio-header__estimate {
        margin-inline-start: auto;
    }

    .studio-header__mobile {
        display: block;
        flex: 0 0 auto;
    }

    .studio-header__menu-trigger {
        border: 1px solid var(--header-edge);
        border-radius: 32px;
        background: #f6f1e7;
    }

    .studio-header__mobile[open] > summary {
        background: #eee7d8;
    }

    .studio-header__menu-icon {
        width: 14px;
        height: 10px;
        border-block: 1px solid currentColor;
        background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
    }

    .studio-header__mobile-panel {
        position: absolute;
        inset: 100% 0 auto;
        max-height: calc(100vh - 112px);
        max-height: calc(100dvh - 112px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 10px 16px 14px;
        border-bottom: 1px solid var(--header-edge);
        background: var(--header-paper);
        box-shadow: 0 14px 26px rgb(45 36 19 / 13%);
    }

    .studio-header__mobile-panel .studio-nav {
        display: block;
        width: min(100%, 620px);
        margin-inline: auto;
    }

    .studio-header__mobile-panel .studio-nav__link {
        justify-content: space-between;
    }

    .studio-header__mobile-panel .studio-nav__sub {
        margin: 4px 0 6px 10px;
        padding-inline-start: 8px;
        border-inline-start: 1px solid var(--header-edge);
    }
}

@media (max-width: 640px) {
    .studio-header__signature,
    .studio-header__email-address,
    .studio-header__estimate-full {
        display: none;
    }

    .studio-header__email-label,
    .studio-header__estimate-short {
        display: inline;
    }

    .studio-header__contacts {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .studio-header__contacts a {
        min-height: 44px;
    }

    .studio-header__main-inner {
        gap: 8px;
    }

    .studio-header__wordmark,
    .studio-header__estimate-arrow {
        display: none;
    }

    .studio-header__estimate {
        padding-inline: 9px;
        font-size: 1.3rem;
    }
}
