/* ==========================================================================
   Gruselgarten Heidelberg – globales Stylesheet
   Quelltext des neuen Designs. Alle Werte sind bereits konsolidiert:
   die früheren Iterations-Durchläufe (Blur, Maske, translate, Augenradial)
   haben sich gegenseitig aufgehoben und sind hier nicht mehr enthalten.
   ========================================================================== */

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

:root {
  color-scheme: dark;
  --red: #d82c39;
  --red-soft: #ff6870;
  --paper: #e9e4dc;
  --muted: #b4aba5;
  --muted-dim: #8e8884;
  --line: #4e3136;
  --line-soft: #3a2c30;
  --surface: #171a20;
  --surface-2: #1c2027;
  --surface-3: #262a33;
  --void: #000;
  --deep: #080b10;
  --font-display: "Barlow Condensed", Impact, sans-serif;
  --font-body: Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font: 16px/1.55 var(--font-body);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

img {
  max-width: 100%;
}

section[id] {
  scroll-margin-top: 92px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--red);
  color: #fff;
  padding: 12px 18px;
  font: 800 15px var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.skip-link:focus {
  left: 0;
}

/* --- Header ------------------------------------------------------------- */

header {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  background: linear-gradient(#06080ceb, transparent);
  padding: 18px clamp(20px, 4vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Variante für Unterseiten: klebt am oberen Rand, hat einen soliden Grund. */
header.header-solid {
  position: sticky;
  top: 0;
  background: #080b10f2;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand img {
  width: 120px;
  height: 90px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.4vw, 37px);
}

.nav a {
  font: 700 17px var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--red-soft);
}

.nav .nav-cta {
  padding: 10px 18px;
  border: 1px solid var(--red);
  background: #9c1727;
}

.menu-toggle {
  display: none;
}

/* --- Buttons und Textlinks --------------------------------------------- */

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  appearance: none;
  border: 0;
  cursor: pointer;
  text-align: center;
  min-height: 53px;
  padding: 12px 26px;
  font: 800 17px var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--red);
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}

.button:hover {
  background: #fa4857;
  transform: translateY(-2px);
}

.button.outline {
  background: #0a0d12b8;
  border: 1px solid #b7a29b;
  color: var(--paper);
}

.button.outline:hover {
  background: #3d2528;
}

.button.whatsapp {
  background: #25d366;
  color: #062b16;
}

.button.whatsapp:hover {
  background: #22c55e;
}

.mail-link {
  color: var(--red-soft);
  border-bottom: 1px solid #7a2b33;
  overflow-wrap: anywhere;
}

.mail-link:hover {
  border-bottom-color: var(--red-soft);
}

/* --- Hero der Startseite ------------------------------------------------ */

.hero {
  min-height: max(690px, 100svh);
  position: relative;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  background: transparent;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  filter: none;
}

.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
      90deg,
      #080b1080 0%,
      #080b102b 38%,
      transparent 85%
    ),
    linear-gradient(0deg, #080b10 1%, transparent 65%);
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 170px clamp(24px, 8vw, 145px) 105px;
  max-width: 1000px;
}

.eyebrow {
  color: var(--red-soft);
  font: 800 17px var(--font-display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.intro {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  max-width: 580px;
  color: #e7dcd6;
  margin: 28px 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* --- Hero der Unterseiten ---------------------------------------------- */

.sub-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(84px, 11vw, 150px) clamp(24px, 8vw, 145px) clamp(56px, 7vw, 96px);
  background: var(--deep);
  border-bottom: 1px solid var(--line);
}

.sub-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Hochformatfotos: das Gesicht liegt oben und würde sonst weggeschnitten. */
.crop-top {
  object-position: center top;
}

/* Im breiten Hero muss der Ausschnitt zusätzlich nach unten wandern,
   sonst landet das Gesicht unter der unteren Gradientkante. */
.crop-head {
  object-position: center 12%;
}

.sub-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
      90deg,
      #080b10e6 0%,
      #080b10a6 40%,
      #080b104d 70%,
      #080b1026 100%
    ),
    linear-gradient(0deg, #000 2%, #000000a6 48%, #00000040 100%);
}

.sub-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
}

.display {
  margin: 14px 0 0;
  font: 900 clamp(3rem, 7.5vw, 7.4rem) / 0.86 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  text-shadow: 0 7px 26px #000a;
  overflow-wrap: break-word;
}

.lead {
  margin: 26px 0 0;
  max-width: 620px;
  color: #d8ccc6;
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  line-height: 1.65;
}

/* --- Sektionen ---------------------------------------------------------- */

main {
  overflow: hidden;
}

