/*
  Step Ahead AI: site motion (concept, 20 Nov 2026)
  2. scroll reveals   3. handwritten notes write themselves   4. compact nav + responsive buttons
  Everything only kicks in once site-motion.js has set html.sm-on,
  so without JS (or with reduced motion) the page looks exactly as before.
*/

/* ---------- 2. scroll reveals ---------- */
html.sm-on .sm-rise {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), translate .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--sm-delay, 0s);
}
html.sm-on .sm-rise.sm-in { opacity: 1; translate: 0 0; }

/* photos open like a curtain, from the bottom up */
html.sm-on .sm-curtain {
  clip-path: inset(100% 0 0 0);
  scale: 1.06;
  transition: clip-path 1.1s cubic-bezier(.7,0,.2,1), scale 1.6s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--sm-delay, 0s);
}
html.sm-on .sm-curtain.sm-in { clip-path: inset(0 0 0 0); scale: 1; }

/* ---------- 3. handwritten notes ---------- */
html.sm-on .sm-write {
  clip-path: inset(-20% 100% -20% -2%);
  transition: clip-path 1.3s cubic-bezier(.55,.1,.35,1);
  transition-delay: var(--sm-delay, 0s);
}
html.sm-on .sm-write.sm-in { clip-path: inset(-20% -2% -20% -2%); }

/* ---------- 4. nav shrinks on scroll ---------- */
html.sm-on .nav-inner { transition: height .35s ease; }
html.sm-on .nav-logo-icon { transition: width .35s ease, height .35s ease; }
html.sm-on .nav { transition: box-shadow .35s ease; }
html.sm-on .nav.sm-compact .nav-inner { height: 64px; }
html.sm-on .nav.sm-compact .nav-logo-icon { width: 36px; height: 36px; }
html.sm-on .nav.sm-compact { box-shadow: 0 1px 0 rgba(255,255,255,.06); }

/* nav links: underline slides in from the left */
html.sm-on .nav-links > li > a { position: relative; }
html.sm-on .nav-links > li > a::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: #5b9cf5; transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
html.sm-on .nav-links > li > a:hover::before,
html.sm-on .nav-links > li > a.active::before { transform: scaleX(1); }

/* buttons lean towards the cursor */
html.sm-on .sm-magnet { translate: var(--sm-mx, 0) var(--sm-my, 0); transition: translate .25s cubic-bezier(.2,.7,.2,1); }
html.sm-on .sm-magnet.sm-pulling { transition-duration: .08s; }
@media (max-width: 768px) {
  html.sm-on .nav-links > li > a::before { display: none; }
}

/* ---------- homepage hero: 3D steps (hero-steps.js puts the canvas first in .hero) ---------- */
.hero-steps { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero-steps ~ .hero-photo, .hero-steps ~ .hero-content { position: relative; z-index: 2; }
