/* ===========================================================
   Nachbarschaftsfest 2026 – Styles
   Farbwelt & Typografie nach Event-Design-Kit v1.0
   =========================================================== */

:root {
  --green: #7EB63C;
  --green-dark: #6aa02f;
  --navy: #0F2237;
  --white: #FFFFFF;
  --grey: #EDEDED;
  --text: #444444;

  --space: 8px;
  --radius: 12px;
  --wrap: 1140px;

  --font-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Caveat", cursive;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--green-dark); text-decoration: none; border-bottom: 1px solid rgba(126,182,60,.5); }
a:hover { color: var(--navy); border-bottom-color: var(--navy); }

strong { color: var(--navy); font-weight: 600; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: 12px 20px; border: 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }

/* ---------- Typo-Bausteine ---------- */

/* Lange Komposita wie "FESTWOCHENENDE" dürfen auf schmalen Displays
   trennen, statt über den Rand zu laufen. */
.h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(26px, 4.5vw, 46px);
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 16px;
  overflow-wrap: break-word;
  hyphens: auto;
}

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin: 0 0 8px;
}

.section__lead {
  font-size: 19px;
  max-width: 620px;
  margin: 0 0 48px;
}

.script {
  font-family: var(--font-script);
  font-weight: 600;
  color: var(--green);
  line-height: 1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .04em;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.btn--ghost { background: transparent; border-color: rgba(255,255,255,.65); color: #fff; }
.btn--ghost:hover { background: #fff; border-color: #fff; color: var(--navy); }

.btn--small { padding: 9px 20px; font-size: 14px; }

/* ---------- Topbar ---------- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: transparent;
  transition: background .25s, box-shadow .25s;
}
.topbar.is-stuck { background: var(--navy); }

.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 72px;
}

.topbar__brand {
  font-family: var(--font-head); font-weight: 800; font-size: 17px;
  letter-spacing: .06em; text-transform: uppercase;
  color: #fff; border: 0; display: flex; gap: 8px; align-items: baseline;
}
.topbar__brand span { color: var(--green); }
.topbar__brand:hover { color: #fff; }

.topbar__nav { display: flex; align-items: center; gap: 28px; }
.topbar__nav a {
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  color: #fff; border: 0; opacity: .9;
}
.topbar__nav a:hover { color: var(--green); opacity: 1; }
.topbar__nav .btn { color: #fff; }
.topbar__nav .btn:hover { color: #fff; }

.topbar__toggle {
  display: none; width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer; padding: 0;
}
.topbar__bars, .topbar__bars::before, .topbar__bars::after {
  display: block; width: 24px; height: 2px; background: #fff; margin: 0 auto;
  transition: transform .2s, opacity .2s;
}
.topbar__bars::before, .topbar__bars::after { content: ""; position: relative; }
.topbar__bars::before { top: -7px; }
.topbar__bars::after  { top: 5px; }

.topbar.is-open .topbar__bars { background: transparent; }
.topbar.is-open .topbar__bars::before { transform: translateY(7px) rotate(45deg); }
.topbar.is-open .topbar__bars::after  { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; color: #fff; }

.hero__bg {
  position: absolute; inset: 0;
  background: url("../assets/hero-bg.jpg") center/cover no-repeat;
}
.hero__veil {
  position: absolute; inset: 0;
  background: rgba(15, 34, 55, .72);
}

.hero__inner {
  position: relative;
  padding: 150px 24px 88px;
}

.hero__kicker {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(13px, 2vw, 17px);
  letter-spacing: .32em; text-transform: uppercase;
  margin: 0 0 12px; color: rgba(255,255,255,.9);
}

/* Skaliert an der Breite des längsten Wortes ("NACHBARSCHAFTS"), damit
   die Zeile auf keiner Bildschirmbreite über den Rand läuft. */
.hero__title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(24px, calc((100vw - 48px) / 10.8), 104px);
  line-height: .92; letter-spacing: -.01em;
  overflow-wrap: break-word;
  text-transform: uppercase;
  margin: 0; color: #fff;
}
.hero__title-accent { display: block; color: var(--green); }

.hero__script {
  font-size: clamp(30px, 5vw, 52px);
  margin: 8px 0 0;
}

.hero__lead {
  font-size: clamp(18px, 2.3vw, 23px);
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.94);
}
.hero__lead strong { color: var(--green); }

.hero__date {
  display: inline-flex; flex-direction: column;
  margin: 40px 0 0;
  padding-left: 20px;
  border-left: 3px solid var(--green);
}
.hero__date-day {
  font-family: var(--font-head); font-weight: 600;
  font-size: 15px; letter-spacing: .22em; text-transform: uppercase;
}
.hero__date-num {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(34px, 6vw, 56px); line-height: 1.1;
  color: var(--green);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 40px 0 0; }

.countdown {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 56px 0 0;
}
.countdown__item {
  min-width: 92px;
  padding: 16px 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  text-align: center;
  background: rgba(255,255,255,.06);
}
.countdown__num {
  display: block;
  font-family: var(--font-head); font-weight: 800;
  font-size: 32px; line-height: 1.1; color: var(--green);
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  display: block; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.75); margin-top: 4px;
}
.countdown.is-over { gap: 0; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section--grey { background: var(--grey); }

/* ---------- Info-Karten ---------- */

.cards {
  display: grid;
  /* min() verhindert, dass die 300px-Mindestbreite schmale Handys sprengt */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.card {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: var(--radius);
  padding: 32px 28px;
}
.section--grey .card { border-color: #dcdcdc; }

.card__title {
  font-family: var(--font-head); font-weight: 800;
  font-size: 20px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy); margin: 20px 0 8px;
  overflow-wrap: break-word;
}
.card p { margin: 0 0 8px; }
.card p:last-child { margin-bottom: 0; }

.card--accent { background: var(--navy); border-color: var(--navy); color: rgba(255,255,255,.88); }
.card--accent .card__title { color: #fff; }
.card--accent strong { color: var(--green); }
.card__script { font-size: 30px; margin-top: 16px; }

.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green); color: #fff;
}
.icon svg { width: 28px; height: 28px; }
.icon--light { background: rgba(126,182,60,.22); color: var(--green); }

/* ---------- Timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }

/* min-width: 0 hebt das Grid-/Flex-Standardmaß "so breit wie das längste
   Wort" auf – sonst dehnt "NACHBARSCHAFTSFEST" die Karte über den Rand. */
.timeline__item {
  display: flex; gap: 24px; align-items: flex-start;
  min-width: 0;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: var(--radius);
  padding: 28px;
}
.timeline__item--highlight { background: var(--navy); border-color: var(--navy); color: rgba(255,255,255,.88); }

.timeline__marker {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green); color: #fff;
}
.timeline__marker svg { width: 28px; height: 28px; }
.timeline__item--highlight .timeline__marker { background: var(--green); }

