/* =====================================================================
   Carnevalverein Petersberg e.V. – Stylesheet
   ---------------------------------------------------------------------
   Standard ist das helle Design; das dunkle gilt nur, wenn es über den
   Schalter im Kopfbereich gewählt wurde (:root[data-theme="dark"]).
   Die Vereinsfarben kommen aus src/_data/site.yaml (--cv-primaer,
   --cv-akzent, --cv-gruen, --cv-dunkel). Alle übrigen Töne werden hier daraus
   berechnet – Farbwechsel also NUR in site.yaml vornehmen.
   ===================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@view-transition { navigation: auto; }

:root {
  color-scheme: light;

  /* Fallbacks, falls site.yaml nichts liefert */
  --cv-primaer: #c81522;
  --cv-akzent: #f9ec9e;
  --cv-gruen: #217c41;
  --cv-dunkel: #183a2a;

  --primary: var(--cv-primaer);
  --primary-strong: color-mix(in oklab, var(--cv-primaer) 75%, black);
  --primary-soft: color-mix(in oklab, var(--cv-primaer) 10%, white);
  --accent: var(--cv-akzent);
  --accent-ink: color-mix(in oklab, var(--cv-akzent) 25%, black);

  --bg: #ffffff;
  --bg-tint: color-mix(in oklab, var(--cv-primaer) 6%, white);
  --surface: #ffffff;
  --text: var(--cv-dunkel);
  --text-muted: color-mix(in oklab, var(--cv-dunkel) 68%, white);
  --border: color-mix(in oklab, var(--cv-dunkel) 12%, white);
  --link: var(--primary-strong);
  --dark-bg: var(--cv-dunkel);
  --focus: var(--cv-primaer);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
  --step-3: clamp(1.8rem, 1.45rem + 1.6vw, 2.8rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.4vw, 4.8rem);

  --space: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --section: clamp(3rem, 2rem + 5vw, 6rem);
  --radius: 1rem;
  --radius-lg: 1.75rem;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px -8px rgb(0 0 0 / .15);
  --container: 72rem;
  --header-h: 4.5rem;
}

:root[data-theme="dark"] {
    --bg: color-mix(in oklab, var(--cv-dunkel) 92%, black);
    --bg-tint: color-mix(in oklab, var(--cv-dunkel) 75%, var(--cv-gruen));
    --surface: color-mix(in oklab, var(--cv-dunkel) 85%, white 3%);
    --text: #eef3ef;
    --text-muted: #b8c6bd;
    --border: rgb(255 255 255 / .12);
    --link: color-mix(in oklab, var(--cv-primaer) 45%, white);
    --primary-soft: color-mix(in oklab, var(--cv-primaer) 25%, var(--cv-dunkel));
    --dark-bg: color-mix(in oklab, var(--cv-dunkel) 70%, black);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .6);
    --focus: var(--cv-akzent);
  }

/* ---------- Basis ---------- */
/* "hidden" muss immer gewinnen, auch gegen display:flex/grid einzelner Bausteine */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.container { width: min(100% - 2 * var(--space), var(--container)); margin-inline: auto; }
.prose { max-width: 46rem; }
.section { padding-block: var(--section); }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--dark-bg); color: #fff; }
.section--dark .link-arrow { color: var(--accent); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--accent); color: #000; padding: .6rem 1rem; border-radius: .5rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }

.kicker { font-family: var(--font-display); font-weight: 700; font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: .75rem; }
.kicker a { color: inherit; }
:root[data-theme="dark"] .kicker, :root[data-theme="dark"] .people-role, :root[data-theme="dark"] .contact-label, :root[data-theme="dark"] .timeline-year { color: var(--link); }
.lead { font-size: var(--step-1); color: var(--text-muted); max-width: 40rem; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--primary); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.4rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); border: 2px solid var(--btn-bg);
  font-weight: 650; font-size: var(--step-0); text-decoration: none; line-height: 1.2;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); --btn-bg: var(--primary-strong); }
