/* ========================================
   AsterFund - Base Styles & Reset
   ======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); margin-bottom: var(--space-6); }
h2 { font-size: var(--text-4xl); margin-bottom: var(--space-5); }
h3 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
h4 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
h5 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
h6 { font-size: var(--text-lg); margin-bottom: var(--space-2); }

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-link-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--space-8) 0;
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--color-accent);
    color: var(--color-white);
    z-index: var(--z-toast);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}
.skip-link:focus {
    top: var(--space-2);
}

/* 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;
}
