/* Explain: Base reset and typography defaults. */
* {
    box-sizing: border-box;
}

html {
    background: var(--background-color);
    scroll-behavior: smooth;
    font-size: var(--base-font-size);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, h4 {
    margin: 0 0 .5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-color);
}

p {
    margin: 0 0 1rem;
}

ul, ol {
    padding-left: 1.4rem;
}

img, video, svg {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

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

:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
    border-radius: 6px;
}

[hidden] {
    display: none !important;
}

/* Link „przejdź do treści” */
.skip-link {
    position: fixed;
    left: 1rem;
    top: -140px;
    z-index: 200;
    padding: .75rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: var(--on-primary);
    font-weight: 700;
    text-decoration: none;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 1rem;
    color: var(--on-primary);
}

/* Ograniczanie animacji */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

html.reduce-motion {
    scroll-behavior: auto;
}

html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
}