/* Talent Ninja motion layer: progressive enhancement.
   Everything here is inert unless <html> has .motion (set by a tiny inline script)
   and the visitor hasn't asked for reduced motion. */

:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

@media (prefers-reduced-motion: no-preference) {

  /* ---------- Always-on micro-interactions ---------- */

  /* Ninja star: one smooth turn of the logo on hover */
  .brand img { transition: transform .9s var(--ease-out); }
  .brand:hover img, .brand:focus-visible img { transform: rotate(360deg); }

  /* Light sweep across gold buttons */
  .btn-primary, .btn:not(.btn-ghost):not(.btn-dark):not(.ghost) { position: relative; overflow: hidden; isolation: isolate; }
  .btn-primary::after, .btn:not(.btn-ghost):not(.btn-dark):not(.ghost)::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .7s var(--ease-out);
  }
  .btn-primary:hover::after, .btn:not(.btn-ghost):not(.btn-dark):not(.ghost):hover::after { transform: translateX(120%); }

  /* Card lift */
  .card, .model, .tier, .terms, .leader, .hero-card {
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s;
  }
  .card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.28); }
  .model:hover, .tier:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.35); border-color: rgba(246,192,119,.55); }
  .card .icon { transition: transform .5s var(--ease-out); }
  .card:hover .icon { transform: rotate(-8deg) scale(1.06); }

  /* Salary guide cover: gentle 3D tilt */
  .guide-inner img, .cover img { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
  .guide-inner img:hover, .cover img:hover { transform: perspective(700px) rotateY(-10deg) rotateX(4deg) scale(1.04); box-shadow: 24px 26px 50px rgba(0,0,0,.55); }

  /* Header gains depth once you scroll */
  header { transition: box-shadow .4s var(--ease-out), background-color .4s; }
  header.scrolled { box-shadow: 0 10px 30px rgba(0,0,0,.35); }

  /* FAQ answers ease in */
  .faq details[open] p { animation: tn-fade-up .45s var(--ease-out) both; }
  .faq summary::after { transition: transform .3s var(--ease-out); }
  .faq details[open] summary::after { transform: rotate(180deg); }

  /* ---------- Hero entrance (CSS only, runs on load) ---------- */
  .hero { position: relative; isolation: isolate; overflow: hidden; }
  .hero::before {
    content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
    background: radial-gradient(520px 320px at 70% 20%, rgba(255,180,0,.10), transparent 65%),
                radial-gradient(420px 260px at 20% 80%, rgba(249,99,50,.06), transparent 65%);
    animation: tn-drift 22s ease-in-out infinite alternate;
  }
  .motion .hero .eyebrow, .motion .hero h1, .motion .hero .lede, .motion .hero .cta-row,
  .motion .hero .crumbs, .motion .hero .hero-card, .motion .hero .stats {
    animation: tn-fade-up .9s var(--ease-out) both;
  }
  .motion .hero .crumbs { animation-delay: 0s; }
  .motion .hero .eyebrow { animation-delay: .05s; }
  .motion .hero h1 { animation-delay: .15s; }
  .motion .hero .lede { animation-delay: .3s; }
  .motion .hero .cta-row { animation-delay: .42s; }
  .motion .hero .hero-card { animation-delay: .5s; }
  .motion .hero .stats { animation-delay: .55s; }

  /* One gold shimmer across the highlighted headline words */
  .motion .hero h1 em {
    background: linear-gradient(100deg, #F6C077 0%, #F6C077 40%, #FFF1D6 50%, #F6C077 60%, #F6C077 100%);
    background-size: 250% 100%; background-position: 100% 0;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: tn-shimmer 1.6s .95s var(--ease-out) both;
  }

  /* ---------- Scroll reveals (JS adds .in) ---------- */
  .motion .reveal { opacity: 0; translate: 0 22px; }
  .motion .reveal.in {
    opacity: 1; translate: none;
    transition: opacity .8s var(--ease-out), translate .8s var(--ease-out);
    transition-delay: var(--d, 0s);
  }

  /* Rules that draw themselves left to right */
  .motion .draw { position: relative; border-top-color: transparent !important; }
  .motion .draw::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--rule, var(--gold)); transform: scaleX(0); transform-origin: left;
    transition: transform 1s var(--ease-out); transition-delay: calc(var(--d, 0s) + .15s);
  }
  .motion .draw.in::after { transform: scaleX(1); }
  .motion .stat.draw, .motion .advice > div.draw, .light .draw, .why .draw { --rule: var(--gold); }

  /* Failsafe: if motion.js never runs, show everything */
  .motion-failsafe .reveal { opacity: 1 !important; translate: none !important; }
  .motion-failsafe .draw::after { transform: scaleX(1) !important; }
}

@keyframes tn-fade-up { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: none; } }
@keyframes tn-shimmer { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes tn-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-6%, 4%, 0) scale(1.08); }
}

/* Printing: always show everything */
@media print {
  .motion .reveal { opacity: 1 !important; translate: none !important; }
  .motion .draw::after { transform: scaleX(1) !important; }
  .hero::before { display: none; }
}