.timeline__date {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--green-dark); margin: 0 0 4px;
}
.timeline__item--highlight .timeline__date { color: var(--green); }

.timeline__title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(18px, 5.4vw, 22px);
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--navy); margin: 0 0 8px;
  overflow-wrap: break-word; hyphens: auto;
}
.timeline__item--highlight .timeline__title { color: #fff; }

.timeline__body { min-width: 0; }
.timeline__body p:last-child { margin: 0; }

/* ---------- Tabs & Formulare ---------- */

.tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  border-bottom: 2px solid #e2e2e2;
  margin-bottom: 32px;
}

.tabs__btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  color: var(--navy);
  background: transparent;
  border: 0; border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 14px 20px;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.tabs__btn:hover { color: var(--green-dark); }
.tabs__btn.is-active { color: var(--green-dark); border-bottom-color: var(--green); }

.tabs__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--grey); color: var(--navy);
  font-size: 14px; font-weight: 800;
}
.tabs__btn.is-active .tabs__num { background: var(--green); color: #fff; }

.panel.is-hidden { display: none; }

.panel__head { margin-bottom: 24px; }
.panel__title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(20px, 5.6vw, 24px);
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--navy); margin: 0 0 8px;
  /* bewusst ohne hyphens: auto – der Titel besteht aus mehreren kurzen
     Wörtern und würde sonst mitten im Wort getrennt ("VIE-LEN") */
  overflow-wrap: break-word;
}
.panel__text { margin: 0; max-width: 640px; }

