/* Landing Spot — tactile micro-interactions (spotlight, stagger, press, data animation) */

/* ---------- Spotlight borders on dark cards ---------- */
.fx-spot { position: relative; isolation: isolate; }
.fx-glow {
  position: absolute; inset: -1px; z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity 220ms ease;
}
.fx-glow::before,
.fx-glow::after { content: ""; position: absolute; inset: 0; }
/* 1px border ring lit around the pointer */
.fx-glow::before {
  padding: 1px;
  background: radial-gradient(220px circle at var(--mx, -999px) var(--my, -999px), rgba(212, 255, 0, 0.42), rgba(212, 255, 0, 0) 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* faint interior wash */
.fx-glow::after {
  inset: 1px;
  background: radial-gradient(320px circle at var(--mx, -999px) var(--my, -999px), rgba(212, 255, 0, 0.045), rgba(212, 255, 0, 0) 60%);
}
.fx-spot:hover > .fx-glow,
.fx-spot.is-spot > .fx-glow { opacity: 1; }

/* Table rows: viewport-fixed gradient follows the pointer across cells */
.need-table tbody tr.fx-row:hover td {
  background:
    radial-gradient(240px circle at var(--vx, -999px) var(--vy, -999px), rgba(212, 255, 0, 0.07), rgba(212, 255, 0, 0) 70%) fixed,
    #101216;
}

/* ---------- Staggered reveal for grids ---------- */
html.fx-js .fx-stagger > * { opacity: 0; transform: translateY(12px); }
html.fx-js .fx-stagger.fx-in > * {
  animation: fx-rise 560ms cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes fx-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Tactile press states ---------- */
.btn, .save-btn, .th-sort, .chip-btn, .seg button, .filt, .remove, .coach-chip, .suggest-chip,
.cta-band-btn, .plan-cta, .filters-open, .show-all, .card-toggle, .sheet-close, .nav-signin, .hero-cta, .cta {
  transition-property: color, background-color, border-color, opacity, transform, box-shadow;
  transition-duration: 160ms, 160ms, 160ms, 160ms, 90ms, 90ms;
}
.btn:active, .save-btn:active, .th-sort:active, .chip-btn:active, .seg button:active, .filt:active,
.remove:active, .coach-chip:active, .suggest-chip:active, .cta-band-btn:active, .plan-cta:active,
.filters-open:active, .show-all:active, .sheet-close:active, .nav-signin:active, .hero-cta:active, .cta:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: inset 0 0 0 1px #D4FF00 !important;
}
.card-toggle:active { transform: translateY(1px); }

/* ---------- Data animation ---------- */
.fit-track i.fx-bar { transition: width 760ms cubic-bezier(.2, .7, .2, 1); }
.meter.fx-pending i.on { background: #22262E; }
.meter i { transition: background-color 220ms ease; }
.meter i:nth-child(2) { transition-delay: 70ms; }
.meter i:nth-child(3) { transition-delay: 140ms; }
.meter i:nth-child(4) { transition-delay: 210ms; }
.fx-count { font-variant-numeric: tabular-nums; }

@media (hover: none) {
  .fx-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.fx-js .fx-stagger > * { opacity: 1; transform: none; animation: none !important; }
  .fit-track i.fx-bar, .meter i, .fx-glow { transition: none !important; }
  .btn:active, .save-btn:active, .th-sort:active, .chip-btn:active, .seg button:active, .filt:active,
  .remove:active, .coach-chip:active, .suggest-chip:active, .cta-band-btn:active, .plan-cta:active,
  .filters-open:active, .show-all:active, .sheet-close:active, .nav-signin:active, .card-toggle:active { transform: none; }
}
