/* Dart Counter - Website. Farben und Ton wie in der App (dunkel, Board-Gruen). */
:root {
  --bg: #0e0f13;
  --bg-hi: #171a21;
  --surface: #1a1c22;
  --surface-hi: #23262e;
  --text: #f4f5f7;
  --text-2: #9aa0ac;
  --text-3: #7c8493;
  --accent: #2fc96b;
  --accent-hi: #4ade80;
  --on-accent: #06140c;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }

/* Muss vor allen display-Regeln stehen: ein `display: flex` auf .modal wuerde
   das hidden-Attribut sonst ueberstimmen und der Dialog staende immer offen. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* Scrollleiste im Ton der Seite (Firefox + Chrome/Safari darunter). */
  scrollbar-color: var(--accent) var(--bg-hi);
  scrollbar-width: thin;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-hi); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  border-radius: 999px;
  border: 3px solid var(--bg-hi);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-hi); }
::selection { background: var(--accent); color: var(--on-accent); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }
.accent { color: var(--accent); }
.center { text-align: center; margin-top: 32px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }

/* ---------- Kopf ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(14, 15, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  /* Eigener GPU-Layer: sonst flackert der Kopf ueber bewegten Inhalten. */
  transform: translateZ(0);
  backface-visibility: hidden;
}
.head-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.lang-switch { display: flex; gap: 4px; margin-left: auto; }
.nav-links + .lang-switch { margin-left: 0; }
.lang-switch a {
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-3);
}
.lang-switch a:hover { background: var(--surface); text-decoration: none; }
.lang-switch a.on { background: var(--surface-hi); color: var(--accent); }

/* ---------- Burger + mobiles Menue ---------- */
.burger {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
}
.burger span {
  display: block;
  position: absolute;
  left: 11px;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.15s ease;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 26px; }
