/* Handy-Karussell in der App-Buehne (Tobias 10.11.2026).
   Vorlage: Phone Mockups 1 (solaceui, 21st.dev), ohne React nachgebaut.
   Vorn ein Geraet, links und rechts blass die Nachbarn, alle laufen unten
   aus der Buehne. Der Platz kommt aus data-platz (mitte, links, rechts, aus),
   das Skript schiebt ihn weiter. Rahmen wie .geraet (start-hell-sektionen.css). */

.hk {
  --unten: 56px; /* = unterer Innenabstand der .app-buehne */
  position: relative;
  align-self: end;
  margin-bottom: calc(-1 * var(--unten));
}
.hk-buehne { position: relative; aspect-ratio: 1 / 1.04; overflow: hidden; }

.hk-handy {
  --x: 0%; --y: 0%; --s: 1; --o: 1;
  position: absolute;
  top: 4%;
  left: 50%;
  width: 46%;
  margin: 0 0 0 -23%;
  overflow: hidden;
  border: 10px solid #15121D;
  border-radius: 44px;
  background: #15121D;
  box-shadow: 0 1px 2px rgba(23, 16, 43, .1), 0 40px 70px -30px rgba(23, 16, 43, .55), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transform: translate(var(--x), var(--y)) scale(var(--s));
  transform-origin: 50% 0;
  opacity: var(--o);
  transition: transform .8s var(--ease), opacity .8s var(--ease), filter .8s var(--ease);
  will-change: transform;
}
/* Dynamic Island: alle Aufnahmen bringen sie mit, nur Heute nicht. Dort wird
   sie nachgezeichnet, gemessen an ios-leads.webp (x 208, y 21, 187 x 55 von 603). */
.hk-handy.hk-insel::after { content: ""; position: absolute; top: 0; left: 34.5%; width: 31%; margin-top: 3.48%; aspect-ratio: 187 / 55; border-radius: 999px; background: #000; }
.hk-handy img { display: block; width: 100%; height: auto; border-radius: 34px; }

.hk-handy[data-platz="mitte"]  { z-index: 3; }
.hk-handy[data-platz="links"]  { z-index: 2; --x: -62%; --y: 15%; --s: .86; --o: .5; filter: saturate(.55); }
.hk-handy[data-platz="rechts"] { z-index: 2; --x: 62%;  --y: 15%; --s: .86; --o: .5; filter: saturate(.55); }
.hk-handy[data-platz="aus"]    { z-index: 1; --y: 24%; --s: .72; --o: 0; }

/* Steuerung: drei runde Knoepfe ueber dem vorderen Geraet. */
.hk-steuer {
  position: absolute; z-index: 4; left: 50%; bottom: calc(var(--unten) + 28px);
  display: flex; gap: 8px; translate: -50% 0;
}
.hk-steuer[hidden] { display: none; }
.hk-knopf {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%;
  background: rgba(21, 18, 29, .74);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(23, 16, 43, .7);
  transition: background var(--t-2) var(--ease), scale var(--t-2) var(--ease);
}
.hk-knopf:hover { background: rgba(21, 18, 29, .9); }
.hk-knopf:active { scale: .94; }
.hk-knopf:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hk-knopf svg { width: 20px; height: 20px; }
.hk-knopf .hk-play { display: none; width: 18px; height: 18px; }
.hk-knopf[aria-pressed="true"] .hk-pause { display: none; }
.hk-knopf[aria-pressed="true"] .hk-play { display: block; }

@media (max-width: 1100px) { .hk { --unten: 40px; } }
@media (max-width: 980px) {
  .hk { max-width: 560px; width: 100%; margin-inline: auto; }
}
@media (max-width: 620px) {
  /* Bis an die Seitenraender der Buehne, sonst harte Kante neben dem Text. */
  .hk { --unten: 24px; --seite: 20px; margin-inline: calc(-1 * var(--seite)); width: calc(100% + 2 * var(--seite)); max-width: none; }
  .hk-buehne { aspect-ratio: 1 / 1.12; }
  .hk-handy { width: 54%; margin-left: -27%; border-width: 6px; border-radius: 28px; }
  .hk-handy img { border-radius: 22px; }
  .hk-handy[data-platz="links"]  { --x: -58%; }
  .hk-handy[data-platz="rechts"] { --x: 58%; }
  .hk-steuer { bottom: calc(var(--unten) + 20px); }
  .hk-knopf { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hk-handy { transition: none; }
}
