/* =========================================================================
   K-M Music — Basis: Reset, Typografie, Layout-Primitive.
   Komponenten (Karten, Header, Footer, Player) liegen in components.css.
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
video,
iframe { max-width: 100%; }

img { height: auto; display: block; }

/* --- Überschriften ------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  margin: 0 0 0.4em;
  text-transform: uppercase;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p { margin: 0 0 1.15em; }

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--accent-hover); }

strong { font-weight: 700; color: var(--text); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.4em; }

blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--fs-sm);
}
th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--text); font-weight: 600; }
td { color: var(--text-muted); }

code {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* --- Fokus: sichtbar, immer --------------------------------------------
   Ein Gold-Ring auf dunklem Grund erfüllt die 3:1-Kontrastanforderung
   (BFSG/WCAG 2.2). Nie auf outline:none setzen. */

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --- Layout-Primitive --------------------------------------------------- */

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

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--flush-top { padding-top: 0; }

.grid {
  display: grid;
  gap: var(--gap);
}
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }

.stack > * + * { margin-top: 1rem; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; }
.prose > :first-child { margin-top: 0; }

/* Lange Rechtstexte (Impressum, Datenschutz) sollen lesbar bleiben,
   nicht nach Großbuchstaben-Plakat aussehen. */
.prose--legal h2,
.prose--legal h3,
.prose--legal h4 {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  line-height: var(--lh-snug);
}
.prose--legal h2 { font-size: var(--fs-xl); }
.prose--legal h3 { font-size: var(--fs-lg); }
.prose--legal { color: var(--text-muted); }
.prose--legal strong { color: var(--text); }

/* --- Eyebrow / Sektionskopf --------------------------------------------- */

.eyebrow {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-header { margin-bottom: 2.75rem; }
.section-header__divider {
  width: 56px;
  height: 2px;
  background: var(--accent);
  margin-top: 1.25rem;
}
.section-header--center { text-align: center; }
.section-header--center .section-header__divider { margin-inline: auto; }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--text-on-accent);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--small { padding: 0.55rem 1.1rem; font-size: var(--fs-xs); }

/* --- Reveal beim Scrollen ----------------------------------------------
   Startzustand wird NUR gesetzt, wenn JS läuft (html.js-reveal). Ohne
   JavaScript bleibt alles sichtbar — sonst wäre die Seite leer. */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
}
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.js-reveal .reveal--d1 { transition-delay: 90ms; }
.js-reveal .reveal--d2 { transition-delay: 180ms; }
.js-reveal .reveal--d3 { transition-delay: 270ms; }
.js-reveal .reveal--d4 { transition-delay: 360ms; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
