/* Palime Archive — base.css */

/* === СБРОС === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img, video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:visited {
    color: inherit;
}

a:hover {
    color: var(--accent-main);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* === ТИПОГРАФИКА === */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

p:last-child {
    margin-bottom: 0;
}

strong { font-weight: 600; }
em     { font-style: italic; }

/* Моноширинный текст */
code, pre, .mono {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* === ВЫДЕЛЕНИЕ ТЕКСТА === */
::selection {
    background: var(--accent-main);
    color: #fff;
}

/* === СКРОЛЛ === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-second);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* === ДОСТУПНОСТЬ === */
:focus-visible {
    outline: 2px solid var(--accent-main);
    outline-offset: 2px;
}

.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;
}
