/* ===================================================================
   Kulturverein Langenargen e.V. — Stylesheet
   -------------------------------------------------------------------
   Aufbau der Datei (zum schnellen Springen):
     1. Schriften
     2. Farben und Grundwerte
     3. Zuruecksetzen / Grundlagen
     4. Typografie
     5. Kopfbereich und Navigation
     6. Fussbereich
     7. Startseite
     8. Seitenaufbau der Unterseiten
     9. Veranstaltungen (Karten + Instagram)
    10. Kontakt (Vorstand + Formular)
    11. Rechtstexte
    12. Hilfsklassen und Bewegung
   =================================================================== */


/* ===================================================================
   1. SCHRIFTEN — Jost, lokal eingebunden
   -------------------------------------------------------------------
   WICHTIG: Es wird NICHTS von Google geladen. Die Schriftdateien
   liegen im Ordner  assets/fonts/  direkt im Projekt (DSGVO).

   Diese drei Dateien werden erwartet (siehe README.md, Punkt 4):
       assets/fonts/Jost-Regular.woff2    (Schriftstaerke 400)
       assets/fonts/Jost-Medium.woff2     (Schriftstaerke 500)
       assets/fonts/Jost-SemiBold.woff2   (Schriftstaerke 600)

   Fehlen die Dateien, benutzt der Browser automatisch Century Gothic
   bzw. die Systemschrift. Die Seite funktioniert also auch dann.
   =================================================================== */

@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


/* ===================================================================
   2. FARBEN UND GRUNDWERTE
   -------------------------------------------------------------------
   Die gesamte Seite ist bewusst schwarz-weiss. Die einzige Farbe auf
   der Website sind die Eventplakate. Bitte keine Akzentfarbe ergaenzen.
   =================================================================== */

:root {
  /* Farben */
  --weiss:   #FFFFFF;
  --schwarz: #0A0A0A;
  --grau:    #6B6B6B;   /* Sekundaertext */
  --linie:   #E5E5E5;   /* Trennlinien */

  /* Schrift */
  --schrift: "Jost", "Century Gothic", "Futura", system-ui, sans-serif;

  /* Abstaende */
  --seitenrand:   clamp(1.25rem, 5vw, 4rem);
  --abschnitt:    clamp(3.5rem, 9vw, 7rem);
  --abstand-klein: 1rem;

  /* Breiten */
  --breite-seite: 64rem;
  --breite-text:  34rem;   /* ergibt rund 65-70 Zeichen pro Zeile */

  /* Sperrung der Versalien */
  --sperrung-gross:  0.26em;
  --sperrung-mittel: 0.2em;
  --sperrung-klein:  0.16em;
}


/* ===================================================================
   3. ZURUECKSETZEN / GRUNDLAGEN
   =================================================================== */

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--weiss);
  color: var(--schwarz);
  font-family: var(--schrift);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(10, 10, 10, 0.12);
}

#inhalt {
  scroll-margin-top: 1.5rem;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* Sichtbarer Tastatur-Fokus auf der ganzen Seite (Barrierefreiheit) */
:focus-visible {
  outline: 2px solid var(--schwarz);
  outline-offset: 3px;
}


/* ===================================================================
   4. TYPOGRAFIE
   =================================================================== */

h1, h2, h3 {
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  line-height: 1.25;
  text-wrap: balance;
  scroll-margin-top: 1.5rem;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.35rem, 1.05rem + 1.5vw, 2.25rem);
  letter-spacing: var(--sperrung-gross);
  font-weight: 400;
}

h2 {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  letter-spacing: var(--sperrung-mittel);
}

h3 {
  font-size: clamp(0.95rem, 0.92rem + 0.2vw, 1.05rem);
  letter-spacing: var(--sperrung-klein);
  font-weight: 600;
}

p {
  margin: 0 0 1.4em;
  max-width: var(--breite-text);
}

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

/* Unterzeile unter einer Ueberschrift, z. B. "Anno 1993".
   max-width: none, damit die Zeile der Ausrichtung ihres Bereichs folgt
   und nicht von der allgemeinen Textbreite fuer Absaetze begrenzt wird. */
.unterzeile {
  margin: 1rem 0 0;
  max-width: none;
  color: var(--grau);
  font-size: 0.78rem;
  letter-spacing: var(--sperrung-mittel);
  text-transform: uppercase;
}

/* Textlinks im Fliesstext */
.inhalt a,
.rechtstext a {
  color: var(--schwarz);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--linie);
  transition: text-decoration-color 0.25s ease;
}

