/* =========================================================
   Base: fonts, reset, typography, container
   ========================================================= */
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations"),
         url("../fonts/plus-jakarta-sans-latin-wght-normal.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: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations"),
         url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.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: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-cyrillic-ext-wght-normal.woff2") format("woff2-variations"),
         url("../fonts/plus-jakarta-sans-cyrillic-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Plus Jakarta Sans almost has no Cyrillic; Inter covers RU/UK glyphs */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-cyrillic-wght-normal.woff2") format("woff2-variations"),
         url("../fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

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

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

body {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    font: inherit;
    color: inherit;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

:focus-visible {
    outline: 2px solid var(--color-focus-outline);
    outline-offset: 2px;
}

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin: 0;
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-text-primary);
}

h1, .h1 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-regular); }
h2, .h2 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-regular); }
h3, .h3 { font-size: var(--font-size-2xl); }
h4, .h4 { font-size: var(--font-size-xl); }
h5, .h5 { font-size: var(--font-size-lg); }
h6, .h6 { font-size: var(--font-size-base); }

p {
    margin: 0;
}

.text-display {
    font-size: var(--font-size-display);
    font-weight: var(--font-weight-regular);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.text-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-snug);
}

.text-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.text-body { font-size: var(--font-size-md); }
.text-body-lg { font-size: var(--font-size-base); }
.text-caption { font-size: var(--font-size-xs); color: var(--color-text-secondary); }
.text-micro { font-size: var(--font-size-2xs); color: var(--color-text-secondary); }

.text-lead {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.text-secondary-ds { color: var(--color-text-secondary) !important; }
.text-muted-ds { color: var(--color-text-muted) !important; }
.text-inverse { color: var(--color-text-inverse) !important; }

.fw-light-ds { font-weight: var(--font-weight-light) !important; }
.fw-regular-ds { font-weight: var(--font-weight-regular) !important; }
.fw-medium-ds { font-weight: var(--font-weight-medium) !important; }
.fw-semibold-ds { font-weight: var(--font-weight-semibold) !important; }

/* Крупные суммы вида $37,201.00, где копейки приглушены */
.amount {
    display: inline-flex;
    align-items: baseline;
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-tight);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.amount--sm { font-size: var(--font-size-xl); }
.amount--md { font-size: var(--font-size-3xl); }
.amount--lg { font-size: var(--font-size-4xl); font-weight: var(--font-weight-semibold); }

.amount__cents {
    color: var(--color-text-muted);
    font-weight: var(--font-weight-regular);
}

/* ---- Container / grid ---- */
.container-ds {
    width: 100%;
    max-width: var(--layout-max-width);
    margin-inline: auto;
    padding-inline: var(--layout-margin);
}

.grid-ds {
    display: grid;
    grid-template-columns: repeat(var(--layout-columns), minmax(0, 1fr));
    gap: var(--layout-gutter);
}

.visually-hidden-ds {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
