/* UA Backend HQ � Base & Reset v2 */
/* Replaces _base.css (original ref above) */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: dark;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.55;
    color: var(--color-text);
    background: radial-gradient(1200px 800px at 10% 20%, rgba(227,25,55,0.08), transparent 60%), radial-gradient(900px 700px at 85% 75%, rgba(227,25,55,0.06), transparent 65%), linear-gradient(180deg, var(--gray-900), var(--gray-950) 60%);
    min-height: 100svh;
    overflow-x: clip;
}

    /* Subtle grain disabled - was causing visual artifacts with hover states */
    /* body::before { ... } */

/* ===== Focus Management ===== */
/* Remove focus outline from non-interactive elements */
h1, h2, h3, h4, h5, h6, p, span, div, label, section, article, header, footer, main, nav {
    outline: none !important;
}

/* Only show focus on interactive elements */
:focus:not(:focus-visible) {
    outline: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 650;
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin-block: 0 0.6em;
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    margin-block: 0 0.9em;
    color: var(--color-text-muted);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-standard);
}

    a:hover {
        color: var(--accent-hover);
    }

    a:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
        border-radius: 4px;
    }

/* ===== Forms ===== */
input, textarea, select, button {
    font: inherit;
    color: inherit;
    line-height: 1.4;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* ===== Containers ===== */
.container {
    width: 100%;
    max-width: 1240px; /* slightly narrower for density */
    margin-inline: auto;
    padding-inline: clamp(var(--space-3), 3vw, var(--space-6));
}

/* ===== Utilities (tight, composable) ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: var(--space-1);
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.h-screen {
    height: 100svh;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    background-clip: padding-box;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.28);
    }

/* ===== Selection ===== */
::selection {
    background: var(--accent);
    color: var(--accent-contrast);
}

/* ===== Motion Safety ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
