/*
 * Chorisma Greifswald - Startseite
 *
 * Enthaelt NUR die Abschnitte der Seitenvorlage. Kopf- und Fusszeile bleiben
 * Sache des Themes: Klassen wie .site-header oder .site-footer werden hier
 * bewusst nicht angefasst, weil viele Themes genau diese Namen verwenden und
 * die Seite sonst das Aussehen der restlichen Website veraendern wuerde.
 * Backsteingotik an der Ostsee + Notenlinien.
 * Kuehles Papier, Schieferblau, Backsteinrot, rechtwinklige Geometrie.
 * Alle Textpaarungen gegen WCAG 2.1 AA geprueft, Werte stehen als Kommentar
 * hinter den Farbtokens.
 */

/* =========================================================
   CHORISMA GREIFSWALD – Design-System
   Richtung: Backsteingotik an der Ostsee + Notenlinien.
   Kuehles Papier, Schiefer-Blau, Backstein-Rot, rechtwinklige
   Geometrie. Fuenf Notenlinien als wiederkehrendes Strukturmotiv.
   Bewusst einthemig (helle Website-Ansicht), alle Farben explizit.
   ========================================================= */

:root {
  /* --- Farben (alle Textpaarungen gegen WCAG 2.1 AA geprueft) --- */
  --c-bg:          #EEF1F4;  /* kuehles Papier                     */
  --c-surface:     #FFFFFF;
  --c-surface-alt: #E0E5EB;
  --c-ink:         #12202D;  /* 14.58:1 auf --c-bg                 */
  --c-ink-muted:   #48586A;  /*  6.43:1 auf --c-bg                 */
  --c-primary:     #154B6B;  /*  8.23:1 auf --c-bg                 */
  --c-primary-dark:#0E3450;  /* 11.39:1 auf --c-bg                 */
  --c-primary-tint:#DDE7EE;
  --c-accent:      #9E3520;  /*  6.21:1 auf --c-bg  (Backstein)    */
  --c-accent-dark: #7E2917;
  --c-accent-tint: #F4E5E1;
  --c-deep:        #0F1C27;
  --c-deep-2:      #1B2C3A;
  --c-on-deep:     #EEF1F4;
  --c-on-deep-mut: #B9C6D2;  /*  9.93:1 auf --c-deep               */
  --c-on-deep-acc: #E0895F;  /*  6.51:1 auf --c-deep               */
  --c-line:        #C9D2DB;  /* Notenlinien, Trenner               */
  --c-line-strong: #758594;  /*  3.34:1 – Formularraender, UI      */
  --c-focus:       #0B5FA5;

  /* --- Typografie ------------------------------------------------
     Vollkorn traegt die Ueberschriften, Atkinson Hyperlegible den
     Fliesstext: eine Schrift, die das Braille Institute fuer
     eingeschraenktes Sehen entwickelt hat – passend zu einem Chor
     zwischen 48 und 88 Jahren. Basis bewusst ueber 18px.        --- */
  --font-head: 'Vollkorn', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --fs-xs:   clamp(0.84rem, 0.81rem + 0.15vw, 0.92rem);
  --fs-sm:   clamp(0.95rem, 0.91rem + 0.18vw, 1.05rem);
  --fs-base: clamp(1.08rem, 1.02rem + 0.28vw, 1.22rem);
  --fs-lg:   clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --fs-xl:   clamp(1.45rem, 1.28rem + 0.75vw, 1.95rem);
  --fs-2xl:  clamp(1.8rem, 1.45rem + 1.5vw, 2.7rem);
  --fs-3xl:  clamp(2.3rem, 1.6rem + 3vw, 4.15rem);
  --lh-tight: 1.14;
  --lh-body:  1.62;

  /* --- Abstaende --- */
  --sp-1: 0.35rem; --sp-2: 0.65rem; --sp-3: 1rem;
  --sp-4: 1.5rem;  --sp-5: 2.25rem; --sp-6: 3.25rem;
  --sp-7: clamp(3.5rem, 2rem + 6vw, 6.5rem);

  /* --- Form: rechtwinklig, wie Backstein und Notenpapier --- */
  --radius:    4px;
  --radius-sm: 3px;
  --shadow:    0 1px 0 rgba(18,32,45,.06), 0 10px 24px -18px rgba(18,32,45,.5);
  --shadow-lg: 0 1px 0 rgba(18,32,45,.08), 0 24px 48px -28px rgba(18,32,45,.6);
  --measure: 64ch;
  --wrap: 78rem;
  --ease: cubic-bezier(.2,.6,.35,1);

  /* --- Notensystem: fuenf Linien im Abstand von 5px --- */
  --stave: repeating-linear-gradient(to bottom,
             var(--c-line) 0, var(--c-line) 1px,
             transparent 1px, transparent 5px);
  --stave-h: 21px;
}