.btn:active { transform: translateY(0); }
.btn-ghost { --btn-fg: var(--text); background: transparent; border-color: var(--border); }
.btn-ghost:hover { --btn-bg: transparent; border-color: var(--primary); }
.btn-accent { --btn-bg: var(--accent); --btn-fg: #1b1300; }
.btn-accent:hover { --btn-bg: color-mix(in oklab, var(--accent) 85%, black); }
.btn-small { min-height: 2.25rem; padding: .35rem 1rem; font-size: var(--step--1); margin-top: .5rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.link-arrow { font-weight: 650; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: .25rem; }

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: 0 6px 20px -16px rgb(0 0 0 / .5); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-short { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--primary); }
.brand-long { font-size: .78rem; color: var(--text-muted); font-weight: 550; }
:root[data-theme="dark"] .brand-short { color: var(--accent); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a {
  display: block; padding: .55rem .9rem; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .98rem;
}
.main-nav a:hover { background: var(--primary-soft); }
.main-nav a[aria-current="page"] { background: var(--primary); color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 52rem) {
  .nav-toggle {
    display: grid; place-items: center; width: 3rem; height: 3rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    content: ""; display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform .25s ease, opacity .2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 1rem var(--space) 1.5rem;
    box-shadow: 0 20px 30px -20px rgb(0 0 0 / .4);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .js .main-nav:not(.is-open) { display: none; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: .9rem 1rem; font-size: 1.1rem; border-radius: .75rem; }
  .main-nav.is-open { animation: slide-down .22s ease-out; }
}
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Hero (Startseite) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(3rem, 2rem + 6vw, 7rem);
  background:
    radial-gradient(60rem 30rem at 85% 10%, color-mix(in oklab, var(--accent) 28%, transparent), transparent 60%),
    radial-gradient(50rem 40rem at 0% 100%, color-mix(in oklab, var(--cv-gruen) 22%, transparent), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
@media (max-width: 55.99rem) {
  .hero-visual { grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
  .hero-logo { width: clamp(5.5rem, 26vw, 9rem); }
}
@media (max-width: 26rem) { .hero-visual { grid-template-columns: 1fr; } .hero-logo { display: none; } }
.hero-title { font-size: clamp(3rem, 2rem + 6vw, 6.5rem); line-height: .95; margin-bottom: 1.5rem; }
.hero-title span {
  background: linear-gradient(100deg, var(--primary) 20%, var(--primary-strong));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="dark"] .hero-title span { background: none; color: var(--accent); }
.hero-visual { display: grid; justify-items: center; gap: 1.5rem; position: relative; }
.hero-logo {
  width: clamp(8rem, 30vw, 13rem); filter: drop-shadow(0 25px 35px rgb(0 0 0 / .25));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px) rotate(-2deg); } }

.next-card {
  display: grid; gap: .2rem; width: min(100%, 22rem);
  padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  border-left: 6px solid var(--primary);
}
.next-card:hover { transform: translateY(-2px); transition: transform .15s; }
.next-label { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .1em; color: var(--primary); font-weight: 700; }
.next-title { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.2; }
.next-date { color: var(--text-muted); font-size: .95rem; }
.next-countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-ink); }
.next-countdown:empty { display: none; }
:root[data-theme="dark"] .next-countdown { color: var(--accent); }
:root[data-theme="dark"] .next-label { color: var(--link); }

/* Konfetti */
.hero-confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-confetti i {
  position: absolute; top: -5%; width: .6rem; height: 1rem; border-radius: 2px; opacity: .8;
  background: var(--accent); animation: confetti 9s linear infinite;
}
.hero-confetti i:nth-child(3n) { background: var(--primary); width: .5rem; height: .5rem; border-radius: 50%; }
.hero-confetti i:nth-child(4n) { background: #e53935; }
.hero-confetti i:nth-child(5n) { background: #1e88e5; height: .7rem; }
@keyframes confetti {
  to { transform: translateY(110vh) rotate(720deg); }
}
.hero-confetti i:nth-child(1){left:4%;animation-delay:-1s;animation-duration:11s}
.hero-confetti i:nth-child(2){left:10%;animation-delay:-6s}
.hero-confetti i:nth-child(3){left:17%;animation-delay:-3s;animation-duration:12s}
.hero-confetti i:nth-child(4){left:23%;animation-delay:-8s}
.hero-confetti i:nth-child(5){left:30%;animation-delay:-2s;animation-duration:10s}
.hero-confetti i:nth-child(6){left:36%;animation-delay:-5s}
.hero-confetti i:nth-child(7){left:42%;animation-delay:-9s;animation-duration:13s}
.hero-confetti i:nth-child(8){left:49%;animation-delay:-4s}
.hero-confetti i:nth-child(9){left:55%;animation-delay:-7s;animation-duration:11s}
.hero-confetti i:nth-child(10){left:61%;animation-delay:-1.5s}
.hero-confetti i:nth-child(11){left:67%;animation-delay:-6.5s;animation-duration:12s}
.hero-confetti i:nth-child(12){left:73%;animation-delay:-3.5s}
.hero-confetti i:nth-child(13){left:79%;animation-delay:-8.5s;animation-duration:10s}
.hero-confetti i:nth-child(14){left:84%;animation-delay:-2.5s}
.hero-confetti i:nth-child(15){left:89%;animation-delay:-5.5s;animation-duration:13s}
.hero-confetti i:nth-child(16){left:94%;animation-delay:-0.5s}
.hero-confetti i:nth-child(17){left:98%;animation-delay:-7.5s}
.hero-confetti i:nth-child(18){left:52%;animation-delay:-10s;animation-duration:14s}

/* ---------- Unterseiten-Kopf ---------- */
.page-hero {
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background:
    radial-gradient(40rem 20rem at 100% 0%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%),
    var(--bg-tint);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: var(--step-4); margin-bottom: .3em; }
.page-hero .lead { margin-bottom: 0; }

/* ---------- Abschnittskopf ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }

/* ---------- Feature (Prinzenpaar) ---------- */
.feature { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
@media (min-width: 48rem) { .feature { grid-template-columns: 1fr 1.2fr; } }
.feature-media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media--placeholder {
  display: grid; place-items: center; font-size: clamp(4rem, 10vw, 7rem);
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--cv-dunkel) 60%, var(--cv-gruen)));
}
.section--tight { padding-top: 0; }
@media (min-width: 48rem) {
  .feature--gespiegelt { grid-template-columns: 1.2fr 1fr; }
  .feature--gespiegelt .feature-media { order: 2; }
}
.feature-media img { object-position: 50% 25%; }
.feature--gespiegelt .feature-media img { object-position: 50% 10%; }
.feature-names { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; color: var(--primary); line-height: 1.2; }
:root[data-theme="dark"] .feature-names { color: var(--accent); }

/* ---------- Termine ---------- */
.event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.event-list--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.event {
  container-type: inline-size;
  display: flex; gap: 1.1rem; align-items: flex-start;
  padding: 1.1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .15s, box-shadow .15s;
}
.event:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.event-date {
  flex: none; display: grid; place-items: center; width: 4.5rem; padding: .5rem 0;
  border-radius: .85rem; background: var(--primary); color: #fff; line-height: 1;
}
.event-weekday { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.event-day { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; margin-block: .15rem; }
.event-month { font-size: .8rem; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.event-body { min-width: 0; }
.event-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--primary); margin: 0 0 .2rem; }
:root[data-theme="dark"] .event-cat { color: var(--link); }
.event-title { font-size: var(--step-1); margin: 0 0 .35rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--text-muted); font-size: .92rem; margin: 0; }
.event-meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.event-meta > span::before {
  content: ""; width: 1em; height: 1em; background: currentColor; flex: none;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.meta-time { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.meta-place { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.1-7-11.5A7 7 0 0 1 19 9.5C19 14.9 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
.event-text { margin: .6rem 0 0; }
@container (max-width: 22rem) {
  .event-date { width: 3.75rem; }
  .event-day { font-size: 1.5rem; }
}
.calendar-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.empty-hint { padding: 2rem; border: 2px dashed var(--border); border-radius: var(--radius); text-align: center; color: var(--text-muted); }

/* ---------- Karten (Beiträge) ---------- */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.card-img--placeholder {
  background:
    radial-gradient(circle at 20% 30%, color-mix(in oklab, var(--accent) 70%, transparent) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 60%, rgb(255 255 255 / .35) 0 4%, transparent 5%),
    radial-gradient(circle at 85% 20%, color-mix(in oklab, var(--accent) 60%, transparent) 0 3%, transparent 4%),
    linear-gradient(135deg, var(--primary), var(--primary-strong));
}
.card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .3rem; }
.card-date { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.card-title { margin: 0 0 .25rem; font-size: var(--step-1); }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* ganze Karte klickbar */
.card-title a:focus-visible { outline: none; }
.card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.card p { margin: 0; color: var(--text-muted); font-size: .97rem; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3rem; flex-wrap: wrap; }

/* ---------- Gruppen ---------- */
.chip-scroller {
  list-style: none; margin: 0; padding: .25rem 0 1rem; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 1fr); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; overscroll-behavior-x: contain;
}
.chip-card { scroll-snap-align: start; }
.chip-card a {
  position: relative; display: grid; align-content: end; height: 100%; min-height: 12rem; overflow: hidden;
  border-radius: var(--radius); color: #fff; text-decoration: none;
  background: linear-gradient(160deg, rgb(255 255 255 / .1), rgb(255 255 255 / .03));
  border: 1px solid rgb(255 255 255 / .14);
}
.chip-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.chip-card a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .8), rgb(0 0 0 / .05) 65%); }
.chip-card a:hover img { transform: scale(1.05); }
.chip-text { position: relative; z-index: 1; display: grid; gap: .15rem; padding: 1rem 1.1rem; }
.chip-text strong { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.15; }
.chip-art { color: var(--accent); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

.group-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.group-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.group-card img, .group-placeholder { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }
.group-placeholder {
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 5rem; color: rgb(255 255 255 / .9);
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--cv-dunkel) 60%, var(--cv-gruen)));
}
.group-body { padding: 1.25rem 1.35rem 1.5rem; }
.group-body h2 { font-size: var(--step-2); margin-bottom: .4rem; }
.group-body p:last-child { margin: 0; color: var(--text-muted); }

