:root {
  --ink: #111827;
  --ink-soft: #1f2937;
  --muted: #4b5563;
  --page: #f3f4f6;
  --panel: #ffffff;
  --line: #e5e7eb;
  --success: #059669;
  --danger: #e11d48;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--page);
  color: var(--ink);
  line-height: 1.5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: #fff;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
  color: #fff;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #d1d5db;
  font-weight: 700;
  font-size: 14px;
}

.nav-links a:hover {
  color: #fff;
}

.lang-switch {
  display: flex;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 2px;
  flex: 0 0 auto;
}

.lang-switch a {
  padding: 5px 11px;
  border-radius: 999px;
  text-decoration: none;
  color: #d1d5db;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.lang-switch a:hover {
  color: #fff;
}

.lang-switch a.is-active {
  background: #fff;
  color: var(--ink);
}

.legal-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 96px;
}

/* Signalisiert auf hohen/kurzen Viewports (z.B. Full-HD-Laptop), dass unter
   dem Hero noch mehr Content folgt - sonst wirkt die Seite dort "fertig". */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scroll-cue .scroll-cue-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink);
  animation: scroll-cue-bounce 1.8s ease-in-out infinite;
}

.scroll-cue:hover .scroll-cue-icon {
  border-color: var(--success);
  color: var(--success);
}

@keyframes scroll-cue-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue .scroll-cue-icon {
    animation: none;
  }
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
}

/* Auf schmalen Handys ist die eingebettete WebApp kaum bedienbar - lieber
   ausblenden und die Leute direkt auf "WebApp in neuem Tab öffnen" (in
   .hero-actions) schicken statt eine winzige Preview zu zeigen. */
@media (max-width: 560px) {
  .webapp-preview {
    display: none;
  }
}

.eyebrow {
  color: var(--success);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 16px;
}

.hero p.lead {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--success);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.hero-copy {
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Webapp/Highscore-Vorschau (bewusst OHNE Handy-Rahmen), als Tab-Karte: Tab 1
   zeigt die Online-Highscores, Tab 2 die eingebettete Spielseite. Die
   Spielseite selbst ist als volle-Viewport-Hoehe/max-980px-Layout gebaut
   (wie die Flutter-App) - eine flache 4:3-Box hat sie oben abgeschnitten.
   Feste, grosszuegige Hoehe statt aspect-ratio, damit Header/HUD/
   Zeichenflaeche komplett sichtbar sind. */
.webapp-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
  height: min(780px, 85vh);
  display: flex;
  flex-direction: column;
}

.preview-tabs {
  display: flex;
  flex: 0 0 auto;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}

.preview-tab {
  flex: 1;
  padding: 14px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.preview-tab.is-active {
  background: var(--panel);
  color: var(--ink);
  border-bottom-color: var(--success);
}

.preview-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.preview-panel.is-active {
  display: block;
}

.webapp-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.webapp-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: var(--panel);
}

.webapp-placeholder img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.webapp-placeholder strong {
  font-size: 17px;
}

.webapp-placeholder span {
  color: var(--muted);
  font-size: 14px;
}

.webapp-placeholder.is-hidden {
  display: none;
}

.preview-leaderboard {
  height: 100%;
  overflow-y: auto;
  padding: 8px 20px;
}

.preview-leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.preview-leaderboard-row:last-child {
  border-bottom: 0;
}

.preview-leaderboard-rank {
  width: 26px;
  flex: 0 0 auto;
  font-weight: 900;
  color: var(--muted);
  font-size: 14px;
}

.preview-leaderboard-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-leaderboard-score {
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 14px;
}

.preview-leaderboard-loading,
.preview-leaderboard-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Sections */
.section {
  padding: 56px 0;
}

.section h2 {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 8px;
  text-align: center;
}

.section .section-lead {
  color: var(--muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.feature-card .icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Rotierender Screenshot-Slider: zeigt 3 Slides, der Track wird per JS alle
   paar Sekunden (oder per Pfeil-Klick) um eine Slide-Breite verschoben - ein
   Bild slided raus, ein neues von der Gegenseite rein, die anderen beiden
   rücken auf. Vor/Nach-Puffer-Bilder stehen dafür schon links/rechts im
   Track bereit - overflow: hidden auf .gallery blendet sie aus, bis die
   Verschiebung läuft. */
.gallery-wrap {
  position: relative;
  margin-top: 36px;
}

.gallery {
  overflow: hidden;
  border-radius: 12px;
}

.gallery-track {
  display: flex;
  gap: 16px;
}

.gallery-track img {
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  aspect-ratio: 1080 / 2290;
  object-fit: cover;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gallery-arrow:hover {
  background: #ffffff;
}

.gallery-arrow-prev {
  left: 10px;
}

.gallery-arrow-next {
  right: 10px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d1d5db;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.2);
  cursor: pointer;
}

.gallery-dot.is-active {
  background: var(--success);
}

/* Download */
.download-section {
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.download-section h2 {
  color: #fff;
}

.download-section .section-lead {
  color: #d1d5db;
}

.store-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

.store-button img {
  width: auto;
  height: 28px;
}

.store-button:hover {
  background: #ffffff;
  color: var(--ink);
}

.store-button[aria-disabled="true"] {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  cursor: not-allowed;
  pointer-events: none;
}

.store-button[aria-disabled="true"] img {
  opacity: 0.5;
}

.store-button .badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 16px 20px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}

.faq-question::after {
  content: "+";
  font-size: 20px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.faq-item.is-open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  padding: 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.faq-item.is-open .faq-answer {
  padding-bottom: 16px;
}

/* Footer */
.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Legal page */
.legal-nav {
  position: sticky;
  top: 0;
  background: var(--ink);
}

.legal-page {
  padding: 40px 0 64px;
}

.legal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}

.legal-content h2 {
  font-size: 18px;
  margin: 28px 0 8px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 15px;
  margin: 20px 0 6px;
}

.legal-content p {
  color: var(--ink-soft);
  font-size: 14px;
}

.legal-updated {
  color: var(--muted);
  font-size: 12px;
  margin-top: 24px;
}
