/**
 * Base Styles
 * Reset, typography, and fundamental element styles
 */

* {
    font-family: var(--font-family);
    box-sizing: border-box;
}

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

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    background-attachment: fixed;
    color: var(--neutral-200);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Centered body (for login page) */
body.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    color: white;
    letter-spacing: -0.025em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* Typography utility classes */
.text-heading-1 {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    letter-spacing: -0.025em;
}

.text-heading-2 {
    font-size: 1.625rem;
    font-weight: 600;
    color: white;
    letter-spacing: -0.025em;
}

.text-heading-3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    letter-spacing: -0.02em;
}

.text-body {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--neutral-200);
    line-height: 1.6;
}

.text-body-sm {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--neutral-300);
    line-height: 1.5;
}

.text-caption {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neutral-400);
    letter-spacing: 0.01em;
}

p {
    margin: 0 0 var(--spacing-md);
}

small {
    font-size: 0.75rem;
}

a {
    color: var(--primary-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-400);
}

/* Text utilities */
.text-muted {
    color: var(--neutral-500) !important;
}

.text-light {
    color: var(--neutral-200) !important;
}

.text-success {
    color: var(--success-500) !important;
}

.text-warning {
    color: var(--warning-500) !important;
}

.text-danger {
    color: var(--danger-500) !important;
}

.text-primary {
    color: var(--primary-500) !important;
}

.fw-bold {
    font-weight: 600;
}

.fw-medium {
    font-weight: 500;
}

/* Monospace text */
code, pre, .font-mono {
    font-family: var(--font-mono);
}

pre {
    margin: 0;
    overflow-x: auto;
}

/* Selection */
::selection {
    background: var(--primary-500);
    color: white;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--neutral-600);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-500);
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

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