/* ---------- Verein ---------- */
.people { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); margin: 0 0 3rem; }
.people li { display: grid; gap: .15rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--bg-tint); }
.people-role { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--primary); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--primary); }
.timeline li { position: relative; padding: 0 0 1.75rem 1.75rem; }
.timeline li::before { content: ""; position: absolute; left: -.6rem; top: .35rem; width: .9rem; height: .9rem; border-radius: 50%; background: var(--accent); border: 3px solid var(--primary); }
.timeline-year { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); color: var(--primary); }
.timeline p { margin: .2rem 0 0; }

/* ---------- Kontakt ---------- */
.contact-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin-bottom: 2.5rem; }
.contact-card { display: grid; align-content: start; gap: .2rem; padding: 1.25rem; border-radius: var(--radius); background: var(--bg-tint); color: var(--text); text-decoration: none; border: 1px solid var(--border); overflow-wrap: anywhere; }
a.contact-card:hover { border-color: var(--primary); }
.contact-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--primary); }

/* ---------- CTA ---------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 3rem); border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--primary), var(--primary-strong)); color: #fff;
}
.cta h2 { margin-bottom: .25em; font-size: var(--step-2); }
.cta p { margin: 0; opacity: .9; max-width: 36rem; }

/* ---------- Fließtext ---------- */
.prose h2 { font-size: var(--step-2); margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose :where(ul, ol):not([class]) { padding-left: 1.25rem; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 2rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--accent); background: var(--bg-tint); border-radius: 0 .75rem .75rem 0; }
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: var(--radius); }
.post-image { margin: 0 0 2rem; }
.post-image figcaption { font-size: .9rem; color: var(--text-muted); margin-top: .5rem; }
.post-back { margin-top: 3rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-bg); color: rgb(255 255 255 / .85); padding-top: clamp(3rem, 6vw, 5rem); margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.footer-brand img { width: 64px; height: 64px; margin-bottom: 1rem; }
.footer-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: .75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-links a, address a { text-decoration: none; }
.footer-links a:hover, address a:hover { text-decoration: underline; }
address { font-style: normal; overflow-wrap: anywhere; }
.narrenruf { font-family: var(--font-display); font-size: var(--step-2); font-weight: 800; color: var(--accent); margin: 0; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: .9rem; }
.footer-bottom p { margin: 0; }
.to-top { text-decoration: none; }