/* =========================================================
   Basis
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--c-primary); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-primary-dark); text-decoration-thickness: 2px; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   Layout-Primitive
   ========================================================= */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(100% - 4rem, var(--wrap)); } }

.section { padding-block: var(--sp-7); }
.section--flush { padding-block-start: 0; }
.section--tint { background: var(--c-surface-alt); }
.section--deep { background: var(--c-deep); color: var(--c-on-deep); }
.section--deep h2, .section--deep h3 { color: var(--c-on-deep); }
.section--deep .lead { color: var(--c-on-deep-mut); }

.section__head { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }

/* Eyebrow mit Notensystem statt einfacher Linie */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 7.5rem;
  height: var(--stave-h);
  background-image: var(--stave);
}
.section--deep .eyebrow { color: var(--c-on-deep-acc); }
.section--deep .eyebrow::after {
  background-image: repeating-linear-gradient(to bottom,
    rgba(238,241,244,.32) 0, rgba(238,241,244,.32) 1px, transparent 1px, transparent 5px);
}

.lead { font-size: var(--fs-lg); color: var(--c-ink-muted); }

.skip-link {
  position: absolute; left: var(--sp-3); top: var(--sp-3); z-index: 100;
  transform: translateY(-160%);
  background: var(--c-primary); color: var(--c-on-deep);
  padding: var(--sp-2) var(--sp-4);
  font-weight: 700; text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--c-on-deep); }

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

/* =========================================================
   Buttons – rechtwinklig, mit klarer Kante
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 0.8em 1.5em;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; font-size: var(--fs-sm); line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .1s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-primary); color: var(--c-on-deep); }
.btn--primary:hover { background: var(--c-primary-dark); color: var(--c-on-deep); }
.btn--ghost { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn--ghost:hover { background: var(--c-primary-tint); color: var(--c-primary-dark); }
.btn--accent { background: var(--c-accent); color: var(--c-surface); }
.btn--accent:hover { background: var(--c-accent-dark); color: var(--c-surface); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding-block: var(--sp-7) var(--sp-6); }
.hero__grid { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--sp-6); }
}
.hero__text { display: flex; flex-direction: column; gap: var(--sp-4); }
.hero__title { color: var(--c-primary-dark); }
.hero__motto {
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: var(--fs-xl); line-height: 1.28; color: var(--c-accent); max-width: 24ch;
}

/* Notensystem mit einem Notenkopf – das Motiv der Seite */
.stave { position: relative; height: var(--stave-h); background-image: var(--stave); }
.stave__note {
  position: absolute; left: 12%; top: 7.5px;
  width: 11px; height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  transform: rotate(-20deg);
}
.stave__note::after {
  content: ""; position: absolute; right: 0; bottom: 3px;
  width: 2px; height: 26px; background: var(--c-accent);
  transform: rotate(20deg); transform-origin: bottom right;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero__facts {
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  padding-top: var(--sp-3); border-top: 1px solid var(--c-line);
  font-size: var(--fs-sm); color: var(--c-ink-muted);
}
.hero__facts strong { color: var(--c-ink); font-weight: 700; }

/* =========================================================
   Bilder mit Platzhalter-Fallback
   ========================================================= */
.figure {
  position: relative; margin: 0;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(150deg, var(--c-primary-tint) 0%, var(--c-surface-alt) 60%, var(--c-accent-tint) 100%);
  border: 1px solid var(--c-line);
}
.figure__media { aspect-ratio: 4 / 3; position: relative; }
.figure--tall .figure__media { aspect-ratio: 3 / 4; }
.figure--wide .figure__media { aspect-ratio: 16 / 10; }
.figure__media img { width: 100%; height: 100%; object-fit: cover; }


.figure figcaption {
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  font-size: var(--fs-sm); color: var(--c-ink-muted); background: var(--c-surface);
}

/* =========================================================
   Aufruf: Maennerstimmen gesucht
   Druckartig – Regel oben statt Farbleiste links.
   ========================================================= */
.callout {
  display: grid; gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-accent);
  border-radius: 0;
}
@media (min-width: 55rem) {
  .callout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
}
.callout__body { display: flex; flex-direction: column; gap: var(--sp-3); }
.callout__badge {
  align-self: start;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-accent);
}
.callout__aside {
  display: flex; flex-direction: column;
  padding: var(--sp-4);
  background: var(--c-bg);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}
