/**
 * base.css — Reset & Basis-Typografie
 */

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

html {
    -webkit-text-size-adjust: 100%;
    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 {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-base);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--color-text);
    background: var(--color-bg);
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: var(--lh-heading);
    font-weight: var(--fw-heading);
    letter-spacing: -0.01em;
    margin: 0 0 var(--space-4);
    color: var(--color-text);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4, h5, h6 { font-size: var(--fs-h4); }

p {
    margin: 0 0 var(--space-4);
}

a {
    color: var(--color-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--color-primary-dark);
}

/* Sichtbarer Fokus-Zustand für alle interaktiven Elemente (Barrierefreiheit) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

ul, ol {
    padding-left: var(--space-5);
}

button {
    font-family: inherit;
}

/* Skip-Link für Tastatur-/Screenreader-Nutzung */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    /* Dunkler Text-Ton statt Primärfarbe: #ff6b35 (Primär) auf Weiß-Text
       erreicht nur ~2.8:1 Kontrast (AA-Fail). --color-text ist dunkelbraun/
       navy und liefert sicher >7:1 — Kontrastkorrektur (Rollout-Durchgang 2). */
    background: var(--color-text);
    color: #ffffff;
    padding: var(--space-3) var(--space-5);
    z-index: 2000;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
}

/* Screenreader-only Text */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
