/*
 * Reset, typografi og layout-primitiver.
 * .stack/.group/.grid modsvarer Mantine's Stack/Group/Grid, som BigSolverWEB bygger sider af.
 */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-md);
    line-height: 1.55;
    color: var(--text);
    background: var(--app-bg);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--fw-heading);
    line-height: 1.3;
    letter-spacing: -.2px;
}

h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-sm); }

p { margin: 0; }

a { color: var(--brand-6); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { max-width: 100%; }
svg { display: block; flex-shrink: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--brand-5);
    outline-offset: 2px;
}

/* ---------- Layout-primitiver ---------- */

.stack { display: flex; flex-direction: column; gap: var(--sp-md); min-width: 0; }
.stack--xs { gap: var(--sp-xs); }
.stack--sm { gap: var(--sp-sm); }
.stack--lg { gap: var(--sp-lg); }

.group {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    min-width: 0;
    flex-wrap: wrap;
}
.group--nowrap { flex-wrap: nowrap; }
.group--between { justify-content: space-between; }
.group--end { justify-content: flex-end; }
.group--top { align-items: flex-start; }
.group--sm { gap: var(--sp-sm); }
.group--md { gap: var(--sp-md); }

.spacer { flex: 1 1 auto; }

/* ---------- Teksthjælpere ---------- */

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-lg { font-size: var(--fs-lg); }
.text-dimmed { color: var(--text-dimmed); }
.text-brand { color: var(--brand-7); }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.label-caps {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--text-dimmed);
}

.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;
}

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
