/* „So geht's" als kleine Show: drei Szenen in einem Handy, Autoplay, Schritte anklickbar.
   Steuerung: main.js setzt data-scene="1|2|3" und startet die Szene neu (Klasse .play). */
.eyebrow { font: 600 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt); margin: 0 0 .8rem; }

.how { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .how { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }

/* Schritte als Tabs mit Fortschrittsbalken */
.how .steps li { cursor: pointer; transition: transform .45s var(--spring), box-shadow .3s var(--ease), border-color .3s var(--ease), opacity .3s; overflow: hidden; outline: none; }
.how .steps li:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.how .steps li:focus-visible { box-shadow: 0 0 0 3px var(--focus), var(--shadow); }
.how .steps li[aria-selected="false"] { opacity: .72; }
.how .steps li[aria-selected="true"] { border-color: color-mix(in srgb, var(--cobalt) 35%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cobalt) 10%, transparent), var(--shadow-lg); }
.how .steps li::before { transition: background .3s, color .3s, transform .45s var(--spring); }
.how .steps li[aria-selected="true"]::before { background: var(--cobalt); color: #fff; transform: scale(1.08); box-shadow: 0 8px 18px -8px rgba(37,99,235,.8); }
.step-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--cobalt) 10%, transparent); }
.step-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3B82F6, #2563EB); border-radius: 0 3px 3px 0; }
.how.play .steps li[aria-selected="true"] .step-bar i { animation: hs-bar var(--hs-dur, 4600ms) linear forwards; }
.how.paused .steps li[aria-selected="true"] .step-bar i { animation-play-state: paused; }
@keyframes hs-bar { to { width: 100%; } }
@media (max-width: 899px) {
  .how .steps li { padding-top: 1.1rem; padding-bottom: 1rem; }
  .how .steps li p { max-height: 12em; overflow: hidden; transition: max-height .45s var(--ease), opacity .3s; }
  .how .steps li[aria-selected="false"] p { max-height: 0; opacity: 0; }
  .how .steps li h3 { margin: .2rem 0 .3rem; }
}

/* Bühne */
.how-stage { position: relative; min-height: 600px; display: grid; place-items: center; perspective: 1400px; isolation: isolate; }
.hs-glow { position: absolute; inset: 8% 4%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(59,130,246,.38), rgba(37,99,235,.12) 55%, transparent 75%); filter: blur(10px);
  animation: hs-breathe 6s ease-in-out infinite; }
