/**
 * Esoteric Illuminati - Base & Reset
 * Typography scale: H1 48-64 (mobile 32-40), body 16-18, line height 1.5-1.6
 */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--line-height-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-16);
    z-index: 9999;
    padding: var(--space-8) var(--space-16);
    background: var(--color-primary);
    color: var(--color-text);
    font-weight: var(--font-semibold);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: top var(--transition-fast);
}
.skip-link:focus {
    top: var(--space-16);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    line-height: var(--line-height-heading);
    margin-top: 0;
    margin-bottom: var(--space-24);
}

/* H1: 48-64px desktop, 32-40px mobile */
h1 { font-size: var(--text-4xl); }
@media (min-width: 768px) { h1 { font-size: var(--text-6xl); } }
@media (min-width: 1024px) { h1 { font-size: var(--text-7xl); } }

/* H2: 36-48px desktop, 28-32px mobile */
h2 { font-size: var(--text-3xl); }
@media (min-width: 768px) { h2 { font-size: var(--text-5xl); } }

/* H3: 28-32px desktop, 24px mobile */
h3 { font-size: var(--text-2xl); }
@media (min-width: 768px) { h3 { font-size: var(--text-3xl); } }

/* H4: 24px desktop, 20px mobile */
h4 { font-size: var(--text-xl); }
@media (min-width: 768px) { h4 { font-size: var(--text-2xl); } }

h5, h6 { font-size: var(--text-lg); }

p {
    margin-top: 0;
    margin-bottom: var(--space-24);
    color: var(--color-text-muted);
    max-width: var(--line-length);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--btn-transition), box-shadow var(--btn-transition);
}
a:hover {
    color: var(--color-accent);
}
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    margin-top: 0;
    margin-bottom: var(--space-24);
    padding-left: 1.5em;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