.inhalt a:hover,
.rechtstext a:hover {
  text-decoration-color: var(--schwarz);
}


/* ===================================================================
   5. KOPFBEREICH UND NAVIGATION
   -------------------------------------------------------------------
   Die Navigation ist auf allen Seiten identisch. Soll ein Menuepunkt
   geaendert werden, muss das in JEDER .html-Datei gemacht werden.
   =================================================================== */

.kopf {
  padding: calc(clamp(1.5rem, 4vw, 2.75rem) + env(safe-area-inset-top, 0px)) var(--seitenrand) 0;
}

/* Kleines Logo ueber der Navigation (nur auf den Unterseiten) */
.kopf__logo {
  display: block;
  width: fit-content;
  margin: 0 auto clamp(1.25rem, 3vw, 2rem);
}

.kopf__logo img {
  width: clamp(5.5rem, 14vw, 8rem);
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav__liste li + li {
  border-left: 1px solid var(--linie);
}

.nav__liste a {
  display: block;
  padding: 0.35em 1.1em;
  font-size: 0.72rem;
  letter-spacing: var(--sperrung-mittel);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--grau);
  transition: color 0.25s ease;
}

.nav__liste a:hover {
  color: var(--schwarz);
}

/* Aktuelle Seite: schwarz und fein unterstrichen */
.nav__liste a[aria-current="page"] {
  color: var(--schwarz);
  position: relative;
}

.nav__liste a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 1.1em;
  right: 1.1em;
  bottom: 0.05em;
  border-bottom: 1px solid var(--schwarz);
}

/* Burger-Schalter — nur auf schmalen Bildschirmen sichtbar */
.nav__schalter {
  display: none;
  background: none;
  border: 0;
  padding: 0.6rem;
  cursor: pointer;
  color: var(--schwarz);
}

.nav__balken,
.nav__balken::before,
.nav__balken::after {
  display: block;
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav__balken::before,
.nav__balken::after {
  content: "";
  position: relative;
}

.nav__balken::before { top: -0.44rem; }
.nav__balken::after  { top:  0.4rem; }

/* Geoeffnetes Menue: Balken werden zum Kreuz */
.nav__schalter[aria-expanded="true"] .nav__balken {
  background: transparent;
}

.nav__schalter[aria-expanded="true"] .nav__balken::before {
  transform: translateY(0.44rem) rotate(45deg);
}

.nav__schalter[aria-expanded="true"] .nav__balken::after {
  transform: translateY(-0.4rem) rotate(-45deg);
}

@media (max-width: 40em) {
  .nav__schalter {
    display: block;
  }

  .nav__liste {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    border-top: 1px solid var(--linie);
  }

  .nav__liste--offen {
    display: flex;
  }

  .nav__liste li + li {
    border-left: 0;
  }

  .nav__liste li {
    border-bottom: 1px solid var(--linie);
    text-align: center;
  }

  .nav__liste a {
    padding: 0.95em 1em;
  }

  .nav__liste a[aria-current="page"]::after {
    display: none;
  }

  .nav__liste a[aria-current="page"] {
    font-weight: 500;
  }
}


/* ===================================================================
   6. FUSSBEREICH
   =================================================================== */

.fuss {
  margin-top: auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--seitenrand) calc(clamp(1.75rem, 4vw, 2.5rem) + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.fuss__liste {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0;
}

.fuss__liste li + li {
  border-left: 1px solid var(--linie);
}

.fuss__liste a {
  display: block;
  padding: 0 1em;
  font-size: 0.68rem;
  letter-spacing: var(--sperrung-klein);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--grau);
  transition: color 0.25s ease;
}

.fuss__liste a:hover {
  color: var(--schwarz);
}

.fuss__name {
  margin: 0;
  max-width: none;
  color: var(--grau);
  font-size: 0.65rem;
  letter-spacing: var(--sperrung-klein);
  text-transform: uppercase;
}


/* ===================================================================
   7. STARTSEITE
   -------------------------------------------------------------------
   Bewusst nur Logo und Vereinsname, vertikal mittig. Das ist eine
   Entscheidung des Vereins — bitte hier nichts ergaenzen.
   =================================================================== */

.start {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 8vw, 5rem) var(--seitenrand);
}

