/* ==========================================================================
   Ablauf-Vorschau — schematisch: Billboard + Handy, Schritt-für-Schritt.
   ========================================================================== */

:root {
  --navy-0: #eef2f8; --navy-1: #f6f8fd; --navy-2: #ffffff;
  --line: #e3e9f4; --panel: #eef3fb;
  --text: #16223f; --muted: #5c6a88;
  --blue: #2f6fe0; --blue-2: #1e5bd6; --cyan: #24b3ff; --glow: rgba(47,111,224,0.22);
  --gold: #b26a00; --green: #16a34a; --violet: #8b5cf6;
  --card: #ffffff; --tint: #e9f1ff; --raise: #eef3fb;
  --shadow-card: 0 12px 34px -16px rgba(23,42,80,0.16);
  --shadow-hover: 0 18px 44px -18px rgba(47,111,224,0.26);
  --font: 'Inter','Segoe UI',system-ui,-apple-system,Arial,sans-serif;
}
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: var(--font); color: var(--text);
  min-height: 100dvh; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(74,144,255,0.12), transparent 55%),
    #f4f7fc;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
svg { display: block; }

.flow-top {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.4rem; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.65); backdrop-filter: blur(8px);
}
.flow-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; }
.flow-brand__logo { width: 1.5rem; height: 1.5rem; border-radius: 6px; display: grid; place-items: center; color: #fff; font-weight: 900; background: linear-gradient(140deg, var(--blue), var(--violet)); }
.flow-brand__tag { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; color: var(--blue); border: 1px solid rgba(47,111,224,0.35); border-radius: 999px; padding: 0.1rem 0.45rem; }
.flow-title { margin-left: auto; font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.flow-main { flex: 1; display: grid; place-items: center; padding: 1.5rem; }

/* ---- Stage ---------------------------------------------------------------- */

.stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(2rem, 9vw, 7rem);
  width: 100%; max-width: 1000px;
}
.stage__label {
  text-align: center; margin-top: 0.8rem;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}

/* ---- Billboard ------------------------------------------------------------ */

.billboard { width: clamp(240px, 38vw, 420px); }
.billboard__screen {
  aspect-ratio: 4 / 3;
  border-radius: 14px; border: 3px solid #d7e0f0;
  background: radial-gradient(120% 100% at 50% 0%, rgba(74,144,255,0.14), transparent 60%), #f4f7fc;
  box-shadow: 0 30px 70px -24px rgba(23,42,80,0.16), 0 0 60px -26px var(--glow);
  padding: clamp(0.9rem, 2.5vw, 1.6rem);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  position: relative; overflow: hidden;
}
.billboard__screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(47,111,224,0.06) 50%, transparent 60%); }
.bb-brand { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 800; font-size: clamp(0.8rem, 1.8vw, 1rem); }
.bb-brand__logo { width: 1.3rem; height: 1.3rem; border-radius: 5px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 0.8rem; background: linear-gradient(140deg, var(--blue), var(--violet)); }
.bb-headline { font-weight: 800; font-size: clamp(0.95rem, 2.4vw, 1.35rem); text-align: center; line-height: 1.15; }
.bb-qr {
  width: clamp(88px, 20vw, 140px); aspect-ratio: 1; background: #fff; border-radius: 10px; padding: 6px;
  transition: box-shadow .3s ease, transform .3s ease;
}
.qr-svg { width: 100%; height: 100%; }
.bb-cue { font-size: clamp(0.68rem, 1.6vw, 0.85rem); color: var(--blue); font-weight: 700; text-align: center; }
.billboard__stand {
  width: 20%; height: clamp(28px, 5vw, 52px); margin: 0 auto;
  background: linear-gradient(180deg, #cdd8ea, #b8c5dd);
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}
/* QR pulsiert im Idle/Scan */
.stage[data-step="0"] .bb-qr, .stage[data-step="1"] .bb-qr { animation: qrpulse 1.6s ease-in-out infinite; }
@keyframes qrpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,111,224,0.0); } 50% { box-shadow: 0 0 0 6px rgba(47,111,224,0.22); } }

/* ---- Scanbeam ------------------------------------------------------------- */

