/* ============================================
   CSS Reset - Modern Normalization
   ============================================ */

/* Box sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

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

/* Document defaults */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    line-height: var(--line-height-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Remove list styles */
ul, ol {
    list-style: none;
}

/* Image defaults */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Form elements */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* Remove button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

button:focus {
    outline: none;
}

/* Link styles */
a {
    text-decoration: none;
    color: inherit;
}

/* Heading styles reset */
h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* Paragraph spacing */
p {
    margin: 0;
}

/* Remove default fieldset styles */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Remove default legend styles */
legend {
    padding: 0;
}

/* Remove default table spacing */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove default quote styles */
blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

/* Input and textarea defaults */
input, textarea {
    border: none;
    outline: none;
    background: none;
}

input:focus, textarea:focus {
    outline: none;
}

/* Remove default appearance */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Prevent font size adjustment on orientation change (iOS) */
html {
    -webkit-text-size-adjust: 100%;
}

/* Accessibility: Skip links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