.callout__aside dt { font-weight: 700; color: var(--c-ink); }
.callout__aside dd { margin: 0 0 var(--sp-3); color: var(--c-ink-muted); }
.callout__aside dd:last-child { margin-bottom: 0; }

/* =========================================================
   Ueber uns
   ========================================================= */
.about__grid { display: grid; gap: var(--sp-5); }
@media (min-width: 62rem) {
  .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--sp-6); align-items: start; }
}
.prose { display: flex; flex-direction: column; gap: var(--sp-3); }
.prose p { color: var(--c-ink-muted); }
.prose p:first-child { color: var(--c-ink); font-size: var(--fs-lg); }

.stats {
  list-style: none; display: grid; gap: var(--sp-3); margin-top: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  font-variant-numeric: tabular-nums;
}
.stats li {
  padding: var(--sp-3);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
}
.stats b {
  display: block; font-family: var(--font-head); font-size: var(--fs-xl);
  font-weight: 700; color: var(--c-primary); line-height: 1.1;
}
.stats span { font-size: var(--fs-xs); color: var(--c-ink-muted); }

/* =========================================================
   Termine
   ========================================================= */
.dates { list-style: none; display: grid; gap: var(--sp-3); }

/* Mehrspaltig sollen alle Terminkarten gleich hoch sein – sonst zerfaellt das
   Raster, sobald eine Karte einen Zusatz oder das Abgesagt-Kennzeichen traegt.
   grid-auto-rows: 1fr gibt jeder Zeile dieselbe Hoehe, height: 100% laesst die
   Karte diese Hoehe auch ausfuellen. Einspaltig bleibt die natuerliche Hoehe –
   dort waere Gleichmachen nur verschenkter Platz. */
.dates li { display: grid; }
.date-card { height: 100%; }

@media (min-width: 48rem) {
  .dates {
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    grid-auto-rows: 1fr;
  }
}

.date-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4); align-items: start;
  padding: var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.date-card:hover { box-shadow: var(--shadow); border-color: var(--c-line-strong); }

.date-card__day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 4.25rem; padding: var(--sp-2);
  background: var(--c-primary); color: var(--c-on-deep);
  border-radius: var(--radius-sm); line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.date-card__day b { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 700; }
.date-card__day span { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; }
.date-card__day em { font-style: normal; font-size: var(--fs-xs); color: var(--c-on-deep-mut); }

.date-card__body { display: flex; flex-direction: column; gap: var(--sp-1); }
.date-card__title { font-size: var(--fs-lg); }
.date-card__meta { font-size: var(--fs-sm); color: var(--c-ink-muted); }

.date-card--off .date-card__day { background: var(--c-ink-muted); }
.date-card--off .date-card__title { text-decoration: line-through; text-decoration-thickness: 1px; }

.tag {
  align-self: start; margin-top: var(--sp-1);
  padding: 0.25em 0.6em; border-radius: var(--radius-sm);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--c-accent-tint); color: var(--c-accent-dark);
}

/* =========================================================
   Beitraege / Konzerte
   ========================================================= */
.posts { list-style: none; display: grid; gap: var(--sp-4); }

/* Gleiche Regel wie bei den Terminkarten: mehrspaltig alle gleich hoch,
   einspaltig die natuerliche Hoehe. */
.posts li { display: grid; }

@media (min-width: 48rem) {
  .posts {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    grid-auto-rows: 1fr;
  }
}

