/* Explain: Base reset and typography, optimized for mobile. */
* {
    box-sizing: border-box;
}

html {
    background: var(--background-color);
    scroll-padding-top: 5.5rem;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 4.5rem;
    }
}

body {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 77, 0, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 18%, rgba(191, 149, 63, 0.09), transparent 26rem),
        linear-gradient(180deg, var(--background-color), #090909 48%, var(--background-color));
    color: var(--text-color);
    font-feature-settings: "kern" 1;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: '';
    opacity: 0.105;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

::selection {
    color: var(--white-color);
    background: var(--primary-color);
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a,
summary {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

input,
select,
textarea {
    font-size: 16px;
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--steel-color) 76%, transparent);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
}

table {
    border-collapse: collapse;
}

[x-cloak] {
    display: none !important;
}

::-webkit-scrollbar {
    width: 0.75rem;
    height: 0.75rem;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border: 3px solid var(--background-color);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