.start__inner {
  text-align: center;
  animation: auftritt 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.start__logo {
  width: min(74vw, 26rem);
  max-height: 44vh;
  object-fit: contain;
  margin: 0 auto;
}

.start__name {
  margin: clamp(1.75rem, 5vw, 2.75rem) 0 0;
  max-width: none;
  font-size: clamp(0.7rem, 0.6rem + 0.5vw, 0.95rem);
  font-weight: 400;
  letter-spacing: var(--sperrung-gross);
  text-transform: uppercase;
  line-height: 1.8;
}

@keyframes auftritt {
  from { opacity: 0; transform: translateY(0.9rem); }
  to   { opacity: 1; transform: none; }
}


/* ===================================================================
   8. SEITENAUFBAU DER UNTERSEITEN
   =================================================================== */

.inhalt {
  flex: 1;
  width: 100%;
  max-width: var(--breite-seite);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--seitenrand) 0;
}

/* Seitenkopf: Ueberschrift plus optionale Unterzeile */
.seitenkopf {
  margin-bottom: var(--abschnitt);
  text-align: center;
}

/* Ein Abschnitt innerhalb einer Seite */
.abschnitt + .abschnitt {
  margin-top: var(--abschnitt);
  padding-top: var(--abschnitt);
  border-top: 1px solid var(--linie);
}

/* Abschnittsüberschriften stehen mittig — wie Menü, Seitentitel und
   Fussbereich. So bleibt die Seite durchgehend symmetrisch. */
.abschnitt__titel {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

/* Fliesstext mit angenehmer Zeilenlaenge, zentriert im Satzspiegel */
.fliesstext {
  max-width: var(--breite-text);
  margin-inline: auto;
  overflow-wrap: break-word;
}

.fliesstext p {
  max-width: none;
}


/* ===================================================================
   9. VERANSTALTUNGEN
   =================================================================== */

/* Die Seite "Veranstaltungen" besteht nur aus dem Instagram-Verweis.
   Eine eigene Terminliste gibt es bewusst nicht — die Termine stehen
   ausschliesslich auf Instagram und sollen nicht doppelt gepflegt werden. */

/* --- Instagram-Hinweis und Zwei-Klick-Loesung --- */
.instagram__text {
  margin-inline: auto;
  text-align: center;
}

.ig-feed {
  margin-top: 2.5rem;
}

.ig-vorschau {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1.25rem, 5vw, 2.5rem);
  border: 1px solid var(--linie);
}

.ig-vorschau__symbol {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--schwarz);
}

.ig-vorschau__hinweis {
  max-width: 30rem;
  margin: 0;
  color: var(--grau);
  font-size: 0.88rem;
}

/* Der geladene Feed */
.ig-rahmen {
  border: 1px solid var(--linie);
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  aspect-ratio: 3 / 4;
  display: block;
}

/* --- Knopf (einheitlich fuer die ganze Seite) --- */
.knopf {
  display: inline-block;
  padding: 0.95em 2.4em;
  background: var(--schwarz);
  color: var(--weiss);
  border: 1px solid var(--schwarz);
  font-size: 0.7rem;
  letter-spacing: var(--sperrung-mittel);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.knopf:hover {
  background: var(--weiss);
  color: var(--schwarz);
}

.knopf:active {
  background: var(--weiss);
  color: var(--schwarz);
  box-shadow: 0 0 0 2px var(--schwarz);
}

.knopf:disabled {
  opacity: 0.45;
  cursor: default;
}

.knopf:disabled:hover {
  background: var(--schwarz);
  color: var(--weiss);
  box-shadow: none;
}

.knopf--senden {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
}

.knopf__spinner {
  display: none;
  width: 0.85em;
  height: 0.85em;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: drehen 0.7s linear infinite;
  flex: none;
}

.knopf--laedt .knopf__spinner {
  display: block;
}

.knopf--laedt:disabled {
  opacity: 1;
  cursor: wait;
}

@keyframes drehen {
  to { transform: rotate(360deg); }
}


/* ===================================================================
   10. KONTAKT
   =================================================================== */

/* --- Vorstandsliste --- */
.vorstand {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 38rem;
  margin-inline: auto;
  border-top: 1px solid var(--linie);
}

.vorstand li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--linie);
  min-width: 0;
}

.vorstand__name,
.vorstand__funktion {
  min-width: 0;
}

.vorstand__name {
  color: var(--schwarz);
}

.vorstand__funktion {
  color: var(--grau);
  font-size: 0.78rem;
  letter-spacing: var(--sperrung-klein);
  text-transform: uppercase;
  align-self: center;
}

@media (max-width: 30em) {
  .vorstand li {
    flex-direction: column;
    gap: 0.15rem;
  }

  .vorstand__funktion {
    align-self: flex-start;
  }
}

