/* Base Styles - Reset and Typography */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-gray-900);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-gray-900);
}

h1 {
    font-size: clamp(var(--font-size-4xl), 5vw, var(--font-size-6xl));
    font-weight: var(--font-weight-extrabold);
}

h2 {
    font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl));
    font-weight: var(--font-weight-extrabold);
}

h3 {
    font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-3xl));
    font-weight: var(--font-weight-bold);
}

h4 {
    font-size: clamp(var(--font-size-xl), 2.5vw, var(--font-size-2xl));
    font-weight: var(--font-weight-bold);
}

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

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

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

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

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

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

/* Images */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Forms */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

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

/* Focus States */
:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: var(--radius-full);
    border: 3px solid var(--color-gray-100);
}

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

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.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;
}

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

/* Media Query Helpers */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 var(--space-4);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
}