/* ==========================================================================
   KjG Altstadt Konstanz - Stylesheet
   Systemschriften statt Google Fonts (DSGVO: keine externen Anfragen)
   ========================================================================== */

:root {
  --orange:      #e8722a;
  --orange-dark: #c85a17;
  --orange-soft: #fdf1e7;
  --ink:         #16302f;
  --ink-soft:    #274a48;
  --teal:        #1f5f5b;
  --sand:        #faf7f2;
  --line:        #e4ddd2;
  --grey:        #5f6b6a;
  --white:       #ffffff;

  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 1px 2px rgba(22,48,47,.06), 0 8px 24px rgba(22,48,47,.07);
  --shadow-lg:   0 2px 4px rgba(22,48,47,.06), 0 18px 48px rgba(22,48,47,.13);

  --wrap:        1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--orange-dark); }
a:hover { color: var(--orange); }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow { max-width: 760px; }

section:not(.paneel) { padding: 84px 0; }
.paneel { padding: 0; }
section.tight { padding: 56px 0; }
.bg-sand  { background: var(--sand); }
.bg-cream { background: var(--orange-soft); }

.lead {
  font-size: 1.16rem;
  color: var(--grey);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-dark); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { color: var(--orange-dark); }

.btn[aria-disabled="true"] {
  background: var(--line);
  color: var(--grey);
  pointer-events: none;
  transform: none;
}

/* --- Schwebende Kopfmarke (Logo, verlinkt zurueck zum Seitenanfang) ------ */

.brand-floating {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  padding: 8px 14px 8px 8px;
  border-radius: 100px;
  box-shadow: var(--shadow);
}
.brand-floating:hover { color: var(--ink); }
.brand-logo {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  object-fit: contain;
  border-radius: 8px;
}
.footer-brand .brand-logo { width: 30px; height: 30px; }
.brand-text  { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: .96rem; }

/* --- Punkt-Navigation (springt zwischen Abschnitten) --------------------- */

.dots-nav {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(22,48,47,.28);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.dot:hover { border-color: var(--orange-dark); }
.dot.aktiv { background: var(--orange-dark); border-color: var(--orange-dark); transform: scale(1.15); }

/* --- Kontakt-Bubble ------------------------------------------------------ */

.kontakt-bubble {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, background .15s ease;
}
.kontakt-bubble:hover { background: var(--orange); color: #fff; transform: scale(1.06); }
.kontakt-bubble svg { width: 24px; height: 24px; }

/* --- Impressum/Datenschutz-Leiste ---------------------------------------- */

.legal-strip {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 60;
  display: flex;
  gap: 10px;
  font-size: .78rem;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  padding: 7px 12px;
  border-radius: 100px;
  box-shadow: var(--shadow);
}
.legal-strip a { color: var(--grey); text-decoration: none; }
.legal-strip a:hover { color: var(--ink); }

/* --- Scroll-Snap-Abschnitte ----------------------------------------------- */

.snap-container {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
  -webkit-overflow-scrolling: touch;
}
.paneel {
  scroll-snap-align: start;
}

@media (max-width: 720px) {
  .dots-nav { right: 12px; }
  .kontakt-bubble { right: 16px; bottom: 16px; width: 50px; height: 50px; }
  .legal-strip { right: 16px; bottom: 76px; font-size: .72rem; }
}

@media (max-width: 360px) {
  /* Auf sehr schmalen Bildschirmen wandert die Impressum/Datenschutz-Leiste
     nach unten links, damit sie nicht mit Buttons unten rechts kollidiert. */
  .legal-strip { right: auto; left: 12px; bottom: 16px; }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 78% 12%, rgba(232,114,42,.24), transparent 62%),
    linear-gradient(160deg, rgba(22,48,47,.4), rgba(22,48,47,.8));
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--bild-staerke, .65);
}
.hero .wrap {
  position: relative;
  z-index: 2;
  padding-top: 116px;
  padding-bottom: 116px;
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero p {
  color: rgba(255,255,255,.86);
  font-size: 1.18rem;
  max-width: 54ch;
}
.hero .eyebrow { color: #ffc79a; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* --- Seitenkopf (Unterseiten) ------------------------------------------- */

.page-head {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 340px at 85% 0%, rgba(232,114,42,.22), transparent 60%),
    linear-gradient(160deg, rgba(22,48,47,.4), rgba(22,48,47,.78));
}
.page-head .hero-bg { opacity: .42; }
.page-head .wrap {
  position: relative;
  z-index: 2;
  padding-top: 74px;
  padding-bottom: 74px;
}
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: rgba(255,255,255,.85); font-size: 1.12rem; max-width: 56ch; }

/* --- Themen-Teaser (kompakte Karte, klappt zur Detailansicht auf) ------- */

