/* ==========================================================
   Базовые стили: цвета, шрифты, сброс, типографика
   ========================================================== */

/* Шрифт для заголовков (Bricolage Grotesque, лицензия OFL), хранится локально */
@font-face {
    font-family: "Bricolage";
    src: url("../fonts/bricolage.woff2") format("woff2");
    font-weight: 400 800;
    font-stretch: 75% 100%;
    font-display: swap;
}

:root {
    /* Палитра: «балтийский» синий + жёлтый цвет грузовой маркировки */
    --ink: #10214b;         /* основной тёмно-синий */
    --ink-deep: #0a1636;    /* самый тёмный фон */
    --cobalt: #2f5bff;      /* яркий акцент, ссылки, иконки */
    --cobalt-soft: #e6ecff; /* светлая подложка под иконки */
    --signal: #ffc53d;      /* жёлтый: главные кнопки, точки маршрута */
    --paper: #f3f6fb;       /* светлый фон секций */
    --white: #ffffff;
    --text: #1b2440;
    --muted: #5a6485;
    --line: #dce3f0;
    --ok: #16865e;
    --error: #c93434;

    /* Шрифты */
    --font-display: "Bricolage", "Segoe UI", system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Размеры */
    --container: 1180px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 24px;
    --header-h: 72px;

    --shadow: 0 18px 40px -24px rgba(16, 33, 75, 0.45);
}

/* --- Сброс --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

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

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

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

a {
    color: var(--cobalt);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-thickness: 2px;
}

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

address {
    font-style: normal;
}

/* --- Заголовки --- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

/* --- Видимый фокус для клавиатуры --- */
:focus-visible {
    outline: 3px solid var(--signal);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Служебные классы --- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--signal);
    color: var(--ink);
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 1rem;
}

.icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.icon--sm {
    width: 1.1rem;
    height: 1.1rem;
}
