/* ============================================
   BASE STYLES - RESET & FOUNDATIONS
   ============================================ */

/* ===== CSS RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== ROOT & HTML ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background: var(--gradient-bg);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

/* Background Radial Gradient Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-radial);
    pointer-events: none;
    z-index: 0;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
}

h4 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}

h5 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
}

h6 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

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

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

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ===== LISTS ===== */
ul,
ol {
    list-style: none;
}

/* ===== IMAGES & MEDIA ===== */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== FORM ELEMENTS ===== */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== TEXT SELECTION ===== */
::selection {
    background-color: var(--color-primary);
    color: var(--color-text-primary);
}

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

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-glass-bg);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-glass-hover);
}

/* ===== FOCUS STYLES ===== */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== UTILITY CLASSES ===== */
.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;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: var(--font-size-4xl);
    }

    h2 {
        font-size: var(--font-size-3xl);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }
}