/* --- Kontaktformular --- */
.formular {
  position: relative;
  max-width: 34rem;
  margin-inline: auto;
}

.feld {
  margin-bottom: 1.75rem;
}

.feld label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.68rem;
  letter-spacing: var(--sperrung-klein);
  text-transform: uppercase;
  color: var(--grau);
}

.feld input[type="text"],
.feld input[type="email"],
.feld textarea {
  width: 100%;
  padding: 0.8em 0.9em;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: 0;
  transition: border-color 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.feld input:hover,
.feld textarea:hover {
  border-color: var(--grau);
}

.feld input:focus,
.feld textarea:focus {
  border-color: var(--schwarz);
}

.feld textarea {
  min-height: 11rem;
  resize: vertical;
}

.feld [aria-invalid="true"] {
  border-color: var(--schwarz);
  border-width: 2px;
}

.feld__fehler {
  margin: 0.5rem 0 0;
  max-width: none;
  font-size: 0.82rem;
  color: var(--schwarz);
}

.feld__fehler::before {
  content: "\2192\00a0";   /* kleiner Pfeil, damit der Fehler nicht nur ueber Farbe erkennbar ist */
}

/* Einwilligungs-Checkbox: Label umschliesst das Kaestchen,
   damit der ganze Text ein gemeinsames Trefferfeld ist. */
.feld--zustimmung label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--schwarz);
  line-height: 1.6;
  cursor: pointer;
}

.feld--zustimmung input {
  margin: 0.42em 0 0;
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  accent-color: var(--schwarz);
}

/* Honigtopf gegen Spam-Bots: fuer Menschen unsichtbar (sr-only),
   aber nicht display:none, damit einfache Bots das Feld ausfuellen.
   Kein left:-9999px — das wuerde die Seite seitlich zum Wackeln bringen. */
.honigtopf {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Rueckmeldung nach dem Absenden */
.formular__status {
  margin: 1.5rem 0 0;
  max-width: none;
  font-size: 0.92rem;
  min-height: 1.6em;
}

.formular__status--fehler {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--schwarz);
}

.formular__status--erfolg {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--linie);
  color: var(--grau);
}


/* ===================================================================
   11. RECHTSTEXTE (Impressum, Datenschutz, 404)
   =================================================================== */

.rechtstext {
  max-width: var(--breite-text);
  margin-inline: auto;
  overflow-wrap: break-word;
}

.rechtstext h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.rechtstext h2:first-of-type {
  margin-top: 0;
}

.rechtstext h3 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.rechtstext p,
.rechtstext li {
  max-width: none;
}

.rechtstext ul {
  margin: 0 0 1.4em;
  padding-left: 1.2rem;
}

.rechtstext li {
  margin-bottom: 0.4em;
}

/* Adressblock, z. B. im Impressum */
.anschrift {
  margin: 0 0 1.4em;
  font-style: normal;
  line-height: 1.9;
}

/* 404-Seite */
.fehlerseite {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(3rem, 10vw, 6rem) var(--seitenrand);
}

.fehlerseite .knopf {
  margin-top: 2.5rem;
}


/* ===================================================================
   12. HILFSKLASSEN UND BEWEGUNG
   =================================================================== */

/* Nur fuer Screenreader sichtbar */
.nur-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Sprungmarke zum Inhalt (erscheint beim Tabben) */
.sprungmarke {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 10;
  padding: 0.7em 1.4em;
  background: var(--schwarz);
  color: var(--weiss);
  font-size: 0.72rem;
  letter-spacing: var(--sperrung-klein);
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.sprungmarke:focus {
  transform: translate(-50%, 0);
}

/* Sanftes Einblenden beim Scrollen.
   Die Klasse "einblenden-aktiv" setzt main.js erst, wenn der
   IntersectionObserver laeuft. Ohne JavaScript — oder bevor das
   Skript da ist — bleibt der Text sichtbar. */
.einblenden-aktiv .einblenden {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.einblenden-aktiv .einblenden.ist-sichtbar {
  opacity: 1;
  transform: none;
}

.ig-laden-hinweis {
  margin: 0 0 1.25rem;
  text-align: center;
  color: var(--grau);
  font-size: 0.88rem;
}

/* Wer im Betriebssystem weniger Bewegung eingestellt hat, bekommt keine. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .einblenden-aktiv .einblenden {
    opacity: 1;
    transform: none;
  }

  .knopf__spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.55;
  }
}
