/* ============================================
   BASE — CSS-Reset, Typografie & Utilities
   ============================================ */

/* --- RESET (Modern Minimal) --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%; /* 16px Basis */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

/* --- TYPOGRAFIE --- */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
}

h1 { font-size: var(--text-5xl); margin-bottom: var(--space-lg); }
h2 { font-size: var(--text-4xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--text-3xl); margin-bottom: var(--space-md); }
h4 { font-size: var(--text-2xl); margin-bottom: var(--space-sm); }
h5 { font-size: var(--text-xl);  margin-bottom: var(--space-sm); }
h6 { font-size: var(--text-lg);  margin-bottom: var(--space-sm); }

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
}

small {
    font-size: var(--text-sm);
    color: var(--color-text-light);
}

/* --- LAYOUT-UTILITIES --- */

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

.flex {
    display: flex;
    gap: var(--space-md);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive: Grid wird auf kleinen Bildschirmen einspaltig */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* --- ABSTANDS-UTILITIES --- */

.section {
    padding-block: var(--space-4xl);
}

.section-sm {
    padding-block: var(--space-2xl);
}

/* --- SICHTBARKEIT --- */

/* Nur für Screenreader sichtbar (Accessibility) */
.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;
}

/* --- TEXT-UTILITIES --- */

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-sm   { font-size: var(--text-sm); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }

.text-muted { color: var(--color-text-light); }
.text-bold  { font-weight: var(--font-bold); }