/* ---------- Scroll-Einblendungen (nur wenn unterstützt) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .card, .event, .group-card, .feature, .cta {
      animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-confetti { display: none; }
  @view-transition { navigation: none; }
}

/* ---------- Druck ---------- */
@media print {
  .site-header, .site-footer, .hero-confetti, .btn, .calendar-actions, .nav-toggle { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .page-hero, .section--tint, .section--dark { background: none !important; color: #000; }
  .event { break-inside: avoid; border: 1px solid #999; }
  a { color: #000; }
}

/* ---------- Erweiterungen: echte Inhalte ---------- */
.feature-logo { width: 55%; max-width: 14rem; filter: drop-shadow(0 10px 20px rgb(0 0 0 / .3)); }
.section-sm { padding-block: clamp(2rem, 1.5rem + 2vw, 3rem) 0; }
.wide-image { width: 100%; border-radius: var(--radius); margin-block: 1rem 1.5rem; box-shadow: var(--shadow); }

.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin-bottom: 2rem; }
.stat { display: grid; gap: .2rem; padding: 1.25rem 1.4rem; border-radius: var(--radius); background: var(--bg-tint); border: 1px solid var(--border); }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); color: var(--primary); line-height: 1.1; }
.stat-label { color: var(--text-muted); font-size: .92rem; }
.stats--small .stat-value { font-size: var(--step-1); }
:root[data-theme="dark"] .stat-value { color: var(--accent); }

.link-tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.link-tile { display: grid; gap: .25rem; padding: 1.25rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.link-tile:hover { transform: translateY(-2px); border-color: var(--primary); }
.link-tile strong { font-family: var(--font-display); font-size: var(--step-1); }
.link-tile strong::after { content: " →"; color: var(--primary); }
.link-tile span { color: var(--text-muted); font-size: .95rem; }

.year-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.year-nav a { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; }
.year-nav a:hover { border-color: var(--primary); }
.year-nav a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

.group-heading { margin-top: 1rem; }
.group-grid + .group-heading { margin-top: 3rem; }
.group-body h3 { font-size: var(--step-2); margin-bottom: .3rem; }
.group-lead { font-weight: 650; color: var(--text) !important; margin-bottom: .3rem !important; }
.group-body p { margin-bottom: .5rem; }

.prince-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(.6rem, 2vw, 1.25rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }
@media (min-width: 40rem) { .prince-grid { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); } }
.prince-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.prince-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-tint); }
.prince-body { padding: clamp(.7rem, 2vw, 1rem) clamp(.75rem, 2vw, 1.15rem) 1.1rem; }
.prince-body .event-cat { font-size: .68rem; }
.prince-body p:last-child { margin: 0; font-size: clamp(.82rem, .78rem + .3vw, .95rem); line-height: 1.45; }