@keyframes hs-breathe { 50% { transform: scale(1.06); opacity: .8; } }
.how-stage::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: 40px;
  background-image: radial-gradient(color-mix(in srgb, var(--cobalt) 22%, transparent) 1px, transparent 1.4px); background-size: 22px 22px;
  mask-image: radial-gradient(closest-side, #000, transparent); -webkit-mask-image: radial-gradient(closest-side, #000, transparent); }

.hs-device { --w: 286px; width: var(--w); aspect-ratio: 286 / 580; background: linear-gradient(160deg, #1E293B, #0B1320 40%); border-radius: 46px; padding: 10px; position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 0 0 1px rgba(255,255,255,.06), 0 50px 80px -30px rgba(11,19,32,.6), 0 20px 40px -20px rgba(37,99,235,.45);
  transform: rotateY(-14deg) rotateX(6deg) rotateZ(1deg); transform-style: preserve-3d; transition: transform .8s var(--spring); }
.how-stage:hover .hs-device { transform: rotateY(-6deg) rotateX(3deg) rotateZ(0deg) translateY(-6px); }
.hs-notch { position: absolute; top: 18px; left: 50%; width: 82px; height: 22px; margin-left: -41px; border-radius: 14px; background: #05080F; z-index: 5; }
.hs-screen { position: absolute; inset: 10px; border-radius: 37px; overflow: hidden; background: #F7F8FA; color: #0B1320; font: 500 12px/1.35 "Inter", system-ui, sans-serif; }
.hs-scene { position: absolute; inset: 0; padding: 50px 16px 18px; display: flex; flex-direction: column; gap: 10px; opacity: 0; visibility: hidden; transform: scale(.97); transition: opacity .45s var(--ease), transform .55s var(--spring), visibility 0s .45s; }
.how[data-scene="1"] .hs-cam, .how[data-scene="2"] .hs-read, .how[data-scene="3"] .hs-file { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--ease), transform .55s var(--spring), visibility 0s; }
.hs-top { display: flex; justify-content: space-between; align-items: center; font: 700 17px/1.1 var(--display); letter-spacing: -.02em; }
.hs-pill { font: 600 10px/1 var(--body); letter-spacing: .02em; padding: 5px 8px; border-radius: 999px; background: #E2E8F0; color: #334155; }
.hs-pill-blue { background: #DBEAFE; color: #1D4ED8; }
.hs-pill-green { background: #DCFCE7; color: #166534; }

/* Mini-Bon */
.hs-bon { width: 120px; padding: 12px 10px 14px; background: #FFFDF7; color: #1F2937; border-radius: 3px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 5px; font: 600 8px/1 var(--mono); }
.hs-bon b { font-size: 9px; text-align: center; letter-spacing: .06em; }
.hs-bon i { display: block; height: 4px; border-radius: 2px; background: #D9D3C3; }
.hs-bon i.s { width: 62%; }
.hs-bon em { font-style: normal; border-top: 1.5px solid #1F2937; padding-top: 4px; text-align: right; }

/* Szene 1: Kamera */
.hs-cam { background: #0B1320; color: #F7F8FA; }
.hs-cam .hs-pill { background: rgba(255,255,255,.12); color: #F7F8FA; }
.hs-view { position: relative; flex: 1; border-radius: 22px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(120% 80% at 50% 40%, #3B4556, #1A2230 70%); }
.hs-view .hs-bon { transform: rotate(-11deg) scale(.92) translate(8px, 10px); }
.hs-corner { position: absolute; width: 26px; height: 26px; border: 3px solid #fff; opacity: .9; border-radius: 6px; }
.hs-frame { position: absolute; inset: 14px; }
.hs-corner.c1 { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.hs-corner.c2 { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.hs-corner.c3 { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.hs-corner.c4 { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.hs-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.hs-hint { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; color: rgba(247,248,250,.8); }
.hs-dot { width: 8px; height: 8px; border-radius: 50%; background: #FBBF24; box-shadow: 0 0 0 0 rgba(251,191,36,.6); }
.hs-shutter { align-self: center; width: 58px; height: 58px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); display: grid; place-items: center; }
.hs-shutter span { width: 44px; height: 44px; border-radius: 50%; background: #fff; }

.how.play[data-scene="1"] .hs-view .hs-bon { animation: hs-straighten 4.6s var(--ease) forwards; }
.how.play[data-scene="1"] .hs-frame { animation: hs-snap 4.6s var(--spring) forwards; }
.how.play[data-scene="1"] .hs-corner { animation: hs-green 4.6s linear forwards; }
.how.play[data-scene="1"] .hs-flash { animation: hs-flash 4.6s linear forwards; }
.how.play[data-scene="1"] .hs-dot { animation: hs-dot 4.6s linear forwards; }
.how.play[data-scene="1"] .hs-shutter span { animation: hs-press 4.6s var(--spring) forwards; }
@keyframes hs-straighten { 0%, 30% { transform: rotate(-11deg) scale(.92) translate(8px, 10px); } 55%, 100% { transform: rotate(0) scale(1.08); } }
@keyframes hs-snap { 0%, 12% { inset: 14px; } 38%, 100% { inset: calc(50% - 72px) calc(50% - 76px); } }
@keyframes hs-green { 0%, 40% { border-color: #fff; } 46%, 100% { border-color: #22C55E; } }
@keyframes hs-flash { 0%, 52% { opacity: 0; } 55% { opacity: .95; } 66%, 100% { opacity: 0; } }
@keyframes hs-dot { 0%, 40% { background: #FBBF24; box-shadow: 0 0 0 0 rgba(251,191,36,.6); } 30% { box-shadow: 0 0 0 6px rgba(251,191,36,0); } 44%, 100% { background: #22C55E; box-shadow: 0 0 0 5px rgba(34,197,94,.18); } }
@keyframes hs-press { 0%, 48% { transform: scale(1); } 53% { transform: scale(.78); } 62%, 100% { transform: scale(1); } }

/* Szene 2: Lesen */
.hs-thumb { position: relative; height: 150px; border-radius: 18px; background: linear-gradient(160deg, #E2E8F0, #CBD5E1); display: grid; place-items: center; overflow: hidden; }
.hs-bon-flat { transform: scale(.95); }
.hs-scan { position: absolute; left: 0; right: 0; height: 36px; top: -36px;
  background: linear-gradient(180deg, transparent, rgba(37,99,235,.28) 70%, rgba(37,99,235,.9) 96%, transparent); }
.hs-fields { display: grid; gap: 6px; }
.hs-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid #E9EBEF; position: relative; overflow: hidden; }
.hs-f span { color: #64748B; font-size: 11px; }
.hs-f b { font: 700 12px/1 var(--body); }
.hs-f::after { content: ""; position: absolute; right: 10px; top: 50%; width: 84px; height: 10px; margin-top: -5px; border-radius: 6px;
  background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%); background-size: 200% 100%; }
.how.play[data-scene="2"] .hs-scan { animation: hs-scan 1.5s cubic-bezier(.45,0,.55,1) 2 forwards; }
.how.play[data-scene="2"] .hs-f::after { animation: hs-shimmer 1s linear infinite, hs-out .25s var(--ease) forwards; animation-delay: 0s, calc(.7s + var(--i) * .42s); }
.how.play[data-scene="2"] .hs-f b { opacity: 0; animation: hs-in .4s var(--spring) forwards; animation-delay: calc(.75s + var(--i) * .42s); }
.how.play[data-scene="2"] .hs-f { animation: hs-ok .7s var(--ease) forwards; animation-delay: calc(.75s + var(--i) * .42s); }
.hs-f:nth-child(1) { --i: 0; } .hs-f:nth-child(2) { --i: 1; } .hs-f:nth-child(3) { --i: 2; } .hs-f:nth-child(4) { --i: 3; } .hs-f:nth-child(5) { --i: 4; }
@keyframes hs-scan { to { top: 150px; } }
@keyframes hs-shimmer { to { background-position: -200% 0; } }
@keyframes hs-out { to { opacity: 0; transform: scaleX(.3); } }
@keyframes hs-in { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes hs-ok { 0% { border-color: #E9EBEF; } 30% { border-color: #93C5FD; box-shadow: 0 0 0 3px rgba(147,197,253,.35); } 100% { border-color: #E9EBEF; box-shadow: none; } }

/* Szene 3: Ablegen */
.hs-file { align-items: stretch; }
.hs-bubble { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid #E9EBEF; box-shadow: 0 8px 20px -14px rgba(11,19,32,.4); font-size: 11.5px; }
.hs-bubble img { width: 22px; height: 22px; border-radius: 7px; flex: none; }
.hs-flyer { position: relative; height: 150px; display: grid; place-items: center; }
.hs-pdf { width: 92px; height: 120px; border-radius: 8px; background: #fff; border: 1px solid #E2E8F0; box-shadow: 0 14px 30px -14px rgba(11,19,32,.5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative; overflow: hidden; }
.hs-pdf::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 26px; background: linear-gradient(90deg, #2563EB, #3B82F6); }
.hs-pdf b { position: relative; z-index: 1; margin-top: -10px; color: #fff; font: 700 11px/1 var(--display); }
.hs-pdf span { font: 600 9px/1 var(--mono); color: #334155; margin-top: 22px; }
.hs-folder { position: relative; align-self: center; width: 150px; height: 64px; border-radius: 6px 14px 14px 14px; background: linear-gradient(160deg, #3B82F6, #1D4ED8); color: #fff; display: flex; flex-direction: column; justify-content: center; padding-left: 14px; box-shadow: 0 16px 30px -14px rgba(37,99,235,.8); }
.hs-tab { position: absolute; left: 0; top: -9px; width: 56px; height: 12px; border-radius: 6px 6px 0 0; background: #3B82F6; }
.hs-folder b { font: 700 14px/1.1 var(--display); } .hs-folder small { font-size: 10px; opacity: .85; }
.hs-stamp { position: absolute; left: 50%; top: 38%; white-space: nowrap; z-index: 2; translate: -50% 0; padding: 6px 12px; border: 3px solid #16A34A; color: #16A34A; border-radius: 10px; font: 800 18px/1 var(--display); letter-spacing: .02em; background: rgba(255,255,255,.9); opacity: 0; transform: rotate(-9deg) scale(2.2); }
.hs-cta { margin-top: auto; position: relative; overflow: hidden; text-align: center; padding: 13px; border-radius: 14px; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #3B82F6, #2563EB 45%, #1D4ED8); box-shadow: 0 10px 22px -12px rgba(37,99,235,.9); }
.hs-ripple { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0); opacity: 0; }
.hs-burst { position: absolute; left: 50%; top: 62%; width: 0; height: 0; }
.hs-burst i { position: absolute; width: 7px; height: 7px; border-radius: 2px; opacity: 0; background: var(--c, #3B82F6); }
.hs-burst i:nth-child(1) { --a: 0deg; --c: #2563EB; } .hs-burst i:nth-child(2) { --a: 36deg; --c: #22C55E; } .hs-burst i:nth-child(3) { --a: 72deg; --c: #F59E0B; }
.hs-burst i:nth-child(4) { --a: 108deg; --c: #93C5FD; } .hs-burst i:nth-child(5) { --a: 144deg; --c: #2563EB; } .hs-burst i:nth-child(6) { --a: 180deg; --c: #22C55E; }
.hs-burst i:nth-child(7) { --a: 216deg; --c: #F59E0B; } .hs-burst i:nth-child(8) { --a: 252deg; --c: #3B82F6; } .hs-burst i:nth-child(9) { --a: 288deg; --c: #93C5FD; } .hs-burst i:nth-child(10) { --a: 324deg; --c: #22C55E; }

.how.play[data-scene="3"] .hs-bubble { animation: hs-in .5s var(--spring) .15s both; }
.how.play[data-scene="3"] .hs-cta { animation: hs-press 4.6s var(--spring) forwards; }
.how.play[data-scene="3"] .hs-ripple { animation: hs-ripple 4.6s var(--ease) forwards; }
.how.play[data-scene="3"] .hs-pdf { animation: hs-fly 4.6s cubic-bezier(.5,0,.3,1) forwards; }
.how.play[data-scene="3"] .hs-folder { animation: hs-bump 4.6s var(--spring) forwards; }
.how.play[data-scene="3"] .hs-stamp { animation: hs-stamp 4.6s var(--spring) forwards; }
.how.play[data-scene="3"] .hs-burst i { animation: hs-burst 4.6s var(--ease) forwards; }
@keyframes hs-ripple { 0%, 22% { transform: scale(0); opacity: 0; } 24% { opacity: .9; } 40% { transform: scale(1); opacity: 0; } 100% { opacity: 0; } }
@keyframes hs-fly { 0%, 30% { transform: none; opacity: 1; } 44% { transform: translateY(-14px) rotate(-4deg) scale(1.04); } 58% { transform: translateY(118px) rotate(8deg) scale(.32); opacity: 1; } 62%, 100% { transform: translateY(124px) scale(.2); opacity: 0; } }
@keyframes hs-bump { 0%, 56% { transform: none; } 62% { transform: scale(1.1, .9); } 70% { transform: scale(.97, 1.04); } 78%, 100% { transform: none; } }
@keyframes hs-stamp { 0%, 62% { opacity: 0; transform: rotate(-9deg) scale(2.2); } 68% { opacity: 1; transform: rotate(-9deg) scale(.94); } 74%, 100% { opacity: 1; transform: rotate(-9deg) scale(1); } }
@keyframes hs-burst { 0%, 62% { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(.6); } 66% { opacity: 1; } 84% { opacity: 1; transform: rotate(var(--a)) translateX(96px) translateY(18px) scale(1) rotate(180deg); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(110px) translateY(40px) rotate(260deg); } }

/* Belegerl neben dem Handy: reagiert auf die Szene */
.hs-mascot { position: absolute; right: max(0px, calc(50% - 250px)); bottom: 2%; width: 150px; height: auto; z-index: 3; filter: drop-shadow(0 22px 22px rgba(11,19,32,.35)); transform-origin: 50% 100%; animation: hs-float 5s ease-in-out infinite; pointer-events: none; }
.how.play[data-scene="1"] .hs-mascot { animation: hs-float 5s ease-in-out infinite, hs-hop .7s var(--spring) .1s; }
.how.play[data-scene="2"] .hs-mascot { animation: hs-float 5s ease-in-out infinite, hs-think 1.2s var(--ease) .1s; }
.how.play[data-scene="3"] .hs-mascot { animation: hs-float 5s ease-in-out infinite, hs-cheer 1s var(--spring) 2.9s; }
@keyframes hs-float { 50% { translate: 0 -10px; } }
@keyframes hs-hop { 0% { transform: none; } 40% { transform: translateY(-14px) scale(.97, 1.04); } 70% { transform: scale(1.04, .96); } 100% { transform: none; } }
@keyframes hs-think { 0%, 100% { transform: none; } 50% { transform: rotate(-6deg); } }
@keyframes hs-cheer { 0% { transform: none; } 30% { transform: translateY(-26px) rotate(5deg) scale(1.05); } 55% { transform: translateY(0) scale(1.06, .94); } 75% { transform: translateY(-8px) rotate(-3deg); } 100% { transform: none; } }

.hs-chip { position: absolute; z-index: 4; padding: 8px 12px; border-radius: 999px; font: 600 12px/1 var(--body); color: var(--text); background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); animation: hs-float 6s ease-in-out infinite; }
.hs-chip-a { left: max(0px, calc(50% - 250px)); top: 18%; }
.hs-chip-b { left: max(8px, calc(50% - 230px)); bottom: 16%; animation-delay: -3s; }
.hs-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 899px) {
  .how { gap: 1rem; }
  .how-copy { display: contents; }
  .how-copy .eyebrow { order: 0; margin: 0; } .how-copy h2 { order: 1; margin: 0; }
  .how-stage { order: 2; min-height: 470px; }
  .how .steps { order: 3; margin-top: 0; }
  .hs-device { --w: 224px; transform: none; }
  .hs-screen { font-size: 11px; }
  .hs-scene { padding: 44px 12px 14px; gap: 8px; }
  .hs-mascot { width: 104px; right: 0; bottom: 0; }
  .hs-chip { font-size: 11px; padding: 7px 10px; }
  .hs-chip-a { left: 0; top: 8%; } .hs-chip-b { left: 0; bottom: 10%; }
}

@media (prefers-reduced-motion: reduce) {
  .how-stage *, .how .steps li, .step-bar i { animation: none !important; transition: none !important; }
  .hs-device { transform: none; }
  .hs-f b { opacity: 1 !important; } .hs-f::after { display: none; }
}

/* Seitenweite Effekte (Landing): Cursor-Schein, Karten-Tilt mit Lichtpunkt */
.cursor-glow { position: fixed; left: -260px; top: -260px; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: -1; opacity: 0;
  background: radial-gradient(closest-side, rgba(59,130,246,.13), rgba(59,130,246,.05) 50%, transparent 72%); transition: opacity .4s; will-change: transform; }
.cursor-glow.on { opacity: 1; }
.feature-grid li, .who-grid article, .plan, .faq details { transition: transform .5s var(--spring), box-shadow .3s var(--ease), border-color .3s; will-change: transform; }
.feature-grid li.is-tilting, .who-grid article.is-tilting, .plan.is-tilting { transition: transform .09s linear, box-shadow .3s; box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--cobalt) 30%, var(--border));
  background-image: radial-gradient(360px circle at var(--mx) var(--my), rgba(59,130,246,.10), transparent 60%); }
.btn { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.btn-primary:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
@media (prefers-reduced-motion: reduce) { .cursor-glow { display: none; } }
