:root {
  --bg: #0f1115;
  --fg: #eef2f7;
  --muted: #9aa4b2;
  --accent: #4f9cf9;
  --accent2: #97f9a9;
  --card: #151923;
  --line: #222839;
  --danger: #ff6b6b;
  --ok: #1ec28b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Basisreset */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    "Helvetica Neue", Arial;
}

/* Links, Buttons */
a {
  color: var(--accent);
  text-decoration: none;
}
.btn {
  display: inline-block;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--fg);
  background: transparent;
  transition: 0.2s;
}
.btn:hover {
  background: var(--accent);
  color: #0b1220;
}
.btn-alt {
  border-color: var(--accent2);
}
.btn-alt:hover {
  background: var(--accent2);
  color: #05240f;
}
.link {
  border-bottom: 1px dashed var(--accent);
}

/* Header Hero */
.hero {
  min-height: 62vh;
  background: radial-gradient(
      1200px 500px at 10% 0%,
      #1a2440 0%,
      var(--bg) 60%
    ),
    linear-gradient(120deg, var(--bg) 0%, #121726 60%);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  text-align: center;
  max-width: 900px;
  padding: 3rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin: 0 0 0.8rem;
  letter-spacing: 0.5px;
}
.hero p {
  color: var(--muted);
  margin: 0 0 1.2rem;
}

/* Navigation */
.topnav {
  position: sticky;
  top: 0;
  background: rgba(10, 12, 18, 0.6);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0.6rem;
}
.topnav a {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  color: var(--fg);
}
.topnav a:hover {
  background: #171c2a;
}

/* Main Content */
main {
  max-width: 1100px;
  margin: auto;
  padding: 2rem;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

article,
section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
article h2,
section h2 {
  margin: 0.2rem 0 1rem;
}

.list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1rem;
}

.masonry {
  columns: 2;
  column-gap: 1rem;
}

.card {
  break-inside: avoid;
  background: #121725;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 2.2rem;
  margin: 0 0 1rem;
  text-align: center;
  color: var(--muted);
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: #101522;
  margin: 0.6rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.contact {
  display: grid;
  gap: 0.7rem;
}
.contact input,
.contact textarea {
  width: 100%;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f1422;
  color: var(--fg);
}
.contact button {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.3s ease;
}
.contact button:hover {
  background: var(--accent);
  color: #061022;
}

/* Footer */
.footer {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

/* Chat-Bot & Popup Styles */
#chat-root {
  position: fixed;
  inset: auto 20px 20px auto;
  z-index: 9999;
}

/* Chat Launch Button */
.chat-launch {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #101522;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.chat-launch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Popup zentriert & fancy */
.chat-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0c1322;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  max-width: 360px;
  width: 90vw;
  box-shadow: var(--shadow);
  z-index: 9998;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.chat-popup p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--fg);
  font-weight: 600;
}

.chat-popup button {
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--fg);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease;
}
.chat-popup button:hover {
  background: var(--accent);
  color: #061022;
  box-shadow: 0 0 8px var(--accent);
}

/* Chat Fenster */
.chat-window {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 360px;
  max-width: 92vw;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0c1322;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.chat-header {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font-weight: 700;
}

.chat-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.mode {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.mode select {
  background: #0f1422;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--fg);
}

.msg {
  max-width: 80%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  word-wrap: break-word;
}

.msg.user {
  align-self: flex-end;
  background: #11192c;
}

.msg.bot {
  align-self: flex-start;
  background: #0e1627;
}

.chat-input {
  display: flex;
  gap: 0.4rem;
  padding: 0.8rem;
  border-top: 1px solid var(--line);
}

.chat-input input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1422;
  color: var(--fg);
  font-size: 1rem;
}

.chat-input button {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.3s ease;
}

.chat-input button:hover {
  background: var(--accent);
  color: #061022;
  box-shadow: 0 0 8px var(--accent);
}

/* Notices and hidden utility */
.notice {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0 1rem 0.6rem;
}
.hidden {
  display: none;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .hero-inner {
    padding: 2rem;
  }
  .topnav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .masonry {
    columns: 1;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .btn,
  .btn-alt {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
  }
  article,
  section {
    padding: 1rem;
  }
  .chat-window {
    width: 100%;
    height: 70vh;
    right: 0;
    bottom: 0;
    border-radius: 0;
    max-width: none;
  }
  .chat-popup {
    max-width: 90%;
    right: 5%;
    left: 5%;
  }
  .chat-launch {
    width: 54px;
    height: 54px;
  }
  .chat-input input {
    font-size: 0.95rem;
  }
}

@media (max-width: 400px) {
  .hero-inner {
    padding: 1.4rem;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .topnav a {
    font-size: 0.85rem;
    padding: 0.3rem 0.4rem;
  }
  .chat-launch {
    width: 48px;
    height: 48px;
  }
}