/* CSS Reset & Base Styles */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-family-base);
    line-height: var(--line-height-base);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--text-color);
    text-align: left;
    background-color: var(--bg-body);
    overflow-x: hidden;
    width: 100vw;
}

/* Typography Reset */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.8em;
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-sm);
}

h1 {
    font-size: var(--font-size-lg);
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: var(--font-size-lg);
}

h5 {
    font-size: var(--font-size-md);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    background-color: transparent;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: none;
}

/* Lists */
ul, ol {
    margin-top: 0;
    margin-bottom: 1rem;
}

ul ul, ul ol, ol ul, ol ol {
    margin-bottom: 0;
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-style: none;
}

/* Forms */
button, input, optgroup, select, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button, input {
    overflow: visible;
}

button, select {
    text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}

button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
    padding: 0;
    border-style: none;
}

input[type="radio"], input[type="checkbox"] {
    box-sizing: border-box;
    padding: 0;
}

textarea {
    overflow: auto;
    resize: vertical;
}

/* Tables */
table {
    border-collapse: collapse;
}

/* Misc */
hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

svg {
    overflow: hidden;
    vertical-align: middle;
}

/* Selection */
::selection {
    background: var(--color-primary-light);
    color: var(--color-dark);
}

::-moz-selection {
    background: var(--color-primary-light);
    color: var(--color-dark);
}

/* Scrollbar */
.scrollbar ::-webkit-scrollbar {
    background: var(--color-dark);
    width: 0.7em;
}

.scrollbar ::-webkit-scrollbar-thumb {
    background: var(--color-primary);
}

/* Focus styles */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