.timeline li p { margin: .35rem 0 0; }

.doc-list { list-style: none; padding: 0 !important; display: grid; gap: .6rem; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-radius: .75rem; background: var(--bg-tint); border: 1px solid var(--border); }
.doc-list a { font-weight: 650; }
.doc-list span { font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--text-muted); }

.partner-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.partner-grid a { display: flex; align-items: center; gap: 1rem; padding: 1rem; height: 100%; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; }
.partner-grid a:hover { border-color: var(--primary); }
.partner-grid img, .partner-initial { width: 72px; height: 72px; flex: none; border-radius: .75rem; background: #fff; border: 1px solid var(--border); }
.partner-grid img { object-fit: contain; padding: .2rem; }
.partner-initial { display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--primary); background: var(--primary-soft); }

.post-body img { border-radius: var(--radius); margin-block: 1.5rem; height: auto; }
.post-body .zoom--beitrag { border-radius: var(--radius); margin-block: 1.5rem; }
.post-body .zoom--beitrag img { margin-block: 0; }
/* Hochformat-Fotos in Beiträgen: schmaler und mittig statt über die ganze Breite */
.post-body img.hochformat { width: min(100%, 26rem); margin-inline: auto; display: block; }
.post-body .zoom--beitrag[data-hochformat] { width: min(100%, 26rem); margin-inline: auto; }
.post-body .zoom--beitrag[data-hochformat] img { width: 100%; }
.post-body table { width: 100%; border-collapse: collapse; margin-block: 1.5rem; font-size: .95rem; display: block; overflow-x: auto; }
.post-body td, .post-body th { padding: .5rem .75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.post-body iframe, .post-body video { max-width: 100%; }
.prose { overflow-wrap: break-word; }

.meta-place { align-items: flex-start !important; }
.meta-place::before { margin-top: .2em; }
.event-ics { display: inline-block; margin-top: .6rem; font-size: .88rem; font-weight: 650; }
.event-ics::before { content: "+ "; }

.footer-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
.meta-price { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M3 8a2 2 0 0 0 2-2h14a2 2 0 0 0 2 2v2a2 2 0 0 0 0 4v2a2 2 0 0 0-2 2H5a2 2 0 0 0-2-2v-2a2 2 0 0 0 0-4z'/%3E%3Cpath d='M14 6v12' stroke-dasharray='2 2'/%3E%3C/svg%3E"); }
.aktive-hinweis { margin-top: 2.5rem; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--bg-tint); border: 1px solid var(--border); font-weight: 600; }

/* ---------- Bildvergrößerung ---------- */
.zoom { position: relative; display: block; cursor: zoom-in; overflow: hidden; }
.zoom img { transition: transform .35s ease; }
.zoom:hover img, .zoom:focus-visible img { transform: scale(1.04); }
.zoom::after {
  content: ""; position: absolute; right: .6rem; bottom: .6rem; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgb(0 0 0 / .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center / 60% no-repeat;
  opacity: .85; transition: opacity .2s;
}
.zoom:hover::after { opacity: 1; }
.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgb(10 18 14 / .94); color: #fff; overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgb(0 0 0 / .6); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .2s ease-out; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox-figure { margin: 0; display: grid; place-items: center; gap: .75rem; width: 100%; height: 100%; padding: 3.5rem 1rem 1.5rem; box-sizing: border-box; }
.lightbox-figure img { max-width: min(100%, 1400px); max-height: calc(100dvh - 8rem); width: auto; height: auto; object-fit: contain; border-radius: .5rem; box-shadow: 0 20px 60px rgb(0 0 0 / .5); }
.lightbox-figure figcaption { max-width: 60rem; text-align: center; font-size: .95rem; color: rgb(255 255 255 / .85); }
.lightbox-btn {
  position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / .25); background: rgb(255 255 255 / .1); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer;
}
.lightbox-btn:hover { background: rgb(255 255 255 / .2); }
.lightbox-close { top: .75rem; right: .75rem; }
.lightbox-prev { left: .75rem; top: 50%; translate: 0 -50%; }
.lightbox-next { right: .75rem; top: 50%; translate: 0 -50%; }
.lightbox.is-single .lightbox-prev, .lightbox.is-single .lightbox-next { display: none; }
@media (max-width: 40rem) { .lightbox-prev, .lightbox-next { top: auto; bottom: .75rem; translate: none; } }
.group-photo { margin: 0; }
.group-photo figcaption { color: var(--text-muted); font-size: .92rem; margin-top: -.75rem; }

/* ---------- Hinweis Kalender-Abo ---------- */
.abo-hinweis { margin: -.25rem 0 2rem; font-size: .85rem; color: var(--text-muted); max-width: 36rem; }
.abo-hinweis:not([open]) { width: fit-content; }
.abo-hinweis summary { cursor: pointer; padding: .2rem 0; list-style: none; display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.abo-hinweis summary:hover { color: var(--text); }
.abo-hinweis summary::-webkit-details-marker { display: none; }
.abo-hinweis summary::before { content: ""; flex: none; width: .42em; height: .42em; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); transition: transform .2s; }
.abo-hinweis[open] summary::before { transform: rotate(45deg); }
.abo-hinweis-inhalt { margin-top: .5rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--bg-tint); color: var(--text); }
.abo-hinweis-inhalt p { margin: 0 0 .5rem; }
.abo-hinweis-inhalt ol { margin: 0 0 .5rem; padding-left: 1.1rem; display: grid; gap: .35rem; }
.abo-hinweis-inhalt ol > li { min-width: 0; }
.abo-url { display: flex; gap: .4rem; margin-top: .3rem; }
.abo-url input { flex: 1; min-width: 0; font: inherit; font-size: .8rem; padding: .3rem .55rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface); color: var(--text); }
.abo-url .btn-small { margin-top: 0; flex: none; min-height: 1.9rem; padding: .2rem .8rem; font-size: .8rem; }
.abo-hinweis-klein { font-size: .78rem; color: var(--text-muted); margin: 0 !important; }

