/* Base: font, colour tokens, reset, typography, buttons and small helpers */

@font-face {
    font-family: "Jost";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/jost-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Jost";
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/jost-latin-italic.woff2") format("woff2");
}

:root {
    /* Colours from the logo: orange, grey, black */
    --accent: #d24b22;          /* buttons and links (white text on it passes WCAG AA) */
    --accent-hover: #b53e1a;
    --accent-bright: #e8592b;   /* the logo orange, for details on dark backgrounds */
    --grey: #8c8c8c;            /* the logo grey */
    --ink: #1d1d1f;
    --muted: #5c5f66;
    --line: #e4dfd8;
    --background: #ffffff;
    --background-alt: #f6f3ef;
    --dark: #0d0d0d;
    --dark-soft: #1a1a1a;
    --on-dark: #f1efec;
    --on-dark-muted: #b9b5af;

    --font: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --radius: 14px;
    --radius-small: 8px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --container: 1180px;
    --page-max: 2560px;         /* the whole page stops here; wider screens get dark edges */
    --gutter: 16px;
    --header-height: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--dark);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

body {
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    max-width: var(--page-max);
    margin: 0 auto;
    background: var(--background);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
}

h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

h3 {
    font-size: 1.35rem;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--accent);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--accent-hover);
}

:focus-visible {
    outline: 3px solid var(--accent-bright);
    outline-offset: 3px;
}

/* Layout helpers */

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container-narrow {
    max-width: calc(760px + 2 * var(--gutter));
}

.section {
    padding: clamp(56px, 8vw, 104px) 0;
}

.section-alt {
    background: var(--background-alt);
}

.section-dark {
    background: var(--dark);
    color: var(--on-dark);
}

.section-dark a:not(.button) {
    color: var(--accent-bright);
}

.section-head {
    max-width: 720px;
    margin: 0 auto clamp(32px, 5vw, 56px);
    text-align: center;
}

.eyebrow {
    display: block;
    margin-bottom: 0.8em;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-dark .eyebrow {
    color: var(--accent-bright);
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
}

.section-dark .lead {
    color: var(--on-dark-muted);
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    min-height: 48px;
    padding: 0.7em 1.4em;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.button-accent {
    background: var(--accent);
    color: #ffffff;
}

.button-accent:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.button-outline {
    border-color: currentColor;
    color: var(--ink);
}

.button-outline:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
}

.button-light {
    border-color: rgba(255, 255, 255, 0.75);
    color: #ffffff;
}

.button-light:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--ink);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.6em;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-weight: 500;
    text-decoration: none;
}

.text-link:hover .icon {
    transform: translateX(3px);
}

.text-link .icon {
    transition: transform 0.2s;
}

/* Placeholder for data that is not known yet */
.unknown {
    padding: 0 0.35em;
    border-radius: 4px;
    background: #fff1c2;
    color: #6b4f00;
    font-size: 0.9em;
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius-small);
    background: #ffffff;
    color: var(--ink);
}

.skip-link:focus {
    top: 12px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
