/* British Built Cars — public site: tokens, fonts, reset, typography.
   Bespoke stylesheet: the public site does not load Bootstrap. Admin still does
   (public/css/admin.css). Load order: base.css → components.css → pages.css. */

/* ─── Fonts ─────────────────────────────────────────────────────
   Self-hosted, extracted from the design bundle. Inter is a variable font with
   one file per unicode range, so a single face covers the whole weight range. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../../fonts/inter-latin.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: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
        U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
        U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'General Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../../fonts/general-sans-500.woff2') format('woff2');
}

@font-face {
    font-family: 'General Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../../fonts/general-sans-600.woff2') format('woff2');
}

/* The design sets display type at weight 800; General Sans stops at 700, which
   is the face the artifact actually rendered. Mapped 700–900 onto it so the
   heavier declarations resolve to the same file rather than synthesising bold. */
@font-face {
    font-family: 'General Sans';
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url('../../fonts/general-sans-700.woff2') format('woff2');
}

/* ─── Tokens ────────────────────────────────────────────────── */

:root {
    /* Surfaces */
    --bbc-page: #f5f4f1;
    --bbc-page-alt: #faf9f6;
    --bbc-band-warm: #ebe8e0;
    --bbc-band-warm-alt: #ece9e2;
    --bbc-dark: #0f1113;
    --bbc-dark-alt: #16191b;
    --bbc-dark-soft: #1a1d1f;
    --bbc-ink: #1a1d1f;
    --bbc-ink-strong: #14171a;
    --bbc-white: #ffffff;

    /* Brand */
    --bbc-red: #c8102e;
    --bbc-red-dark: #a80d26;
    --bbc-navy: #012169;
    --bbc-navy-light: #0a2f8a;
    --bbc-navy-muted: #9fb2d6;
    --bbc-navy-muted-dim: #4a68a8;

    /* Text */
    --bbc-muted: #6b706c;
    --bbc-muted-dark: #55595a;
    --bbc-muted-deep: #44494a;
    --bbc-muted-slate: #4c5350;
    --bbc-on-dark: #c9cec8;
    --bbc-on-dark-dim: #9aa19b;
    --bbc-on-dark-faint: #7e8580;
    --bbc-on-dark-fainter: #5e6462;

    /* Lines */
    --bbc-line: #e2e0da;
    --bbc-line-warm: #ddd9d0;
    --bbc-line-warm-dark: #d8d5cd;
    --bbc-line-dark: #2a2f31;
    --bbc-line-dark-soft: #24282a;
    --bbc-line-dark-faint: #1c1f21;
    --bbc-line-dark-btn: #2f3436;
    --bbc-line-dark-mid: #33383a;

    /* Type */
    --bbc-font-text: Inter, Helvetica, Arial, sans-serif;
    --bbc-font-display: 'General Sans', Helvetica, Arial, sans-serif;

    /* Layout */
    --bbc-container: 1240px;
    --bbc-gutter: 28px;
    --bbc-prose: 900px;
    --bbc-lede: 620px;
}

/* ─── Reset ─────────────────────────────────────────────────── */

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

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--bbc-font-text);
    font-size: 16px;
    color: var(--bbc-ink);
    background: var(--bbc-page);
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}

* {
    font-variant-numeric: tabular-nums;
}

img,
picture,
video,
iframe {
    max-width: 100%;
}

img {
    border-style: none;
}

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

button {
    cursor: pointer;
}

figure {
    margin: 0;
}

/* ─── Typography ────────────────────────────────────────────── */

a {
    color: var(--bbc-red);
    text-decoration: none;
}

a:hover {
    color: var(--bbc-navy);
}

h1,
h2,
h3,
h4 {
    font-family: var(--bbc-font-display);
    font-weight: 800;
    margin: 0;
}

h1 {
    font-size: 44px;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h4 {
    font-size: 16.5px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

em {
    font-style: italic;
}

/* The small uppercase tracked label used above almost every heading. */
.bbc-eyebrow {
    font-family: var(--bbc-font-text);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Eyebrow as a solid red tag rather than plain text. */
.bbc-tag {
    display: inline-block;
    padding: 6px 11px;
    font-family: var(--bbc-font-text);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bbc-white);
    background: var(--bbc-red);
}

.bbc-display {
    font-family: var(--bbc-font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ─── Layout ────────────────────────────────────────────────── */

.bbc-container {
    max-width: var(--bbc-container);
    margin: 0 auto;
    padding-left: var(--bbc-gutter);
    padding-right: var(--bbc-gutter);
}

/* Reading measure for article and review bodies. */
.bbc-prose {
    max-width: var(--bbc-prose);
    margin: 0 auto;
    padding-left: var(--bbc-gutter);
    padding-right: var(--bbc-gutter);
}

.bbc-prose p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--bbc-muted-slate);
    margin-bottom: 20px;
}

.bbc-prose p:last-child {
    margin-bottom: 0;
}

/* Dark and warm full-bleed bands. */
.bbc-band-dark {
    background: var(--bbc-dark-alt);
    color: var(--bbc-on-dark);
}

.bbc-band-warm {
    background: var(--bbc-band-warm);
    border-top: 1px solid var(--bbc-line-warm);
}

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

@media (max-width: 720px) {
    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 26px;
    }
}
