/* Shared by every home page option: bots, people, reveal-on-scroll, motion controls and the option switcher. */

/* Decorative art may reach past the edge; the page itself never scrolls sideways. */
html, body { overflow-x: clip; }

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

/* ---------- Bots and people (drawn by shared.js) ---------- */

.bot, .person { display: inline-block; flex: none; width: var(--size, 64px); line-height: 0; }
.bot svg, .person svg { display: block; width: 100%; height: auto; overflow: visible; }
.bot svg * { transform-box: fill-box; }
.b-float { animation: b-float 3.4s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.b-eyes { transform-origin: center; animation: b-blink 5.2s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.b-ant { animation: b-pulse 1.8s ease-in-out infinite; }
.b-wave { transform-origin: 0 100%; animation: b-wave 2.6s ease-in-out infinite; }

@keyframes b-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes b-blink { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }
@keyframes b-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes b-wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-10deg); } }

/* ---------- Reveal on scroll (only once script is running) ---------- */

.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Sequences (chat, feeds): items appear one at a time ---------- */

.js [data-seq] .seq { opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .7, .2, 1); }
.js [data-seq] .seq.is-on { opacity: 1; transform: none; }

/* ---------- Motion toggle ---------- */

.motion-toggle { display: inline-flex; align-items: center; gap: .5em; padding: .45em .95em; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: .85rem; opacity: .75; cursor: pointer; }
.motion-toggle:hover { opacity: 1; }
.motion-toggle[hidden] { display: none; }
.motion-toggle .icon { width: .85em; height: .85em; fill: currentColor; }
.motion-toggle .icon-play, .motion-toggle[aria-pressed="true"] .icon-pause { display: none; }
.motion-toggle[aria-pressed="true"] .icon-play { display: inline; }

/* ---------- Design option switcher (review only; remove at launch) ---------- */

.options { position: fixed; z-index: 50; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(12, 14, 34, .88); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 600 .78rem/1 "Segoe UI", system-ui, -apple-system, sans-serif; max-width: calc(100vw - 20px); }
.options span { padding: 0 8px 0 10px; color: #a3abd0; white-space: nowrap; }
.options a { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; color: #eef0ff; text-decoration: none; white-space: nowrap; }
.options a:hover { background: rgba(255, 255, 255, .12); }
.options a[aria-current="page"] { background: #3ee6b0; color: #062a22; }
.options a b { font-weight: 700; }
.options a i { font-style: normal; margin-left: 6px; }
@media (max-width: 640px) { .options span, .options a i { display: none; } }

/* ---------- Respect people who turn motion off ---------- */

.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  :root:not(.motion-on) *, :root:not(.motion-on) *::before, :root:not(.motion-on) *::after { animation: none !important; transition: none !important; }
}
