/* ==========================================================
   auftACt – Stylesheet
   Farben: Konzertschwarz, helles Papierweiß, Gold von den
   Plakaten. Die sechs Mappenfarben tauchen nur sparsam auf.
   ========================================================== */

:root {
  --fg: #141414;
  --bg: #fbfaf8;
  --tint: #f0efed;
  --line: #dcdad5;
  --line-strong: #c9c7c1;
  --muted: #596175;
  --band: #141414;
  --band-fg: #ffffff;
  --band-muted: #c9c9c9;
  --btn-bg: #141414;
  --btn-fg: #ffffff;
  --gold: #f0a21b;
  --gold-ink: #141414;
  --focus: #2b86de;
  --logo-filter: none;
  --header-bg: rgba(251, 250, 248, 0.94);

  /* Mappenfarben */
  --f-red: #e2332f;
  --f-green: #6fbf3f;
  --f-orange: #f78a1b;
  --f-blue: #2b86de;
  --f-yellow: #f5c518;
  --f-pink: #c4246c;

  --font: "Source Sans 3", "Source Sans Pro", "Myriad Pro", "Segoe UI", "Frutiger", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2rem);
  --maxw: 1180px;
}

/* Dunkles Farbschema (Systemeinstellung oder manuelle Wahl) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg: #f1efea;
    --bg: #161616;
    --tint: #202020;
    --line: #343434;
    --line-strong: #484848;
    --muted: #a9afbd;
    --band: #0b0b0b;
    --btn-bg: #f1efea;
    --btn-fg: #141414;
    --logo-filter: invert(1);
    --header-bg: rgba(22, 22, 22, 0.94);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fg: #f1efea;
  --bg: #161616;
  --tint: #202020;
  --line: #343434;
  --line-strong: #484848;
  --muted: #a9afbd;
  --band: #0b0b0b;
  --btn-bg: #f1efea;
  --btn-fg: #141414;
  --logo-filter: invert(1);
  --header-bg: rgba(22, 22, 22, 0.94);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--fg); }

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

[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--maxw); }
.narrow .facts--plain { max-width: 640px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--btn-bg); color: var(--btn-fg); padding: 0.6rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--header-bg); }

/* ---------- Typografie ---------- */

h1, h2, h3, h4 { margin: 0; line-height: 1.15; }

h2 {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

p { margin: 0 0 1.1em; max-width: 62ch; }
.lead { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.55; }

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 3.75rem;
}
.site-header__logo img { height: 2.25rem; width: auto; filter: var(--logo-filter); }

.nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 600; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  font: inherit; font-weight: 600; color: inherit;
  background: none; border: 1px solid var(--fg); border-radius: 999px;
  padding: 0.35rem 1rem; cursor: pointer;
}

@media (max-width: 719px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .nav a { display: block; padding: 0.75rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
}

/* ---------- Start ---------- */

.hero__intro {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: clamp(1.25rem, 3vw, 2rem);
}
.hero__title { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 300; letter-spacing: -0.015em; }
.hero__lead { margin: 0; color: var(--muted); font-size: 1.1rem; }

/* Das Chorfoto wird nie beschnitten: es behält sein Seitenverhältnis (3:2). */
.hero__photo { background: var(--bg); }
.hero__photo img { display: block; width: 100%; height: auto; }
.slides { position: relative; max-width: 1280px; margin-inline: auto; }
.slide { display: block; }
/* Mit JavaScript wechseln die Fotos per Überblendung; ohne bleibt das erste Foto stehen. */
.slides.is-rotating .slide { opacity: 0; transition: opacity 1.2s ease; }
.slides.is-rotating .slide:not(:first-child) { position: absolute; inset: 0; }
.slides.is-rotating .slide.is-active { opacity: 1; }
.slides__dots { position: absolute; left: 0; right: 0; bottom: 0.4rem; display: flex; justify-content: center; gap: 0; }
.slides__dot { appearance: none; border: 0; background: none; padding: 0; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; cursor: pointer; }
.slides__dot::before { content: ""; width: 0.65rem; height: 0.65rem; border-radius: 999px; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); transition: width 0.3s ease, background 0.3s ease; }
.slides__dot[aria-current="true"]::before { width: 1.5rem; background: #fff; }
.slides__dot:hover::before { background: #fff; }
.slides__dot:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .slides__dot::before { transition: none; } }
@media (prefers-reduced-motion: reduce) { .slides.is-rotating .slide { transition: none; } }

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

.next-concert { background: var(--band); color: var(--band-fg); }
.next-concert__inner {
  display: grid; gap: 0.35rem 2rem; align-items: center;
  padding-block: 1.4rem;
}
.next-concert p { margin: 0; max-width: none; }
.next-concert__label { color: var(--gold); font-weight: 600; }
.next-concert__when { font-size: 1.35rem; font-weight: 300; line-height: 1.25; }
.next-concert__what { display: grid; line-height: 1.35; }
.next-concert__what strong { font-weight: 600; font-size: 1.1rem; }
.next-concert__what span { color: var(--band-muted); }
.next-concert .button { justify-self: start; margin-top: 0.75rem; }

@media (min-width: 900px) {
  .next-concert__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "label what button"
      "when  what button";
    gap: 0 3rem;
  }
  .next-concert__label { grid-area: label; align-self: end; }
  .next-concert__when { grid-area: when; align-self: start; }
  .next-concert__what { grid-area: what; }
  .next-concert .button { grid-area: button; margin-top: 0; justify-self: end; }
}

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

