/*
 * base.css — Reset + Tag-Selektor-Typografie
 * Regeln: keine Utility-Klassen für H-Tags (R2). Typografie wird zentral über
 * die Tag-Selektoren gesteuert; das Design-Tool greift direkt auf die CSS-Variablen zu.
 */

/* ───────── Reset ───────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base, 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-base);
    color: var(--color-text-main);
    background-color: var(--color-bg-page);
    line-height: var(--line-height-base, 1.6);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

/* Mobile-Menü-Open / Modal-Open: Body-Scroll sperren via Klasse, nicht Inline-Style (R7) */
body.is-scroll-locked {
    overflow: hidden;
}

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

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* ───────── Typografie über Tag-Selektoren (R2) ───────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-family: var(--font-family-h1, var(--font-family-heading));
    color:       var(--color-text-h1, var(--color-text-heading));
    font-size:   var(--font-size-h1, 2.5rem);
}

h2 {
    font-family: var(--font-family-h2, var(--font-family-heading));
    color:       var(--color-text-h2, var(--color-text-heading));
    font-size:   var(--font-size-h2, 1.75rem);
}

h3 {
    font-family: var(--font-family-h3, var(--font-family-heading));
    color:       var(--color-text-h3, var(--color-text-heading));
    font-size:   var(--font-size-h3, 1.25rem);
}

h4 {
    font-family: var(--font-family-heading);
    color:       var(--color-text-heading);
    font-size:   1.1rem;
}

h5 {
    font-family: var(--font-family-heading);
    color:       var(--color-text-heading);
    font-size:   1rem;
}

h6 {
    font-family: var(--font-family-heading);
    color:       var(--color-text-heading);
    font-size:   0.9rem;
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    color: var(--color-text-main);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

ul ul, ol ul, ul ol, ol ol {
    margin-bottom: 0;
}

a {
    color: var(--color-link);
    text-decoration: var(--text-decoration-link);
    font-weight: var(--font-weight-link);
    transition: color 0.2s ease, font-weight 0.2s ease;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: var(--text-decoration-link-hover);
    font-weight: var(--font-weight-link-hover);
}

/* Sichtbarer Fokus-Indikator (R13) */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Größenvariation, ohne H-Tags zu überschreiben (R2) */
.text-small { font-size: 0.875rem; }
.text-tiny  { font-size: 0.75rem;  }
.text-intro { font-size: 1.125rem; }
