/* Skylinelabs visual effects. One block per effect, each only active when
   js/effects.js adds its "fx-<name>" class to <html>. Delete a block, or set
   the effect to false in js/effects.js, to remove just that effect. */

/* ---------- glow: drifting colour behind the hero ---------- */
html.fx-glow .hero, html.fx-grid .hero { position: relative; overflow: hidden; isolation: isolate; }
html.fx-glow .hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 40% at 20% 30%, rgba(0,243,144,.16), transparent 70%),
    radial-gradient(35% 35% at 80% 20%, rgba(40,120,255,.20), transparent 70%),
    radial-gradient(40% 40% at 60% 90%, rgba(0,243,144,.10), transparent 70%);
  animation: fx-drift 18s ease-in-out infinite alternate;
}
@keyframes fx-drift { to { transform: translate3d(4%, 3%, 0) scale(1.1); } }

/* ---------- grid: faint moving grid behind the hero ---------- */
html.fx-grid .hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,243,144,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,243,144,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  animation: fx-grid 14s linear infinite;
}
@keyframes fx-grid { to { background-position: 48px 48px, 48px 48px; } }

/* ---------- hover: glow on cards and icons ---------- */
@media (hover: hover) {
  html.fx-hover :is(.phone, .niche-out, .form-panel, .demo-panel) { transition: border-color .25s, box-shadow .25s; }
  html.fx-hover :is(.phone, .niche-out, .form-panel, .demo-panel):hover {
    border-color: var(--mint-d);
    box-shadow: 0 0 0 1px rgba(0,243,144,.25), 0 24px 60px -24px rgba(0,243,144,.35);
  }
  html.fx-hover .role span { transition: border-color .2s, background .2s; }
  html.fx-hover .role:hover span { border-color: var(--mint-d); }
  html.fx-hover .does-item svg { transition: filter .25s, transform .25s; }
  html.fx-hover .does-item:hover svg { filter: drop-shadow(0 0 7px rgba(0,243,144,.7)); transform: scale(1.08); }
}

/* ---------- buttons: shine sweep and glow ---------- */
html.fx-buttons .btn { position: relative; overflow: hidden; isolation: isolate; }
html.fx-buttons .btn.primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
  transform: translateX(-130%);
}
@media (hover: hover) {
  html.fx-buttons .btn.primary { transition: background .15s, transform .15s, box-shadow .25s; }
  html.fx-buttons .btn.primary:hover { box-shadow: 0 0 0 4px rgba(0,243,144,.16), 0 10px 32px -8px rgba(0,243,144,.65); transform: translateY(-1px); }
  html.fx-buttons .btn.primary:hover::after { transform: translateX(130%); transition: transform .8s ease; }
}

/* ---------- stepline: "How it works" line draws itself ---------- */
html.fx-stepline .steps li::after { transform-origin: top; transform: scaleY(0); transition: transform .9s ease .25s; }
html.fx-stepline .steps li.in::after { transform: scaleY(1); }

/* ---------- reveal: fade and slide in on scroll ---------- */
/* The element list here must match REVEAL in js/effects.js. */
html.fx-reveal :is(
  .sec-head, .does-item, .wait, .caveat, .promise, .trio>div, .ticks li,
  .pilot .blk, .niche-out, .steps li, .faq details, .outcomes li,
  .split>div:first-child, .pilot-grid>div:first-child, .contact-grid>div:first-child,
  .how>div:first-child, .form-panel, .demo-panel, .picker, .niche-cta
) {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease var(--d, 0ms), transform .7s cubic-bezier(.2,.7,.2,1) var(--d, 0ms), border-color .25s, box-shadow .25s;
}
html.fx-reveal :is(
  .sec-head, .does-item, .wait, .caveat, .promise, .trio>div, .ticks li,
  .pilot .blk, .niche-out, .steps li, .faq details, .outcomes li,
  .split>div:first-child, .pilot-grid>div:first-child, .contact-grid>div:first-child,
  .how>div:first-child, .form-panel, .demo-panel, .picker, .niche-cta
).in { opacity: 1; transform: none; }