.stripe {
  background: #ad1928;
  padding: 16px clamp(24px, 8vw, 145px);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  font: 800 clamp(1rem, 2.2vw, 1.55rem) var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stripe span:last-child {
  font-size: 0.8em;
  opacity: 0.86;
}

.section {
  padding: clamp(70px, 9vw, 130px) clamp(24px, 8vw, 145px);
}

.section-tight {
  padding-block: clamp(50px, 6vw, 84px);
}

.section h2 {
  font: 900 clamp(3rem, 6vw, 6.7rem) / 0.9 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 13px 0 25px;
}

.section p {
  max-width: 620px;
  color: var(--muted);
}

/* --- Karten und Raster -------------------------------------------------- */

.card {
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: clamp(26px, 3vw, 40px);
}

.card-title {
  margin: 0 0 14px;
  color: var(--paper);
  font: 800 clamp(1.45rem, 2.4vw, 2.05rem) / 1.08 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

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

.card p strong {
  color: var(--paper);
}

/* Überschrift auf Kapitel- und Kartentiefe. */
.chapter-title {
  margin: 0 0 18px;
  color: var(--paper);
  font: 800 clamp(1.9rem, 3.4vw, 3.2rem) / 1.02 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 5px 18px #0008;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* In Karten ist weniger Platz, deshalb eine Stufe kleiner. */
.card .chapter-title {
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
}

.card-accent {
  border-left: 5px solid var(--red);
}

.card-wide {
  grid-column: 1 / -1;
}

.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* --- Textblöcke und Listen --------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.split + .split {
  margin-top: clamp(40px, 6vw, 80px);
}

.split > * {
  min-width: 0;
}

.media {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background: #0c0c11;
  border: 1px solid #5b363b;
  box-shadow: 20px 20px 0 #171117;
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prose p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 18px;
}

.list-diamond {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px 22px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.list-diamond li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  line-height: 1.6;
}

.list-diamond li::before {
  content: "\25C6";
  position: absolute;
  left: 0;
  color: var(--red-soft);
}

.address {
  font-style: normal;
  color: var(--paper);
}

.note {
  background: #0f1219;
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  padding: clamp(24px, 3vw, 38px);
  margin-top: 28px;
}

.note strong {
  display: block;
  color: var(--paper);
  font: 800 clamp(1.35rem, 2.2vw, 2rem) / 1.15 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* --- Startseite: Geschichte, Termine, Mitmachen ------------------------ */

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  align-items: center;
  background: var(--void);
}

.story-art {
  min-height: 470px;
  background: linear-gradient(0deg, #0c0c11db, transparent 60%),
    url("assets/haus-im-zweiten-abschnitt.jpg") center / cover;
  border: 1px solid #5b363b;
  box-shadow: 28px 28px 0 #171117;
  position: relative;
}

.story .button {
  margin-top: 18px;
}

.visit {
  border-top: 1px solid var(--line);
  background: var(--void);
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 38px 0;
}

.date-card {
  padding: 30px 34px;
  background: var(--surface);
  border-left: 5px solid var(--red);
}

.date-card strong {
  display: block;
  font: 900 clamp(2.1rem, 4vw, 4.4rem) / 1 var(--font-display);
}

.date-card span {
  display: block;
  color: #c5b9b4;
  margin-top: 7px;
}

.visit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.join {
  background: var(--void);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.join p {
  color: #f3dadd;
  margin-bottom: 0;
}

.join .button {
  background: #f2e9e3;
  color: #231419;
  white-space: nowrap;
}

.join .button:hover {
  background: #fff;
}

/* --- Stadtplan: Karte und Umschalter ----------------------------------- */

.map-frame {
  height: clamp(340px, 54vh, 560px);
  background: #0d1016;
  border: 1px solid var(--line);
  box-shadow: 20px 20px 0 #171117;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.segmented button {
  appearance: none;
  cursor: pointer;
  min-height: 42px;
  padding: 8px 18px;
  background: transparent;
  border: 0;
  color: #c5b9b4;
  font: 800 15px var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
}

.segmented button:hover {
  color: #fff;
  background: var(--surface-3);
}

.segmented button[aria-pressed="true"] {
  background: var(--red);
  color: #fff;
}

.card-click {
  appearance: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.card-click:hover {
  background: var(--surface-2);
  border-color: #7a2b33;
}

.card-click.is-active {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.map-pin {
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
}

.map-meta {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.map-meta strong {
  display: block;
  color: var(--paper);
  font-size: 1rem;
}

/* Leaflet auf das dunkle Theme umstellen */
.leaflet-container {
  background: #0d1016;
  font: var(--font-body);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface);
  color: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px #000b;
}

.leaflet-popup-content {
  margin: 18px 20px;
  color: var(--muted);
  line-height: 1.55;
}

.leaflet-popup-content h3 {
  margin: 0 0 10px;
  color: var(--red-soft);
  font: 800 20px / 1.1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.leaflet-popup-content p {
  margin: 0 0 6px;
}

.leaflet-popup-content strong {
  color: var(--paper);
}

.leaflet-popup-close-button {
  color: var(--muted) !important;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  background: var(--surface);
  color: var(--paper);
  border-bottom-color: var(--line-soft);
}

.leaflet-bar a:hover {
  background: var(--surface-3);
}

.leaflet-control-attribution {
  background: #0b0d12d9 !important;
  color: var(--muted-dim) !important;
  font-size: 11px;
}

.leaflet-control-attribution a {
  color: var(--muted) !important;
}

/* --- Footer ------------------------------------------------------------- */

footer {
  padding: 42px clamp(24px, 8vw, 145px);
  background: var(--void);
  color: #a9a3a2;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 26px clamp(24px, 4vw, 56px);
  align-items: center;
  justify-content: space-between;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.5vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a,
.footer-legal button {
  font: 800 16px var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c5b9b4;
}

.footer-nav a:hover,
.footer-legal button:hover {
  color: var(--red-soft);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.5vw, 30px);
}

.footer-legal button {
  appearance: none;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: inline-flex;
  color: #c5b9b4;
}

.footer-social a:hover {
  color: var(--red-soft);
}

.footer-copy {
  width: 100%;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid #241a1d;
  color: var(--muted-dim);
  font-size: 15px;
}

/* --- Modals ------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: #000000cc;
}

.modal-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 60px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: #0f1219;
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  padding: clamp(28px, 4vw, 52px);
  box-shadow: 0 30px 80px #000c;
}

.modal-card h2 {
  margin: 0 0 26px;
  color: var(--paper);
  font: 900 clamp(1.7rem, 2.7vw, 2.5rem) / 1.05 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.modal-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.modal-card strong {
  color: var(--paper);
}

.modal-card a {
  color: var(--red-soft);
}

.modal-card a:hover {
  text-decoration: underline;
}

.modal-card address {
  font-style: normal;
}

.modal-close {
  margin-top: 26px;
}

/* --- Bild-Überschriften der Startseite --------------------------------- */

.base-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.04em;
  max-width: 520px;
}

.base-heading img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 95px;
  object-fit: contain;
  object-position: left center;
}

.hero-title {
  max-width: 440px;
}

.hero-title img {
  max-height: 110px;
}

.join .base-heading {
  max-width: 500px;
}

/* --- Bewegungsreduktion ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}

/* --- Mobil -------------------------------------------------------------- */

@media (max-width: 900px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  header {
    padding: 12px 20px;
  }

  header.header-solid {
    padding: 12px 20px;
  }

  .brand img {
    width: 90px;
    height: 68px;
  }

  .menu-toggle {
    display: block;
    border: 1px solid #9d8182;
    background: #13151a;
    color: #fff;
    padding: 8px 13px;
    font: 700 17px var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .nav {
    display: none;
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    padding: 24px;
    background: #0b0d12;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .hero {
    min-height: max(760px, 100svh);
    align-items: flex-end;
  }

  .hero:after {
    background: linear-gradient(0deg, #080b10 0%, #080b104d 47%, transparent 100%);
  }

  .hero-content {
    width: 100%;
    padding: 170px 26px 88px;
  }

  .hero-title {
    max-width: min(100%, 350px);
    gap: 8px;
    margin: 22px 0;
  }

  .intro {
    font-size: 1.08rem;
    line-height: 1.7;
    margin: 26px 0 32px;
  }

  .section {
    padding: 86px 26px;
  }

  .section h2 {
    margin: 20px 0 30px;
  }

  .section p,
  .prose p {
    line-height: 1.75;
    margin: 0 0 18px;
  }

  .story {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .story-art {
    min-height: 420px;
    box-shadow: 12px 12px 0 #171117;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split + .split {
    margin-top: 40px;
  }

  .media {
    min-height: 260px;
    box-shadow: 12px 12px 0 #171117;
  }

  .card-grid.cols-2,
  .card-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .visit-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 40px 0;
  }

  .date-card {
    padding: 28px;
  }

  .join {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .join .button {
    white-space: normal;
  }

  .sub-hero {
    padding: 78px 26px 52px;
  }

  .map-frame {
    height: 60vh;
    min-height: 320px;
    box-shadow: 12px 12px 0 #171117;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding-inline: 24px;
  }

  .actions,
  .visit-links {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .actions .button,
  .visit-links .button,
  .join .button {
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    text-align: center;
    white-space: normal;
  }

  .stripe {
    gap: 8px;
    padding: 22px 26px;
    line-height: 1.3;
  }

  .stripe span:last-child {
    font-size: 0.9em;
  }

  footer {
    padding: 44px 26px;
    line-height: 1.7;
  }
}