/* ==========================================================================
   Energie-Erlebnis-Camp Gleisdorf
   Handgeschriebenes Stylesheet. Ersetzt Astra + Elementor + Jetpack.
   Werte (Farben, Groessen, Abstaende) sind aus der alten Seite gemessen.
   ========================================================================== */

/* --- Schriften -------------------------------------------------------- */
/* Beides Variable Fonts (wght 100-900), je eine Datei fuer latin und latin-ext. */

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/jost-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/jost-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/roboto-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/roboto-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Design-Tokens ---------------------------------------------------- */

:root {
  --ink: #1e1810;          /* Ueberschriften */
  --body: #62615c;         /* Fliesstext */
  --ink-strong: #000;      /* Kopf-/Fusszeile */
  --accent: #f9c349;       /* Button */
  --accent-hover: #f0b429;
  --accent-text: #ffb100;  /* grosse Hero-Ueberschrift */
  --nav-active: #2c541d;
  --surface: #fafafa;      /* Team-Abschnitt */
  --panel: #f8f7f3;        /* Galerie-Karte */
  --card: #fff;
  --card-glass: rgba(255, 255, 255, 0.71);
  --line: #d5d8dc;

  --font-display: 'Jost', 'Trebuchet MS', sans-serif;
  --font-body: 'Roboto', 'Helvetica Neue', Arial, sans-serif;

  --container: 1180px;   /* 1140px Inhalt + 2x20px Rand */
  --gutter: 20px;

  --shadow-card: 0 10px 20px rgba(0, 0, 0, 0.1);
  --shadow-lift: 0 18px 34px rgba(30, 24, 16, 0.14);
  --thread: #e8b13a;         /* Roter Faden auf der Vorstellungsseite */
  --thread-faint: rgba(249, 195, 73, 0.3);
}

/* --- Grundlagen ------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}

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

button { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Die Galerieseiten sind etwas breiter als der Rest. */
.container--wide { max-width: 1240px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

/* --- Kopfzeile -------------------------------------------------------- */

/* Schlanke, mitlaufende Leiste: Logo links, Menue rechts.
   Beim Scrollen schrumpft sie leicht und bekommt eine Kante. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header[data-scrolled='true'] {
  border-bottom-color: rgba(30, 24, 16, 0.08);
  box-shadow: 0 1px 18px rgba(30, 24, 16, 0.07);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 11px var(--gutter);
  transition: padding 0.25s ease;
}

.site-header[data-scrolled='true'] .site-header__inner { padding-block: 5px; }

.site-logo {
  display: block;
  line-height: 0;
  flex: none;
}
.site-logo img {
  width: auto;
  height: 52px;
  transition: height 0.25s ease;
}
.site-header[data-scrolled='true'] .site-logo img { height: 42px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 8px 15px;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-strong);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

/* Feiner Strich, der von links einfaehrt. */
.main-nav a::after {
  content: '';
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible { color: var(--nav-active); }
.main-nav a:hover::after,
.main-nav a:focus-visible::after { transform: scaleX(1); }

.main-nav [aria-current='page'] { color: var(--nav-active); }
.main-nav [aria-current='page']::after {
  background: var(--nav-active);
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span:not(.visually-hidden) {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-strong);
  transition: transform 0.25s ease, opacity 0.18s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Ankersprung darf nicht unter der Leiste landen. */
[id] { scroll-margin-top: 90px; }

/* --- Bild-Abschnitte mit Overlay -------------------------------------- */

.band {
  position: relative;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0.5;
  z-index: -1;
}
.band--dark::before { background: #000; }
.band > * { position: relative; }

/* --- Startseite: Hero ------------------------------------------------- */

.hero {
  background-image: url('/images/2023/10/IMG_0054-scaled-e1696617393961-768x361.jpg');
  background-position: left top;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 50px 0 20px;
}

.hero__col--offset { margin-top: 168px; }

.glass {
  background: var(--card-glass);
  padding: 10px;
}
.glass > img { width: 100%; }

.glass--top    { border-radius: 100px 100px 2px 2px; }
.glass--top > img { border-radius: 100px 100px 0 2px; }
.glass--bottom { border-radius: 0 2px 100px 100px; }
.glass--bottom > img { border-radius: 0 0 100px 100px; }
.glass--side   { border-radius: 0 50px 50px 0; }
.glass--side > img { border-radius: 0 50px 48px 0; }

.glass h2,
.glass h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  margin: 20px 0;
}

.glass p { margin-bottom: 0; }

.glass .video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.glass .video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.text-right { text-align: right; }

/* --- Team ------------------------------------------------------------- */

.team {
  background: var(--surface);
  padding: 80px 0 100px;
}

.team__title {
  font-size: 41px;
  line-height: 1.3;
  text-align: center;
  margin-bottom: 20px;
}

.team__intro {
  text-align: center;
  max-width: 1140px;
  margin: 0 auto 45px;
}

.team__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px 60px;
  align-items: start;
  padding-inline: 30px;
}

.team__col {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.member {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 15px;
}

.member img {
  width: 140px;
  flex: none;
  border-radius: 70% 50% 60% 40%;
}
.member--alt img { border-radius: 45% 50% 60% 40%; }

.member__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 5px;
}

.member__role {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  color: var(--body);
  margin-bottom: 12px;
}

.member__quote {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

/* --- Aufruf zur Anmeldung --------------------------------------------- */

.cta {
  background-image: url('/images/2023/10/IMG_0144-scaled.jpg');
  padding: 100px 0 140px;
  text-align: center;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 22px 46px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(184, 133, 20, 0.35);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.button:hover,
.button:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(184, 133, 20, 0.45);
}

.cta__lead {
  padding: 60px 0 0;
  text-align: center;
}
.cta__lead h2 {
  font-size: 41px;
  line-height: 1.3;
  margin-bottom: 20px;
}

/* --- Fusszeile -------------------------------------------------------- */

.site-footer {
  background: #fff;
  border-top: 1px solid rgba(30, 24, 16, 0.09);
  padding: 32px 0;
  color: var(--ink-strong);
  font-size: 15px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a {
  display: block;
  padding: 3px 16px 3px 0;
  line-height: 1.7;
  text-decoration: none;
  transition: color 0.18s ease;
}
.footer-nav a:hover { color: var(--nav-active); }

.site-footer__logo { line-height: 0; }
.site-footer__logo img { width: auto; height: 54px; }

.sponsor { text-align: right; }
.sponsor p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--body);
}
.sponsor__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

/* --- Vorstellung ------------------------------------------------------ */

.page-hero {
  background-image: url('/images/2023/11/IMG_0649-scaled.jpg');
  background-position: center bottom;
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.page-hero h1 {
  font-size: 70px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 8.5px;
  text-transform: uppercase;
  text-align: center;
  color: var(--accent-text);
}

/* Geschichte: gleicher Kopf, etwas flacher, mit Zeile darueber und darunter. */
.page-hero--history {
  background-image: url('/images/2023/11/IMG_0232-scaled.jpg');
  background-position: center 62%;
  min-height: 440px;
}

.page-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  margin: 0 0 16px;
}

.page-hero__note {
  max-width: 46ch;
  margin: 20px auto 0;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
}

/* Roter Faden: eine durchgehende Linie in der Blattmitte, an der die
   Kapitel wie Perlen haengen. Der gefuellte Teil waechst beim Scrollen. */

.thread {
  position: relative;
  padding: 40px 0 10px;
}

.thread__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--thread-faint);
  overflow: hidden;
}
.thread__line::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--thread-progress, 0%);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--thread));
}

