/* ==========================================================================
   QRENA Landing — Hero „Szene“ (Q-353 Etappe 2a, 2026-12-02)
   Abgenommener Entwurf: planning/redesign-landing/hero-entwurf.html (impeccable + animate, Chrome 390/820/1180/1366).
   Alles mit Präfix hs-; Tokens am Hero selbst (die Landing nutzt --text als FARBE, hier ist es die Schrift).
   Regeln nach docs/design/designsystem.md: dunkles Glas, ein neutraler Schatten, Tinte auf Weltfarbe, nur SVG,
   Bewegung nur transform/opacity, abschaltbar (prefers-reduced-motion + body.reduce-motion).
   ========================================================================== */
.hs-hero {
    --bg: #0b1120;
    --panel: #111827;
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --ink-3: #94a3b8;
    --linie: rgba(241, 245, 249, 0.14);
    --rallye: #f97316;
    --rallye-tinte: #1a0b02;
    --sol-tx: #6ee7b7;
    --pfad-a: #10b981;
    --pfad-b: #f59e0b;
    --pfad-c: #ef4444;
    --sos: #ef4444;
    --bewertung: #f59e0b;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --feder: cubic-bezier(.34, 1.56, .64, 1);
    --schatten: 0 24px 60px rgba(0, 0, 0, .5);
    --display: "Space Grotesk", system-ui, sans-serif;
    --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
  /* ── Hero ─────────────────────────────────────────────── */
  .hs-hero { color: var(--ink-2); max-width: 1200px; margin: 0 auto; padding: 104px 16px 56px; display: grid; gap: 22px; }
  .hs-hero-text { display: contents; }
  .hs-hero-titel { order: 1; margin: 0; font-family: var(--display); font-weight: 700; color: var(--ink); font-size: clamp(1.85rem, 1.2rem + 3vw, 3.15rem); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
  .hs-hero-titel .hs-zeile2 { display: block; color: var(--sol-tx); }
  .hs-nw { white-space: nowrap; }
  .hs-hero-sub { order: 4; margin: 0; font-size: 1.0625rem; max-width: 54ch; text-wrap: pretty; }
  .hs-hero-aktion { order: 2; display: grid; gap: 10px; justify-items: start; }
  .hs-szene { order: 3; }
  .hs-saeulen { order: 5; }

  .hs-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 16px; background: var(--rallye); color: var(--rallye-tinte); font-family: var(--display); font-weight: 700; font-size: 1.0625rem; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); transition: transform .2s var(--ease), background-color .2s var(--ease); }
  .hs-cta svg { width: 20px; height: 20px; }
  @media (hover: hover) and (pointer: fine) { .hs-cta:hover { transform: translateY(-2px); background: #fb8a3c; } }
  .hs-ehrlich { margin: 0; font-size: .9375rem; color: var(--ink-3); }

  .hs-saeulen { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .hs-saeulen a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--linie); background: rgba(17, 24, 39, .72); color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 600; transition: border-color .2s var(--ease); }
  .hs-saeulen svg { width: 18px; height: 18px; color: var(--sol-tx); flex: none; }
  @media (hover: hover) and (pointer: fine) { .hs-saeulen a:hover { border-color: rgba(241, 245, 249, .4); } }

  /* ── Szene: Wand an der Tafel + Live-Ansicht der Lehrkraft, im Wechsel SOL ↔ Rallye ── */
  .hs-szene { position: relative; margin: 6px 0 0; }
  .hs-motto { margin: 0 0 12px; text-align: center; font-family: var(--display); font-weight: 700;
    font-size: clamp(1.6rem, 1rem + 2.6vw, 2.9rem); line-height: 1.02; letter-spacing: -0.025em; color: #64748b; text-wrap: balance; }
  .hs-motto span { white-space: nowrap; }

  .hs-wahl { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 0 14px; }
  .hs-wahl-gruppe { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(17, 24, 39, .8); border: 1px solid var(--linie); }
  .hs-wahl-knopf { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 600 .9375rem var(--text); cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease); }
  .hs-wahl-knopf b { font-family: var(--display); color: var(--ink); }
  .hs-wahl-knopf[aria-pressed="true"][data-modus="sol"] { background: #10b981; color: #022c22; }
  .hs-wahl-knopf[aria-pressed="true"][data-modus="rallye"] { background: var(--rallye); color: var(--rallye-tinte); }
  .hs-wahl-knopf[aria-pressed="true"] b { color: inherit; }
  .hs-pause { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--linie); background: rgba(17, 24, 39, .8); color: var(--ink-2); cursor: pointer; }
  .hs-pause svg { width: 18px; height: 18px; }
  .hs-pause .hs-an { display: none; }
  .hs-pause[aria-pressed="true"] .hs-aus { display: none; }
  .hs-pause[aria-pressed="true"] .hs-an { display: block; }
  @media (hover: hover) and (pointer: fine) { .hs-wahl-knopf:hover:not([aria-pressed="true"]) { background: rgba(241, 245, 249, .06); } .hs-pause:hover { border-color: rgba(241, 245, 249, .4); } }

  @media (max-width: 479px) { .hs-wahl-knopf .hs-zusatz { display: none; } .hs-wahl-knopf { padding: 0 22px; } }
  .hs-buehne { display: grid; }
  .hs-modus { grid-area: 1 / 1; position: relative; opacity: 0; visibility: hidden; transition: opacity .42s var(--ease), visibility 0s linear .42s; }
  .hs-modus.hs-aktiv { opacity: 1; visibility: visible; transition: opacity .42s var(--ease), visibility 0s; }

  .hs-tafel { position: relative; padding: 8px; border-radius: 22px; background: #05070f; border: 1px solid var(--linie); box-shadow: var(--schatten); }
  .hs-tafel-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 4px 6px 10px; font-size: .8125rem; color: var(--ink-3); }
  .hs-tafel-kopf strong { font-family: var(--display); font-size: .875rem; color: var(--ink); margin-right: 2px; }
  .hs-tafel-kopf span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .hs-tafel-kopf span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--farbe); }
  .hs-tafel-bild { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #000; }
  .hs-wand { position: relative; }
  .hs-wand img { display: block; width: 100%; height: auto; }
  .hs-ring { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); border-radius: 10px; border: 3px solid #f8fafc; box-shadow: 0 0 0 4px rgba(5, 7, 15, .65); opacity: 0; }
  .hs-ring i { position: absolute; top: -12px; left: -12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #f8fafc; color: #05070f; }
  .hs-ring i svg { width: 15px; height: 15px; }
  .hs-ring--3 { opacity: 1; }   /* Endbild: letzter Ring bleibt */

  .hs-radar { position: relative; margin: -12px 10px 0 auto; width: calc(100% - 20px); max-width: 360px; padding: 14px 14px 8px; border-radius: 20px; background: rgba(17, 24, 39, .9); border: 1px solid rgba(241, 245, 249, .16); box-shadow: var(--schatten), inset 0 1px 0 rgba(255, 255, 255, .08); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .hs-radar { background: rgba(17, 24, 39, .78); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); } }
  .hs-radar-kopf { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; font-size: .8125rem; font-weight: 700; color: var(--ink); }
  .hs-radar-kopf .hs-live { width: 8px; height: 8px; border-radius: 50%; background: var(--welt); }
  .hs-meldungen { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .hs-meldung { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(241, 245, 249, .04); }
  .hs-meldung .hs-sym { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--farbe); color: #05070f; }
  .hs-meldung .hs-sym svg { width: 17px; height: 17px; }
  .hs-meldung p { margin: 0; font-size: .9375rem; line-height: 1.3; color: var(--ink); }
  .hs-meldung p small { display: block; font-size: .8125rem; color: var(--ink-3); }
  .hs-meldung b { font-family: var(--display); }

  .hs-modus--sol { --welt: #10b981; }
  .hs-modus--rallye { --welt: var(--rallye); }
  /* Ringe = echte Stationen/Aufgaben im Bild. SOL: Ausschnitt 890×668 (x 280, y 58); Rallye: 2082×1296 */
  .hs-modus--sol .hs-ring--1 { --x: 35.73%; --y: 40.12%; --w: 16.63%; --h: 22.16%; }
  .hs-modus--sol .hs-ring--2 { --x: 57.30%; --y: 72.46%; --w: 16.63%; --h: 22.16%; }
  .hs-modus--sol .hs-ring--3 { --x: 78.88%; --y: 7.49%;  --w: 16.63%; --h: 22.16%; }
  .hs-modus--rallye .hs-ring--1 { --x: 50.29%; --y: 8.56%;  --w: 11.38%; --h: 21.30%; }
  .hs-modus--rallye .hs-ring--2 { --x: 62.68%; --y: 31.48%; --w: 11.38%; --h: 21.30%; }
  .hs-modus--rallye .hs-ring--3 { --x: 87.46%; --y: 8.56%; --w: 11.38%; --h: 21.30%; }

  @media (min-width: 900px) {
    .hs-hero { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); column-gap: 56px; row-gap: 26px; padding: 132px 24px 96px; align-items: center; }
    .hs-hero-text { display: grid; gap: 26px; align-content: center; grid-column: 1; grid-row: 1; }
    .hs-hero-titel, .hs-hero-sub, .hs-hero-aktion, .hs-saeulen, .hs-kinder { order: 0; }
    .hs-hero-sub { font-size: 1.1875rem; }
    .hs-szene { grid-column: 2; grid-row: 1; margin: 0 0 56px; }
    .hs-radar { position: absolute; left: -36px; bottom: -56px; margin: 0; width: 320px; }
  }
  @media (min-width: 900px) and (max-width: 1199px) { .hs-radar { left: -16px; width: 280px; } }

  /* ── Bewegung: je Modus drei Takte (Kind scannt → Lehrkraft sieht es), dann Wechsel ── */
  .hs-modus.hs-laeuft .hs-ring--1 { animation: heroRingAn .32s var(--ease) .5s both, heroRingAus .3s var(--ease) 1.75s forwards; }
  .hs-modus.hs-laeuft .hs-ring--2 { animation: heroRingAn .32s var(--ease) 1.75s both, heroRingAus .3s var(--ease) 3s forwards; }
  .hs-modus.hs-laeuft .hs-ring--3 { animation: heroRingAn .32s var(--ease) 3s both; }
  .hs-modus.hs-laeuft .hs-meldung:nth-child(1) { animation: heroMeldung .42s var(--feder) .8s both; }
  .hs-modus.hs-laeuft .hs-meldung:nth-child(2) { animation: heroMeldung .42s var(--feder) 2.05s both; }
  .hs-modus.hs-laeuft .hs-meldung:nth-child(3) { animation: heroMeldung .42s var(--feder) 3.3s both; }
  .hs-modus.hs-wartet .hs-ring, .hs-modus.hs-wartet .hs-meldung { opacity: 0; }
  @keyframes heroRingAn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
  @keyframes heroRingAus { from { opacity: 1; } to { opacity: 0; } }
  @keyframes heroMeldung { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

  @media (prefers-reduced-motion: reduce) {
    .hs-ring, .hs-meldung { animation: none !important; }
    .hs-modus, .hs-modus.hs-aktiv { transition: none; }
  }
  body.reduce-motion .hs-ring, body.reduce-motion .hs-meldung { animation: none !important; }
  body.reduce-motion .hs-modus { transition: none; }


  /* Landing-Button-Regel aufheben (landing.css: button:not(…)×3 setzt Padding, Hover-Sprung, transition:all) */
  .hs-hero .hs-wahl button.hs-wahl-knopf { padding: 0 16px; min-width: 0; border-radius: 10px; font-size: .9375rem; letter-spacing: 0;
    box-shadow: none; transition: background-color .25s var(--ease), color .25s var(--ease); }
  .hs-hero .hs-wahl button.hs-pause { padding: 0; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--linie);
    box-shadow: none; transition: border-color .2s var(--ease); }
  .hs-hero .hs-wahl button:hover, .hs-hero .hs-wahl button:active { transform: none; box-shadow: none; }
  @media (max-width: 479px) { .hs-hero .hs-wahl button.hs-wahl-knopf { padding: 0 22px; } }

  /* Weg für Kinder, die per QR auf qrena.de landen (aus dem alten Hero übernommen) */
  .hs-kinder { order: 6; margin: 0; font-size: .9375rem; color: var(--ink-3); }
  .hs-kinder a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline;
    text-underline-offset: 3px; text-decoration-color: rgba(241, 245, 249, .35); }
  .hs-hero :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