/* ---------- Kontaktwege ---------- */
.contact-cards--wege { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.contact-card a { color: inherit; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
.contact-desc { color: var(--text-muted); font-size: .92rem; margin-top: .25rem; }
/* E-Mail-Adressen nicht am Bindestrich umbrechen */
a[data-mail], a[href^="mailto:"] { white-space: nowrap; }

/* ---------- Social-Media-Symbole im Kopfbereich ---------- */
.header-inner .brand { order: 1; margin-right: auto; }
.header-inner .main-nav { order: 2; }
.header-inner .social-icons { order: 3; }
.header-inner .nav-toggle { order: 4; }
.social-icons { list-style: none; margin: 0; padding: 0 0 0 .5rem; display: flex; gap: .15rem; }
.social-icons a {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  color: var(--text-muted); transition: color .15s, background-color .15s;
}
.social-icons a:hover { color: var(--primary); background: var(--primary-soft); }
.social-icons svg { width: 1.2rem; height: 1.2rem; }
:root[data-theme="dark"] .social-icons a:hover { color: var(--accent); }
@media (max-width: 52rem) {
  .social-icons { padding: 0; margin-right: .35rem; }
  .social-icons a { width: 2.5rem; height: 2.5rem; }
}
@media (max-width: 22rem) { .brand-long { display: none; } }

/* ---------- Gruppen: Alter, Training, Ort, Kontakt ---------- */
.group-facts { display: grid; gap: .45rem; margin: .9rem 0 0; padding-top: .9rem; border-top: 1px solid var(--border); font-size: .92rem; }
.group-facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; }
.group-facts dt { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); padding-top: .12rem; }
.group-facts dd { margin: 0; overflow-wrap: anywhere; }
:root[data-theme="dark"] .group-facts dt { color: var(--link); }
.group-facts a[data-mail], .group-facts a[href^="mailto:"] { white-space: normal; }

