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

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

body {
    margin: 0;
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-wrap: anywhere; /* очень длинные слова переносятся и не вылезают из карточек */
    transition: background-color var(--speed), color var(--speed);
}

/* Атрибут hidden должен скрывать элемент, даже если у него задан display в стилях */
[hidden] { display: none !important; }

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    transition: background-color var(--speed), transform var(--speed) var(--ease);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 2px var(--border-color); }
.btn-ghost:hover { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }

.section { margin-top: clamp(56px, 8vw, 104px); }
.section-title { margin-bottom: 28px; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.15; }
.hint { padding: 24px; border: 2px dashed var(--border-color); border-radius: var(--radius-m); color: var(--text-muted); font-size: 14px; }

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

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