/* Motion is an enhancement. Content stays visible when JavaScript or motion is off. */
@media (prefers-reduced-motion: no-preference) {
  .hero-image img {
    animation: hero-arrive 1.8s cubic-bezier(.2,.7,.2,1) both;
  }
  .hero-content > * {
    animation: hero-copy .78s cubic-bezier(.2,.7,.2,1) both;
  }
  .hero-content > :nth-child(2) { animation-delay: .12s; }
  .hero-content > :nth-child(3) { animation-delay: .22s; }
  .hero-content > :nth-child(4) { animation-delay: .32s; }
  .hero-content > :nth-child(5) { animation-delay: .42s; }

  .motion-reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity .75s cubic-bezier(.2,.7,.2,1),
                transform .75s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .motion-reveal.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
  .motion-reveal.from-left { transform: translate3d(-28px, 0, 0); }
  .motion-reveal.from-right { transform: translate3d(28px, 0, 0); }
  .motion-reveal.from-left.is-visible,
  .motion-reveal.from-right.is-visible { transform: translate3d(0, 0, 0); }
  @media (max-width: 560px) {
    .motion-reveal.from-left,
    .motion-reveal.from-right { transform: translate3d(0, 28px, 0); }
    .motion-reveal.from-left.is-visible,
    .motion-reveal.from-right.is-visible { transform: translate3d(0, 0, 0); }
  }

  .intro-card { animation: gentle-float 6s ease-in-out infinite; }
  .intro-photo img,
  .level-image img,
  .story-image img { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
  .intro-visual:hover .intro-photo img,
  .level-card:hover .level-image img,
  .story-section:hover .story-image img { transform: scale(1.045); }
  .feature-card,
  .platform-benefits article,
  .audience-grid > a,
  .portal-card,
  .dash-content-row { transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background .28s ease; }
  .feature-card:hover,
  .platform-benefits article:hover { transform: translateY(-6px); box-shadow: 0 18px 40px #092b3d16; }
  .level-card:hover { transform: translateY(-6px); }
  .platform-benefits article:hover { border-color: #c9ec6870; background: #ffffff15; box-shadow: 0 20px 45px #00172035; }
  .feature-glyph { transition: transform .38s cubic-bezier(.2,.7,.2,1); }
  .feature-card:hover .feature-glyph { transform: rotate(-8deg) scale(1.12); }
  .audience-grid > a:hover .audience-icon { transform: rotate(-8deg) scale(1.08); }
  .audience-icon,
  .audience-end,
  .level-more span,
  .text-link span { transition: transform .3s ease; }
  .audience-grid > a:hover .audience-end,
  .level-more:hover span,
  .text-link:hover span { transform: translateX(5px); }
  .portal-card:hover { box-shadow: 0 28px 75px #092b3d2a; }
  .dash-content-row:hover { transform: translateX(3px); border-color: #b9d9c8; }
  .dash-nav { transition: background .2s ease, transform .2s ease; }
  .dash-nav:hover { transform: translateX(3px); }
  .portal-tabs button { transition: color .22s ease, border-color .22s ease; }
  .site-header { transition: box-shadow .3s ease, background .3s ease; }
  .site-header.has-scrolled { box-shadow: 0 10px 28px #092b3d14; }
  .primary-nav.open { animation: panel-appear .28s ease both; }
  .form-result:not([hidden]) { animation: result-appear .38s cubic-bezier(.2,.7,.2,1) both; }
  .level-dialog[open] { animation: dialog-appear .32s cubic-bezier(.2,.7,.2,1) both; }
  .level-dialog[open]::backdrop { animation: backdrop-appear .32s ease both; }
  .closing-section { background-size: 200% 200%; background-image: linear-gradient(115deg, #c9ec68, #d9f394, #c9ec68); animation: closing-glow 12s ease-in-out infinite; }

  @keyframes hero-arrive { from { transform: scale(1.08); opacity: .65; } to { transform: scale(1); opacity: 1; } }
  @keyframes hero-copy { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes gentle-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
  @keyframes panel-appear { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes result-appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes dialog-appear { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
  @keyframes backdrop-appear { from { opacity: 0; } to { opacity: 1; } }
  @keyframes closing-glow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
}

@media (prefers-reduced-motion: reduce) {
  .motion-reveal { opacity: 1 !important; transform: none !important; }
}