/* Zwei Schritte je Liste: erst eintragen, dann nachschauen */
.step + .step { margin-top: 48px; }

.step__title {
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 8px;
  padding-left: 14px;
  border-left: 3px solid var(--green);
}
.step__text { margin: 0 0 16px; max-width: 640px; }
.step__title + .embed { margin-top: 16px; }

.embed {
  border: 1px solid #e2e2e2;
  border-radius: var(--radius);
  background: #fafafa;
  overflow: hidden;
}
/* Höhe kommt aus js/listen.js, --embed-h wird dort je Rahmen gesetzt */
.embed iframe { display: block; width: 100%; border: 0; height: var(--embed-h, 640px); background: #fff; }

.embed__open {
  display: block;
  padding: 16px 20px;
  border: 0; border-top: 1px solid var(--green-dark);
  background: var(--green);
  color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  text-align: center;
}
.embed__open:hover { background: var(--green-dark); color: #fff; }

.embed__placeholder {
  padding: 64px 32px;
  text-align: center;
  border: 2px dashed #cfcfcf;
  border-radius: var(--radius);
  margin: 16px;
  background: #fff;
}
.embed__hint { font-size: 19px; color: var(--navy); margin: 0 0 8px; }
.embed__note { font-size: 15px; margin: 0; }
.embed__note code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px; background: var(--grey); padding: 2px 6px; border-radius: 4px;
}

.listen__hint { margin: 32px 0 0; font-size: 15px; color: #6a6a6a; }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 8px; margin-bottom: 48px; }

.faq__item {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: var(--radius);
  padding: 4px 24px;
}

.faq__q {
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
  color: var(--navy);
  cursor: pointer;
  padding: 18px 32px 18px 0;
  list-style: none;
  position: relative;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.faq__item[open] .faq__q::after { transform: translateY(-20%) rotate(-135deg); }

.faq__a { padding: 0 0 18px; }
.faq__a p { margin: 0; }

/* ---------- Highlight-Box ---------- */

.highlight {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  color: rgba(255,255,255,.9);
}
.highlight__text { font-size: 19px; margin: 20px 0 0; }
.highlight__script { font-size: 34px; margin: 12px 0 0; }

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

.footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 64px 0 48px; }
.footer__inner { text-align: center; }
.footer__skyline { width: 240px; height: 40px; color: var(--green); }
.footer__script { font-size: clamp(30px, 5vw, 44px); margin: 16px 0 24px; }
.footer__meta { font-size: 14px; letter-spacing: .06em; margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .topbar { background: var(--navy); }
  .topbar__toggle { display: block; }
  .topbar__nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy);
    padding: 0 24px;
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease;
  }
  .topbar.is-open .topbar__nav { max-height: 340px; padding-bottom: 24px; }
  .topbar__nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .topbar__nav .btn { margin-top: 16px; text-align: center; border-bottom: 2px solid var(--green); }

  .hero__inner { padding: 118px 24px 72px; }
  .section { padding: 72px 0; }
  .timeline__item { flex-direction: column; gap: 16px; }
  .tabs__btn { flex: 1 1 140px; justify-content: center; padding: 14px 12px; font-size: 15px; }
  /* Nur die Übersicht kürzen – das Formular braucht seine volle Höhe,
     sonst wird es im Rahmen abgeschnitten. */
  .embed--liste iframe { height: 420px; }

  /* Am Handy brechen die Fragen um, das Formular wird höher.
     formHeightMobil aus js/listen.js, sonst die normale Höhe. */
  .embed--form iframe { height: var(--embed-h-mobil, var(--embed-h, 900px)); }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .countdown__item { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .card { padding: 28px 22px; }

  /* Tabs untereinander statt gequetscht nebeneinander */
  .tabs { flex-direction: column; gap: 0; border-bottom: 0; }
  .tabs__btn {
    flex: none;
    justify-content: flex-start;
    border-bottom: 1px solid #e2e2e2;
    border-left: 3px solid transparent;
    margin-bottom: 0;
  }
  .tabs__btn.is-active { border-bottom-color: #e2e2e2; border-left-color: var(--green); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .countdown, .hero__actions, .embed { display: none; }
  .hero__veil { background: none; }
  body { color: #000; }
}