.button {
  display: inline-block;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 2px solid var(--btn-bg); border-radius: 999px;
  padding: 0.6rem 1.5rem;
  transition: background-color 0.15s, color 0.15s;
}
.button:hover { background: var(--bg); color: var(--fg); border-color: var(--fg); }
.mailto-text { margin-left: 0.75rem; color: var(--muted); }
.button--gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.button--gold:hover { background: transparent; color: var(--band-fg); border-color: var(--band-fg); }
.section--tint .button:hover { background: var(--bg); }

/* ---------- Abschnitte ---------- */

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--tint { background: var(--tint); }
.section--ink { background: var(--band); color: var(--band-fg); }
.section--ink a { text-decoration-color: var(--gold); }
.section__intro { color: var(--muted); font-size: 1.1rem; margin-bottom: 2.5rem; }

/* Über uns */

.about { display: grid; gap: 2.5rem; }
.about__text p:last-child { margin-bottom: 0; }

@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
}

.facts { margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.95rem; }
.facts dd { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.facts--plain { margin-bottom: 2rem; border-top-color: var(--line-strong); }
.facts--plain > div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; align-items: baseline; border-bottom-color: var(--line-strong); }

.folders { margin-top: clamp(2.5rem, 6vw, 4.5rem); height: clamp(110px, 17vw, 230px); overflow: hidden; background: var(--tint); }
.folders picture, .folders img { width: 100%; height: 100%; }
.folders img { object-fit: cover; object-position: 50% 50%; }

/* Geschichte und Chorleitung */

.about-more { display: grid; gap: 2rem; margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.about-more h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.75rem; }
.about-more p:last-child { margin-bottom: 0; }
@media (min-width: 900px) { .about-more { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; } }

/* Konzertarchiv */

/* Plakatwand: alle Konzerte in einem Raster, neueste zuerst.
   Die Jahres-Überschriften bleiben für Screenreader erhalten. */
