/* ER Design System — Base: resets, typography, focus, layout primitives */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body.electron-revolution {
    background: var(--er-bg);
    color: var(--er-text);
    font-family: var(--er-font-body);
    font-size: var(--er-text-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.er-container {
    width: 100%;
    max-width: var(--er-max-width);
    margin-inline: auto;
    padding-inline: var(--er-gutter);
}

.er-section {
    padding-block: var(--er-space-9);
}

@media (max-width: 768px) {
    .er-section {
        padding-block: var(--er-space-7);
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--er-font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-wrap: balance;
    color: var(--er-text);
    margin: 0 0 var(--er-space-4);
}

h1 { font-size: var(--er-text-4xl); }
h2 { font-size: var(--er-text-3xl); }
h3 { font-size: var(--er-text-2xl); }
h4 { font-size: var(--er-text-lg); }

@media (max-width: 768px) {
    h1 { font-size: var(--er-text-3xl); }
    h2 { font-size: var(--er-text-2xl); }
    h3 { font-size: var(--er-text-xl); }
}

p {
    max-width: 65ch;
    color: var(--er-text-dim);
    margin: 0 0 var(--er-space-4);
}

.er-eyebrow {
    display: inline-block;
    font-family: var(--er-font-mono);
    font-size: var(--er-text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--er-accent-strong);
    margin-bottom: var(--er-space-3);
}

a {
    color: var(--er-accent-strong);
    text-decoration: none;
    transition: color var(--er-motion-fast) var(--er-ease-standard);
}

a:hover {
    color: var(--er-metallic-100);
}

/* Visible focus everywhere — required before any interactive component ships */
:focus-visible {
    outline: 2px solid var(--er-accent-strong);
    outline-offset: 3px;
    border-radius: var(--er-radius-sm);
}

.er-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--er-accent);
    color: var(--er-carbon-900);
    padding: var(--er-space-3) var(--er-space-5);
    font-weight: 700;
}

.er-skip-link:focus {
    left: var(--er-space-4);
    top: var(--er-space-4);
}

.er-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

::selection {
    background: var(--er-accent);
    color: var(--er-carbon-900);
}

table {
    font-variant-numeric: tabular-nums;
    border-collapse: collapse;
    width: 100%;
}

.er-overflow-x {
    overflow-x: auto;
}
