/*
 * base.css — foundations for every page: fonts, design tokens (colours,
 * sizes, spacing), reset, typography and buttons.
 *
 * Sizes were measured from the approved design video. The video shows the
 * site at a 1680px-wide browser window; values that scale with the window use
 * clamp() so that width gives the design's size and smaller screens shrink.
 * Change a colour or size here and it changes everywhere.
 */

/* ------------------------------------------------------------------------
 * Fonts (self-hosted, latin subset; licences in assets/fonts/)
 * --------------------------------------------------------------------- */

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/archivo-latin-variable.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-700.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------------
 * Tokens
 * --------------------------------------------------------------------- */

:root {
    /* Colours */
    --fdfs-ink: #0d0e12;            /* dark sections, top bar, footer */
    --fdfs-black: #0e0e10;          /* dark buttons, headings */
    --fdfs-red: #b7001c;            /* primary buttons, labels, numbers, accents */
    --fdfs-red-dark: #960017;       /* red hover */
    --fdfs-paper: #f9f8f4;          /* header */
    --fdfs-surface: #f7f6f4;        /* default page background, cards */
    --fdfs-surface-alt: #f4f3ef;    /* alternate sections */
    --fdfs-surface-muted: #f2f1ef;  /* breadcrumb bar, notice band */
    --fdfs-white: #ffffff;
    --fdfs-line: #e0dfdb;           /* dividers and borders on light */
    --fdfs-line-dark: rgba(255, 255, 255, 0.14); /* dividers on dark */
    --fdfs-text: #444243;           /* body text */
    --fdfs-text-strong: #282725;    /* navigation, list text */
    --fdfs-text-on-dark: #c6c7cb;   /* body text on dark */
    --fdfs-muted-on-dark: #8d8b88;  /* small labels on dark */
    --fdfs-placeholder: #e7e5e0;    /* empty image boxes */

    /* Type */
    --fdfs-font-heading: "Archivo", "Arial Narrow", Arial, sans-serif;
    --fdfs-font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --fdfs-font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

    --fdfs-size-hero: clamp(2.5rem, 4vw, 4.1875rem);          /* 67px */
    --fdfs-size-h2: clamp(2rem, 2.83vw, 2.9688rem);           /* 47.5px */
    --fdfs-size-h3: 1.25rem;                                  /* 20px card titles */
    --fdfs-size-lead: 1.125rem;                               /* 18px */
    --fdfs-size-section-text: 1.075rem;                       /* 17.2px text under section headings */
    --fdfs-size-body: 1rem;                                   /* 16px */
    --fdfs-size-card-text: 0.9rem;                            /* 14.4px text in cards */
    --fdfs-size-small: 0.875rem;                              /* 14px */
    --fdfs-size-label: 0.72rem;                               /* 11.5px mono labels */
    --fdfs-size-link: 0.66rem;                                /* 10.5px mono text links */

    /* Layout */
    --fdfs-container: 1372px;
    --fdfs-gutter: clamp(1.25rem, 4vw, 2.5rem);
    --fdfs-section-space: clamp(4.5rem, 6.9vw, 7.25rem);       /* 116px */
    --fdfs-header-height: 94px;
    --fdfs-topbar-height: 29px;
}

/* ------------------------------------------------------------------------
 * Reset
 * --------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--fdfs-surface);
    color: var(--fdfs-text);
    font-family: var(--fdfs-font-body);
    font-size: var(--fdfs-size-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

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

:focus-visible {
    outline: 2px solid var(--fdfs-red);
    outline-offset: 3px;
}

.fdfs-menu-open {
    overflow: hidden;
}

/* ------------------------------------------------------------------------
 * Accessibility helpers
 * --------------------------------------------------------------------- */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fdfs-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 12px 18px;
    background: var(--fdfs-black);
    color: var(--fdfs-white);
    transform: translateY(-120%);
}

.fdfs-skip-link:focus {
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important; /* Honour the visitor's reduced-motion setting over every component transition. */
        animation-duration: 0.01ms !important;
    }
}

/* ------------------------------------------------------------------------
 * Typography
 * --------------------------------------------------------------------- */

.fdfs-container {
    width: 100%;
    max-width: calc(var(--fdfs-container) + 2 * var(--fdfs-gutter));
    margin-inline: auto;
    padding-inline: var(--fdfs-gutter);
}

.fdfs-heading {
    color: var(--fdfs-black);
    font-family: var(--fdfs-font-heading);
    font-size: var(--fdfs-size-h2);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0;
}

.fdfs-eyebrow {
    color: var(--fdfs-red);
    font-family: var(--fdfs-font-mono);
    font-size: var(--fdfs-size-label);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.fdfs-eyebrow--light {
    color: var(--fdfs-muted-on-dark);
}

.fdfs-eyebrow--muted {
    color: var(--fdfs-muted-on-dark);
}

.fdfs-eyebrow--red {
    color: var(--fdfs-red);
}

.fdfs-lead {
    font-size: var(--fdfs-size-lead);
    line-height: 1.7;
}

.fdfs-number {
    color: var(--fdfs-red);
    font-family: var(--fdfs-font-mono);
    font-size: var(--fdfs-size-label);
    letter-spacing: 0.08em;
}

.fdfs-prose > * + * {
    margin-top: 1em;
}

.fdfs-prose h2,
.fdfs-prose h3 {
    margin-top: 1.6em;
    color: var(--fdfs-black);
    font-family: var(--fdfs-font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.fdfs-prose a {
    color: var(--fdfs-red);
    text-decoration: underline;
}

.fdfs-prose ul {
    padding-left: 1.2em;
    list-style: square;
}

/* ------------------------------------------------------------------------
 * Buttons and text links
 * --------------------------------------------------------------------- */

.fdfs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 21px 0 23px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-family: var(--fdfs-font-body);
    font-size: var(--fdfs-size-small);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fdfs-button__icon {
    width: 16px;
    height: 16px;
    flex: none;
    transition: transform 0.2s ease;
}

.fdfs-button:hover .fdfs-button__icon {
    transform: translateX(3px);
}

.fdfs-button--red {
    background: var(--fdfs-red);
    color: var(--fdfs-white);
}

.fdfs-button--red:hover {
    background: var(--fdfs-red-dark);
}

.fdfs-button--dark {
    background: var(--fdfs-black);
    color: var(--fdfs-white);
}

.fdfs-button--dark:hover {
    background: var(--fdfs-red);
}

.fdfs-button--outline {
    border-color: #c9c7c2;
    background: transparent;
    color: var(--fdfs-black);
}

.fdfs-button--outline:hover {
    border-color: var(--fdfs-black);
}

.fdfs-button--outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
    color: var(--fdfs-white);
}

.fdfs-button--outline-light:hover {
    border-color: var(--fdfs-white);
}

.fdfs-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fdfs-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fdfs-red);
    font-family: var(--fdfs-font-mono);
    font-size: var(--fdfs-size-link);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.fdfs-link:hover span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.fdfs-link__icon {
    width: 13px;
    height: 13px;
}
