/**
 * CSS Reset + базовые нормализации
 * Современный reset без агрессивного обнуления
 * 
 * Путь: /public/assets/css/reset.css
 */

/* ─── Box-sizing для всех ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Базовый HTML/Body ─── */
html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Типографика ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

p {
    line-height: var(--line-height-normal);
}

/* ─── Ссылки ─── */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-primary);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

/* ─── Списки ─── */
ul, ol {
    list-style: none;
}

/* ─── Изображения ─── */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

/* ─── Формы ─── */
input, button, textarea, select, optgroup {
    font: inherit;
    color: inherit;
}

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

textarea {
    resize: vertical;
}

fieldset {
    border: none;
}

/* ─── Таблицы ─── */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ─── HR ─── */
hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-md) 0;
}

/* ─── Выделение ─── */
::selection {
    background-color: var(--color-primary);
    color: #fff;
}

/* ─── Скроллбар ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ─── Focus visible глобально ─── */
:focus {
    outline: none;
}

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

/* ─── Убираем стрелки у number-input ─── */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
}

input[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ─── Placeholder ─── */
::placeholder {
    color: var(--color-text-light);
    opacity: 1;
}