/* "How it works" v3 (research 66 §12): brief card · iPhone (call → transcript → WhatsApp) · result card + 4 steps.
   Brand colours on our own UI; the phone screens use the look of the real apps (iOS call green/red, WhatsApp greens)
   so they read as real screenshots. Motion: js/flow-a.js. */
.fa { max-width: var(--page-max); margin: var(--section-y) var(--edge) 0; }
.fa-head { max-width: 820px; margin: 0 auto var(--head-gap); text-align: center; }
.fa-eyebrow { margin: 0 0 12px; font: 500 13px/1.3 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.rta .fa-h2 { margin: 0; font: 600 clamp(32px, 4.6vw, 68px)/1.04 var(--font); letter-spacing: -0.035em; text-wrap: balance; }
.fa-key { background-image: linear-gradient(var(--warm-soft), var(--warm-soft)); background-repeat: no-repeat; background-position: 0 88%; background-size: 100% 0.32em; }
.fa-intro { max-width: 52ch; margin: 18px auto 0; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }

.fa-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: center;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 48px); border-radius: var(--r-xl); isolation: isolate;
  background: radial-gradient(90% 70% at 85% 0%, rgba(var(--sky-rgb), 0.16), transparent 60%), radial-gradient(80% 60% at 10% 100%, rgba(var(--warm-rgb), 0.08), transparent 60%), #f4f5fa; }
