/* "How it works" scene (preview 29.11.2026), same language as flow-anim.css and problem-anim.css.
   One 15 s loop: the audit ticks its four questions, the proposal fills its two columns and gets stamped
   "Yours to keep", the build fills its four stages in turn. The bee travels card to card.
   BASE state = everything finished (reduced motion); motion only in the no-preference query.
   Hidden on phones: the three steps below carry the same content and the drawing would be too small to read. */
.how-anim{ --ha-ink:#16181D; --ha-card:#FFFFFF; --ha-muted:#4A4F5A; --ha-line:#8A8F99; --ha-accent:#B8451A; --ha-tint:#FBEEE8;
  margin: 30px 0 0; }
.how-anim svg{ display:block; width:100%; height:auto; overflow:visible; }
.how-anim text{ font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif; fill: var(--ha-ink); }
.how-anim .ha-card rect{ fill: var(--ha-card); stroke: var(--ha-ink); stroke-width: 1.5; }
.how-anim .ha-title{ font-size: 20px; font-weight: 700; }
.how-anim .ha-sub{ font-size: 14px; font-weight: 600; fill: var(--ha-accent); }
.how-anim .ha-item text{ font-size: 15px; }
.how-anim .ha-box{ fill: var(--ha-card); stroke: var(--ha-ink); stroke-width: 1.4; }
.how-anim .ha-tick{ fill:none; stroke: var(--ha-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10; stroke-dashoffset: 0; }
.how-anim .ha-col{ font-size: 14px; font-weight: 700; }
.how-anim .ha-rule{ stroke: #CFCFCB; stroke-width: 1.2; }
.how-anim .ha-bar{ fill: var(--ha-line); transform-box: fill-box; transform-origin: 0 50%; }
.how-anim .ha-bar-c{ fill: var(--ha-accent); }
.how-anim .ha-stamp rect{ fill: var(--ha-tint); stroke: var(--ha-accent); stroke-width: 1.6; }
.how-anim .ha-stamp text{ font-size: 15px; font-weight: 700; text-anchor: middle; fill: var(--ha-accent); }
.how-anim .ha-stamp{ transform-box: fill-box; transform-origin: 50% 50%; }
.how-anim .ha-stage rect{ fill: var(--ha-tint); stroke: var(--ha-accent); stroke-width: 1.5; }
.how-anim .ha-stage text{ font-size: 18px; font-weight: 700; text-anchor: middle; }
.how-anim .ha-note{ font-size: 14px; fill: var(--ha-muted); }
.how-anim .ha-link{ fill:none; stroke: var(--ha-line); stroke-width: 1.5; stroke-dasharray: 4 4; }
.how-anim .ha-wing{ fill:#fff; fill-opacity:.9; stroke: var(--ha-ink); stroke-width:1.1; transform-box: fill-box; transform-origin: 50% 100%; }

@media (prefers-reduced-motion: no-preference){
  .how-anim .ha-link{ animation: ha-flow 1.2s linear infinite; }
  .how-anim .ha-c1 rect{ animation: ha-c1 15s ease-in-out infinite both; }
  .how-anim .ha-c2 rect{ animation: ha-c2 15s ease-in-out infinite both; }
  .how-anim .ha-c3 rect{ animation: ha-c3 15s ease-in-out infinite both; }
  .how-anim .ha-k1{ animation: ha-k1 15s ease-out infinite both; }
  .how-anim .ha-k2{ animation: ha-k2 15s ease-out infinite both; }
  .how-anim .ha-k3{ animation: ha-k3 15s ease-out infinite both; }
  .how-anim .ha-k4{ animation: ha-k4 15s ease-out infinite both; }
  .how-anim .ha-b1, .how-anim .ha-b4{ animation: ha-b1 15s ease-out infinite both; }
  .how-anim .ha-b2, .how-anim .ha-b5{ animation: ha-b2 15s ease-out infinite both; }
  .how-anim .ha-b3, .how-anim .ha-b6{ animation: ha-b3 15s ease-out infinite both; }
  .how-anim .ha-stamp{ animation: ha-stamp 15s cubic-bezier(.3,1.6,.5,1) infinite both; }
  .how-anim .ha-s1 rect{ animation: ha-s1 15s ease-out infinite both; }
  .how-anim .ha-s2 rect{ animation: ha-s2 15s ease-out infinite both; }
  .how-anim .ha-s3 rect{ animation: ha-s3 15s ease-out infinite both; }
  .how-anim .ha-s4 rect{ animation: ha-s4 15s ease-out infinite both; }
  .how-anim .ha-bee{ animation: ha-bee 15s ease-in-out infinite both; }
  .how-anim .ha-wing{ animation: ha-flutter .18s ease-in-out infinite alternate; }
  .how-anim .ha-wing2{ animation-delay: .09s; }
}
@keyframes ha-flow{ to{ stroke-dashoffset: -16; } }
/* the active card's frame turns orange */
@keyframes ha-c1{ 0%,2%{stroke: var(--ha-ink)} 4%,30%{stroke: var(--ha-accent)} 33%,100%{stroke: var(--ha-ink)} }
@keyframes ha-c2{ 0%,33%{stroke: var(--ha-ink)} 36%,62%{stroke: var(--ha-accent)} 65%,100%{stroke: var(--ha-ink)} }
@keyframes ha-c3{ 0%,65%{stroke: var(--ha-ink)} 68%,93%{stroke: var(--ha-accent)} 96%,100%{stroke: var(--ha-ink)} }
/* audit: four ticks */
@keyframes ha-k1{ 0%,6%{stroke-dashoffset:10} 9%,96%{stroke-dashoffset:0} 99%,100%{stroke-dashoffset:10} }
@keyframes ha-k2{ 0%,12%{stroke-dashoffset:10} 15%,96%{stroke-dashoffset:0} 99%,100%{stroke-dashoffset:10} }
@keyframes ha-k3{ 0%,18%{stroke-dashoffset:10} 21%,96%{stroke-dashoffset:0} 99%,100%{stroke-dashoffset:10} }
@keyframes ha-k4{ 0%,24%{stroke-dashoffset:10} 27%,96%{stroke-dashoffset:0} 99%,100%{stroke-dashoffset:10} }
/* proposal: two columns fill, then the stamp lands */
@keyframes ha-b1{ 0%,37%{transform: scaleX(0)} 41%,96%{transform: scaleX(1)} 99%,100%{transform: scaleX(0)} }
@keyframes ha-b2{ 0%,41%{transform: scaleX(0)} 45%,96%{transform: scaleX(1)} 99%,100%{transform: scaleX(0)} }
@keyframes ha-b3{ 0%,45%{transform: scaleX(0)} 49%,96%{transform: scaleX(1)} 99%,100%{transform: scaleX(0)} }
@keyframes ha-stamp{ 0%,53%{opacity:0; transform: scale(1.6)} 57%,96%{opacity:1; transform: scale(1)} 99%,100%{opacity:0} }
/* build: four stages, one after another */
@keyframes ha-s1{ 0%,68%{fill: var(--ha-card); stroke: var(--ha-line)} 72%,96%{fill: var(--ha-tint); stroke: var(--ha-accent)} 99%,100%{fill: var(--ha-card); stroke: var(--ha-line)} }
@keyframes ha-s2{ 0%,74%{fill: var(--ha-card); stroke: var(--ha-line)} 78%,96%{fill: var(--ha-tint); stroke: var(--ha-accent)} 99%,100%{fill: var(--ha-card); stroke: var(--ha-line)} }
@keyframes ha-s3{ 0%,80%{fill: var(--ha-card); stroke: var(--ha-line)} 84%,96%{fill: var(--ha-tint); stroke: var(--ha-accent)} 99%,100%{fill: var(--ha-card); stroke: var(--ha-line)} }
@keyframes ha-s4{ 0%,86%{fill: var(--ha-card); stroke: var(--ha-line)} 90%,96%{fill: var(--ha-tint); stroke: var(--ha-accent)} 99%,100%{fill: var(--ha-card); stroke: var(--ha-line)} }
/* the bee: above card 1, then card 2, then card 3 (its resting place) */
@keyframes ha-bee{ 0%{opacity:0; transform: translate(-690px,0)} 3%,30%{opacity:1; transform: translate(-690px,0)} 16%{transform: translate(-690px,-8px)}
  35%,62%{transform: translate(-345px,0)} 48%{transform: translate(-345px,-8px)} 67%,95%{opacity:1; transform: none} 80%{transform: translate(0,-8px)} 99%,100%{opacity:0} }
@keyframes ha-flutter{ from{ transform: scaleY(1) } to{ transform: scaleY(.35) } }
@media (max-width: 760px){ .how-anim{ display: none; } }