.post-card {
  position: relative;
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.post-card:hover { box-shadow: var(--shadow-lg); border-color: var(--c-line-strong); }
.post-card .figure { border-radius: 0; border: 0; border-bottom: 1px solid var(--c-line); }
.post-card .figure figcaption { display: none; }
.post-card__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); flex: 1; }
.post-card__date {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-accent);
}
.post-card__title { font-size: var(--fs-lg); }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card__title a:hover { color: var(--c-primary); }
.post-card__excerpt { font-size: var(--fs-sm); color: var(--c-ink-muted); }
.post-card__more { margin-top: auto; padding-top: var(--sp-2); font-size: var(--fs-sm); font-weight: 700; color: var(--c-primary); }

/* =========================================================
   Archiv – Verzeichnis aller Beitraege nach Jahren
   ========================================================= */
.archiv {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-line-strong);
}
.archiv__titel { font-size: var(--fs-lg); margin-bottom: var(--sp-4); }

.archiv__jahre {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.archiv__jahr h4 {
  font-size: var(--fs-base);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--c-accent);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-line);
  font-variant-numeric: tabular-nums;
}

.archiv__jahr ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.archiv__jahr a {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  color: var(--c-primary);
}
.archiv__jahr a:hover { color: var(--c-primary-dark); text-decoration: underline; }
.archiv__jahr time {
  display: block;
  font-size: var(--fs-xs);
  color: var(--c-ink-muted);
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Galerie
   ========================================================= */
.gallery { list-style: none; display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.gallery .figure { height: 100%; }
@media (min-width: 62rem) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* =========================================================
   Mitsingen (dunkler Abschnitt)
   Nummerierung ist hier echte Reihenfolge: erster Kontakt,
   erster Abend, erstes Mitsingen.
   ========================================================= */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--sp-4); }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li {
  counter-increment: step;
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--c-deep-2);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step) ".";
  font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 700;
  color: var(--c-on-deep-acc); line-height: 1;
}
.steps h3 { font-size: var(--fs-lg); }
.steps p { color: var(--c-on-deep-mut); font-size: var(--fs-sm); }

.practice {
  display: grid; gap: var(--sp-4);
  margin-top: var(--sp-5); padding-top: var(--sp-5);
  border-top: 1px solid rgba(238,241,244,.2);
}
@media (min-width: 48rem) { .practice { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.practice div { display: flex; flex-direction: column; gap: var(--sp-1); }
.practice dt {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .14em;
  color: var(--c-on-deep-acc); font-weight: 700;
}
.practice dd { margin: 0; font-size: var(--fs-base); color: var(--c-on-deep); }

/* =========================================================
   Kontakt + Formular
   ========================================================= */
.contact__grid { display: grid; gap: var(--sp-5); }
@media (min-width: 62rem) { .contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--sp-6); } }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-4); }
.contact-list li { display: grid; grid-template-columns: auto minmax(0,1fr); gap: var(--sp-3); align-items: start; }
.contact-list svg { width: 1.4rem; height: 1.4rem; color: var(--c-accent); flex: none; margin-top: .25em; }
.contact-list b { display: block; font-weight: 700; font-size: var(--fs-sm); }
.contact-list span { color: var(--c-ink-muted); font-size: var(--fs-sm); }

.form {
  display: grid; gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-primary);
  border-radius: 0;
}
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field label { font-weight: 700; font-size: var(--fs-sm); }
.field .hint { font-size: var(--fs-xs); color: var(--c-ink-muted); }
.field input, .field textarea {
  font: inherit; font-size: var(--fs-sm); color: var(--c-ink);
  padding: 0.75em 0.9em;
  background: var(--c-bg);
  border: 2px solid var(--c-line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover, .field textarea:hover { border-color: var(--c-ink-muted); }
.field input:focus, .field textarea:focus { border-color: var(--c-focus); background: var(--c-surface); }
.field .error { font-size: var(--fs-xs); font-weight: 700; color: var(--c-accent-dark); }
.field .error:empty { display: none; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea { border-color: var(--c-accent); background: var(--c-accent-tint); }

.form__note { font-size: var(--fs-xs); color: var(--c-ink-muted); }
.form__status {
  padding: var(--sp-3); border-radius: var(--radius-sm);
  background: var(--c-primary-tint); color: var(--c-primary-dark);
  font-size: var(--fs-sm); font-weight: 700;
}
.form__status:empty { display: none; }