.fa-wires { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fa-wire { fill: none; stroke: var(--sky); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0.7; }

/* ---------- cards ---------- */
.fa-card { position: relative; padding: clamp(20px, 2vw, 28px); border-radius: var(--r-l); background: #fff;
  box-shadow: 0 1px 2px rgba(33, 33, 33, 0.04), 0 30px 60px -36px rgba(var(--shade), 0.4); }
.fa-card .icon, .fa-card svg { display: inline-block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.12em; }
.fa-kind { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 500 12px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.fa-card__t { margin: 0; font: 600 clamp(19px, 1.6vw, 24px)/1.2 var(--font); letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.fa-list { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--grey-1); font: 500 12px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.fa-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 15px; line-height: 1.35; color: var(--ink); }
.fa-checks li { display: flex; align-items: center; gap: 10px; }
.fa-ck { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(var(--shade), 0.25); }
.fa-ck i { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; opacity: 0; transform: scale(0.4); transition: opacity 0.25s, transform 0.3s var(--e-spring); font: 700 12px/1 var(--font); font-style: normal; color: #fff; }
.fa-ck__ok { background: var(--positive-fill); }
.fa-ck__ok svg { width: 11px; height: 11px; stroke-width: 3.2; }
.fa-ck__ask { background: var(--warm); }
.fa-ck[data-st="ok"] .fa-ck__ok, .fa-ck[data-st="ask"] .fa-ck__ask { opacity: 1; transform: none; }
.fa-status { position: relative; display: grid; margin: 18px 0 0; }
.fa-status > span { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font: 600 13px/1.2 var(--font); }
.fa-status__wait { background: var(--fill); color: var(--text-2); }
.fa-status__wait i { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); animation: fa-blink 1.2s ease-in-out infinite; }
.fa-status__done { background: var(--positive-tint); color: var(--positive-ink); }
@keyframes fa-blink { 50% { opacity: 0.3; } }

.fa-ok { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 6px 10px; border-radius: 999px; background: var(--positive-tint); color: var(--positive-ink); font: 600 12.5px/1 var(--font); }
.fa-sub { margin: 6px 0 0; font-size: 15px; color: var(--text-2); }
.fa-rows { list-style: none; margin: 18px 0 0; padding: 0; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--grey-1); }
.fa-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; font-size: 14.5px; color: var(--ink); }
.fa-rows li + li { border-top: 1px solid var(--grey-1); }
.fa-rows__ic { color: var(--text-2); }
.fa-rows__m { display: grid; justify-items: end; font: 500 13.5px/1 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; }
.fa-rows__m > span { grid-area: 1 / 1; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.fa-m2 { color: var(--positive-ink); }

/* ---------- the iPhone ---------- */
.fa-phone { position: relative; width: 300px; aspect-ratio: 300 / 620; padding: 10px; border-radius: 52px; background: linear-gradient(145deg, #3a3a3e, #121214);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.12), 0 50px 90px -40px rgba(20, 24, 40, 0.65); }
.ip-screen { position: relative; height: 100%; border-radius: 43px; overflow: hidden; background: #000; font-family: -apple-system, "SF Pro Text", var(--font); }
.ip-scr { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ip-bar { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 26px 0 30px; font: 600 14px/1 -apple-system, "SF Pro Text", var(--font); color: #000; flex: none; }
.ip-bar--dark { color: #fff; }
.ip-isl { width: 92px; height: 26px; border-radius: 20px; background: #000; }
.ip-sig { display: flex; align-items: flex-end; gap: 1.5px; }
.ip-sig b { width: 3px; border-radius: 1px; background: currentColor; }
.ip-sig b:nth-child(1) { height: 4px; } .ip-sig b:nth-child(2) { height: 6px; } .ip-sig b:nth-child(3) { height: 8px; } .ip-sig b:nth-child(4) { height: 10px; margin-right: 5px; }
.ip-sig svg { width: 24px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.9; }
.ip-sig .ip-batt { fill: currentColor; stroke: none; }

/* incoming + live call: iOS full-screen call on a blurred wallpaper */
.ip-in, .ip-call { color: #fff; background: radial-gradient(120% 70% at 20% 10%, #5a6c8f, transparent 60%), radial-gradient(100% 70% at 90% 90%, #7a5a6a, transparent 60%), linear-gradient(170deg, #2d3448, #1d2030); }
.ip-who { padding: 34px 20px 0; text-align: center; }
.ip-name { margin: 0; font: 400 34px/1.1 -apple-system, "SF Pro Display", var(--font); letter-spacing: -0.01em; }
.ip-name--s { font-size: 26px; }
.ip-subl { margin: 6px 0 0; font-size: 16px; opacity: 0.75; }
.ip-act { display: flex; justify-content: space-between; margin-top: auto; padding: 0 30px 56px; }
.ip-btn { display: grid; justify-items: center; gap: 8px; font-size: 14px; }
.ip-btn i { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; }
.ip-btn i .icon, .ip-btn i svg, .ip-end svg { width: 30px; height: 30px; fill: currentColor; stroke: currentColor; stroke-width: 0.5; }
.ip-btn--no i { background: #ff3b30; }
.ip-btn--no i svg, .ip-end svg { transform: rotate(135deg); }
.ip-btn--yes i { background: #34c759; }
.ip-live { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: 12.5px; font-weight: 600; }
.ip-live i { width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.3); }
.ip-timer { margin: 4px 0 0; font-size: 15px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.ip-lines { flex: 1; min-height: 0; margin: 16px 0 112px; padding: 0 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 34px); mask-image: linear-gradient(to bottom, transparent, #000 34px); }
.ip-track { display: grid; gap: 7px; padding-top: 10px; }
.ip-line { --hl: 0; margin: 0; padding: 8px 11px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); font-size: 13px; line-height: 1.32; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 calc(var(--hl) * 2px) rgba(244, 180, 140, 0.95); }
.ip-line b { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; opacity: 0.7; }
.ip-line--a { background: rgba(232, 116, 59, 0.32); }
.ip-note { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 8px 3px 5px; border-radius: 999px; background: #34c759; color: #fff; font: 600 11px/1 var(--font); }
.fa .ip-note .icon { width: 11px; height: 11px; }
.ip-note svg { stroke-width: 3.2; }
.ip-end { position: absolute; left: 50%; bottom: 36px; display: grid; place-items: center; width: 62px; height: 62px; margin-left: -31px; border-radius: 50%; background: #ff3b30; color: #fff; }

/* WhatsApp (iOS light) */
.ip-wa { background: #efeae2; color: #111b21; }
.ip-wa .ip-bar { background: #f6f6f6; }
.wa-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px 10px 6px; background: #f6f6f6; border-bottom: 1px solid #dedede; flex: none; }
.wa-head .icon, .wa-head svg { width: 22px; height: 22px; fill: none; stroke: #007aff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wa-back svg { transform: rotate(90deg); }
.wa-ava { width: 34px; height: 34px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7a676, var(--warm) 55%, #c95a24); }
.wa-head b { display: block; font: 600 15px/1.2 -apple-system, var(--font); }
.wa-head small { display: block; font-size: 11.5px; color: #667781; }
.wa-call { margin-left: auto; }
.wa-chat { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; overflow: hidden;
  background: radial-gradient(circle at 10px 10px, rgba(0, 0, 0, 0.035) 2px, transparent 2.5px) 0 0 / 26px 26px, #efeae2; }
.wa-msg { position: relative; max-width: 84%; margin: 0; padding: 6px 8px 16px 9px; border-radius: 9px; font-size: 13.5px; line-height: 1.3; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
.wa-msg time { position: absolute; right: 7px; bottom: 3px; display: flex; align-items: center; gap: 2px; font-size: 10px; color: #667781; }
.wa-msg--in { align-self: flex-start; background: #fff; border-top-left-radius: 2px; padding-right: 36px; }
.wa-msg--out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; padding-right: 52px; }
.wa-tick { display: inline-flex; color: #8696a0; }
.wa-tick .icon, .wa-tick svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.wa-tick .icon + .icon, .wa-tick svg + svg { margin-left: -8px; }
.wa-input { display: flex; align-items: center; gap: 10px; padding: 8px 12px 26px; background: #f6f6f6; flex: none; color: #007aff; font-size: 24px; }
.wa-input i { flex: 1; height: 32px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px #e0e0e0; }
.wa-mic svg, .wa-mic .icon { width: 22px; height: 22px; fill: none; stroke: #007aff; stroke-width: 2; }

/* ---------- cursors ---------- */
.fa-cur { position: absolute; left: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; pointer-events: none; opacity: 0; visibility: hidden; }
.fa-cur b { padding: 4px 9px; border-radius: 999px; font: 600 12px/1 var(--font); white-space: nowrap; }
.fa-cur--agent { margin: -11px 0 0 -11px; }
.fa-cur--agent i { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7a676, var(--warm) 55%, #c95a24); box-shadow: 0 0 0 0 rgba(232, 116, 59, 0.5), 0 6px 14px -4px rgba(232, 116, 59, 0.8); }
.fa-cur--agent b { background: var(--warm); color: #fff; }

/* ---------- steps ---------- */
.fa-steps { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);   /* every step in one row, however many (5 in the copy; QA 20.10: the 5th fell under the 4th) */
   gap: clamp(12px, 2vw, 32px); margin: 24px 0 0; padding: 0; }
.fa-steps button { display: grid; gap: 12px; min-width: 0; overflow-wrap: anywhere; hyphens: auto; width: 100%; padding: 0 0 6px; border: 0; background: none; text-align: left; font: 500 15px/1.3 var(--font); color: var(--text-3); cursor: pointer; }
.fa-steps button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.fa-steps i { display: block; height: 3px; border-radius: 3px; background: rgba(var(--shade), 0.12); overflow: hidden; }
.fa-steps b { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.fa[data-step="0"] .fa-steps li:nth-child(1) button, .fa[data-step="1"] .fa-steps li:nth-child(2) button,
.fa[data-step="2"] .fa-steps li:nth-child(3) button, .fa[data-step="3"] .fa-steps li:nth-child(4) button { color: var(--ink); }

/* ---------- reduce motion: the finished story ---------- */
.fa.is-done .ip-in, .fa.is-done .ip-call { display: none; }
.fa.is-done .ip-wa, .fa.is-done .wa-msg { opacity: 1; visibility: visible; }
.fa.is-done .fa-ck i { opacity: 1; transform: none; }
.fa.is-done .fa-ck__ask { display: none; }
.fa.is-done .fa-status__wait, .fa.is-done .fa-m1 { display: none; }
.fa.is-done .fa-steps b { transform: none; }
.fa.is-done .fa-wire { stroke-dashoffset: 0; }
.fa.is-done .fa-cur { display: none; }

/* ---------- phones: steps on top, the iPhone, then the card of the current step ---------- */
@media (max-width: 899px) {
  .fa, .fa-play { display: flex; flex-direction: column; }
  .fa-steps { order: 1; margin: 0 0 14px !important; }   /* steps above the iPhone, so the story is readable without scrolling */
  .fa-stage { order: 2;  grid-template-columns: minmax(0, 1fr); gap: 20px; justify-items: center; padding: 20px 12px 24px; border-radius: var(--r-l); }
  .fa-wires { display: none; }
  .fa-phone { order: 1; width: min(272px, 78vw); }
  .fa-brief, .fa-result { order: 2; grid-area: auto; width: 100%; max-width: 420px; box-sizing: border-box; }
  .fa[data-step="3"] .fa-brief { display: none; }
  .fa:not([data-step="3"]) .fa-result { display: none; }
  .fa.is-done .fa-brief { display: none; }
  .fa.is-done .fa-result { display: block; }
  .fa-steps { gap: 6px; }
  .fa-steps button { gap: 8px; font-size: 12px; }
  .ip-name { font-size: 30px; }
}

/* icons inside the scene: own sizes (the site-wide `.home .icon svg { width: 100% }` would blow them up) */
.fa .icon { display: inline-grid; flex: none; width: 1em; height: 1em; vertical-align: -0.12em; }
.fa .icon svg { display: block; width: 100%; height: 100%; }
.fa .wa-head .icon, .fa .wa-mic .icon { width: 22px; height: 22px; }
.fa .wa-tick .icon { width: 12px; height: 12px; }
.fa .wa-tick .icon + .icon { margin-left: -8px; }
.fa .ip-btn i .icon, .fa .ip-end .icon { width: 30px; height: 30px; }
.fa .fa-ck__ok .icon { width: 11px; height: 11px; }

/* the voice on the line: bars like a voice visualiser, warm while the agent speaks */
.ip-wave { display: flex; justify-content: center; align-items: center; gap: 3px; height: 22px; margin-top: 10px; }
.ip-wave i { width: 3px; height: 30%; border-radius: 2px; background: rgba(255, 255, 255, 0.8); animation: ip-wave 0.9s ease-in-out infinite; }
.ip-wave i:nth-child(2n) { animation-duration: 0.7s; } .ip-wave i:nth-child(3n) { animation-duration: 1.1s; } .ip-wave i:nth-child(5n) { animation-delay: -0.3s; }
.fa[data-voice="a"] .ip-wave i { background: #f4b48c; }
@keyframes ip-wave { 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .ip-wave i { animation: none; } }

.fa .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fa-play { background: inherit; }

/* QA 20.10: long words (de «Gesprächsaufnahme») wrapped inside their column instead of running over at ~1024 px;
   the step buttons reach 44 px for a finger while the bar and the label keep their look */
.fa-rows__t { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.fa-steps button { position: relative; min-height: 44px; align-content: start; }
