/* ════════════════════════════════════════════════════════════
   FULLY-HK — Premium Motion Layer (fy-motion)
   Web Animation Ultimate 3.0 × high-end light-minimal
   Cinematic page transitions · split hero · scroll-fill ·
   pin & stagger · count-up · parallax · magnetic.
   GPU-only (transform/opacity). Full reduced-motion fallback.
   ════════════════════════════════════════════════════════════ */

:root{
  --fym-ease: cubic-bezier(.22,1,.36,1);
  --fym-expo: cubic-bezier(.16,1,.3,1);
  --fym-curtain: cubic-bezier(.76,0,.24,1);
}

/* ── PAGE TRANSITION OVERLAY ──
   In HTML from first paint (covers FOUC). CSS auto-reveals even
   without JS; JS adds cover-on-leave. */
#fym-trans{
  position: fixed; inset: 0; z-index: 99999;
  background: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(0);
  animation: fym-reveal .9s var(--fym-curtain) .12s forwards;
  will-change: transform;
}
.fym-trans-mark{
  font-family: 'Geist', -apple-system, sans-serif;
  font-weight: 600; letter-spacing: -0.05em;
  font-size: clamp(38px, 8vw, 92px); color: #fff;
  opacity: .14;
  transform: translateY(8px);
  animation: fym-mark .6s var(--fym-ease) forwards;
}
@keyframes fym-reveal{ to{ transform: translateY(-100%); } }
@keyframes fym-mark{ to{ opacity:.22; transform:none; } }

/* JS cover-on-leave */
#fym-trans.fym-cover{
  animation: fym-cover .6s var(--fym-curtain) forwards;
}
@keyframes fym-cover{ from{ transform: translateY(-100%);} to{ transform: translateY(0);} }
/* settled hidden (after reveal, JS parks it) */
#fym-trans.fym-done{ display:none; }

/* ── SPLIT HERO (line-mask rise) ── */
.fy-hero-h1[data-fym-split]{ animation: none !important; opacity: 1 !important; transform: none !important; }
.fym-line{ display:block; overflow:hidden; }
.fym-line-in{
  display:block;
  transform: translateY(115%);
  opacity: 0;
  transition: transform .9s var(--fym-ease), opacity .9s var(--fym-ease);
  transition-delay: var(--fym-d, 0ms);
  will-change: transform, opacity;
}
.fy-hero-h1.fym-in .fym-line-in{ transform:none; opacity:1; }

/* ── PARALLAX media ── */
[data-fym-parallax]{ will-change: transform; }

/* ── MAGNETIC ── */
[data-fym-mag]{
  --mx:0px; --my:0px;
  transform: translate3d(var(--mx),var(--my),0);
  transition: transform .35s var(--fym-ease);
  will-change: transform;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce){
  #fym-trans{ display:none !important; }
  .fy-hero-h1[data-fym-split] .fym-line-in{ transform:none; opacity:1; }
  [data-fym-mag]{ transform:none !important; }
}
