/* ====================================================================
   Vorlage „Sommerwiese" · fröhlich und farbenfroh

   Runde, gewachsene Formen und kräftige Farbe. Für Kindergeburtstage,
   Einschulungen, Vereinsfeste und alles, was draußen stattfindet.

   DER GANZE UNTERSCHIED LIEGT IN DEN FORMEN. Ein Rechteck mit
   border-radius: 24px ist ein Rechteck mit runden Ecken · man sieht
   ihm die Voreinstellung an. Die Flächen hier sind ungleiche
   Ellipsen: vier verschiedene Radien, jeder in zwei Achsen. Keine
   Form hat eine Symmetrieachse, und keine ist wie ihre Nachbarin.

   Dazu zwei gezeichnete SVG-Bänder (Klecks im Kopf, Welle darunter),
   die die Abschnitte nicht mit einer Geraden trennen.

   DIE KACHELN KIPPEN LEICHT, und die Drehung kommt aus nth-child im
   Stylesheet. Ein style="--dreh:2deg" wäre live still verworfen
   worden · die Sicherheitsrichtlinie schickt style-src 'self' ohne
   'unsafe-inline'.
   ==================================================================== */

@font-face {
  font-family: "Young Serif";
  src: url("../fonts/youngserif-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

.ev--sommerwiese {
  --grund: #fffdf7;
  --grund-2: #fff6e4;
  --schrift: #241f16;
  --schrift-2: #5f574a;
  --linie: #ecdfc6;

  --schrift-anzeige: "Young Serif", Georgia, serif;
  --schrift-text: "Figtree", system-ui, sans-serif;

  --ecke: 14px;
  --ecke-gross: 999px;
  --rand: clamp(1.25rem, 5vw, 3rem);

  --akzent: #f0a92b;
  --akzent-text: #8a5a03;
  --auf-akzent: #241f16;
}

.ev--sommerwiese.akzent-sonne    { --akzent: #f0a92b; --akzent-text: #8a5a03; --auf-akzent: #241f16; }
.ev--sommerwiese.akzent-himbeere { --akzent: #e0526f; --akzent-text: #a52840; --auf-akzent: #fffdf7; }
.ev--sommerwiese.akzent-lagune   { --akzent: #2aa3ac; --akzent-text: #1c6f76; --auf-akzent: #fffdf7; }
.ev--sommerwiese.akzent-wiese    { --akzent: #63ad3c; --akzent-text: #3f6f24; --auf-akzent: #241f16; }
.ev--sommerwiese.akzent-flieder  { --akzent: #9b7bd4; --akzent-text: #6a4aa3; --auf-akzent: #fffdf7; }

.sw-innen {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--rand);
}
.sw-innen--schmal { max-width: 44rem; }

/* == Kopfbereich ==================================================== */

.sw-kopf { position: relative; padding-top: clamp(2.5rem, 7vw, 5rem); }

/* Der Klecks liegt hinter dem Kopftext und ist absichtlich nicht
   symmetrisch. preserveAspectRatio="none" im Markup zieht ihn auf
   jede Fensterbreite, ohne dass er kachelt. */
.sw-klecks {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: clamp(24rem, 62vw, 40rem);
  color: color-mix(in oklab, var(--akzent) 26%, transparent);
  z-index: -1;
}

.sw-kopfraster { display: grid; gap: 2rem; align-items: center; }

@media (min-width: 860px) {
  .sw-kopfraster { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; }
}

.sw-anlass {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px 999px 999px 4px;
  background: var(--akzent);
  color: var(--auf-akzent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sw-titel {
  margin-top: 1rem;
  font-family: var(--schrift-anzeige);
  font-size: clamp(2.4rem, 1.2rem + 5.4vw, 4.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.sw-name {
  margin-top: 0.6rem;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem);
  font-weight: 600;
  color: var(--akzent-text);
}

.sw-kopftext .ev-termin { margin-top: 1.5rem; }
.sw-kopftext .ev-termin-datum { font-family: var(--schrift-anzeige); font-size: 1.6rem; }
.sw-kopftext .ev-countdown { margin-top: 1.25rem; }
.sw-kopftext .ev-countdown-zahl { font-family: var(--schrift-anzeige); }

/* Das Bild in einer gewachsenen Form, leicht gekippt. */
.sw-kopfbild {
  border-radius: 46% 54% 38% 62% / 42% 36% 64% 58%;
  overflow: hidden;
  background: var(--grund-2);
  rotate: -2.2deg;
}
.sw-kopfbild img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.sw-welle {
  display: block;
  width: 100%;
  height: clamp(2rem, 5vw, 3.5rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
  color: var(--grund-2);
}

/* == Abschnitte ===================================================== */

.sw-abschnitt { padding-block: clamp(2.25rem, 5vw, 3.75rem); }

.sw-ueberschrift {
  font-family: var(--schrift-anzeige);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.sw-gruss { background: var(--grund-2); padding-block: clamp(2.5rem, 6vw, 4.5rem); margin-top: -1px; }
.sw-grusstext {
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.85rem);
  line-height: 1.4;
  font-weight: 500;
  text-wrap: pretty;
}

.sw-fliess { color: var(--schrift-2); max-width: 54ch; }

/* == Kacheln ======================================================== */

.sw-kachel {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 32px 12px 32px 12px;
  background: var(--grund-2);
  border: 2px solid var(--linie);
}
.sw-kachel--ort .ev-ort-name { font-family: var(--schrift-anzeige); font-size: 1.5rem; font-weight: 400; }

/* == Ablauf ========================================================= */

.sw-ablaufblock .ev-ablauf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
.sw-ablaufblock .ev-ablauf-punkt {
  padding: 1.25rem 1.4rem;
  background: var(--grund-2);
  border: 2px solid var(--linie);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Vier verschiedene Formen und Neigungen, die sich abwechseln. So
   sieht keine Kachel aus wie ihre Nachbarin, und trotzdem steht
   nirgends ein Einzelwert im Markup. */
.sw-ablaufblock .ev-ablauf-punkt:nth-child(4n+1) { border-radius: 30px 10px 26px 12px; rotate: -0.9deg; }
.sw-ablaufblock .ev-ablauf-punkt:nth-child(4n+2) { border-radius: 12px 28px 12px 30px; rotate:  0.8deg; }
.sw-ablaufblock .ev-ablauf-punkt:nth-child(4n+3) { border-radius: 26px 26px 10px 26px; rotate:  0.5deg; }
.sw-ablaufblock .ev-ablauf-punkt:nth-child(4n)   { border-radius: 10px 26px 30px 12px; rotate: -0.6deg; }
.sw-ablaufblock .ev-ablauf-punkt:hover { rotate: 0deg; transform: translateY(-2px); }

.sw-ablaufblock .ev-ablauf-zeit {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  margin-bottom: 0.6rem;
  border-radius: 999px;
  background: var(--akzent);
  color: var(--auf-akzent);
  font-size: 0.9375rem;
  font-weight: 700;
}
.sw-ablaufblock .ev-ablauf-titel { font-family: var(--schrift-anzeige); font-size: 1.25rem; font-weight: 400; }
.sw-ablaufblock .ev-ablauf-satz { margin-top: 0.3rem; }

/* == Hinweise ======================================================= */

.sw-hinweisblock .ev-hinweise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}
.sw-hinweisblock .ev-hinweis {
  padding: 1.25rem 1.4rem;
  border: 2px solid var(--linie);
  background: var(--grund);
}
.sw-hinweisblock .ev-hinweis:nth-child(3n+1) { border-radius: 28px 10px 28px 10px; }
.sw-hinweisblock .ev-hinweis:nth-child(3n+2) { border-radius: 10px 28px 10px 28px; }
.sw-hinweisblock .ev-hinweis:nth-child(3n)   { border-radius: 24px 24px 10px 24px; }
.sw-hinweisblock .ev-hinweis h3 { font-family: var(--schrift-anzeige); font-size: 1.2rem; font-weight: 400; }

/* == Galerie ======================================================== */

.sw-galerieblock .ev-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
}
.sw-galerieblock .ev-galerie-bild img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.sw-galerieblock .ev-galerie-bild:nth-child(3n+1) img { border-radius: 48% 52% 40% 60% / 44% 40% 60% 56%; }
.sw-galerieblock .ev-galerie-bild:nth-child(3n+2) img { border-radius: 30px 10px 30px 10px; }
.sw-galerieblock .ev-galerie-bild:nth-child(3n)   img { border-radius: 10px 34px 10px 34px; }
.sw-galerieblock figcaption { text-align: center; }

/* == Zu- und Absage ================================================= */

.sw-rsvpblock { background: var(--grund-2); }
.sw-rsvpblock .ev-feld input,
.sw-rsvpblock .ev-feld textarea { background: var(--grund); border-width: 2px; border-radius: var(--ecke); }
.sw-rsvpblock .ev-antwort-wahl label { background: var(--grund); border-width: 2px; }
.sw-rsvpblock .ev-knopf { font-weight: 700; }

/* == Kontakt ======================================================== */

.sw-kontaktblock .ev-kontakt {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 12px 30px 12px 30px;
  border: 2px solid var(--linie);
}

/* == Auftritt ======================================================= */

/* Anfangszustand nur innerhalb der Ruhe-Abfrage · siehe die
   ausführliche Begründung in vorlage-abendlicht.css. */
@media (prefers-reduced-motion: no-preference) {
  .sw-anlass,
  .sw-titel,
  .sw-name,
  .sw-kopfbild {
    animation: sw-auf 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .sw-titel { animation-delay: 0.06s; }
  .sw-name { animation-delay: 0.12s; }
  .sw-kopfbild { animation-delay: 0.18s; animation-name: sw-auf-bild; }
}

@keyframes sw-auf {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: none; }
}

/* Eigener Auftritt fürs Bild: Es trägt schon eine Drehung, und ein
   zweites transform in der Animation würde sie überschreiben statt
   sie zu ergänzen. Deshalb bleibt rotate hier unangetastet ·
   rotate und transform sind getrennte Eigenschaften. */
@keyframes sw-auf-bild {
  from { opacity: 0; scale: 0.94; }
  to   { opacity: 1; scale: 1; }
}
