/*
 * Kulturstelle – Basis: Schrift, Grundstile, Layout, Header, Menü, Footer.
 * Gestaltung siehe docs/design/index.html
 */

/* ---------- Schrift (selbst gehostet) ---------- */
/* Louis George Cafe von Yining Chen: «100% free for both personal and business usages» (fonts/LouisGeorgeCafe-License.txt) */
@font-face { font-family: "Louis George Cafe"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/louis-george-cafe-light.woff2") format("woff2"); }
@font-face { font-family: "Louis George Cafe"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/louis-george-cafe.woff2") format("woff2"); }
@font-face { font-family: "Louis George Cafe"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/louis-george-cafe-bold.woff2") format("woff2"); }
@font-face { font-family: "Louis George Cafe"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/louis-george-cafe-italic.woff2") format("woff2"); }
/* Afronaut (Machalski) für Titel: sobald die Weblizenz gekauft ist, Datei nach fonts/afronaut.woff2 legen,
   diesen Block aktivieren und in tokens.css --display-char auf .7 setzen.
@font-face { font-family: "Afronaut"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/afronaut.woff2") format("woff2"); }
*/

/* ---------- Grundstile ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ks-paper); color: var(--ks-ink);
  font: var(--fw-body) var(--fs-body)/var(--lh-body) var(--font-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; line-height: 1.15; }
p, ul, ol, dl, blockquote { margin: 0 0 1em; }
strong, b { font-weight: var(--fw-strong); }
hr { border: 0; border-top: 1px solid var(--ks-line); margin: var(--space-6) 0; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .875em; }
::selection { background: var(--ks-lilac); color: var(--ks-ink); }

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

/* ---------- Typografie ---------- */
.display, .h1, .h2, .h3 {
  font-family: var(--font-display); font-weight: var(--fw-display);
  letter-spacing: var(--tracking-display); line-height: var(--lh-display);
}
.h1 { font-size: var(--fs-display-l); }
.h2 { font-size: var(--fs-display-m); line-height: 1.05; }
.h3 { font-size: var(--fs-display-s); line-height: 1.12; }
.lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); font-weight: 300; line-height: 1.55; }
.kicker { font-size: .9375rem; color: var(--ks-muted); margin: 0 0 var(--space-3); }
.muted { color: var(--ks-muted); }
.small { font-size: var(--fs-small); }
.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;
}

/* Fliesstext aus dem Editor (Event-Beschreibungen) und Textseiten */
.prose { max-width: var(--text-max); }
.prose > :last-child { margin-bottom: 0; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-display); margin: 1.6em 0 .5em; line-height: 1.15; }
.prose h2 { font-size: var(--fs-display-s); }
.prose h3, .prose h4 { font-size: 1.1875rem; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .3em 0; }
.prose img { margin: var(--space-5) 0; }
.prose blockquote { margin: var(--space-5) 0; padding-left: var(--space-4); border-left: 2px solid var(--ks-violet); font-weight: 300; font-size: 1.125rem; }
.prose table { border-collapse: collapse; }
.prose td, .prose th { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--ks-line); text-align: left; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.page { padding-block: var(--space-7) var(--space-9); }
.page--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding-block: clamp(var(--space-7), 6vw, var(--space-9)); }
.section + .section { padding-top: 0; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-5); }
.page-head { margin-bottom: clamp(var(--space-6), 5vw, var(--space-8)); }
.page-head .lead { max-width: 40em; margin: var(--space-4) 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 200;
  background: var(--ks-ink); color: var(--ks-white); padding: var(--space-3) var(--space-4); border-radius: var(--radius-pill);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ks-paper) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ks-line);
}
.site-header__in { display: flex; align-items: center; gap: var(--space-6); min-height: 72px; }
/* Wortmarke «kulturstelle» */
.site-logo { display: block; flex: none; width: clamp(150px, 16vw, 200px); color: var(--ks-ink); }
.site-logo svg { width: 100%; height: auto; }
.site-nav { display: none; align-items: center; gap: var(--space-5); }
.site-nav__link {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 0;
  font: inherit; font-size: .9375rem; color: inherit; text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.site-nav__link:hover, .site-nav__link.active {
  text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1.5px;
}
.site-header__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-4); }
.site-header__end .lang, .site-header__end .user { display: none; }

@media (min-width: 960px) {
  .site-nav, .site-header__end .lang, .site-header__end .user { display: flex; }
  .menu-toggle { display: none !important; }
}

/* Sprachwahl */
.lang { align-items: center; gap: 2px; font-size: .875rem; }
.lang form { display: contents; }
.lang button, .lang span {
  padding: 6px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; line-height: 1;
}
.lang button { opacity: .6; }
.lang button:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.lang [aria-current] { font-weight: var(--fw-strong); cursor: default; }

