/*
 * TEKMYR Interactive Visual Effects Layer
 * Cursor-tracking spotlight borders, 3D perspective stage, laser pipeline beams,
 * orbital radar rotations, and staggered entrance choreography.
 */
.refined-ui.js-ready:not(.fx-ready) .sidebar {
  transition: none;
}

.refined-ui .site-header,
.refined-ui .topbar,
.refined-ui .public-header {
  transition: box-shadow 240ms ease, border-color 240ms ease, background-color 240ms ease;
}

.refined-ui .has-scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.65);
}

/* ── Cursor-Tracking Spotlight on Cards (Linear / Raycast style) ── */
@media (hover: hover) and (pointer: fine) {
  .refined-ui :is(.card, .quick-link, .mode-card, .faq .disclosure, .path li, .basics > div, .report-points > div) {
    position: relative;
  }

  .refined-ui :is(.card, .quick-link, .mode-card, .faq .disclosure, .path li, .basics > div, .report-points > div)::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
      380px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
      rgba(255, 255, 255, 0.28),
      rgba(96, 165, 250, 0.12) 35%,
      transparent 65%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 260ms ease;
    z-index: 2;
  }

  .refined-ui :is(.card, .quick-link, .mode-card, .faq .disclosure, .path li, .basics > div, .report-points > div):hover::after {
    opacity: 1;
  }
}

/* ── Staggered Section Reveal Choreography ── */
@media (prefers-reduced-motion: no-preference) {
  .landing.refined-ui .fx-enter-visible {
    animation: polished-arrival 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .landing.refined-ui .fx-enter-visible > :nth-child(1) { animation: polished-arrival 600ms 40ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .landing.refined-ui .fx-enter-visible > :nth-child(2) { animation: polished-arrival 600ms 110ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .landing.refined-ui .fx-enter-visible > :nth-child(3) { animation: polished-arrival 600ms 180ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .landing.refined-ui .fx-enter-visible > :nth-child(4) { animation: polished-arrival 600ms 250ms cubic-bezier(0.16, 1, 0.3, 1) both; }

  .landing.refined-ui .fx-enter-visible:focus-within {
    animation: none;
  }

  @keyframes polished-arrival {
    from { opacity: 0; transform: translateY(16px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (prefers-reduced-motion: reduce), (forced-colors: active) {
  .refined-ui .fx-enter-visible,
  .refined-ui .fx-enter-visible > * { animation: none !important; }
  .landing.refined-ui .hero-figure,
  .landing.refined-ui .paper-wrap { --rx: 0deg !important; --ry: 0deg !important; --art-x: 0px !important; --art-y: 0px !important; }
}

@media print {
  .refined-ui .fx-enter-visible { animation: none !important; opacity: 1 !important; transform: none !important; }
  .refined-ui .has-scrolled { box-shadow: none; }
}
