/* ============ MOTION LAYER (KB #2385, 2026-10-24) ============
   Additive. Loads after site.css, touches no existing rule. Every motion sits inside a
   prefers-reduced-motion: no-preference guard, so the static page is complete on its own.
   Catalogue numbers refer to the Forge Motion Catalogue (PV research/kb2320-design-workflow). */

/* 01 hero letter reveal: motion.js wraps each glyph in .l with --i, markup unchanged for SEO */
.hero h1 .wd { white-space: nowrap; display: inline-block; }
.hero h1 .l { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1.is-split .l { animation: av-smoke 1.5s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i) * 45ms + .15s); }
  @keyframes av-smoke {
    /* transform/filter only: animating letter-spacing widened each word mid-reveal, so the
       headline wrapped to extra lines and pushed the hero down (KB #891). */
    from { filter: blur(16px); opacity: 0; transform: translateY(.25em) scale(1.1); }
    to   { filter: blur(0);    opacity: 1; transform: none; }
  }
  .hero h1.is-split + .hero-subtitle,
  .hero h1.is-split ~ .hero-form,
  .hero h1.is-split ~ .trust-badges { animation: av-rise .9s cubic-bezier(.16,1,.3,1) both; }
  .hero h1.is-split + .hero-subtitle { animation-delay: 1.2s; }
  .hero h1.is-split ~ .hero-form { animation-delay: 1.35s; }
  .hero h1.is-split ~ .trust-badges { animation-delay: 1.5s; }
  @keyframes av-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* 02 ticker: existing trust copy, two directions, edge fade, pauses on hover */
.ticker { border-top: 1px solid rgba(0,102,255,.25); border-bottom: 1px solid rgba(0,102,255,.25); background: var(--deep); overflow: hidden; }
.ticker-row { display: flex; overflow: hidden; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-row + .ticker-row { border-top: 1px solid rgba(0,102,255,.12); }
.ticker-row ul { display: flex; gap: 48px; list-style: none; margin: 0; padding: 0 24px; white-space: nowrap; flex-shrink: 0; font-family: var(--font-serif); font-size: 1.35rem; color: var(--color-text); }
.ticker-row--cap ul { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--color-text-muted); }
.ticker-row li::after { content: "\25C6"; color: var(--color-accent); margin-left: 48px; font-size: .55em; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) {
  .ticker-row ul { animation: av-marquee 32s linear infinite; }
  .ticker-row--cap ul { animation-direction: reverse; animation-duration: 40s; }
  .ticker-row:hover ul { animation-play-state: paused; }
  @keyframes av-marquee { to { transform: translateX(-100%); } }
}
@media (prefers-reduced-motion: reduce) { .ticker-row ul[aria-hidden] { display: none; } .ticker-row ul { white-space: normal; flex-wrap: wrap; } }

/* 04 stacking steps: each row sticks and the next slides over it (desktop only) */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .step { position: sticky; top: calc(96px + var(--k, 0) * 56px); background: var(--paper-bg); }
}

/* 05 kinetic read: words light up as the reader scrolls (motion.js) */
.kinetic .w { color: var(--paper-muted); transition: color .3s ease; }
.kinetic .w.on { color: var(--paper-text); }
@media (prefers-reduced-motion: reduce) { .kinetic .w { color: inherit; } }

/* 07 magnetic CTA + spotlight cards (pointer: fine only, motion.js) */
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn-primary[data-mag] { transition: transform .35s cubic-bezier(.16,1,.3,1), background-color .2s; will-change: transform; }
  .card, .pricing-card { position: relative; overflow: hidden; }
  .card::before, .pricing-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(0,102,255,.16), transparent 60%);
  }
  .card:hover::before, .pricing-card:hover::before { opacity: 1; }
  .card > *, .pricing-card > * { position: relative; }
}

/* 13 turning seal: text on a circle, sits on the hero illustration */
.hero-illustration { position: relative; }
/* centred on the top-right corner of the dashboard window, matching the full site (AW 2026-10-24) */
.seal { position: absolute; right: 32px; top: -64px; width: 128px; height: 128px; }
.seal text { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; fill: var(--ink-soft); }
.seal circle { fill: none; stroke: var(--color-accent); stroke-width: 1; }
@media (prefers-reduced-motion: no-preference) {
  .seal { animation: av-spin 28s linear infinite; transform-origin: center; }
  @keyframes av-spin { to { transform: rotate(360deg); } }
}
@media (max-width: 1024px) { .seal { display: none; } }
