/* Shared motion layer. Hidden starting states apply only under .motion-ready, which
   motion.js sets when motion is welcome, so the page is whole without JavaScript. */
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/dm-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/dm-mono-500.woff2') format('woff2'); }

:root {
  --font-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --pin-top: 88px;
  --ease-glide: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-scene] { --p: 0; --e: 0; --sp: 0; }

/* Reveals: a short, quiet rise out of a light blur, staggered by --i inside groups. */
.motion-ready [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  filter: blur(4px);
  transition:
    opacity 900ms var(--ease-glide) calc(var(--i, 0) * 80ms),
    translate 1100ms var(--ease-glide) calc(var(--i, 0) * 80ms),
    filter 900ms var(--ease-glide) calc(var(--i, 0) * 80ms);
}
.motion-ready [data-reveal='scale'] { translate: 0 18px; scale: .965; transition-property: opacity, translate, filter, scale; transition-duration: 900ms, 1100ms, 900ms, 1100ms; }
.motion-ready [data-reveal='fade'] { translate: 0 0; filter: none; }
/* A revealed element ends with no filter, translate or scale at all. Any of them would keep it a
   separate layer, and art inside that blends into the page (multiply) would show a pale box. */
.motion-ready [data-reveal].is-revealed { opacity: 1; translate: none; filter: none; scale: none; }

/* The statement reads itself in as you scroll: each word brightens in turn. */
.motion-ready [data-words] .w { opacity: clamp(.13, calc((var(--p) * (var(--n) + 9) - var(--i)) / 9), 1); transition: opacity 160ms linear; }

/* Step detent: the marker presses in and springs back, the visual half of a haptic click. */
.is-detent { animation: olmi-detent 360ms var(--ease-bump); }
@keyframes olmi-detent { 0% { scale: 1; } 30% { scale: .88; } 100% { scale: 1; } }

/* Press feedback: buttons and cards give a little under the finger. */
.motion-ready .button { transition: background 180ms, transform 180ms, box-shadow 180ms, scale 140ms var(--ease-out); }
.motion-ready .button:active { scale: .965; }
.motion-ready :is(.cs-card, .people-card, .pc-feature-card, .ms-tile, .pl-tile) { transition: scale 220ms var(--ease-out), translate 420ms var(--ease-glide), box-shadow 300ms ease, background-color 300ms ease; }
.motion-ready :is(.cs-card, .people-card, .pc-feature-card):active { scale: .985; }

/* Parallax art drifts a little against the scroll. */
.motion-ready [data-parallax] { translate: 0 var(--shift, 0px); will-change: translate; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-words] .w { opacity: 1 !important; translate: none !important; filter: none !important; scale: 1 !important; }
  .is-detent { animation: none; }
}
