/*
 * Zweck: Eigenständiges Stylesheet der Unterseite /spieler — schlanke Fassung zum Marktstart
 *   (fachliche Grundlage §9.3, .agent/pakete/… siehe lib/seiten/spieler.js Dateikopf).
 * Hauptverantwortung: Hero (Video hochkant im Rahmen, zweispaltig, mobil Video über dem Text),
 *   Karten "So läuft's für dich", Bestenliste (Beispiel, statisch) mit Einblend-Animation,
 *   Abschnitt "Drei Spieler-Fragen". Die Anmeldung-Section bringt ihr eigenes Stylesheet mit
 *   (page({ stylesheets: ['/css/startseite/basis.css', '/css/startseite/anmeldung.css', …] })).
 * Eingebunden NACH /css/site.css — nutzt dessen .container/.section/.btn-primary/.rc-faq-*
 *   weiter, überschreibt sie nicht.
 * Reduzierte Bewegung: siehe Medienabfrage am Dateiende — keine Transition/Transform, Video
 *   bleibt beim Standbild (Pause übernimmt public/js/spieler-hero-video.js).
 */

.sp-seite {
  --sp-dunkel: #12222B;
  --sp-magenta: #a90055;
  --sp-gruen: #00631d;
  --sp-gruen-hell: #e6f8e6;
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.sp-seite h1,
.sp-seite h2,
.sp-seite h3 {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

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

.sp-hero {
  background: var(--sp-dunkel);
  color: #fff;
  padding: 56px 0;
}

.sp-hero-inhalt {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .sp-hero-inhalt {
    /* Desktop: Text links, Video rechts — mobil kehrt die Reihenfolge per order() um. */
    grid-template-columns: 1.1fr 0.9fr;
  }
  .sp-hero-text { order: 0; }
  .sp-hero-video-rahmen { order: 1; }
}

/* Mobil: Video ÜBER dem Text (DOM-Reihenfolge Video zuerst, siehe lib/seiten/spieler.js —
   hier keine zusätzliche Regel nötig, Grid-Default ist bereits Quellreihenfolge). */

.sp-hero-video-rahmen {
  /* Feste Box mit Seitenverhältnis 9:16 — keine Layoutverschiebung, egal ob Video oder
     Standbild gerade sichtbar ist. position: relative verankert den Ton-Knopf (.sp-hero-ton)
     innerhalb des Rahmens. */
  position: relative;
  aspect-ratio: 9 / 16;
  max-width: 320px;
  margin-inline: auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.sp-hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ton-Knopf (Gründerauftrag 04.10.2026): Video startet stumm (Autoplay-Pflicht), der Knopf
   schaltet den Ton ein/aus. Position unten rechts im Rahmen, dunkler halbtransparenter Kreis,
   weißes Symbol, kein Blinken/Leuchten. Kein eigenes @font-face mehr (Paket "Startseite
   entschlacken"): das Symbol kommt als Inline-SVG (lib/icons.js), die Größenregeln unten
   wirken unverändert auf das <svg> (site.css: ".material-symbols-outlined svg"). */

.sp-hero-ton {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(18, 34, 43, 0.55);
  color: #fff;
  cursor: pointer;
}

.sp-hero-ton:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.sp-hero-ton .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
}

.sp-hero-titel {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
}

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

@media (min-width: 768px) {
  .sp-hero-text { text-align: left; }
}

.sp-hero-text p {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 24px;
  opacity: 0.92;
}

.sp-hero-button {
  background: var(--sp-gruen);
  box-shadow: none;
}

.sp-hero-button:hover {
  background: #0a7a2b;
}

/* ---------- So läuft's für dich ---------- */

.sp-ablauf h2,
.sp-bestenliste h2,
.sp-fragen h2 {
  font-size: clamp(22px, 3.5vw, 32px);
  margin: 0 0 24px;
  color: var(--sp-dunkel);
}

.sp-karten-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .sp-karten-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sp-karte {
  text-align: center;
}

.sp-karte-bild {
  position: relative;
  max-width: 220px;
  margin: 0 auto 16px;
}

.sp-karte-bild img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.sp-karte h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.sp-karte p {
  margin: 0;
  color: #4b5a62;
}

.sp-plakette {
  display: inline-block;
  background: var(--sp-magenta);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

/* Alle drei Kartenbilder in gleich großer quadratischer Fläche. */
.sp-karte-bild {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-karte-bild--foto img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0;
}

/* Karte 1: Matchkarte (Endstand wie auf /so-funktionierts) */
.sp-karte-bild--matchkarte { padding-bottom: 12px; }
.sp-mini-match {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid var(--sp-dunkel);
  border-radius: 16px;
  text-align: left;
}
.sp-mini-match-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sp-magenta);
  color: #fff;
  border-radius: 13px 13px 0 0;
  padding: 4px 8px 4px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sp-mini-match-kopf img { width: 16px; height: 16px; border-radius: 0; }
/* Rahmen nur fuer den KI-Hinweis (data-ki-hinweis) - traegt Groesse/Zentrierung, die vorher am
   Bild selbst lagen, damit der Hinweis exakt zum sichtbaren Foto passt. */
.sp-karte-bild .sp-mini-match-konsole-rahmen {
  display: block;
  width: fit-content;
  height: 64px;
  margin: 6px auto 2px;
}
.sp-karte-bild .sp-mini-match-konsole {
  width: auto;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}
.sp-mini-match ul { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.sp-mini-match li { display: flex; align-items: center; gap: 8px; }
.sp-mini-match li svg { flex: none; }
.sp-mini-match li > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.sp-mini-match-label { font-size: 8px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #5a3f46; }
.sp-mini-match-wert { font-size: 11px; font-weight: 700; color: var(--sp-dunkel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-mini-match-plakette {
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  background: var(--sp-dunkel);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Karte 2: Bestenliste (Endstand wie auf /so-funktionierts) */
.sp-mini-liste {
  width: 100%;
  background: #fff;
  border: 2px solid var(--sp-dunkel);
  border-radius: 16px;
  padding: 10px 10px 8px;
  text-align: left;
  font-size: 12px;
}
.sp-mini-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px 8px;
  margin-bottom: 4px;
  border-bottom: 2px solid #e2e2e2;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
}
.sp-mini-beispiel {
  background: #ffecef;
  color: var(--sp-magenta);
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.sp-mini-liste ol { list-style: none; margin: 0; padding: 0; }
.sp-mini-liste li {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 6px 0 2px;
  border-radius: 8px;
  color: var(--sp-dunkel);
}
.sp-mini-platz { width: 12px; text-align: center; font-weight: 800; color: #5a3f46; }
.sp-mini-liste img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #e6f8e6; box-shadow: 0 0 0 1.5px #00631d; }
.sp-mini-name { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-mini-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-mini-liste li.sp-mini-erster { background: #00631d; color: #fff; }
.sp-mini-liste li.sp-mini-erster .sp-mini-platz { color: #fff; }

.sp-karte-bild--champion .sp-plakette {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* ---------- Bestenliste (Beispiel, statisch) ---------- */

.sp-bestenliste {
  background: #f9f9f9;
}

.sp-bestenliste-liste {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  max-width: 480px;
}

.sp-bestenliste-zeile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(18, 34, 43, 0.08);
}

.sp-bestenliste-platz {
  font-weight: 700;
  width: 24px;
  text-align: center;
  color: var(--sp-dunkel);
}

.sp-bestenliste-name {
  flex: 1;
  font-weight: 600;
}

.sp-bestenliste-score {
  font-variant-numeric: tabular-nums;
  color: #4b5a62;
}

.sp-bestenliste-zeile--erster {
  background: var(--sp-magenta);
  color: #fff;
}

.sp-bestenliste-zeile--erster .sp-bestenliste-platz,
.sp-bestenliste-zeile--erster .sp-bestenliste-score {
  color: #fff;
}

/* Bestenliste links, lachender Spieler rechts; mobil untereinander. */
.sp-bestenliste-raster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 768px) {
  .sp-bestenliste-raster { grid-template-columns: minmax(0, 480px) minmax(0, 320px); justify-content: space-between; }
}
.sp-bestenliste-bild {
  justify-self: center;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: #e6f8e6;
}
.sp-bestenliste-bild img { display: block; width: 100%; height: 100%; object-fit: cover; }

.sp-bestenliste-abschluss {
  font-weight: 600;
  color: var(--sp-dunkel);
}

/* ---------- Drei Spieler-Fragen ---------- */

.sp-fragen-faq-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--sp-magenta);
  font-weight: 600;
  text-decoration: none;
}

.sp-fragen-faq-link:hover {
  text-decoration: underline;
}

/* ---------- Einblenden beim Scrollen (Ablauf, Bestenliste) ----------
   Wiederverwendung des generischen Mechanismus aus public/js/startseite-einblenden.js:
   [data-einblenden]/[data-einblenden-teil] + Klasse "rc-einblenden-js"/"ist-sichtbar", hier
   NEU mit eigenen, sanft auslaufenden Werten für diese Seite (kein Blinken/Leuchten). Ohne
   Skript oder bei reduzierter Bewegung bleibt alles sofort sichtbar — das Skript setzt die
   Klasse "rc-einblenden-js" nur, wenn beides vorhanden ist. */

.rc-einblenden-js [data-einblenden-teil] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rc-einblenden-js.ist-sichtbar [data-einblenden-teil] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .sp-seite * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Bei reduzierter Bewegung bleibt nur das Standbild (public/js/spieler-hero-video.js
     pausiert das Video) — ein Ton-Knopf ergäbe ohne laufendes Video keinen Sinn. */
  .sp-hero-ton {
    display: none;
  }
}

/* Kein horizontales Scrollen bei 375 px: Container/Grid bleiben innerhalb der Viewport-Breite. */
.sp-seite {
  overflow-x: clip;
}

/* Abspiel-Knopf (nur per public/js/spieler-hero-video.js erzeugt): erscheint, wenn der Browser
   die stumme Wiedergabe verweigert (z. B. iOS-Stromsparmodus) oder reduzierte Bewegung
   eingestellt ist — ein Tipp startet das Video. */
.sp-hero-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(18, 34, 43, 0.65);
  color: #fff;
  cursor: pointer;
}

.sp-hero-play[hidden] {
  display: none;
}

.sp-hero-play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.sp-hero-play .material-symbols-outlined {
  font-size: 36px;
  line-height: 1;
}

/* Abstände zwischen den Sections enger (Gründer 05.10.2026: wirkte zu leer). Allgemein .section
   hat 80 px oben und unten; auf dieser Seite 48 px, mobil 36 px. */
.sp-seite .section { padding-top: 48px; padding-bottom: 48px; }
@media (max-width: 767px) {
  .sp-seite .section { padding-top: 36px; padding-bottom: 36px; }
}