.archive {
  display: grid; gap: 2rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  padding-top: 2.5rem; border-top: 1px solid var(--line);
}
.year, .year__list { display: contents; }
.year__label {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (min-width: 640px)  { .archive { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.5rem; } }
@media (min-width: 900px)  { .archive { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .archive { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.concert { min-width: 0; }
.concert__open { display: block; text-decoration: none; }
.concert__open img {
  width: 100%; aspect-ratio: 5 / 7; object-fit: cover;
  background: var(--tint);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.15s;
}
.concert__open:hover img { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28); }
/* Schmaler Hochformat-Flyer (1:2): nie beschneiden, sondern in die Plakatfläche einpassen */
.concert--flyer .concert__open img { object-fit: contain; box-shadow: none; }
.concert--flyer .concert__open:hover img { box-shadow: none; }
.concert__title, .concert__meta { hyphens: auto; overflow-wrap: break-word; }
.concert__title { font-size: 1.05rem; font-weight: 600; line-height: 1.25; margin-top: 0.75rem; }
.concert__meta { margin: 0.2rem 0 0; font-size: 0.95rem; line-height: 1.4; color: var(--muted); }
.upcoming { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.appearances { list-style: none; margin: 0; padding: 0; }
.appearances li { display: flex; flex-wrap: wrap; gap: 0 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.appearances span { color: var(--muted); }
.subhead { font-size: 1.4rem; font-weight: 600; margin: 0 0 1rem; }
.archive + .subhead, .appearances { margin-top: 0; }

/* Platzhalter, die noch ergänzt werden müssen */
.todo { outline: 2px dashed #c0392b; outline-offset: 2px; background: #fff3cd; color: #141414; padding: 0 0.25em; font-weight: 400; }

/* Rechtliche Seiten */

.legal__title { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.2rem); font-weight: 300; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.legal__h { font-size: 1.25rem; font-weight: 600; letter-spacing: 0; margin: 2rem 0 0.5rem; }

/* Link zu Facebook */

.social { margin-top: 1.25rem; }
.social__link { display: inline-flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 0.15rem; }
.social__link:hover { border-bottom-width: 2px; }
.social__icon { flex: none; background: #fff; border-radius: 50%; }

/* ---------- Fußzeile ---------- */

.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding-block: 2.5rem; }
.site-footer__bar { display: grid; gap: 1.25rem; justify-items: start; }
.site-footer__logo { height: 2rem; width: auto; filter: var(--logo-filter); }
.swatches { display: flex; gap: 6px; }
.swatches i { display: block; width: 0.8rem; height: 0.8rem; background: var(--c); transform: rotate(-8deg); }
.site-footer__links { display: flex; gap: 1.5rem; }
.site-footer__copy { margin: 0; color: var(--muted); font-size: 0.95rem; }

@media (min-width: 900px) {
  .site-footer__bar { grid-template-columns: auto auto 1fr auto; align-items: center; gap: 2rem; }
  .site-footer__links { justify-self: end; }
}

/* ---------- Detailansicht ---------- */

.lightbox {
  border: 0; padding: 0; background: var(--bg); color: var(--fg);
  width: min(960px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem);
  overflow: hidden; border-radius: 6px;
}
.lightbox::backdrop { background: rgba(20, 20, 20, 0.78); }
.lightbox__inner {
  display: grid; gap: 1.5rem; padding: 4rem 1.25rem 1.5rem;
  max-height: calc(100dvh - 1.5rem); overflow: auto;
}
.lightbox__poster { width: 100%; max-width: 420px; margin-inline: auto; height: auto; max-height: calc(100dvh - 7rem); object-fit: contain; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.lightbox__text h3 { font-size: 1.8rem; font-weight: 300; letter-spacing: -0.01em; margin-bottom: 1rem; padding-right: 2rem; }
.lightbox__text .when { font-weight: 600; margin-bottom: 0.2em; }
.lightbox__text .where { margin-bottom: 1.1em; }
.lightbox__text .who { color: var(--muted); }
.lightbox__text .note { font-size: 0.95rem; color: var(--muted); }
.lightbox__text .photos { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 1.5rem; }
.lightbox__text .photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.lightbox__close, .lightbox__nav {
  position: absolute;
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  font: inherit; font-size: 1.6rem; line-height: 1; color: var(--fg);
  background: var(--bg); border: 1px solid var(--fg); border-radius: 50%;
  cursor: pointer;
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.lightbox__close { top: 0.6rem; right: 0.6rem; }
.lightbox__nav { top: 0.6rem; right: 3.7rem; }
.lightbox__nav--prev { right: 6.4rem; }

@media (min-width: 760px) {
  .lightbox__inner { grid-template-columns: minmax(0, 380px) 1fr; gap: 2.5rem; padding: 2rem 2rem 4.5rem; align-items: start; }
  .lightbox__poster { max-width: none; }
  .lightbox__close { top: 1rem; right: 1rem; }
  .lightbox__nav { top: auto; bottom: 1rem; right: 1rem; }
  .lightbox__nav--prev { right: 4rem; }
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
