/* Explain: Base reset, typography, and background effects with accessibility styles. */
* {
    box-sizing: border-box;
}

html {
    background: var(--background-color);
    color: var(--text-color);
    scroll-padding-top: 130px;
}

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--background-color);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(212, 175, 55, 0.06), transparent 26rem),
        radial-gradient(circle at 88% 8%, rgba(88, 129, 87, 0.08), transparent 24rem),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M39 40H0V0h1v39h39v1z' fill='%23d4af37' fill-opacity='0.04' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: var(--text-color);
    font-family: var(--font-body);
    text-rendering: optimizeLegibility;
}

button,
a,
select {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--accent-color);
    color: #ffffff;
}

/* Accessibility Overrides */
body.a11y-high-contrast {
    --background-color: #000000 !important;
    --text-color: #ffffff !important;
    --text-muted: #cccccc !important;
    --surface-color: #111111 !important;
    --glass-bg: rgba(0, 0, 0, 0.9) !important;
    --nav-bg: rgba(0, 0, 0, 0.9) !important;
    --footer-bg: #111111 !important;
    --primary-color: #ffff00 !important;
    --accent-color: #ffff00 !important;
    --button-color: #333333 !important;
    --border-color: #ffffff !important;
    --glass-border: #ffffff !important;
}

body.a11y-high-contrast img {
    filter: grayscale(100%) contrast(120%);
}

body.a11y-large-text {
    font-size: 110%;
}

body.a11y-large-text h1 { font-size: 120%; }
body.a11y-large-text h2 { font-size: 120%; }
body.a11y-large-text h3 { font-size: 120%; }
body.a11y-large-text p, 
body.a11y-large-text span, 
body.a11y-large-text a, 
body.a11y-large-text button { 
    font-size: 110%; 
}

body.a11y-highlight-links a,
body.a11y-highlight-links button {
    text-decoration: underline !important;
    text-decoration-color: var(--accent-color) !important;
    text-decoration-thickness: 3px !important;
    outline: 2px solid var(--accent-color) !important;
    outline-offset: 2px !important;
}