.thread__step { position: relative; }

/* Knoten am Faden, auf Hoehe der Abschnittsmitte. */
.thread__step::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 15px;
  height: 15px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--thread);
  box-shadow: 0 0 0 6px #fff;
}

.thread__title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 16px;
}
.thread__title::before {
  content: '';
  display: block;
  width: 46px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 70px;
  padding: 55px 0;
}

.split__text  { max-width: 470px; grid-row: 1; grid-column: 1; margin-left: auto; }
.split__image { grid-row: 1; grid-column: 2; }
.split--flip .split__text  { grid-column: 2; margin-left: 0; margin-right: auto; }
.split--flip .split__image { grid-column: 1; }
.split img {
  width: 100%;
  border-radius: 90px 24px 90px 24px;
  box-shadow: var(--shadow-card);
}
.split--flip img { border-radius: 24px 90px 24px 90px; }

/* Abschluss des Fadens: ein gefuellter Knoten unter dem letzten Kapitel. */
.thread__end {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 17px;
  height: 17px;
  margin: 0 0 -8px -8px;
  border-radius: 50%;
  background: var(--thread);
  box-shadow: 0 0 0 6px #fff, 0 0 0 12px var(--thread-faint);
}

.pull-quote {
  max-width: 880px;
  margin-inline: auto;
  padding: 78px 0 70px;
}
.pull-quote h2 {
  font-size: 36px;
  line-height: 1.35;
  text-align: center;
}

/* --- Geschichte ------------------------------------------------------- */
/* Die Seite ist ein Verzeichnis der Jahre. Der Faden von der Vorstellung
   laeuft hier durch alle Jahrzehnte weiter: die Jahrzehnte sind Knoten
   daran, die Jahre haengen als Zeilen daneben. */