.scanbeam { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 3px; pointer-events: none; opacity: 0; transition: opacity .35s ease; z-index: 3; }
.scanbeam span { position: absolute; top: 0; width: 14px; height: 3px; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 12px 1px var(--cyan); }
.stage[data-step="1"] .scanbeam { opacity: 1; }
.stage[data-step="1"] .scanbeam span { animation: dash 1.1s linear infinite; }
.scanbeam span:nth-child(2) { animation-delay: .36s; }
.scanbeam span:nth-child(3) { animation-delay: .72s; }
@keyframes dash { from { left: 62%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { left: 30%; opacity: 0; } }

/* ---- Phone ---------------------------------------------------------------- */

.phone-dev { width: clamp(150px, 26vw, 230px); }
.phone-dev__frame {
  position: relative; aspect-ratio: 9 / 19; border-radius: 26px;
  background: linear-gradient(160deg, #e8edf6, #d7e0ee); padding: 8px;
  border: 1px solid var(--line); box-shadow: 0 30px 70px -24px rgba(23,42,80,0.18), 0 0 60px -26px var(--glow);
}
.phone-dev__notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 34%; height: 14px; background: #d0dae9; border-radius: 0 0 10px 10px; z-index: 4; }
.phone-dev__screen { width: 100%; height: 100%; border-radius: 19px; overflow: hidden; background: #f6f8fd; position: relative; }

/* Phone-Inhalte je Schritt (von flow.js gesetzt) */
.ph { position: absolute; inset: 0; padding: 0.7rem; display: flex; flex-direction: column; animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.ph--idle { align-items: center; justify-content: center; gap: 0.3rem; color: var(--muted); }
.ph--idle .ph-time { font-size: 2rem; font-weight: 800; color: var(--text); }
.ph--idle .ph-lock { font-size: 1.1rem; }

.ph-scan { position: absolute; inset: 0; background: linear-gradient(160deg, #e9eef7, #dde4f0); }
.ph-scan__vf { position: absolute; inset: 22% 20%; border: 2px solid var(--cyan); border-radius: 10px; box-shadow: 0 0 20px -2px var(--cyan); }
.ph-scan__vf::before, .ph-scan__vf::after { content: ""; position: absolute; left: -2px; right: -2px; height: 2px; background: var(--cyan); }
.ph-scan__line { position: absolute; left: 22%; right: 22%; height: 2px; background: var(--cyan); box-shadow: 0 0 12px 1px var(--cyan); animation: scanline 1.4s ease-in-out infinite; }
@keyframes scanline { 0%,100% { top: 26%; } 50% { top: 70%; } }
.ph-scan__cap { position: absolute; bottom: 8%; left: 0; right: 0; text-align: center; font-size: 0.72rem; color: var(--blue); font-weight: 700; }

.ph-app { gap: 0.55rem; }
.ph-appbar { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.62rem; color: var(--muted); }
.ph-appbar b { color: var(--text); }
.ph-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; }
.ph-emoji { font-size: 2.2rem; }
.ph-h { font-weight: 800; font-size: 0.95rem; line-height: 1.15; }
.ph-sub { font-size: 0.66rem; color: var(--muted); }
.ph-btn { margin-top: 0.3rem; padding: 0.45rem 1.1rem; font-size: 0.78rem; font-weight: 800; color: #fff; border-radius: 9px; background: linear-gradient(180deg, var(--blue), var(--blue-2)); position: relative; }
.ph-btn--tap { animation: tap 1.1s ease-in-out infinite; }
@keyframes tap { 0%,100% { transform: scale(1); } 50% { transform: scale(0.93); } }
.ph-btn--tap::after { content: ""; position: absolute; inset: -6px; border-radius: 14px; border: 2px solid var(--blue); opacity: 0; animation: ripple 1.1s ease-out infinite; }
@keyframes ripple { 0% { transform: scale(0.8); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }

.ph-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; width: 100%; margin-top: auto; margin-bottom: auto; }
.ph-choice { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.3rem; text-align: center; }
.ph-choice__e { font-size: 1.5rem; }
.ph-choice__l { font-size: 0.64rem; font-weight: 700; margin-top: 0.2rem; }
.ph-choice--hot { border-color: var(--blue); box-shadow: 0 0 16px -4px var(--glow); }

.ph-wheel { margin: auto; width: 74%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--blue) 0 60deg, var(--green) 60deg 120deg, var(--gold) 120deg 180deg, #ec4899 180deg 240deg, var(--violet) 240deg 300deg, var(--cyan) 300deg 360deg);
  box-shadow: 0 0 0 5px #ffffff, 0 0 0 7px var(--line); position: relative; animation: spin 1.1s cubic-bezier(.2,.7,.2,1) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ph-wheel__hub { position: absolute; inset: 40%; border-radius: 50%; background: #ffffff; border: 2px solid var(--blue); }
.ph-wheel__ptr { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 14px solid var(--blue); z-index: 3; }
.ph-play { position: relative; align-items: center; justify-content: center; }
.ph-play__cap { position: absolute; bottom: 7%; left: 0; right: 0; text-align: center; font-size: 0.68rem; color: var(--muted); }

.ph-rcs { gap: 0.45rem; }
.ph-rcshead { display: flex; align-items: center; gap: 0.35rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
.ph-rcshead__a { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: linear-gradient(140deg, var(--blue), var(--violet)); display: grid; place-items: center; font-size: 0.7rem; font-weight: 900; color: #fff; }
.ph-rcshead__n { font-size: 0.66rem; font-weight: 800; display: flex; align-items: center; gap: 0.2rem; }
.ph-rcshead__n span { color: var(--muted); font-weight: 500; }
.ph-bub { align-self: flex-start; max-width: 88%; background: #eef2f8; padding: 0.35rem 0.5rem; border-radius: 10px 10px 10px 3px; font-size: 0.64rem; }
.ph-cardmini { background: #ffffff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: auto; }
.ph-cardmini__h { height: 2.6rem; display: grid; place-items: center; font-size: 1.4rem; background: radial-gradient(120% 120% at 30% 0%, rgba(240,196,106,0.30), transparent), #f6f8fd; }
.ph-cardmini__b { padding: 0.4rem 0.5rem; }
.ph-cardmini__t { font-weight: 800; font-size: 0.72rem; }
.ph-cardmini__c { margin-top: 0.2rem; font-family: ui-monospace, monospace; font-size: 0.6rem; color: #b26a00; background: #fff7e6; border: 1px dashed #f0c46a; border-radius: 5px; padding: 0.15rem; text-align: center; }
.ph-cardmini__btn { margin-top: 0.3rem; text-align: center; font-size: 0.6rem; font-weight: 700; color: #fff; background: linear-gradient(180deg, var(--blue), var(--blue-2)); border-radius: 6px; padding: 0.25rem; }

/* ---- Controls ------------------------------------------------------------- */

.controls { border-top: 1px solid var(--line); background: rgba(255,255,255,0.7); backdrop-filter: blur(8px); padding: 1rem 1.4rem 1.4rem; text-align: center; }
.controls__caption { font-size: 0.98rem; font-weight: 600; min-height: 1.5rem; }
.controls__caption b { color: var(--blue); }
.controls__dots { display: flex; gap: 0.4rem; justify-content: center; margin: 0.7rem 0 0.9rem; }
.controls__dots span { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--line); transition: all .25s ease; }
.controls__dots span.on { background: var(--blue); transform: scale(1.3); box-shadow: 0 0 10px 1px var(--glow); }
.controls__btns { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.ctl-btn { padding: 0.7rem 1.4rem; font-size: 0.95rem; font-weight: 700; font-family: var(--font); border-radius: 10px; cursor: pointer; border: none; -webkit-tap-highlight-color: transparent; transition: transform .12s ease, box-shadow .2s ease, opacity .2s ease, border-color .2s ease, background .2s ease; }
.ctl-btn--primary { color: #fff; background: linear-gradient(180deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 24px -8px var(--glow); }
.ctl-btn--primary:active { transform: scale(0.97); }
.ctl-btn--ghost { color: var(--text); background: transparent; border: 1px solid var(--line); }
.ctl-btn--ghost:hover { border-color: var(--blue); }
.ctl-btn:disabled { opacity: 0.4; cursor: default; }
.ctl-btn--on { border-color: var(--blue); color: var(--blue); }

@media (max-width: 640px) {
  .stage { gap: 1.2rem; }
  .billboard { width: 46%; }
  .phone-dev { width: 40%; }
}

/* ---- Motion / entrance & hover ------------------------------------------- */

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.9); } 60% { opacity: 1; transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes popScale { 0% { opacity: 0; transform: scale(0.8); } 70% { opacity: 1; transform: scale(1.05); } 100% { transform: scale(1); } }

.stage__label { animation: fadeUp .5s ease .05s backwards; }
.billboard { animation: fadeUp .6s ease .05s backwards; }
.phone-dev { animation: fadeUp .6s ease .16s backwards; }
.controls__caption { animation: fadeUp .5s ease backwards; }
.bb-headline { animation: popIn .5s ease .12s backwards; }
.bb-cue { animation: slideUp .5s ease .18s backwards; }

.ph-choice { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: fadeUp .3s ease backwards; }
.ph-choice:nth-child(1) { animation-delay: .04s; }
.ph-choice:nth-child(2) { animation-delay: .10s; }
.ph-choice:nth-child(3) { animation-delay: .16s; }
.ph-choice:nth-child(4) { animation-delay: .22s; }
.ph-choice:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.ph-cardmini { transition: transform .24s ease, box-shadow .24s ease; animation: popScale .42s ease .1s backwards; }
.ph-cardmini:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.ph-btn { transition: transform .2s ease, box-shadow .2s ease; }
.bb-qr:hover { transform: translateY(-2px); }
.ctl-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.ctl-btn:active:not(:disabled) { transform: scale(0.97); }
.ctl-btn--ghost:hover { background: var(--tint); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
