/* Why Youbs as six equal cards with a small scene each (proposal, Claude Code, 18/11/2026).
   Scenes rest on their final image (complete without motion); they play once when the card comes into view
   and again when the pointer enters the card. Reduced motion: final images only. */
body.de-home main #why .why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: .5rem; }
@media (max-width: 960px) { body.de-home main #why .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { body.de-home main #why .why-grid { grid-template-columns: 1fr; } }
.why-card { display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.why-frame { aspect-ratio: 280 / 170; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ya-line, #c4c4c8); border-radius: 14px; background: var(--ya-bg, #f7f7f7); overflow: hidden; padding: 8px; }
html[data-theme="dark"] .why-frame { border-color: #6a6a70; background: #333333; }
.why-frame > .ya-scene, .why-frame > svg, .why-frame .ya-scene > svg { width: 100%; height: 100%; max-height: 100%; }
.why-frame.ya-scene { border-radius: 14px; }
.why-frame > .ya-scene > svg { display: block; }
/* Astra's two scenes inside the uniform frame: no own border, no extra text or button */
.why-frame .ya-keys, .why-frame .ya-route { border: 0; padding: 0; margin: 0; background: transparent; max-width: none; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.why-frame .ya-key-fact, .why-frame .ya-replay, .why-frame .ya-route-fact, .why-frame .ya-scene p { display: none !important; }
.why-frame .ya-zone-labels { font-size: 11px; }
body.de-home main #why .why-card h3 { margin: .35rem 0 0; font-size: 1.08rem; background: none; box-shadow: none; }
body.de-home main #why .why-card p { margin: 0; font-size: .96rem; line-height: 1.5; color: var(--de-muted); background: none; box-shadow: none; max-width: none; }
body.de-home main #why .why-card { background: var(--de-bg); }

@media (prefers-reduced-motion: no-preference) {
  .why-card svg * { transform-box: view-box; }
  /* 01 rules: the agent walks to the edge of its rules, the budget fills to its limit, the approval step clears */
  .why-card.is-play .w-walker { animation: w-walk 2.3s cubic-bezier(.45,0,.25,1) backwards; }
  .why-card.is-play .w-budget { animation: w-budget 2.6s ease-out backwards; transform-origin: 68px 135px; }
  .why-card.is-play .w-gate-check { animation: w-pop .5s 2.4s ease-out backwards; transform-origin: 232px 69px; }
  /* 03 review: the change appears, checks pass, the reader scans it, review passes */
  .why-card.is-play .w-card { animation: w-slide 1s ease-out backwards; }
  .why-card.is-play .w-tests { animation: w-pop .45s 1.1s ease-out backwards; transform-origin: 106px 122px; }
  .why-card.is-play .w-beam { animation: w-scan 1.4s 1.5s ease-in-out backwards; }
  .why-card.is-play .w-ok { animation: w-pop .45s 2.9s ease-out backwards; transform-origin: 190px 122px; }
  /* 04 one place: your subscriptions plug in, then your tools */
  .why-card.is-play .w-agents > g { animation: w-fade .4s ease-out backwards; }
  .why-card.is-play .w-agents > g:nth-child(2) { animation-delay: .15s; } .why-card.is-play .w-agents > g:nth-child(3) { animation-delay: .3s; }
  .why-card.is-play .w-agents > g:nth-child(4) { animation-delay: .45s; } .why-card.is-play .w-agents > g:nth-child(5) { animation-delay: .6s; }
  .why-card.is-play .w-links path { stroke-dasharray: 260; animation: w-draw 1.2s .7s ease-out backwards; }
  .why-card.is-play .w-tools > g { animation: w-fade .4s 1.7s ease-out backwards; }
  .why-card.is-play .w-tools > g:nth-child(2) { animation-delay: 1.85s; } .why-card.is-play .w-tools > g:nth-child(3) { animation-delay: 2s; }
  /* 06 where: Youbs unplugs from our infrastructure, moves and plugs into yours; a dashed outline stays behind */
  .why-card.is-play .w-box { animation: w-move 2.6s .2s cubic-bezier(.5,0,.3,1) backwards; }
  .why-card.is-play .w-ghost { animation: w-ghost 2.6s .2s ease-out backwards; }
  .why-card .w-run { animation: w-blink 1.6s ease-in-out infinite; }
  .why-card.is-play .w-led-you { animation: w-led 2.6s .2s steps(1) backwards; }
}
.w-box { transform: translate(70px, 73px); }
.w-led-you { opacity: 1; }
@keyframes w-walk { from { transform: translateX(0); } to { transform: translateX(100px); } }
.w-walker { transform: translateX(100px); }
@keyframes w-budget { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes w-pop { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: none; } }
@keyframes w-slide { 0% { opacity: 0; transform: translateX(-26px); } 100% { opacity: 1; transform: none; } }
@keyframes w-scan { 0%, 100% { opacity: 0; } 30%, 70% { opacity: .35; } }
.w-beam { opacity: 0; }
@keyframes w-fade { 0% { opacity: 0; transform: translateY(4px); } 100% { opacity: 1; transform: none; } }
@keyframes w-draw { 0% { stroke-dashoffset: 260; } 100% { stroke-dashoffset: 0; } }
@keyframes w-move { 0%, 18% { transform: translate(204px, 85px); } 32% { transform: translate(200px, 50px); } 58% { transform: translate(140px, 38px); } 84%, 100% { transform: translate(70px, 73px); } }
@keyframes w-ghost { 0%, 32% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes w-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes w-led { 0%, 88% { opacity: .15; } 89%, 100% { opacity: 1; } }

/* Waiting for its turn in the sequence: first frame */
.why-card.is-held, .why-card.is-held * { animation-play-state: paused !important; }
