/* Shared foundations, navigation, subpage hero, footer and controls. */

:root {
    --bg: #fafafa;
    --ink: #202124;
    --muted: #595b62;
    --accent: #515478;
    --onaccent: #fff;
    --panel: #f0f0f2;
    --line: #d5d6dc;
    --error: #a52828;
    --body: Arial, Helvetica, sans-serif;
    --display: Arial, Helvetica, sans-serif;
    --mono: "Courier New", monospace;
    --header-height: 58px;
}

/* Foundations */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 17px/1.65 var(--body);
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.08;
}

h1 {
    font-size: clamp(42px, 5.2vw, 78px);
    letter-spacing: -0.045em;
}

h2 {
    font-size: clamp(31px, 3.3vw, 47px);
    letter-spacing: -0.035em;
}

h3 {
    font-size: 25px;
    letter-spacing: -0.02em;
}

p {
    max-width: 70ch;
}

p + p {
    margin-top: 16px;
}

figure {
    margin: 0;
}

a {
    color: inherit;
    text-underline-offset: 5px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
textarea,
select {
    touch-action: manipulation;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

small,
.small {
    font-size: 14px;
    line-height: 1.6;
}

[hidden] {
    display: none !important;
}

::selection {
    background-color: #18191c;
    color: #fff;
}

::-moz-selection {
    background-color: #18191c;
    color: #fff;
}

/* Shared layout */

.wrap {
    max-width: 1280px;
    margin: auto;
    padding: 0 64px;
}

.site-layout > #main {
    padding-top: var(--header-height);
}

.dark {
    --bg: #08090b;
    --ink: #f4f4f5;
    --muted: #a6a6b0;
    --line: #292b31;
    --panel: #141519;
    --accent: #b1b2d0;
    --onaccent: #101116;

    background: var(--bg);
    color: var(--ink);
}

.dark .wrap {
    max-width: 1440px;
}

.eyebrow {
    display: block;
    margin-bottom: 24px;
    color: var(--accent);
    font: 14px/1.5 var(--body);
    letter-spacing: 0.06em;
}

/* Links and buttons */

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin-top: 30px;
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-height: 48px;
    padding: 13px 21px;
    border: 1px solid #202126;
    border-radius: 6px;
    background: #202126;
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 5px;
}

/* Shared header */

.header-dock {
    --ink: #f4f4f5;
    --line: #292b31;
    --bg: #08090b;

    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    border-bottom: 1px solid #27282c;
    background: #08090bf5;
    color: var(--ink);
    backdrop-filter: blur(12px);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    min-height: 58px;
    padding: 6px 0;
}

.brand {
    color: inherit;
    font: 500 23px/1 var(--body);
    letter-spacing: -1.1px;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
}

.brand-symbol {
    display: block;
    flex-shrink: 0;
    width: auto;
    height: 28px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 27px;
}

.site-nav a {
    color: #b9bac1;
    font-size: 14px;
    text-decoration: none;
}

.site-nav a[aria-current="page"] {
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 7px;
}

.header-dock a:hover {
    color: #c5c4dd;
}

.language-form {
    display: flex;
    margin: 0;
}

.lang {
    max-width: 80px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: #b9bac1;
    font-size: 14px;
}

.lang option {
    background: #08090b;
    color: #f4f4f5;
}

.menu {
    display: none;
    padding: 8px 16px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
}

/* Shared subpage hero */

.subhero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    align-items: center;
    gap: 60px;
    min-height: 370px;
    padding: 68px 0;
}

