/* ==========================================================================
   SPDLAB.hu — reset.css
   Modern CSS reset based on Josh W. Comeau's reset + Andy Bell's reset.
   Applied first in the cascade to normalize cross-browser inconsistencies.
   ========================================================================== */

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* 3. Allow percentage-based heights in the application */
html,
body {
    height: 100%;
}

/* 4. Improve text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
    font: inherit;
}

/* 7. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* 8. Remove list styles on ul/ol with a list role */
ul[role="list"],
ol[role="list"] {
    list-style: none;
}

/* 9. Remove built-in form typography styles */
input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* 10. Remove default button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* 11. Anchor tag resets */
a {
    text-decoration: none;
    color: inherit;
}

/* 12. Horizontal rule reset */
hr {
    border: none;
    border-top: 1px solid currentColor;
}

/* 13. Table reset */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 14. Fieldset reset */
fieldset {
    border: none;
}

/* 15. Remove animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 16. Root scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ============================================================
   Focus ring — only visible for keyboard navigation
   ============================================================ */

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

/* Remove default focus ring from mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Keyboard-user body flag (set by JS) */
body:not(.using-keyboard) :focus {
    outline: none;
}
