/* ═══════════════════════════════════════════════════════════
   base.css — Reset, typografi, layout-skal, animationer
═══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100svh;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

/* ── App-skal ── */
.app {
    width: 100%;
    max-width: none;
    animation: fadeIn 0.3s ease-out;
}

main { margin-top: 0; }

.section { display: none; }
.section.active {
    display: block;
    animation: sectionIn 0.18s ease-out;
}

/* ── Typografi-klasser ── */
.display-heading {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

.section-heading {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.page-date {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

/* ── Tilgængelighed ── */
:focus { outline: none; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

/* ── Reducér bevægelse ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ── Animationer ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes sectionIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes sheetUp {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
    to   { opacity: 0; transform: translateY(8px) scale(0.94); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.02); }
}
@keyframes checkPop {
    0%   { transform: scale(0.7); }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ── Hjælpeklasser ── */
.hidden  { display: none !important; }
.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;
}
.small  { font-size: 13px; color: var(--muted); }
.muted  { color: var(--muted); }
.faint  { color: var(--faint); }
.full   { width: 100%; }
.center { text-align: center; }
.divider-top { border-top: 1px solid var(--line); padding-top: var(--s-3); margin-top: var(--s-1); }

/* ── Scrollbar (desktop, diskret) ── */
@media (pointer: fine) {
    ::-webkit-scrollbar       { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--r-pill); }
}