/* Aufklappmenüs (details/summary, funktionieren ohne JS) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary.site-nav__link::after, .dropdown > summary.btn::after {
  content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid; border-bottom: 1.5px solid;
  transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-fast) var(--ease);
}
.dropdown[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.dropdown__menu {
  position: absolute; top: calc(100% + 12px); left: -14px; z-index: 60; min-width: 230px;
  display: grid; padding: 8px; background: var(--ks-white); border: 1px solid var(--ks-line);
}
.dropdown--end .dropdown__menu { left: auto; right: 0; }
.dropdown__menu a, .dropdown__menu button {
  display: block; padding: 10px 12px; font: inherit; font-size: .9375rem; color: inherit; text-align: left;
  text-decoration: none; background: none; border: 0; cursor: pointer;
}
.dropdown__menu a:hover, .dropdown__menu a.active { background: var(--ks-paper-2); }
.dropdown__sep { height: 1px; margin: 6px 0; background: var(--ks-line); }

/* Burger */
.menu-toggle {
  display: inline-grid; place-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: none; color: inherit; cursor: pointer;
}
.menu-toggle i { display: block; width: 22px; height: 1.5px; background: currentColor; }

/* ---------- Mobile-Menü: Vollbild auf Bühne ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 100; isolation: isolate; overflow: hidden auto;
  display: flex; flex-direction: column;
  background: var(--stage); color: var(--on-stage); --blob-blur: 70px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.mobile-menu .site-logo { color: inherit; }
.menu-close { position: relative; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: inherit; cursor: pointer; }
.menu-close::before, .menu-close::after {
  content: ""; position: absolute; left: 11px; top: 21px; width: 22px; height: 1.5px; background: currentColor; transform: rotate(45deg);
}
.menu-close::after { transform: rotate(-45deg); }
.mobile-menu__nav { display: grid; justify-items: start; gap: 2px; padding-block: var(--space-5); }
.mobile-menu__nav a {
  font-family: var(--font-display); font-size: clamp(2.25rem, 10vw, 3.25rem); line-height: 1.12;
  letter-spacing: var(--tracking-display); text-decoration: none;
}
.mobile-menu__nav a.sub { font-family: var(--font-text); font-size: 1.25rem; font-weight: 300; line-height: 1.6; }
.mobile-menu__end { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-5) var(--space-7); }
.mobile-menu__end .lang { display: flex; }
.mobile-menu__user { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); font-size: 1.0625rem; }
.mobile-menu__user a { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu:not([hidden]) { animation: menu-in var(--dur) var(--ease); }
  .mobile-menu:not([hidden]) .mobile-menu__nav a { animation: menu-link .5s var(--ease) both; }
  .mobile-menu__nav a:nth-child(2) { animation-delay: 40ms !important; }
  .mobile-menu__nav a:nth-child(3) { animation-delay: 80ms !important; }
  .mobile-menu__nav a:nth-child(4) { animation-delay: 120ms !important; }
  .mobile-menu__nav a:nth-child(5) { animation-delay: 160ms !important; }
  .mobile-menu__nav a:nth-child(6) { animation-delay: 200ms !important; }
  .mobile-menu__nav a:nth-child(7) { animation-delay: 240ms !important; }
  .mobile-menu__nav a:nth-child(8) { animation-delay: 280ms !important; }
}
@keyframes menu-in { from { opacity: 0; } }
@keyframes menu-link { from { opacity: 0; transform: translateY(12px); } }
body.menu-open { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; isolation: isolate; overflow: hidden; margin-top: auto;
  background: var(--stage); color: var(--on-stage);
  padding-block: clamp(var(--space-7), 6vw, var(--space-8)) var(--space-5); --blob-blur: 90px;
}
.site-footer__grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
.site-footer__logo { display: block; width: 200px; color: inherit; }
.site-footer h2 { margin: 0 0 6px; font: var(--fw-strong) .9375rem/1.4 var(--font-text); }
.site-footer p, .site-footer ul { margin: 0; font-size: .9375rem; line-height: 1.65; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__partners {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5);
  margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid rgba(255, 255, 255, .3);
  font-size: .8125rem;
}
.partner-logo { display: block; color: inherit; }
.partner-logo svg { height: 30px; width: auto; }
.partner-logo--vseth svg { height: 38px; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .site-footer__grid { grid-template-columns: 1.4fr 1.2fr 1fr 1fr; } }
.mobile-menu__user .dropdown__sep { display: none; }
