/* Home ambient motion (board P1): drifting glows, a slow grid, rising page flecks, the stacked-sheet fan and
   a scan line. Decorative only (aria-hidden); transform and opacity only; off under prefers-reduced-motion. Tokens only. */
.amb { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.amb-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.amb-glow--a { width: 620px; height: 620px; left: -140px; top: -180px; background: radial-gradient(circle, var(--home-glow-a), transparent 70%); animation: amb-drift-a 26s ease-in-out infinite; }
.amb-glow--b { width: 560px; height: 560px; right: -160px; top: 80px; background: radial-gradient(circle, var(--home-glow-b), transparent 70%); animation: amb-drift-b 32s ease-in-out infinite; }
.amb-glow--c { width: 480px; height: 480px; left: 38%; top: 520px; background: radial-gradient(circle, var(--home-glow-c), transparent 70%); animation: amb-drift-c 22s ease-in-out infinite; }
.amb-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--home-grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--home-grid-line) 1px, transparent 1px); background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 28%, var(--home-bg) 25%, transparent 78%); mask-image: radial-gradient(ellipse 70% 60% at 50% 28%, var(--home-bg) 25%, transparent 78%); animation: amb-grid 48s linear infinite; }
.amb-fleck { position: absolute; bottom: -40px; width: 14px; height: 18px; border-radius: 2px; border: 1px solid var(--home-fleck-border); background: var(--home-fleck-fill); opacity: 0; animation: amb-rise 22s linear infinite; }
.amb-fleck--1 { left: 6%; }
.amb-fleck--2 { left: 17%; animation-delay: -7s; width: 10px; height: 13px; }
.amb-fleck--3 { left: 29%; animation-delay: -14s; }
.amb-fleck--4 { left: 44%; animation-delay: -3s; width: 10px; height: 13px; }
.amb-fleck--5 { left: 58%; animation-delay: -18s; }
.amb-fleck--6 { left: 71%; animation-delay: -10s; width: 10px; height: 13px; }
.amb-fleck--7 { left: 83%; animation-delay: -5s; }
.amb-fleck--8 { left: 94%; animation-delay: -16s; width: 10px; height: 13px; }
.amb-fade { position: absolute; inset: auto 0 0 0; height: 320px; background: linear-gradient(to bottom, var(--home-fade), var(--home-bg)); }

/* Stacked sheets fanning into identified documents */
.amb-sheets { position: absolute; inset: 0; }
.amb-sheet { position: absolute; left: 50%; top: 50%; width: 200px; height: 52px; margin: -26px 0 0 -100px; display: flex; align-items: center; gap: 10px; padding-right: 12px; overflow: hidden; border-radius: var(--radius-md); background: var(--home-sheet); border: 1px solid var(--home-sheet-border); box-shadow: var(--home-sheet-shadow); color: var(--home-sheet-text); font-size: var(--text-xs);
  transform: translate(calc(var(--i) * 3px), calc(var(--i) * 3px)); animation: amb-fan 9s var(--ease-standard) infinite; }
.amb-sheet--0 { --i: 0; } .amb-sheet--1 { --i: 1; } .amb-sheet--2 { --i: 2; } .amb-sheet--3 { --i: 3; }
.amb-sheet__band { align-self: stretch; width: var(--stripe-width); flex: none; }
.amb-sheet__id { font-family: var(--font-mono); font-weight: 700; color: var(--home-sheet-id); flex: none; }
.amb-sheet__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amb-scan { position: absolute; left: 12%; right: 12%; top: 22%; height: 2px; background: linear-gradient(90deg, transparent, var(--home-accent), transparent); opacity: 0; animation: amb-scan 9s linear infinite; }
.amb-live { width: 8px; height: 8px; border-radius: 50%; background: var(--home-live); flex: none; animation: amb-pulse 2s ease-out infinite; }

@keyframes amb-drift-a { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(90px, 50px, 0) scale(1.15); } }
@keyframes amb-drift-b { 0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-110px, 30px, 0) scale(0.92); } }
@keyframes amb-drift-c { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(40px, -70px, 0); } }
@keyframes amb-grid { to { background-position: 56px 56px, 56px 56px; } }
@keyframes amb-rise { 0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; } 12% { opacity: 0.9; } 88% { opacity: 0.6; } 100% { transform: translate3d(30px, -1180px, 0) rotate(28deg); opacity: 0; } }
@keyframes amb-fan { 0%, 14% { transform: translate(calc(var(--i) * 3px), calc(var(--i) * 3px)); } 42%, 82% { transform: translate(0, calc(var(--i) * 66px - 99px)); } 96%, 100% { transform: translate(calc(var(--i) * 3px), calc(var(--i) * 3px)); } }
@keyframes amb-scan { 0%, 4% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 34% { transform: translateY(168px); opacity: 1; } 40%, 100% { transform: translateY(168px); opacity: 0; } }
@keyframes amb-pulse { 0% { box-shadow: 0 0 0 0 var(--home-live-ring); } 70% { box-shadow: 0 0 0 8px var(--home-live-ring-off); } 100% { box-shadow: 0 0 0 0 var(--home-live-ring-off); } }

@media (prefers-reduced-motion: reduce) {
  .amb-glow, .amb-grid, .amb-fleck, .amb-sheet, .amb-scan, .amb-live { animation: none; }
  .amb-fleck { display: none; }
  .amb-sheet { transform: translate(0, calc(var(--i) * 66px - 99px)); }
}
