/* ==========================================================================
   ДИФ — base: шрифты, reset, типографика, раскладка, утилиты
   ========================================================================== */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("/assets/manrope-cyrillic-wght-normal-0cd7e757.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("/assets/manrope-latin-wght-normal-050889a9.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: "Geologica";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/assets/geologica-cyrillic-wght-normal-e56351d3.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Geologica";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/assets/geologica-latin-wght-normal-8009162a.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;
}

/* Плавные переходы между страницами (Chrome/Edge/Safari 18+) */
@view-transition {
    navigation: auto;
}

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

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h-compact) + var(--space-6));
    hanging-punctuation: first last;
}

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

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    font-weight: var(--weight-regular);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

main {
    flex: 1 0 auto;
}

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

img {
    height: auto;
}

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

button {
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

/* нулевая специфичность: классы компонентов могут задавать свои отступы */
:where(ul, ol)[role="list"] {
    list-style: none;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--weight-bold);
    line-height: var(--leading-snug);
    text-wrap: balance;
}

p,
li,
dd {
    text-wrap: pretty;
}

::selection {
    background: var(--c-accent);
    color: var(--ink-950);
}

:focus-visible {
    outline: 2px solid var(--c-focus);
    outline-offset: 3px;
    border-radius: 4px;
}

[hidden] {
    display: none !important;
}

/* ---------- Layout primitives ---------- */

/* Контейнер контента. Выравнивание по макету: 60px поля на 1440. */
.container {
    width: var(--container);
    margin-inline: auto;
}

.container--narrow {
    width: min(860px, 100% - 2 * var(--gutter));
    margin-inline: auto;
}

/* Сетка «на всю ширину» с именованными линиями: позволяет блоку
   выходить к краю экрана (full) или оставаться в контенте (content). */
.bleed-grid {
    display: grid;
    grid-template-columns:
        [full-start] minmax(var(--gutter), 1fr)
        [content-start] minmax(0, calc(var(--container-max) / 2))
        [center] minmax(0, calc(var(--container-max) / 2))
        [content-end] minmax(var(--gutter), 1fr)
        [full-end];
}

.section {
    padding-block: var(--section-gap);
}

.section--tight {
    padding-block: var(--section-gap-sm);
}

.section + .section--flush-top,
.section--flush-top {
    padding-top: 0;
}

.stack > * + * {
    margin-top: var(--stack-gap, var(--space-4));
}

/* ---------- Typography helpers ---------- */
.display {
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    font-size: var(--text-display);
    line-height: 1.12;
    letter-spacing: var(--tracking-tight);
    text-transform: uppercase;
}

.h-section {
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    font-size: var(--text-3xl);
    line-height: 1.15;
    letter-spacing: var(--tracking-tight);
    text-transform: uppercase;
}

.h-page {
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    font-size: var(--text-4xl);
    line-height: 1.1;
    letter-spacing: var(--tracking-tight);
    text-transform: uppercase;
}

.h-block {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    line-height: 1.2;
    letter-spacing: -0.005em;
}

.h-card {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    line-height: 1.3;
}

.lead {
    font-size: var(--text-xl);
    line-height: 1.4;
    max-width: 34ch;
}

.text-muted {
    color: var(--c-text-muted);
}

.text-accent {
    color: var(--c-accent-text);
}

.eyebrow {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--c-text-muted);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: var(--z-overlay);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-pill);
    background: var(--ink-900);
    color: var(--white);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform var(--dur-base) var(--ease-out);
}

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

/* ---------- Icons (SVG sprite) ---------- */
.icon {
    width: var(--icon-size, 1.25em);
    height: var(--icon-size, 1.25em);
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: var(--icon-stroke, 1.75);
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Scroll reveal ----------
   Прогрессивное улучшение: на браузерах со scroll-driven animations
   элементы мягко проявляются; остальные видят контент сразу. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        [data-reveal] {
            animation: reveal linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 40%;
        }
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        translate: 0 32px;
    }
}