.thema-teaser[hidden] { display: none; }
.thema-teaser {
  display: block;
  width: 100%;
  margin: 0;
  border: none;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.thema-teaser::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 340px at 85% 0%, rgba(232,114,42,.22), transparent 60%),
    linear-gradient(160deg, rgba(22,48,47,.4), rgba(22,48,47,.78));
}
.thema-teaser-inner {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 107px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.thema-teaser-text { min-width: 0; }
.thema-teaser h2 { color: #fff; margin-bottom: .25em; }
.thema-teaser p { color: rgba(255,255,255,.85); margin: 0; font-size: 1.02rem; }
.thema-teaser .eyebrow { color: #ffc79a; }
.thema-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 100px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-weight: 600;
  transition: background .15s ease, transform .15s ease;
}
.thema-teaser:hover .thema-cta { background: rgba(255,255,255,.26); transform: translateX(3px); }
.thema-teaser:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.page-head .eyebrow { color: #ffc79a; }

/* --- Karten ------------------------------------------------------------- */

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-plain {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}

/* --- Info-Kacheln (Eckdaten) -------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact { background: #fff; padding: 24px; }
.fact dt {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}
.fact dd {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
}

/* --- Status-Badge ------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge-offen       { background: #e8f5ec; color: #1d7a41; }
.badge-vorschau    { background: var(--orange-soft); color: var(--orange-dark); }
.badge-warteliste  { background: #fdf3d8; color: #8a6208; }
.badge-geschlossen { background: #f0efec; color: var(--grey); }

/* --- Termine ------------------------------------------------------------ */

.termine { border-top: 1px solid var(--line); }

.termin {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
a.termin:hover { background: var(--sand); color: inherit; }

.termin-datum {
  flex: 0 0 76px;
  text-align: center;
  background: var(--orange-soft);
  border-radius: var(--radius-sm);
  padding: 9px 4px;
}
.termin-datum b {
  display: block;
  font-size: 1.4rem;
  color: var(--ink);
  line-height: 1;
}
.termin-datum span {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-top: 3px;
}
.termin-info { flex: 1; min-width: 0; }
.termin-info b { display: block; color: var(--ink); font-size: 1.04rem; }
.termin-info span { font-size: .92rem; color: var(--grey); }
.termin-pfeil { color: var(--grey); flex: 0 0 auto; }

/* --- Ablauf/Schritte ---------------------------------------------------- */

.steps { counter-reset: step; display: grid; gap: 20px; }
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.step-num {
  counter-increment: step;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.step-num::before { content: counter(step); }
.step h3 { margin-bottom: .25em; font-size: 1.08rem; }
.step p { color: var(--grey); font-size: .98rem; }

.anmeldung-ablauf { padding: 48px 0; }
.anmeldung-ablauf h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.anmeldung-ablauf .lead { font-size: 1rem; }
.anmeldung-ablauf .steps { gap: 14px; }
.anmeldung-ablauf .step-num { flex: 0 0 34px; height: 34px; font-size: .9rem; }
.anmeldung-ablauf .step h3 { font-size: 1rem; }
.anmeldung-ablauf .step p { font-size: .92rem; }
.anmeldung-schritte { grid-template-columns: repeat(3, 1fr); }

/* --- Split (Text + Bild) ------------------------------------------------ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 380;
  object-fit: cover;
}

/* --- Aufzaehlung mit Haken ---------------------------------------------- */

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: .45em;
  width: 16px; height: 9px;
  border-left: 2.5px solid var(--orange);
  border-bottom: 2.5px solid var(--orange);
  transform: rotate(-45deg);
}

/* --- FAQ ---------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 20px 40px 20px 4px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--orange);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 40px 20px 4px; color: var(--grey); }

/* --- CTA-Band ----------------------------------------------------------- */

.cta {
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius);
  padding: 52px;
  text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); margin-left: auto; margin-right: auto; max-width: 52ch; }
.cta .hero-actions { justify-content: center; }

/* --- Hinweis-Box -------------------------------------------------------- */

.note {
  background: var(--orange-soft);
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  font-size: .98rem;
}
.note b { color: var(--ink); }

/* --- PDF-Einbettung (z. B. Datenschutzerklärung) ------------------------ */

.pdf-embed {
  width: 100%;
  height: 82vh;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--sand);
}
.pdf-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.pdf-fallback {
  margin-top: 14px;
  font-size: .9rem;
  color: var(--grey);
  text-align: center;
}

/* --- Galerie ------------------------------------------------------------ */

.galerie-jahrgang + .galerie-jahrgang { margin-top: 40px; }
.galerie-jahr {
  font-size: 1.1rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.galerie-bild {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--sand);
  border: 1px solid var(--line);
}
.galerie-bild img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.galerie-bild:hover img { transform: scale(1.05); }

/* --- Rechtstexte -------------------------------------------------------- */

.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.05rem; margin-top: 1.6em; }
.legal { font-size: .99rem; }

/* --- Hilfsklassen ------------------------------------------------------- */

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.mt-l { margin-top: 44px; }
.mt-m { margin-top: 28px; }
.stack-actions { display: flex; flex-wrap: wrap; gap: 12px; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--orange);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta { padding: 40px 26px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  section:not(.paneel) { padding: 60px 0; }

  .grid-2, .grid-3, .anmeldung-schritte { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: 40px; padding-bottom: 100px; }
  .page-head .wrap { padding-top: 44px; padding-bottom: 90px; }
  .termin { gap: 16px; }
  .termin-datum { flex-basis: 64px; }
  .card-plain { padding: 24px; }
  .thema-teaser-inner { padding: 85px 20px; flex-direction: column; align-items: flex-start; }
}

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