/* CSS Reset and Global Styles */

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

/* Remove default margins */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

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

/* Set core body defaults */
body {
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}

/* Remove default padding from lists */
ul,
ol {
    padding: 0;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    background-color: inherit;
}

/* Reset form elements */
button,
input,
select,
textarea {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* Remove default link styles */
a {
    color: inherit;
    text-decoration: none;
}

/* Set root font size */
html {
    font-size: 100%;
}

/* Remove tap highlight on mobile */
a,
button,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

/* Only remove outline for mouse users, keep for keyboard navigation */
:focus:not(:focus-visible) {
    outline: none;
}

/* Set pointer cursor for buttons */
button,
[type="button"],
[type="submit"],
[role="button"] {
    cursor: pointer;
}

/* Remove number input spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Reduced motion preferences */
@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;
    }
}