/* Offen: die Balken werden zum X. */
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: sticky;
  top: 64px;
  z-index: 39;
  background: rgba(14, 15, 19, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 20px 20px;
}
.mobile-nav a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px 0;
  color: var(--text);
  font-weight: 700;
  border-radius: 12px;
}
.mobile-nav a:hover { background: var(--surface); text-decoration: none; }
.lang-switch.mobile { margin: 10px 0 0; gap: 6px; }
.lang-switch.mobile a {
  width: auto;
  padding: 8px 14px;
  background: var(--surface);
  font-size: 0.85rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-lg { padding: 17px 34px; font-size: 1.08rem; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 10px 30px rgba(47, 201, 107, 0.25);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: var(--surface-hi);
  color: var(--text);
  border-color: var(--border);
}
.btn-soon { opacity: 0.62; cursor: default; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; position: relative; overflow-x: clip; }
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(47, 201, 107, 0.16), transparent 65%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.lead { font-size: 1.14rem; color: var(--text-2); max-width: 34em; }
.hero-cta { margin: 28px 0 22px; }
/* Zwei Reihen zu zwei Kacheln - im Flex-Fluss waeren es 3 + 1 geworden. */
.badges {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.badges li {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
}
.hero-shot { position: relative; min-height: 420px; }
.hero-shot img {
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.hero-shot .shot-a { width: 74%; position: relative; z-index: 2; }
.hero-shot .shot-b {
  width: 62%;
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 1;
  opacity: 0.9;
}

/* ---------- Sektionen ---------- */
.section { padding: 76px 0; }
.section.alt { background: var(--bg-hi); border-block: 1px solid var(--border); }
.sub { color: var(--text-2); max-width: 46em; margin: 0 0 36px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card .ico { font-size: 1.7rem; margin-bottom: 10px; }
.card p { color: var(--text-2); margin: 0; font-size: 0.97rem; }

.more {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  /* Fest zwei Spalten: bei auto-fit standen die vier Punkte als 3 + 1. */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 36px;
  color: var(--text-2);
  font-size: 0.95rem;
}
.more strong { color: var(--text); }

/* ---------- Galerie als Laufband (rechts nach links) ----------
   Die Kacheln stehen zweimal im Markup. Das Band wandert genau um die Haelfte
   seiner Breite - in dem Moment steht die Kopie exakt dort, wo das Original
   begann, und der Sprung zurueck auf 0 ist unsichtbar. */
.marquee {
  overflow: hidden;
  /* Rechts und links weich auslaufen lassen, statt hart abzuschneiden. */
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track figure { margin: 0; width: 280px; flex: none; }
.marquee-track img {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.marquee-track figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-2);
  text-align: center;
}
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  /* -50% = genau eine Kachel-Reihe. Der halbe Abstand gleicht die Luecke aus,
     die zwischen der letzten Kachel und der ersten Kopie steht. */
  to { transform: translate3d(calc(-50% - 10px), 0, 0); }
}

/* ---------- Pro ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.plan-pro {
  border-color: rgba(47, 201, 107, 0.45);
  box-shadow: 0 0 0 1px rgba(47, 201, 107, 0.12), 0 20px 50px rgba(47, 201, 107, 0.08);
}
.plan-pro h3 { color: var(--accent); }
.check { list-style: none; padding: 0; margin: 16px 0; }
.check li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 9px;
  color: var(--text-2);
}
.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 17px 20px;
  font-weight: 700;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 900; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 20px 18px; color: var(--text-2); }
.faq .answer p { margin: 0; }

/* ---------- Rechtsseiten ---------- */
.legal h2 { font-size: 1.2rem; margin-top: 34px; }
.legal p { color: var(--text-2); }
.legal code {
  background: var(--surface-hi);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* ---------- Fuss ---------- */
.site-foot { border-top: 1px solid var(--border); padding: 52px 0 26px; background: var(--bg-hi); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.site-foot h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-3); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot li a { color: var(--text-2); font-size: 0.94rem; }
.site-foot li a:hover { color: var(--text); }
.foot-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- Cookie-Banner + Einstellungen ---------- */
.cookie-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  background: rgba(23, 26, 33, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.cookie-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-inner p { margin: 4px 0 0; color: var(--text-2); max-width: 62ch; }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 18px; font-size: 0.92rem; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.switch-row p { margin: 3px 0 0; }
.always { color: var(--accent); font-weight: 800; font-size: 0.82rem; white-space: nowrap; }
.switch { position: relative; width: 50px; height: 29px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.18s;
  cursor: pointer;
}
.slider::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  top: 3px;
  background: var(--text-2);
  border-radius: 50%;
  transition: transform 0.18s, background 0.18s;
}
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(21px); background: var(--on-accent); }
.modal-actions { margin-top: 22px; text-align: right; }

/* ---------- Nach oben ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(47, 201, 107, 0.4);
  background: rgba(26, 28, 34, 0.92);
  backdrop-filter: blur(10px);
  color: var(--accent);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: var(--on-accent); }
/* Solange der Cookie-Hinweis steht, hoeher setzen - sonst liegt er darunter. */
body.cookie-open .to-top { bottom: 128px; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .head-inner .lang-switch { display: none; }
  .burger { display: block; margin-left: auto; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-shot { min-height: 0; margin-top: 8px; }
  .hero-shot .shot-a { width: 62%; margin: 0 auto; }
  .hero-shot .shot-b { display: none; }

  /* Alles mittig: Text, Buttons, Kacheln, Fuss. */
  .hero-text,
  .section h2,
  .sub,
  .card,
  .plan,
  .site-foot { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .badges { justify-content: center; }
  .more { grid-template-columns: 1fr; text-align: center; }
  .check li { padding-left: 0; }
  .check li::before { position: static; margin-right: 8px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .site-foot .brand { justify-content: center; }
  .faq h2 { text-align: center; }
  .marquee-track { animation-duration: 34s; }
}

@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .hero { padding-top: 40px; }
  .hero-shot .shot-a { width: 78%; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .cookie-inner { justify-content: center; text-align: center; }
  .cookie-inner p { margin-inline: auto; }
  .cookie-actions { margin-left: 0; width: 100%; }
  .cookie-actions .btn { flex: 1; text-align: center; }
  .marquee-track figure { width: 230px; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  /* Kein endloses Laufband fuer Menschen, denen Bewegung zusetzt. */
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}
