/* =============================================================================
   BASIS - SCHRIFTEN, RESET, TYPOGRAFIE, BARRIEREFREIHEIT, DRUCK
   ============================================================================= */

/* Schriften (lokal, variable, nach Zeichenbereich aufgeteilt) */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Variable-ext.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat/Montserrat-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat/Montserrat-Variable-ext.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-hoehe);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--schrift);
    font-size: var(--text-base);
    font-weight: var(--fw-normal);
    line-height: var(--lh-normal);
    color: var(--farbe-text);
    background-color: var(--farbe-hintergrund);
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

/* Listen ohne Punkte; im HTML tragen sie role="list", damit Safari/VoiceOver sie weiter als Liste ansagt */
ul,
ol {
    list-style: none;
}

address {
    font-style: normal;
}

/* Aufklappbare Bereiche (<details>) zeichnen ihren Pfeil selbst (Akkordeon, Beispiel-Ausstattung, Equipment-Filter) */
summary {
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

[hidden] {
    display: none !important;
}

/* Typografie: alles in Montserrat ist groß geschrieben, mittelstark und eng gesetzt (Tokens --fw-headline, --ls-headline) */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--schrift-headlines);
    font-weight: var(--fw-headline);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-headline);
    word-spacing: var(--ws-headline);
    text-transform: var(--schrift-gross);
    color: var(--farbe-grau);
    text-wrap: balance;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* Schmale Bildschirme: lange Wörter in Überschriften ("Partnerschaften") dürfen getrennt werden statt überzulaufen */
@media (max-width: 30em) {
    h1, h2, h3 {
        -webkit-hyphens: auto; /* Safari vor Version 17 trennt nur mit Präfix */
        hyphens: auto;
        overflow-wrap: anywhere; /* Fallback ohne Trennwörterbuch: ein einzelnes langes Wort („Beschallungsset“) sprengt sonst die Seite */
    }
}

p {
    margin-bottom: var(--space-md);
    text-wrap: pretty;
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: var(--fw-semibold);
}

/* Links: Klassenlose Links im Fließtext sind rot und unterstrichen (Farbe allein reicht nicht) */
a {
    color: inherit;
    text-decoration: none;
}

a:not([class]) {
    color: var(--farbe-akzent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
    transition: color var(--transition-schnell);
}

a:not([class]):hover {
    color: var(--farbe-rot-hover);
}

/* Fokus: zweifarbiger Ring (Token --schatten-fokus), sichtbar auf hellem, dunklem und rotem Grund */
:focus-visible {
    outline: 3px solid var(--farbe-rot);
    outline-offset: 2px;
    box-shadow: var(--schatten-fokus);
}

/* Der Hauptinhalt bekommt nach "Nach oben" und dem Skip-Link programmatisch den Fokus - ohne Rahmen um die ganze Seite */
main:focus-visible {
    outline: 0;
    box-shadow: none;
}

::selection {
    background-color: rgb(var(--farbe-rot-rgb) / 0.15);
    color: var(--farbe-rot-tief);
}

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

/* Skip-Link */
.skip-link {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: var(--z-skip-link);
    padding: var(--space-sm) var(--space-lg);
    background: var(--farbe-tinte);
    color: var(--farbe-weiss);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    transform: translate(-50%, -110%);
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

/* Reduzierte Bewegung: Dauer und Verzögerung praktisch null (0.01ms statt 0, damit transitionend-Ereignisse noch feuern) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
}

/* Druck: Bedienelemente und Video weg, Inhalt in Schwarz auf Weiß, Links mit Adresse */
@media print {
    .header,
    .fab,
    .dialog,
    .hero__video-container,
    .hero__steuerung,
    .hero__scroll,
    .skip-link {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
        color: #000;
        background: #fff;
    }

    .sektion,
    .footer {
        background: none !important;
        color: inherit !important;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* -----------------------------------------------------------------------------
   CODE-FELD - die Kästchen für den Anmeldecode (helpers.php: code_feld()).
   Steht in base.css und nicht in components.css, weil Kontrollpult und Partnerbereich
   ihre eigenen Stylesheets haben und base.css das einzige gemeinsame ist.
   ----------------------------------------------------------------------------- */
.code-feld {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-width: 340px;
    margin-inline: auto;
}

.code-feld input {
    width: 100%;
    padding: 12px 0;
    font-size: 24px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: inherit;
    background: var(--farbe-weiss, #fff);
    border: 1px solid var(--farbe-linie, #e2e2dd);
    border-radius: 10px;
    /* Ohne das zieht iOS die Kästchen auf eigene Breiten */
    -moz-appearance: textfield;
    appearance: none;
}

.code-feld input:focus-visible {
    outline: 2px solid var(--farbe-rot, #bc2822);
    outline-offset: 2px;
    border-color: transparent;
}

/* Gefülltes Kästchen setzt sich ab, damit man beim Tippen sieht, wo man ist */
.code-feld input:not(:placeholder-shown),
.code-feld input[data-gefuellt] {
    border-color: var(--farbe-rot, #bc2822);
}

@media (max-width: 24em) {
    .code-feld { gap: 5px; }
    .code-feld input { padding: 10px 0; font-size: 19px; }
}
