/* ============================================================================
   base.css — Reset, типографика, утилиты, фон-атмосфера
   ========================================================================== */

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

* { margin: 0; padding: 0; }

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

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

body {
    font-family: var(--font-body);
    font-size: var(--fs-16);
    line-height: 1.55;
    color: var(--text-0);
    background: var(--bg-0);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* Атмосфера: тонкая неоновая дымка + сетка */
    background-image:
        radial-gradient(60% 40% at 85% 0%, rgba(198, 255, 0, .06), transparent 60%),
        radial-gradient(50% 40% at 5% 8%, rgba(46, 204, 113, .05), transparent 60%);
    background-attachment: fixed;
}

/* Тонкая grain/grid-текстура поверх фона */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .5;
    background-image:
        linear-gradient(rgba(38, 48, 57, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(38, 48, 57, .18) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 75%);
}

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

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; }

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

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

/* Скроллбары */
* { scrollbar-width: thin; scrollbar-color: var(--stroke) transparent; }
*::-webkit-scrollbar { height: 8px; width: 8px; }
*::-webkit-scrollbar-thumb { background: var(--stroke); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--bg-3); }

/* ── Типографика ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--text-0);
}

.num { font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ── Раскладка / контейнер ───────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
    position: relative;
    z-index: 1;
}

.section { padding-block: clamp(40px, 7vw, 84px); position: relative; z-index: 1; }
.section--tight { padding-block: clamp(28px, 4vw, 48px); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.section-head h2 {
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    text-transform: uppercase;
    letter-spacing: .01em;
}
.section-head .more-link {
    color: var(--accent);
    font-weight: 600;
    font-size: var(--fs-14);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--t-fast) var(--ease);
}
.section-head .more-link:hover { gap: 8px; }
.section-head .eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: var(--fs-12);
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

/* ── Утилиты ─────────────────────────────────────────────────────────────── */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-1); }
.no-scroll { overflow: hidden; }
.hide-mobile { display: none; }
@media (min-width: 1024px) { .hide-mobile { display: revert; } .hide-desktop { display: none; } }

/* Горизонтальный скролл-ряд (мобильные карусели) */
.hscroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }
