/* ==========================================================================
   TimeDance – Stylesheet
   Idee: Kassettendeck & Radioskala der 90er. Satte Aubergine, Türkis,
   Pink und Sonnengelb – mit Kontrasten nach WCAG 2.2 AA (Fließtext AAA).
   ========================================================================== */

/* ---------- Schriften (lokal gehostet, keine Verbindung zu Google) ---------- */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-italic.woff2") format("woff2");
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Bungee";
  src: url("../fonts/bungee-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Farben & Maße ---------- */
:root {
  --aubergine: #2a1446;   /* Grundfläche */
  --plum:      #3b1f61;   /* Flächen, Karten */
  --night:     #1c0d33;   /* Kopf, Fuß, Skala */
  --text:      #fbf5ff;   /* Fließtext – Kontrast 15:1 */
  --muted:     #dccbf2;   /* Nebentext – Kontrast ≥ 9:1 */
  --teal:      #3ee6d2;   /* Links, Akzente */
  --pink:      #ff6eb8;   /* Akzente, Schatten */
  --sun:       #ffd23f;   /* Fokus, Hervorhebung */
  --ink:       #1c0d33;   /* Text auf hellen Flächen */
  --paper:     #fff8e6;   /* Formularfelder */
  --danger:    #ffb3c7;   /* Fehlermeldungen auf dunklem Grund */

  --font-body: "Atkinson Hyperlegible", "Verdana", system-ui, sans-serif;
  --font-display: "Bungee", "Impact", "Arial Black", sans-serif;

  --step--1: 0.95rem;
  --step-0: 1.125rem;
  --step-1: 1.35rem;
  --step-2: 1.7rem;
  --step-3: clamp(2rem, 4vw, 2.6rem);
  --step-4: clamp(2.6rem, 9vw, 5.6rem);

  --space: 1.5rem;
  --measure: 68ch;
  --radius: 6px;
}

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

html {
  font-size: 100%;           /* respektiert die Schriftgröße des Browsers */
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--aubergine);
  /* Memphis-Konfetti: rein dekorativ und sehr zurückhaltend */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke-width='3' stroke-linecap='round' opacity='.16'%3E%3Cpath d='M20 40q10-14 20 0t20 0 20 0' stroke='%233ee6d2'/%3E%3Cpath d='M170 30l14 24h-28z' stroke='%23ff6eb8'/%3E%3Ccircle cx='60' cy='170' r='9' stroke='%23ffd23f'/%3E%3Cpath d='M150 160l20 20M170 160l-20 20' stroke='%233ee6d2'/%3E%3Cpath d='M100 105q10-14 20 0t20 0' stroke='%23ffd23f'/%3E%3Cpath d='M205 200h20' stroke='%23ff6eb8'/%3E%3C/g%3E%3C/svg%3E");
}

img, svg, iframe { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { line-height: 1.2; margin: 2rem 0 0.75rem; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; }
h1 { font-size: var(--step-3); color: var(--sun); }
h2 { font-size: var(--step-2); color: var(--teal); }
h3 { font-size: var(--step-1); font-weight: 700; }
h1:first-child, h2:first-child { margin-top: 0; }

p, ul, ol, dl, table { margin: 0 0 1rem; }
.content p, .content li { max-width: var(--measure); }
.content { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 30rem) { .content { hyphens: auto; } }

a { color: var(--teal); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--sun); text-decoration-thickness: 0.15em; }

/* Sichtbarer Tastaturfokus – dick, gelb, mit dunklem Gegenrand */
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--night);
  border-radius: 2px;
}
main:focus { outline: none; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

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

.skip-link {
  position: absolute; left: 1rem; top: -10rem; z-index: 100;
  padding: 0.75rem 1.25rem; background: var(--sun); color: var(--ink);
  font-weight: 700; text-decoration: none; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Kopf ---------- */
.masthead { background: var(--night); border-bottom: 4px solid var(--pink); }
.masthead__bar { padding: 1.1rem 0 0.9rem; }

.brand { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; text-decoration: none; color: var(--text); }
.brand__name {
  font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--sun);
  text-shadow: 2px 2px 0 var(--pink), 4px 4px 0 var(--teal);
}
.brand__logo { display: block; height: 2.75rem; width: auto; }
@media (max-width: 30rem) { .brand__logo { height: 2.1rem; } }
.brand__claim { font-size: var(--step--1); color: var(--muted); }
.brand:hover .brand__logo { filter: brightness(1.12); }
.brand:hover .brand__name { color: var(--text); }

/* Navigation als Tasten eines Kassettendecks */
.deck { background: linear-gradient(var(--night), #140927); padding: 0.75rem 0 1rem; }
.deck__keys {
  list-style: none; margin-block: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.5rem;
}
.deck__key {
  display: block; text-align: center; padding: 0.7rem 0.75rem 0.6rem;
  font-weight: 700; color: var(--text); text-decoration: none;
  background: linear-gradient(#4a2a75, var(--plum));
  border: 2px solid #6b4a99; border-bottom-width: 6px; border-bottom-color: #160a29;
  border-radius: 4px 4px 2px 2px;
  transition: transform 80ms ease-out, border-bottom-width 80ms ease-out;
}
.deck__key:hover { color: var(--sun); border-color: var(--teal); border-bottom-color: #160a29; }
.deck__key[aria-current="page"] {
  transform: translateY(4px); border-bottom-width: 2px;
  background: var(--plum); color: var(--sun);
  box-shadow: inset 0 3px 0 rgba(0,0,0,.35);
}
.deck__key[aria-current="page"]::after {
  content: ""; display: block; height: 4px; width: 2.5rem; margin: 0.35rem auto 0;
  background: var(--sun); border-radius: 2px;
}

/* ---------- Layout ---------- */
.layout {
  flex: 1 0 auto;
  display: grid; gap: 2.5rem;
  padding-block: 2.5rem 3rem;
}
@media (min-width: 62rem) {
  .layout { grid-template-columns: minmax(0, 1fr) 17rem; align-items: start; }
}

/* ---------- Startseite: Bühne mit Radioskala ---------- */
.stage { margin-bottom: 3rem; }
.stage__title {
  font-size: var(--step-4); line-height: 0.95; margin: 0 0 1rem; color: var(--sun);
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--teal), 9px 9px 0 var(--night);
  overflow-wrap: anywhere;
}
.stage__claim { font-size: var(--step-1); font-weight: 700; margin: 0 0 0.5rem; max-width: 40ch; }
.stage__broadcast { color: var(--muted); margin: 0 0 1.75rem; max-width: 52ch; }

.stage__actions { margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem; }

/* Die Skala: die Nadel reist beim Laden von „heute“ zurück ins Jahr 1990 */
.dial {
  position: relative; padding: 1rem 1.25rem 0.75rem;
  background: linear-gradient(#1a0b30, #241242);
  border: 3px solid #6b4a99; border-radius: 10px;
  box-shadow: inset 0 0 24px rgba(62, 230, 210, .18);
}
.dial__bands { display: flex; justify-content: space-between; font-size: var(--step--1); color: var(--muted); margin-bottom: 0.4rem; }
.dial__scale {
  position: relative; display: flex; justify-content: space-between; align-items: flex-end;
  height: 3.2rem; padding: 0 0.25rem;
  background:
    repeating-linear-gradient(90deg, rgba(251,245,255,.55) 0 2px, transparent 2px 100%) bottom left / calc(100% / 36) 0.6rem repeat-x;
  border-bottom: 2px solid rgba(251,245,255,.55);
}
.dial__year { font-family: var(--font-display); font-size: 0.95rem; color: var(--teal); padding-bottom: 0.9rem; }
.dial__year--now { color: var(--muted); }
@media (max-width: 30rem) { .dial__year--odd { display: none; } }
.dial__needle {
  position: absolute; top: -0.4rem; bottom: -0.2rem; width: 4px; left: 2%;
  background: var(--pink); border-radius: 2px; box-shadow: 0 0 10px var(--pink);
  animation: tune 2.6s cubic-bezier(.6,.05,.25,1) 0.3s both;
}
@keyframes tune {
  0%   { left: 97%; }
  70%  { left: 0.5%; }
  85%  { left: 3%; }
  100% { left: 2%; }
}

/* ---------- Abschnitte & Karten ---------- */
.section { margin-top: 3rem; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.section__head h2 { margin: 0; }

.lead { font-size: var(--step-1); }

/* News im Stil einer Kassettenhülle: farbiger Rücken mit Datum */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; max-width: none; }
.news-list > li { max-width: none; }
.jcard {
  display: grid; grid-template-columns: 4.25rem 1fr;
  background: var(--plum); border: 2px solid #6b4a99; border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--pink);
}
.jcard__spine {
  background: var(--teal); color: var(--ink); border-radius: 4px 0 0 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.75rem 0.25rem; text-align: center; line-height: 1.1; font-weight: 700;
}
.jcard__day { font-family: var(--font-display); font-size: 1.6rem; }
.jcard__month { font-size: 0.85rem; }
.jcard__year { font-size: 0.85rem; }
.jcard__body { padding: 1.1rem 1.25rem 1.25rem; min-width: 0; }
.jcard__title { font-family: var(--font-body); font-size: var(--step-1); font-weight: 700; color: var(--text); margin: 0 0 0.5rem; }
.jcard__title a { color: inherit; text-decoration: none; }
.jcard__title a:hover { color: var(--sun); text-decoration: underline; }
.jcard p:last-child { margin-bottom: 0; }

.more-link { font-weight: 700; }
.readmore { margin: 0.9rem 0 0; }
.readmore a {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.2rem 0;
  font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.03em;
  color: var(--sun); text-decoration: none; border-bottom: 3px solid var(--pink);
}
.readmore a:hover { color: var(--teal); border-bottom-color: var(--teal); }
.readmore__arrow { font-family: var(--font-body); font-weight: 700; transition: transform 120ms ease-out; }
.readmore a:hover .readmore__arrow { transform: translateX(3px); }

/* Ausgaben-Liste */
.episode-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.episode-list > li { max-width: none; }
.episode-teaser {
  padding: 1.1rem 1.25rem; background: var(--plum); border-left: 8px solid var(--sun);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.episode-teaser h2, .episode-teaser h3 { font-family: var(--font-body); font-size: var(--step-1); font-weight: 700; margin: 0 0 0.25rem; color: var(--text); }
.episode-teaser h2 a, .episode-teaser h3 a { color: inherit; }
.meta { color: var(--muted); font-size: var(--step--1); margin-bottom: 0.5rem; }

/* Playlist als Einleger-Tabelle */
.playlist-wrap { overflow-x: auto; margin: 1rem 0 2rem; border-radius: var(--radius); }
.playlist {
  width: 100%; border-collapse: collapse; background: var(--paper); color: var(--ink);
  font-size: var(--step-0);
}
.playlist caption {
  caption-side: top; text-align: left; padding: 0.6rem 1rem; background: var(--pink); color: var(--ink);
  font-weight: 700; border-radius: var(--radius) var(--radius) 0 0;
}
.playlist th, .playlist td { padding: 0.55rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid #e7d6b8; }
.playlist thead th { background: #f3e6c9; font-weight: 700; }
.playlist td:first-child, .playlist th:first-child { width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.playlist td.year { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Mixcloud-Player mit 2-Klick-Lösung */
.player {
  margin: 1.5rem 0; padding: 1.25rem; background: var(--night);
  border: 2px dashed var(--teal); border-radius: var(--radius);
}
.player__title { margin-top: 0; font-family: var(--font-body); font-size: var(--step-1); font-weight: 700; color: var(--text); }
.player__note { color: var(--muted); font-size: var(--step--1); }
.player iframe { display: block; width: 100%; border: 0; border-radius: 4px; background: #fff; }
.player__remember { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.75rem 0 1rem; }
.player__remember input { width: 1.4rem; height: 1.4rem; margin-top: 0.15rem; accent-color: var(--sun); flex-shrink: 0; }

/* ---------- Schaltflächen ---------- */
.button, button, input[type="submit"] {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  padding: 0.75rem 1.4rem; min-height: 2.75rem;
  color: var(--ink); background: var(--sun);
  border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--pink); text-decoration: none;
}
.button:hover, button:hover, input[type="submit"]:hover { background: var(--teal); color: var(--ink); }
.button:active, button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--pink); }
.button--quiet { background: transparent; color: var(--text); border-color: var(--teal); box-shadow: none; }
.button--quiet:hover { background: var(--plum); color: var(--sun); }

/* ---------- Tabellen (Sender) ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0 2rem; }
.table-wrap:focus-visible { outline-offset: 2px; }
.data {
  width: 100%; border-collapse: collapse; background: var(--plum);
}
.data caption { caption-side: top; text-align: left; font-weight: 700; padding: 0 0 0.6rem; color: var(--muted); }
.data th, .data td { padding: 0.75rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid #5c3d88; }
.data thead th { background: var(--night); color: var(--sun); border-bottom: 3px solid var(--teal); }
.data tbody tr:hover { background: #452670; }

/* Auf schmalen Bildschirmen: jede Zeile als Block mit Beschriftung */
@media (max-width: 44rem) {
  .data--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data--stack, .data--stack tbody, .data--stack tr, .data--stack td, .data--stack th[scope="row"] { display: block; width: 100%; }
  .data--stack caption { display: block; width: 100%; }
  .data--stack tr { border-bottom: 3px solid var(--teal); padding: 0.5rem 0; }
  .data--stack td, .data--stack th[scope="row"] { border: 0; padding: 0.35rem 1rem; }
  .data--stack th[scope="row"] { font-size: var(--step-1); color: var(--sun); }
  .data--stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--muted); }
}

/* ---------- Formulare ---------- */
.form { max-width: 40rem; }
.field { margin-bottom: 1.4rem; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field .hint { display: block; color: var(--muted); font-size: var(--step--1); margin: -0.15rem 0 0.4rem; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="url"], .field input[type="date"], .field input[type="datetime-local"],
.field input[type="number"], .field input[type="time"], .field input[type="file"], .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--muted); border-radius: var(--radius); padding: 0.65rem 0.8rem; min-height: 2.75rem;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--sun); }
.field [aria-invalid="true"] { border-color: var(--danger); border-width: 3px; }
.field-error { display: block; color: var(--danger); font-weight: 700; margin-top: 0.35rem; }
.req { color: var(--sun); }
fieldset.field { border: 0; padding: 0; margin-inline: 0; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.4rem 0; }
.choice input { width: 1.4rem; height: 1.4rem; margin-top: 0.2rem; accent-color: var(--sun); flex-shrink: 0; }
.choice label { font-weight: 400; margin: 0; }

/* Honigtopf: für Menschen und Screenreader unsichtbar, für Bots verlockend */
.hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 1rem 1.25rem; border-radius: var(--radius); margin: 0 0 1.5rem; border: 2px solid; }
.notice:focus { outline: 3px solid var(--sun); outline-offset: 3px; }
.notice--ok { background: #123d3a; border-color: var(--teal); }
.notice--error { background: #4a1530; border-color: var(--danger); }
.notice h2 { font-family: var(--font-body); font-size: var(--step-1); font-weight: 700; color: var(--text); margin: 0 0 0.5rem; }
.notice ul { margin: 0; }
.notice a { color: var(--text); }

.placeholder {
  padding: 0.75rem 1rem; border: 2px dashed var(--sun); border-radius: var(--radius);
  color: var(--text); background: rgba(255, 210, 63, .08);
}

/* ---------- Formatierte Texte (News, Ausgaben) ---------- */
.content blockquote { margin: 1.5rem 0; padding: 0.75rem 1.25rem; border-left: 6px solid var(--teal); background: var(--plum); max-width: var(--measure); }
.content blockquote p:last-child { margin-bottom: 0; }
.content hr { border: 0; border-top: 3px dashed #6b4a99; margin: 2rem 0; max-width: var(--measure); }

/* ---------- Rubriken (Über-Seite) ---------- */
.rubrics { list-style: none; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.rubrics > li { max-width: none; padding: 1.1rem 1.25rem; background: var(--plum); border-top: 6px solid var(--pink); border-radius: 0 0 var(--radius) var(--radius); }
.rubrics h3 { margin-top: 0; color: var(--sun); }

/* ---------- Rechtstexte ---------- */
.legal h2 { font-size: var(--step-1); margin-top: 2.5rem; }
.legal h3 { font-size: var(--step-0); margin-top: 1.75rem; color: var(--sun); }
.legal address { font-style: normal; margin-bottom: 1rem; }

/* ---------- Seitenleiste ---------- */
.sidebar {
  background: var(--night); border: 2px solid #6b4a99; border-radius: var(--radius);
  padding: 1.25rem; position: relative;
}
@media (min-width: 62rem) { .sidebar { position: sticky; top: 1rem; } }
.sidebar__title { font-size: var(--step-1); color: var(--pink); margin: 0 0 1rem; }
.quick { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.quick a {
  display: block; padding: 0.7rem 0.85rem; text-decoration: none; color: var(--text);
  background: var(--plum); border-radius: 4px; border-left: 5px solid var(--teal);
}
.quick a:hover { border-left-color: var(--sun); color: var(--sun); }
.quick__item--episode a { border-left-color: var(--pink); background: #4a2370; }
.quick__label { display: block; font-size: var(--step--1); color: var(--muted); }
.quick__text { font-weight: 700; }
.quick__meta { display: block; font-size: var(--step--1); color: var(--muted); }

/* ---------- Blättern ---------- */
.pager ul { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.pager a { font-weight: 700; }
.pager__status { color: var(--muted); }

/* ---------- Fuß ---------- */
.footer { background: var(--night); border-top: 4px solid var(--teal); padding: 1.75rem 0 2rem; }
.footer__links { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__copy { color: var(--muted); font-size: var(--step--1); margin: 0; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .dial__needle { left: 2%; }
}

/* ---------- Hochkontrastmodus (Windows) ---------- */
@media (forced-colors: active) {
  .brand__name, .stage__title { text-shadow: none; }
  .deck__key, .jcard, .episode-teaser, .sidebar, .player, .rubrics > li { border: 2px solid CanvasText; }
  .deck__key[aria-current="page"] { outline: 3px solid Highlight; }
  .dial__needle { background: Highlight; }
}

/* ---------- Druck ---------- */
@media print {
  body { background: #fff; color: #000; }
  .masthead, .deck, .sidebar, .footer, .skip-link, .player { display: none; }
  a { color: #000; }
  h1, h2, h3 { color: #000; text-shadow: none; }
}
