/* ============================================
   BASE STYLES - Reset, Body, Scrollbars, Focus
   ============================================ */

/* Reset */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.01em;
    background-color: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection styling */
::selection {
    background: rgba(34, 211, 238, 0.3); /* Cyan selection */
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(34, 211, 238, 0.3);
    color: var(--text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--space-500);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--space-400);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--space-500) var(--space-800);
}

/* Focus states */
:focus-visible {
    outline: 2px solid var(--clr-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Utility classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: calc(var(--z-fixed) + 10);
    width: auto;
    height: auto;
    padding: 10px 16px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    background: var(--bg-panel);
    color: var(--clr-primary);
    border: 2px solid var(--clr-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
}

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