.subhero h1 {
    max-width: 850px;
    font-size: clamp(44px, 5.1vw, 70px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.subhero p {
    max-width: 740px;
    margin-top: 24px;
    color: #a9aab4;
    font-size: 18px;
}

.subhero .eyebrow {
    margin-bottom: 20px;
    color: #a9aabb;
}

.subhero img {
    max-width: 100%;
    height: 260px;
    object-fit: cover;
}

/* Consent panel */

.consent {
    position: fixed;
    z-index: 1000;
    inset-inline-start: 50%;
    inset-block-end: clamp(16px, 5vh, 48px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: min(1100px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    margin: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.consent[hidden] {
    display: none !important;
}

.consent strong {
    display: block;
    margin-bottom: 7px;
    font-size: 16px;
    font-weight: 500;
}

.consent p {
    max-width: 650px;
    color: #555962;
    font-size: 14px;
}

.consent-actions {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

.consent button {
    min-height: 46px;
    padding: 12px 16px;
    border: 1px solid #b3b5be;
    border-radius: 5px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
}

.consent button[data-consent="analytics"] {
    min-height: 48px;
    padding: 13px 21px;
    border-color: #202126;
    border-radius: 6px;
    background: #202126;
    color: #fff;
    font-size: 15px;
    font-weight: 400;
}

/* Footer */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 44px 0 32px;
    border-top: 1px solid var(--line);
    color: #666974;
    font-size: 14px;
}

.site-footer .brand {
    color: #24262d;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
}

.footer-links .link-button {
    font: inherit;
    cursor: pointer;
}

/* Preview dialogs */

dialog {
    width: calc(100% - 32px);
    max-width: 560px;
    padding: 32px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
}

dialog::backdrop {
    background: #0008;
}

dialog p {
    margin: 20px 0;
}

dialog button {
    padding: 10px 18px;
    border: 0;
    background: var(--accent);
    color: var(--onaccent);
}

/* Accessibility */

:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

:where(a, button, select):focus-visible {
    outline: 2px solid #9890d2;
    outline-offset: 5px;
}

.skip {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 200;
    padding: 12px;
    background: var(--bg);
}

.skip:focus {
    top: 12px;
}

/* Responsive layout */

@media (max-width: 1100px) {
    .wrap {
        padding-inline: 40px;
    }

    .site-header {
        gap: 25px;
    }

    .site-nav {
        gap: 18px;
    }

    .subhero {
        gap: 30px;
    }

}

@media (max-width: 1024px) {
    .consent {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 850px) {
    .site-header {
        gap: 16px;
        min-height: 54px;
        padding: 5px 0;
    }

    .menu {
        display: block;
        min-height: 44px;
    }

    .language-form {
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        inset: 100% 0 auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        max-height: calc(100svh - var(--header-height));
        overflow: auto;
        padding: 20px 40px;
        border-bottom: 1px solid #33343b;
        background: #0d0e11;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 10px 0;
    }

    .subhero {
        grid-template-columns: 1fr;
        min-height: 320px;
        padding: 52px 0;
    }

    .subhero img {
        display: none;
    }
}

@media (max-width: 600px) {
    .wrap {
        padding-inline: 24px;
    }

    .brand {
        font-size: 22px;
    }

    .site-header .brand {
        gap: 8px;
    }

    .brand-symbol {
        height: 24px;
    }

    .lang {
        max-width: 68px;
        padding: 4px;
        font-size: 12px;
    }

    .menu {
        border-color: #383a42;
        border-radius: 4px;
        color: #f1f1f3;
    }

    .site-nav {
        padding: 16px 24px;
    }

    .site-nav a {
        border-top: 1px solid var(--line);
    }

    .actions {
        gap: 20px;
    }

    .cta {
        justify-content: center;
        gap: 20px;
        width: 100%;
        text-align: center;
    }

    .subhero {
        min-height: 280px;
        padding: 42px 0;
    }

    .subhero h1 {
        font-size: 44px;
    }

    .subhero p {
        font-size: 17px;
    }

    .consent {
        gap: 20px;
        padding: 20px;
    }

    .consent-actions {
        flex-direction: column;
        width: 100%;
    }

    .consent button {
        width: 100%;
    }

    .site-footer {
        gap: 24px;
        padding-top: 32px;
    }

    .footer-links {
        gap: 22px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .site-header {
        gap: 8px;
    }

    .site-header .brand {
        gap: 6px;
        font-size: 20px;
    }

    .brand-symbol {
        height: 22px;
    }

    .site-header .menu {
        padding-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
