@font-face {
    font-family: Geist;
    src: url("../fonts/geist-2ffebe99.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ink: #081438;
    --muted: #354365;
    --action: #362bf0;
    --action-dark: #281ed1;
    --focus: #1679d9;
    font-family: Geist, system-ui, sans-serif;
    color: var(--ink);
    background: #fdfefe;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; }
h1, h2, p { margin: 0; }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
}

.site-header {
    position: relative;
    z-index: 2;
    background: #fdfefe;
    border-bottom: 1px solid var(--action);
}

.header-inner {
    width: min(1400px, calc(100% - 64px));
    min-height: 86px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.8vw, 25px);
}

.header-inner > .brand {
    margin-inline-end: clamp(0px, 2.5vw, 28px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 35px;
    font-weight: 690;
    letter-spacing: -.06em;
    line-height: 1;
}

.brand img {
    width: 50px;
    height: auto;
}

.header-panel, .site-nav, .header-actions {
    display: flex;
    align-items: center;
}

.header-panel {
    flex: 1;
    gap: 20px;
}

.site-nav {
    gap: clamp(20px, 3vw, 44px);
    font-size: 18px;
    font-weight: 520;
}

.site-nav a:hover { color: var(--action-dark); }
.site-nav a[aria-current="page"] {
    border-radius: 8px;
    background: #ece9ff;
    color: var(--action-dark);
    box-shadow: 0 0 0 6px #ece9ff;
}
.header-actions { margin-inline-start: auto; gap: clamp(10px, 1.7vw, 25px); }
.header-panel[hidden], .header-menu-toggle { display: none; }

.header-language { position: relative; }
.header-language summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding-inline: 13px;
    border: 1px solid var(--ink);
    border-radius: 14px;
    list-style: none;
    font-weight: 560;
    cursor: pointer;
}
.header-language summary::-webkit-details-marker { display: none; }
.header-language summary:hover { background: #f3f3ff; }
.header-language[open] .language-arrow { transform: rotate(180deg); }
.language-label { display: none; }
.language-options {
    position: absolute;
    z-index: 1;
    inset-block-start: calc(100% + 8px);
    inset-inline-start: 50%;
    min-width: 175px;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid #dfe2ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 24px rgb(8 20 56 / .16);
    list-style: none;
}
.language-options a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 8px;
}
.language-options li + li { border-top: 1px solid #dfe2ee; }
.language-options a:hover { color: var(--action); }
.language-options [aria-current="page"] img {
    filter: invert(19%) sepia(99%) saturate(4534%) hue-rotate(247deg) brightness(96%);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 10px 21px;
    border: 1px solid transparent;
    border-radius: 16px;
    font-weight: 620;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.button:disabled { cursor: default; opacity: 1; }

.button-primary {
    background: var(--action);
    color: white;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .32), inset 0 -4px 12px rgb(27 17 151 / .24);
}

.button-primary:not(:disabled):hover { background: var(--action-dark); }

.button-outline {
    color: var(--ink);
    border-color: var(--ink);
    background: rgb(255 255 255 / .64);
}

.button-outline:not(:disabled):hover { background: white; }
.button:not(:disabled):active { transform: translateY(1px); }
.header-login, .header-signup { font-size: 18px; }

.site-footer {
    border-top: clamp(3px, .32vw, 5px) solid #a4f3df;
    background: #0d1840;
    color: #f8f9ff;
}

.footer-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(26px, 3vw, 46px);
    width: min(1420px, calc(100% - 8.3vw));
    margin-inline: auto;
    padding-block: clamp(25px, 2.75vw, 43px);
}

.site-footer .brand { font-size: clamp(29px, 3.2vw, 49px); }
.site-footer .brand img { width: clamp(38px, 4.55vw, 70px); }
.site-footer :focus-visible { outline-color: #a4f3df; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px clamp(22px, 3.55vw, 54px);
    margin: 0;
    padding: 0;
    font-size: clamp(15px, 1.58vw, 24px);
    letter-spacing: -.024em;
    list-style: none;
}

.footer-links a:hover { text-decoration: underline; text-underline-offset: .22em; }

@media (max-width: 1080px) {
    .header-inner { width: calc(100% - 40px); }
    .brand { font-size: 29px; }
    .brand img { width: 43px; }
    .site-nav, .header-login, .header-signup { font-size: 15px; }
    .header-login, .header-signup { min-height: 46px; padding-inline: 15px; }
    .header-language summary { min-height: 46px; padding-inline: 10px; }
}

@media (max-width: 1050px) {
    .footer-layout { flex-direction: column; align-items: start; }
}

@media (max-width: 940px) {
    .header-inner {
        display: grid;
        grid-template-columns: minmax(max-content, 1fr) minmax(0, max-content) auto;
        grid-template-rows: minmax(68px, auto);
        column-gap: clamp(6px, 2vw, 12px);
        width: calc(100% - clamp(20px, 5.5vw, 40px));
        min-height: 68px;
    }

    .header-inner > .brand {
        grid-area: 1 / 1;
        justify-self: start;
        margin-inline-end: 0;
        gap: 5px;
        font-size: clamp(18px, 5.5vw, 25px);
    }
    .header-inner > .brand img { width: clamp(24px, 7.2vw, 34px); }

    .header-signup.button {
        grid-area: 1 / 2;
        min-height: 44px;
        padding-block: 6px;
        padding-inline: clamp(8px, 2.25vw, 13px);
        border-radius: 11px;
        font-size: clamp(11.5px, 3.08vw, 14px);
        text-wrap: balance;
    }

    .header-menu-toggle:not([hidden]) {
        grid-area: 1 / 3;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--ink);
        border-radius: 10px;
        background: #fff;
        color: var(--ink);
        cursor: pointer;
    }

    .header-menu-toggle:hover { background: #f1f1ff; }
    .header-menu-toggle[aria-expanded="false"] .menu-close-icon,
    .header-menu-toggle[aria-expanded="true"] .menu-open-icon { display: none; }

    .header-panel {
        grid-area: 2 / 1 / 3 / -1;
        display: grid;
        gap: 0;
        padding-block-end: 8px;
    }

    .site-nav { display: grid; gap: 0; }
    .site-nav a[aria-current="page"] { padding-inline: 9px; box-shadow: none; }
    .site-nav a, .header-login.button {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 8px 5px;
        border: 0;
        border-top: 1px solid #dfe2ee;
        border-radius: 0;
        font-size: 16px;
        font-weight: 520;
        text-align: start;
    }

    .header-login.button { justify-content: start; margin: 0; background: transparent; }
    .header-actions { display: grid; gap: 0; margin: 0; }
    .header-language summary {
        min-height: 46px;
        padding: 8px 5px;
        border: 0;
        border-top: 1px solid #dfe2ee;
        border-radius: 0;
        font-weight: 520;
    }
    .language-label { display: inline; }
    .language-short { margin-inline-start: auto; }
    .language-options {
        position: static;
        padding: 0;
        border: 0;
        border-top: 1px solid #dfe2ee;
        border-radius: 0;
        box-shadow: none;
    }
    .language-options a { padding-inline: 29px 8px; }
}

@media (max-width: 600px) {
    .footer-layout { width: calc(100% - 36px); }
    .footer-links { column-gap: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; }
}
