/* Homepage motion and play. Everything here degrades to the finished, static page:
   no JS, reduced motion and crawlers all see the content without any hidden state. */

/* ---- small polish ---- */
a.navlink { position: relative; }
a.navlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease-out; }
@media (hover: hover) { a.navlink:hover::after { transform: scaleX(1); } }
.nav-links.open a.navlink::after { display: none; }
.btn:active { transform: translateY(0) scale(.98); }
@media (hover: none) { .btn-primary:hover, .card:hover, .svc-card:hover { transform: none; } }
@media (pointer: coarse) { .chip { min-height: 48px; } }

/* ---- scope sketch ---- */
.scope { margin: -8px 0 32px; }
.scope[hidden] { display: none; }
.scope-l { display: block; font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.scope-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.scope-chips .chip { transition: background .15s, border-color .15s, transform .12s ease-out; }
.scope-chips .chip:active { transform: scale(.97); }
.step p.flash { animation: stepflash .5s ease-out; }
@keyframes stepflash { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- scroll reveals (armed by JS only after on-screen items are marked arrived) ---- */
.rv [data-reveal] { transition: opacity .55s ease-out, transform .55s ease-out; }
.rv [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  a.navlink::after { transition: none; }
  .rv [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
  .step p.flash { animation: none; }
}

/* ---- hero background (assets/hero-bg.js) ---- */
#top { position: relative; }
#top > div:not(.hero-bg) { position: relative; z-index: 1; }
.hero-bg { position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.4) 0%, rgba(0,0,0,.4) 38%, #000 62%, #000 100%);
  mask-image: linear-gradient(to right, rgba(0,0,0,.4) 0%, rgba(0,0,0,.4) 38%, #000 62%, #000 100%); }
.hero-bg canvas { display: block; }
.hero-bg-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--edge); box-shadow: 0 14px 40px -12px rgba(0,0,0,.35); max-width: calc(100vw - 24px); }
.hero-bg-bar button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--edge); background: var(--soft); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.hero-bg-bar button[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.hero-bg-bar button:last-child { margin-left: 8px; }