/* ---------- Hauptbeitrag auf der Startseite ---------- */
.feature--beitrag h2 a { color: inherit; text-decoration: none; }
.feature--beitrag h2 a:hover { text-decoration: underline; text-decoration-thickness: .08em; }
.feature--beitrag .btn { margin-top: .5rem; }
a.feature-media { display: block; }
a.feature-media img { transition: transform .4s ease; }
a.feature-media:hover img { transform: scale(1.03); }

/* ---------- Schalter helles/dunkles Design ---------- */
.theme-toggle {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-muted); cursor: pointer; transition: color .15s, background-color .15s;
}
.theme-toggle:hover { color: var(--primary); background: var(--primary-soft); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; }
.theme-toggle .icon-sun { display: none; }
.header-inner .theme-toggle { order: 4; margin-left: .15rem; }
.header-inner .nav-toggle { order: 5; }
@media (max-width: 52rem) { .theme-toggle { width: 2.5rem; height: 2.5rem; margin-right: .35rem; } }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle:hover { color: var(--accent); }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* Sehr schmale Handys (z. B. iPhone SE): Kopfbereich etwas kompakter */
@media (max-width: 24rem) {
  .header-inner { gap: .4rem; }
  .brand { gap: .5rem; }
  .brand img { width: 40px; height: 40px; }
  .brand-short { font-size: 1.2rem; }
  .social-icons a, .theme-toggle { width: 2.1rem; height: 2.1rem; }
  .social-icons { margin-right: 0; }
  .theme-toggle { margin-right: .15rem; }
  .nav-toggle { width: 2.75rem; height: 2.75rem; }
}

/* „Startseite“ nur im Handy-Menü – am Computer führt das Logo zur Startseite */
.main-nav .nav-home { display: none; }
@media (max-width: 52rem) {
  .main-nav .nav-home { display: block; }
}