.history-intro {
  max-width: 58ch;
  padding: 64px 0 46px;
}
.history-intro p {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

.chronik {
  /* Mitte des Fadens, vom linken Rand der Chronik aus gemessen.
     Alles, was am Faden haengt, richtet sich danach aus. */
  --rope: 175px;
  position: relative;
  padding-bottom: 26px;
}

/* Der Faden liegt in der Spalte zwischen Jahrzehnt (150px) und Jahren. */
.chronik__line {
  position: absolute;
  left: var(--rope);
  margin-left: -1px;
  top: 6px;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--thread-faint);
  overflow: hidden;
}
.chronik__line::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--thread-progress, 0%);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--thread));
}

/* Gefuellter Knoten am unteren Ende - hier endet die Chronik. */
.chronik__end {
  position: absolute;
  left: var(--rope);
  bottom: 0;
  width: 17px;
  height: 17px;
  margin: 0 0 -8px -8.5px;
  border-radius: 50%;
  background: var(--thread);
  box-shadow: 0 0 0 6px #fff, 0 0 0 12px var(--thread-faint);
}

.decade {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0 48px;
  padding-bottom: 54px;
}
.decade:last-of-type { padding-bottom: 30px; }

/* Der Kopf bleibt stehen, solange sein Jahrzehnt laeuft. */
.decade__head {
  position: sticky;
  top: 104px;
  align-self: start;
  text-align: right;
  padding-top: 12px;
}
.decade__head::after {
  content: '';
  position: absolute;
  left: var(--rope);
  top: 28px;
  width: 15px;
  height: 15px;
  margin: -7.5px 0 0 -7.5px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--thread);
  box-shadow: 0 0 0 6px #fff;
}

.decade__name {
  font-size: 33px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.5px;
}
.decade__count {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--body);
  margin: 10px 0 0;
}

.years {
  list-style: none;
  margin: 0;
  padding: 0;
}
.years li + li { border-top: 1px solid rgba(30, 24, 16, 0.08); }

.year__row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: 0;
  border-radius: 12px;
  text-align: left;
  text-decoration: none;
  color: inherit;
}

.year__num {
  flex: none;
  width: 60px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  color: #8a6a15;
}

.year__motto {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}

/* Nur Jahre mit Fotos reagieren - der Rest bleibt ruhige Liste. */
a.year__row,
button.year__row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}
a.year__row:hover,
a.year__row:focus-visible,
button.year__row:hover,
button.year__row:focus-visible { background: #faf7ef; }

.year__chip {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid rgba(44, 84, 29, 0.25);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--nav-active);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.year__chip::after {
  content: '\2192';
  font-size: 14px;
  letter-spacing: 0;
  transition: transform 0.2s ease;
}
.year__chip--open::after { content: '\25BE'; }
[aria-expanded='true'] .year__chip--open::after { transform: rotate(180deg); }

.year__row:hover .year__chip,
.year__row:focus-visible .year__chip {
  background: var(--accent);
  border-color: transparent;
  color: var(--ink);
}
a.year__row:hover .year__chip::after { transform: translateX(3px); }

.year__panel { padding: 2px 16px 20px; }
.year__panel[hidden] { display: none; }

.year__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.year__gallery a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
}
.year__gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity 0.2s ease, transform 0.4s ease;
}
.year__gallery a:hover img { opacity: 0.9; transform: scale(1.04); }

/* Schlusswort, buendig mit der Jahresspalte. */
.chronik-outro {
  margin-left: 198px;
  padding: 30px 0 0;
}
.chronik-outro p {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 6px;
}
.chronik-outro__link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--nav-active);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
  transition: border-color 0.2s ease;
}
.chronik-outro__link:hover,
.chronik-outro__link:focus-visible { border-bottom-color: var(--nav-active); }

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

.panel {
  background: var(--panel);
  border-radius: 28px;
  padding: 56px 56px 64px;
  margin: 48px 0 72px;
}

.panel h1 {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}

.panel__lead {
  max-width: 60ch;
  margin-bottom: 34px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}

