/* Shared foundations, typography, navigation and footer. */
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}
body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font:
        16px/1.65 "Segoe UI",
        Arial,
        sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
select,
textarea {
    font: inherit;
}
button {
    cursor: pointer;
}
a,
button,
input,
select,
textarea,
summary {
    outline-offset: 4px;
}
:focus-visible {
    outline: 2px solid var(--accent);
}
[hidden] {
    display: none !important;
}
.wrap {
    width: min(1180px, calc(100% - 64px));
    margin-inline: auto;
}
h1,
h2,
h3 {
    color: inherit;
    font-weight: 650;
}
h1 {
    margin: 0 0 22px;
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.16;
    letter-spacing: -1.1px;
}
h2 {
    margin: 0 0 20px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.25;
    letter-spacing: -0.65px;
}
h3 {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.35;
}
p {
    margin: 0 0 18px;
}
.lead {
    color: var(--muted);
    max-width: 740px;
}
.eyebrow {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.15px;
    margin-bottom: 14px;
}
header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand img {
    width: 58px;
    height: 50px;
    object-fit: contain;
}
.brand strong {
    font-size: 19px;
    letter-spacing: 0.6px;
}
.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 1px;
}
nav {
    display: flex;
    align-items: center;
    gap: 27px;
    font-size: 14px;
    font-weight: 600;
}
nav > a:not(.btn):hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 5px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 21px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: #fff;
    background: var(--accent);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    transition:
        background 0.18s ease,
        border-color 0.18s ease;
}
.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.textbtn {
    display: inline-block;
    border: 0;
    border-bottom: 1px solid #bec8d8;
    padding: 0 0 2px;
    color: var(--accent);
    background: none;
    font-weight: 600;
    text-align: left;
}
.textbtn:hover {
    border-color: var(--accent);
}
.mobile {
    display: none;
}
footer {
    background: var(--footer-bg);
    color: #e2e7f0;
    padding: 42px 0 22px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 70px;
}
.footer-contact strong {
    font-size: 18px;
}
.footer-contact p {
    margin: 12px 0 0;
    color: #c5cfe0;
    font-size: 14px;
}
.footer-contact a:hover,
.footer-resources a:hover,
.footer-bottom a:hover {
    text-decoration: underline;
}
.footer-resources h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 14px;
}
.useful-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 11px 26px;
}
.useful-grid a {
    font-size: 14px;
    color: #d5deed;
    line-height: 1.5;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #43506d;
    padding-top: 19px;
    margin-top: 30px;
    color: #c5cfe0;
    font-size: 13px;
}
@media (max-width: 850px) {
    .wrap {
        width: calc(100% - 36px);
    }
    .nav {
        min-height: 72px;
        gap: 14px;
    }
    .brand img {
        width: 49px;
        height: 43px;
    }
    .brand strong {
        font-size: 17px;
    }
    .mobile {
        display: block;
        background: #fff;
        color: var(--ink);
        border: 1px solid var(--line);
        padding: 8px 13px;
        border-radius: 6px;
        box-shadow: 0 2px 5px rgba(36, 51, 90, 0.12);
    }
    .mobile:active {
        box-shadow: 0 1px 2px rgba(36, 51, 90, 0.1);
        transform: translateY(1px);
    }
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        padding: 0 18px;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        border-radius: 0 0 6px 6px;
        box-shadow: 0 7px 14px rgba(36, 51, 90, 0.1);
        transition:
            max-height 0.25s ease,
            padding 0.25s ease,
            opacity 0.2s ease,
            transform 0.25s ease,
            visibility 0s linear 0.25s;
    }
    nav.open {
        max-height: 340px;
        padding: 12px 18px 18px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition:
            max-height 0.25s ease,
            padding 0.25s ease,
            opacity 0.2s ease,
            transform 0.25s ease,
            visibility 0s;
    }
    nav > a:not(.btn) {
        padding: 10px 0;
    }
    nav .btn {
        margin-top: 8px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
@media (max-width: 480px) {
    .brand {
        gap: 8px;
    }
    .brand small {
        font-size: 11px;
    }
    .useful-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

/* Navigation remains available when JavaScript is disabled. */
@media (max-width: 850px) {
    html:not(.js) .nav {
        flex-wrap: wrap;
        padding-block: 12px;
    }
    html:not(.js) .mobile {
        display: none;
    }
    html:not(.js) nav {
        position: static;
        max-height: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
    }
}
