/* ==========================================================================
   Base Typography & Elements
   ========================================================================== */

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: var(--leading-normal);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-gray-900);
}

h1 {
    font-size: var(--text-3xl);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-2xl);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

h5 {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
}

h6 {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}

@media (min-width: 1024px) {
    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-4xl); }
    h3 { font-size: var(--text-2xl); }
    h4 { font-size: var(--text-xl); }
}

/* Paragraphs */
p {
    margin-bottom: var(--space-4);
    color: var(--color-text-light);
}

p:last-child {
    margin-bottom: 0;
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

a:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Strong */
strong, b {
    font-weight: var(--weight-semibold);
}

/* Images */
img {
    height: auto;
}

/* Selection */
::selection {
    background-color: var(--color-gold);
    color: var(--color-black);
}

/* Focus visible for all interactive elements */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: 9999;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
    color: var(--color-white);
}