.gallery-teaser {
  display: block;
  text-decoration: none;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-teaser:hover,
.gallery-teaser:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.gallery-teaser figure { margin: 0; }

.gallery-teaser__media {
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.gallery-teaser img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-teaser:hover img,
.gallery-teaser:focus-visible img { transform: scale(1.05); }

.gallery-teaser figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 18px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.gallery-teaser figcaption::after {
  content: '\2192';
  color: var(--thread);
  transition: transform 0.25s ease;
}
.gallery-teaser:hover figcaption::after { transform: translateX(4px); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.photo-grid a { display: block; border-radius: 10px; overflow: hidden; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity 0.2s ease, transform 0.4s ease;
}
.photo-grid a:hover img { opacity: 0.9; transform: scale(1.04); }

/* --- Lightbox --------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  display: grid;
  place-items: center;
  padding: 40px 60px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
}
.lightbox__btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  padding: 12px;
  cursor: pointer;
  opacity: 0.7;
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__btn--close { top: 8px; right: 12px; }
.lightbox__btn--prev  { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next  { right: 8px; top: 50%; transform: translateY(-50%); }

/* --- Einblenden beim Scrollen ------------------------------------------ */
/* Nur wenn JavaScript laeuft - ohne JS ist alles sofort sichtbar. */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Responsiv -------------------------------------------------------- */

@media (max-width: 1200px) {
  .panel { padding: 44px 40px 52px; }
}

@media (max-width: 921px) {
  .site-header__inner { padding: 8px var(--gutter); }
  .site-logo img { height: 44px; }
  .site-header[data-scrolled='true'] .site-logo img { height: 38px; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 26px rgba(30, 24, 16, 0.09);
    padding: 4px var(--gutter) 12px;
  }
  .main-nav[data-open='false'] { display: none; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 13px 4px; font-size: 17px; }
  .main-nav a::after { display: none; }
  .main-nav li + li a { border-top: 1px solid var(--line); }
  .main-nav [aria-current='page'] { font-weight: 700; }

  .hero__grid { grid-template-columns: 1fr; gap: 25px; padding: 30px 0; }
  .hero__col--offset { margin-top: 0; }
  .glass--side { border-radius: 0 50px 50px 0; }

  .team { padding: 50px 0 60px; }
  .team__title { font-size: 32px; }
  .team__grid { grid-template-columns: 1fr; gap: 25px; padding-inline: 0; }

  /* Faden wandert an den linken Rand, Kapitel stapeln sich daneben. */
  .thread { padding-left: 34px; }
  .thread__line { left: 7px; margin-left: 0; }
  .thread__end { left: 7px; margin-left: -8.5px; }
  /* Das Kapitel beginnt erst hinter der Einrueckung - der Knoten muss
     um genau diese 34px wieder heraus, sonst haengt er neben dem Faden. */
  .thread__step::before { left: -33.5px; top: 44px; margin-left: 0; }

  .split { grid-template-columns: 1fr; gap: 25px; padding: 34px 0; }
  /* Einspaltig: grid-row muss zurueckgesetzt werden, sonst landen Text und
     Bild beide in Zeile 1 derselben Spalte und liegen uebereinander. */
  .split__text,
  .split__image,
  .split--flip .split__text,
  .split--flip .split__image { grid-column: 1; grid-row: auto; }
  .split__text { max-width: none; margin: 0; }
  .split img { border-radius: 46px 16px 46px 16px; }
  .split--flip img { border-radius: 16px 46px 16px 46px; }
  .thread__title { font-size: 25px; }

  .page-hero { min-height: 380px; }
  .page-hero--history { min-height: 320px; }
  .page-hero h1 { font-size: 38px; letter-spacing: 4px; }
  .page-hero__eyebrow { font-size: 12px; letter-spacing: 2.4px; }
  .page-hero__note { font-size: 17px; }

  .pull-quote h2,
  .cta__lead h2 { font-size: 30px; }
  .pull-quote { padding: 50px 0; }

  /* Chronik: Faden an den linken Rand, Jahrzehnt ueber seine Jahre. */
  .history-intro { padding: 40px 0 28px; }
  .history-intro p { font-size: 19px; }

  .chronik { --rope: 8px; }

  .decade {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 34px;
    padding-bottom: 36px;
  }
  .decade__head {
    position: relative;
    top: auto;
    text-align: left;
    padding: 2px 0 10px;
  }
  /* Der Kopf ist mobil um 34px eingerueckt - der Knoten wieder heraus. */
  .decade__head::after { left: calc(var(--rope) - 34px); top: 15px; }
  .decade__name { font-size: 26px; }

  .year__row { gap: 16px; padding: 13px 8px; }
  .year__num { width: 52px; font-size: 18px; }
  .year__motto { font-size: 19px; }
  .year__chip { padding: 6px 12px; font-size: 11px; letter-spacing: 1.2px; }
  .year__panel { padding-inline: 8px; }

  .chronik-outro { margin-left: 34px; }
  .chronik-outro p { font-size: 19px; }

  .cta { padding: 60px 0 90px; }
  .button { padding: 19px 34px; letter-spacing: 2px; }

  .panel { padding: 32px 24px 40px; margin: 28px 0 44px; border-radius: 20px; }
  .panel h1 { font-size: 28px; }

  .site-footer { padding: 28px 0; }
  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .footer-nav ul { justify-content: center; }
  .footer-nav a { padding-inline: 9px; }
  .sponsor { text-align: center; }
}

@media (max-width: 600px) {
  .photo-grid,
  .year__gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .member { flex-direction: column; text-align: center; }
  .page-hero h1 { font-size: 30px; letter-spacing: 3px; }
  .lightbox { padding: 20px; }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
