@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f2ea;
  --bg-soft: #efe9de;
  --ink: #3f4a42;
  --sage: #8a9a8c;
  --sage-dark: #6f7f71;
  --line: #d9d2c4;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    url("img/deko-stern.svg"),
    url("img/deko-welle.svg"),
    url("img/deko-staender.svg"),
    url("img/deko-stern.svg"),
    url("img/deko-welle.svg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position:
    6vw 14vh,
    calc(100% - 6vw) 52vh,
    3vw 80vh,
    calc(100% - 9vw) 22vh,
    5vw 50vh;
  background-size: 90px, 120px, 220px, 60px, 90px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

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

.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Körnung / Sand-Struktur über der ganzen Seite (rein dekorativ) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.4  0 0 0 0 0.35  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 300px 300px;
}

.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;
}

/* Header */
header {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}
header .logo {
  display: block;
  max-width: 460px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}
nav {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}
nav a {
  text-decoration: none;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  transition: background 0.15s, color 0.15s;
}
nav a:hover { background: var(--sage); color: var(--bg); }

/* Content */
main { padding: 1rem 0 1rem; }

h1, h2, h3 {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  color: var(--sage-dark);
  letter-spacing: 0.01em;
  font-weight: 400;
  line-height: 1.2;
}
h1 { font-size: 2.4rem; margin: 0 0 1rem; }
h2 {
  font-size: 1.9rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
h3 { font-size: 1.35rem; margin: 1.5rem 0 0.4rem; }

.intro {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-weight: 400;
  color: var(--sage-dark);
  font-size: 1.5rem;
  line-height: 1.35;
  text-align: center;
  max-width: 560px;
  margin: 0.75rem auto 0;
}

/* Termine */
.termine { list-style: none; padding: 0; margin: 0; }
.termin {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px dashed var(--line);
}
.termin:last-child { border-bottom: none; }
.termin .datum {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  text-align: center;
  background: var(--sage);
  color: var(--bg);
  border-radius: 6px;
  padding: 0.6rem 0.4rem;
  line-height: 1.15;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.termin .datum .tag { display: block; font-size: 2.2rem; font-weight: 400; }
.termin .datum .monat { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.termin .titel { font-family: "Fredoka", "Trebuchet MS", sans-serif; font-weight: 400; font-size: 1.4rem; line-height: 1.2; margin: 0 0 0.3rem; }
.termin p { margin: 0.15rem 0; line-height: 1.45; }
.termin .meta { color: var(--sage-dark); font-size: 0.95rem; }
.termin .ort { font-size: 0.95rem; }
.folgt { color: var(--sage-dark); font-size: 0.95rem; margin: 0.75rem 0 0; }
.termin .ort a {
  color: var(--sage-dark);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.termin .ort a:hover { color: var(--ink); text-decoration-color: var(--sage); }

.hinweis {
  background: var(--bg-soft);
  border-left: 3px solid var(--sage);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
}

/* Galerie (Masonry via CSS columns) */
.galerie {
  columns: 3;
  column-gap: 0.75rem;
  margin: 1.25rem 0;
}
.galerie img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  break-inside: avoid;
}
.galerie-video {
  position: relative;
  break-inside: avoid;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}
.galerie-video video { display: block; width: 100%; height: auto; }
.galerie-video .play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: rgba(63, 74, 66, 0.18);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.galerie-video .play svg {
  width: 64px; height: 64px;
  padding: 16px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.galerie-video .play:hover { background: rgba(63, 74, 66, 0.28); }
.galerie-video .play:hover svg { transform: scale(1.08); }
.galerie-video .play:focus-visible { outline: 3px solid var(--sage-dark); outline-offset: -3px; }
.galerie-video.playing .play { display: none; }
@media (max-width: 520px) {
  .galerie { columns: 2; column-gap: 0.5rem; }
  .galerie img, .galerie-video { margin-bottom: 0.5rem; }
  .galerie-video .play svg { width: 48px; height: 48px; padding: 12px; }
}

/* Footer */
footer {
  margin-top: 3rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  text-align: center;
  color: var(--sage-dark);
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
}
footer a { margin: 0 0.8rem; text-decoration: none; font-size: 1.05rem; }
footer a:hover { text-decoration: underline; }
footer p { margin: 1.25rem 0 0; font-size: 0.85rem; opacity: 0.8; }

@media (max-width: 1100px) {
  body { background-image: none; }
}

@media (max-width: 520px) {
  .termin { grid-template-columns: 80px 1fr; gap: 0.9rem; }
  .termin .datum .tag { font-size: 1.5rem; }
  body { font-size: 1rem; }
}

/* Fun-Element im Footer */
.fun {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.2s;
}
.fun img { display: block; width: 56px; height: 56px; opacity: 0.9; }
.fun { display: block; margin: 0 auto 1rem; }
.fun:hover { transform: scale(1.15) rotate(15deg); }
.fun.spin { animation: fun-spin 0.7s cubic-bezier(.3,1.4,.5,1); }
@keyframes fun-spin {
  from { transform: rotate(0) scale(1); }
  50%  { transform: rotate(200deg) scale(1.4); }
  to   { transform: rotate(360deg) scale(1); }
}
.funkel {
  position: fixed;
  z-index: 10;
  color: var(--sage);
  pointer-events: none;
  animation: funkel 1s ease-out forwards;
}
@keyframes funkel {
  from { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  to   { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 80px)) scale(1) rotate(180deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fun.spin, .funkel { animation: none; }
  .funkel { display: none; }
}


/* Karikatur unten rechts (erscheint per Klick auf den Stern) */
.karikatur {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: 220px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.3,1.3,.5,1);
}
.karikatur.show { pointer-events: auto; }
.karikatur-btn { display: block; width: 100%; background: none; border: none; padding: 0; cursor: pointer; line-height: 0; }
.karikatur-btn:focus-visible { outline: 3px solid var(--sage-dark); outline-offset: 2px; }
.karikatur img { display: block; width: 100%; height: auto; }
.karikatur-bubble {
  position: absolute;
  right: 150px;
  bottom: 190px;
  width: 200px;
  margin: 0;
  padding: 0.6rem 0.9rem;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--sage);
  border-radius: 14px 14px 4px 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
}
.karikatur-bubble::before { content: "\201E"; }
.karikatur-bubble::after  { content: "\201C"; }
.karikatur-bubble.pop { animation: bubble-pop 0.3s cubic-bezier(.3,1.4,.5,1); }
@keyframes bubble-pop { from { transform: scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
.karikatur-note {
  margin: 0;
  padding: 0 0.6rem 0.4rem 0;
  text-align: right;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--sage-dark);
}
.karikatur.show { opacity: 1; transform: none; }
@media (max-width: 700px) {
  .karikatur { width: 140px; }
  .karikatur-bubble { right: 90px; bottom: 120px; width: 160px; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { .karikatur { transition: none; } }
