/* Reset CSS — обнуляем всё */

/* 1. Сбрасываем отступы и границы */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;  /* чтобы padding не увеличивал ширину */
}

/* 2. Убираем маркеры списков */
ul, ol {
    list-style: none;
}

/* 3. Ссылки без подчеркивания */
a {
    text-decoration: none;
    color: inherit;  /* наследуют цвет текста */
}

/* 4. Кнопки и инпуты без стандартной обводки */
button,
input,
textarea,
select {
    font: inherit;
    background: none;
    border: none;
    outline: none;  /* убираем стандартную обводку */
}

/* Убираем ТОЛЬКО обводку, ключ оставляем */
input:focus {
    outline: none !important;
}

/* Для Safari дополнительно */
input:focus-visible {
    outline: none !important;
}

/* 5. Кнопки как ссылки */
button {
    cursor: pointer;
}

/* 6. Изображения резиновые */
img,
svg {
    max-width: 100%;
    height: auto;
    display: block;  /* убирает лишний отступ снизу */
}

/* 7. Таблицы без отступов */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 8. HTML5 элементы блочные */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

/* 9. База для html и body */
html, body {
    height: 100%;
    scroll-behavior: smooth;  /* плавный скролл */
}

body {
    line-height: 1.5;  /* читаемый межстрочник */
    -webkit-font-smoothing: antialiased;  /* сглаживание шрифтов */
    text-rendering: optimizeLegibility;
}

/* 10. Заголовки без жирности (потом зададим свою) */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    font-size: inherit;
}

/* 11. Убираем стандартные стили полей */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

/* 12. Для доступности: оставляем фокус, но делаем красиво */
:focus-visible {
    outline: 2px solid var(--color-accent-4, #5A8AF9);
    outline-offset: 2px;
}
