/* v2 Base Styles - Reset, Typography, Global */

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

/* Body */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Typography hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.025em;
    color: var(--text);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

/* Paragraphs */
p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-smooth);
}

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

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

/* SVG logo text color — controlled by theme */
.nav-logo .logo-text { fill: var(--text); }
.footer-logo .logo-text { fill: var(--text-muted); }

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1.5rem;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Screen reader only utility */
.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;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--brand-bright);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Forced colors mode fallback for gradient text */
@media (forced-colors: active) {
    .page-hero h1 em,
    .gradient-text {
        -webkit-text-fill-color: unset;
        background: none;
        color: LinkText;
    }
}

/* Text selection */
::selection {
    background-color: var(--brand-dim);
    color: var(--accent);
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-faint);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
