/* ===== CSS RESET ===== */

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core root defaults */
html {
    scroll-behavior: smooth;
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: var(--line-height-normal);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-regular);
    color: var(--text-color);
    background-color: var(--body-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Remove default link styles */
a {
    text-decoration: none;
    color: inherit;
    background-color: transparent;
}

a:hover,
a:focus {
    text-decoration: none;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Remove default button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Remove default fieldset styles */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

/* Remove default legend styles */
legend {
    padding: 0;
}

/* Remove default table styles */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove default list styles */
ul,
ol {
    list-style: none;
}

/* Headings and paragraphs */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font);
    font-weight: var(--font-semi-bold);
    color: rgb(204, 201, 201);
    line-height: var(--line-height-tight);
    margin: 0;
}

p {
    margin: 0;
    line-height: var(--line-height-normal);
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for accessibility */
:focus {
    outline: 2px solid var(--first-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--first-color);
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background-color: var(--first-color);
    color: #fff;
}

::-moz-selection {
    background-color: var(--first-color);
    color: #fff;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: var(--scroll-bar-color);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb-color);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color-light);
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb-color) var(--scroll-bar-color);
}

/* Form elements reset */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
textarea,
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    border-radius: 0;
    background: transparent;
    outline: none;
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Remove search input styling */
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;
}

/* Remove password reveal button in Edge */
input[type="password"]::-ms-reveal {
    display: none;
}

/* Remove clear button in IE */
input::-ms-clear {
    display: none;
}

/* Placeholder styles */
::placeholder {
    color: var(--text-color-light);
    opacity: 1;
}

::-webkit-input-placeholder {
    color: var(--text-color-light);
}

::-moz-placeholder {
    color: var(--text-color-light);
    opacity: 1;
}

:-ms-input-placeholder {
    color: var(--text-color-light);
}

/* Print styles */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]::after {
        content: " (" attr(title) ")";
    }
    
    pre {
        white-space: pre-wrap !important;
    }
    
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr,
    img {
        page-break-inside: avoid;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :focus {
        outline: 3px solid;
        outline-offset: 2px;
    }
}

/* Reduced transparency for accessibility */
@media (prefers-reduced-transparency: reduce) {
    * {
        backdrop-filter: none !important;
    }
}