/* =====================================================================
   fx.css — the graphics layer. Pure CSS + WebGL (scenes.js), no stock art.
   Mesh-gradient skies, glass tiles, device frames, pointer tilt, glow floors,
   gradient avatars, animated "popular" ring, count-up numbers (fx.js).
   Everything respects prefers-reduced-motion.
   ===================================================================== */

/* ---------- shared: mesh gradient blobs ---------- */
.mesh,
.sub__sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.mesh i,
.sub__sky i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
  animation: mesh-drift 18s ease-in-out infinite alternate;
}
.mesh i:nth-child(1),
.sub__sky i:nth-child(1) {
  width: 46vw;
  height: 46vw;
  left: -10vw;
  top: -18vw;
  background: radial-gradient(circle at 30% 30%, #7c8cff, #4d5cff 45%, transparent 70%);
}
.mesh i:nth-child(2),
.sub__sky i:nth-child(2) {
  width: 40vw;
  height: 40vw;
  right: -12vw;
  top: -6vw;
  background: radial-gradient(circle at 60% 40%, #d18cff, #8d5cff 45%, transparent 70%);
  animation-delay: -6s;
}
.mesh i:nth-child(3),
.sub__sky i:nth-child(3) {
  width: 34vw;
  height: 34vw;
  left: 38vw;
  top: 6vw;
  background: radial-gradient(circle at 50% 50%, #9ad7ff, #5bb8ff 40%, transparent 70%);
  animation-delay: -12s;
}
@keyframes mesh-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(6vw, 4vw, 0) scale(1.15);
  }
}

/* ---------- hero: nebula canvas, floating panel on a glow floor ---------- */
.hero__bg .gl {
  opacity: 0.9;
}
.hero__glow {
  background:
    radial-gradient(44% 36% at 50% 100%, rgba(77, 92, 255, 0.5), transparent 70%),
    radial-gradient(26% 20% at 18% 30%, rgba(140, 92, 255, 0.28), transparent 70%),
    radial-gradient(22% 18% at 82% 24%, rgba(90, 184, 255, 0.22), transparent 70%);
}
.hero__stage {
  perspective: 1600px;
}
.hero__panel {
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) !important;
  box-shadow:
    0 0 0 1px rgba(140, 160, 255, 0.22),
    0 50px 140px rgba(0, 0, 0, 0.75),
    0 0 120px rgba(77, 92, 255, 0.25);
}
.hero__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 28%, transparent 60%, rgba(255, 255, 255, 0.05));
  mix-blend-mode: screen;
  z-index: 5;
}
.hero__stage::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: min(1100px, 90%);
  height: 160px;
  transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, rgba(77, 92, 255, 0.55), transparent 70%);
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}
.hero h1 .grad {
  background: linear-gradient(92deg, #a7b4ff 0%, #5b6cff 38%, #c15cff 72%, #ff8ad6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: 200% 0;
  }
}

/* ---------- proof strip ---------- */
.proof {
  position: relative;
  overflow: hidden;
}
.proof::before {
  content: '';
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 70%;
  background: radial-gradient(50% 60% at 50% 100%, rgba(77, 92, 255, 0.25), transparent 70%);
  pointer-events: none;
}
.proof__grid b {
  background: linear-gradient(180deg, #fff, #b9c3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- strategy cards: glass tiles with a hue each ---------- */
.strat {
  position: relative;
  overflow: hidden;
}
.strat .s-wrap {
  position: relative;
  z-index: 1;
}
.strat__card {
  --hue: 224;
  position: relative;
  overflow: hidden;
  border: 1px solid hsla(var(--hue), 80%, 60%, 0.18);
  background:
    radial-gradient(120% 90% at 100% 0%, hsla(var(--hue), 90%, 70%, 0.22), transparent 55%),
    #fff;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.25s, border-color 0.25s;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
}
.strat__card:hover {
  --ty: -4px;
  border-color: hsla(var(--hue), 80%, 55%, 0.5);
  box-shadow: 0 30px 60px -20px hsla(var(--hue), 80%, 50%, 0.35);
}
.strat__card::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(var(--hue), 95%, 70%, 0.55), transparent 65%);
  filter: blur(26px);
  pointer-events: none;
}
/* 23 Oct: the tiles hold small trading illustrations (payoff diagram, SELL contract,
   0-DTE calendar, index chart, CALL/PUT arrows, overnight candles) on a pale-blue
   square instead of the old abstract glyphs on a gradient. The SVGs carry their own
   ink/blue strokes and fills, so nothing is forced to white here any more. */
.strat__ico {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #ebf0ff;
  border: 1px solid rgba(43, 92, 255, 0.14);
  box-shadow: none;
  padding: 8px;
}
.strat__ico svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}
.strat__ico svg text {
  font-family: var(--font, inherit);
}

/* ---------- pricing: mesh backdrop, glass cards, glowing popular ring ---------- */
.pricing {
  position: relative;
  overflow: hidden;
}
.mesh--pricing i {
  opacity: 0.4;
}
.pricing > .wrap,
.pricing > .s-wrap {
  position: relative;
  z-index: 1;
}
.plan {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 24px 60px -24px rgba(12, 15, 44, 0.25);
}
.plan--pop {
  position: relative;
}
.plan--pop::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--a, 0deg), #4d5cff, #c15cff, #5bb8ff, #4d5cff);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin-ring 6s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@property --a {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes spin-ring {
  to {
    --a: 360deg;
  }
}
.plan--pop > * {
  position: relative;
  z-index: 1;
}

/* ---------- reviews: gradient avatars ---------- */
.review figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review figcaption > div {
  display: grid;
  gap: 2px;
}
.review__av {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  background: linear-gradient(145deg, #5b6cff, #c15cff);
  box-shadow: 0 10px 24px -10px rgba(77, 92, 255, 0.7);
}
.review:nth-child(2) .review__av {
  background: linear-gradient(145deg, #2bd4c4, #4d5cff);
}
.review:nth-child(3) .review__av {
  background: linear-gradient(145deg, #ff8ad6, #8d5cff);
}
.review {
  transition: transform 0.25s, box-shadow 0.25s;
}
.review:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -30px rgba(12, 15, 44, 0.35);
}

/* ---------- close: globe behind the CTA ---------- */
.s-close {
  position: relative;
  overflow: hidden;
}
.s-close__fx {
  position: absolute;
  inset: -10% 0 -30% 0;
  pointer-events: none;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(60% 60% at 50% 50%, #000 30%, transparent 75%);
}
.s-close__fx .gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.s-close .s-wrap {
  position: relative;
  z-index: 1;
}
.s-close__mark {
  background: linear-gradient(145deg, #5b6cff, #c15cff);
  box-shadow: 0 20px 40px -14px rgba(120, 92, 255, 0.8);
}

/* ---------- sub pages: animated sky behind the title ---------- */
.sub {
  position: relative;
  overflow: hidden;
}
.sub__sky {
  height: 70vh;
  inset: 0 0 auto 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.sub__sky i {
  opacity: 0.38;
}
.sub > .wrap {
  position: relative;
  z-index: 1;
}
/* (26 Oct) the sub-page label pill is now styles.css .section-eyebrow, shared by every page */

/* ---------- sign-in panel: globe ---------- */
.si-panel__globe {
  position: absolute;
  right: -20%;
  bottom: -30%;
  width: 90%;
  aspect-ratio: 1;
  z-index: -1;
  opacity: 0.7;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(55% 55% at 50% 50%, #000 40%, transparent 72%);
  mask-image: radial-gradient(55% 55% at 50% 50%, #000 40%, transparent 72%);
}
.si-panel__globe .gl {
  width: 100%;
  height: 100%;
}

/* ---------- footer card: faint mesh ---------- */
.foot {
  position: relative;
  overflow: hidden;
}
.foot::before {
  content: '';
  position: absolute;
  right: -10%;
  top: -30%;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 150, 255, 0.35), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}
.foot > * {
  position: relative;
}

/* ---------- entrance: cards rise in once (not scroll-locked) ---------- */
.fx-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fx-in.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .mesh i,
  .sub__sky i,
  .hero h1 .grad,
  .plan--pop::before {
    animation: none !important;
  }
  .fx-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__panel,
  .strat__card {
    transform: none !important;
  }
}
@media (max-width: 768px) {
  .mesh i,
  .sub__sky i {
    filter: blur(40px);
  }
  .sub__sky {
    height: 50vh;
  }
}
/* tuning */
.hero__veil {
  background:
    linear-gradient(to bottom, rgba(5, 5, 9, 0.75), rgba(5, 5, 9, 0.3) 40%, rgba(5, 5, 9, 0) 70%),
    linear-gradient(to top, rgba(5, 5, 9, 0.9), rgba(5, 5, 9, 0) 30%);
}
.mesh--pricing i {
  opacity: 0.28;
  top: 10vw;
}
.s-close__fx {
  opacity: 0.8;
}

/* =====================================================================
   motion pack — 3D entrances, floating devices, flips, shine sweeps,
   parallax skies, cursor spotlight. All passive, nothing locks scroll.
   ===================================================================== */
/* 3D rise-in: cards tip up out of the page */
.fx-in {
  transform: perspective(1200px) rotateX(14deg) translateY(28px) scale(0.98);
  transform-origin: 50% 100%;
}
.fx-in.is-in {
  transform: perspective(1200px) rotateX(0deg) translateY(0) scale(1);
}
/* headings: masked line reveal */
/* 25 Oct (Alfi): the mask clipped descenders. Section headings run at line-height 1.05-1.08 while Inter's
   glyph area is ~1.21em tall, so each line box ends ~0.08em above the bottom of g / p / y and
   overflow: hidden cut them flat ("Start with Funded Capital Today", "Long calls & puts …"). The mask is
   now a clip-path that reaches 0.1em above and below the line box: no overflow clipping, so line-height,
   heading height and section spacing are untouched and the glyphs are whole. The reveal still starts
   fully hidden: the inner span begins 110% of the line box down, past the 0.1em the mask gained
   (0.1 × line-height ≥ 0.1em whenever line-height ≥ 1em). mobile.css's overflow: visible for phones
   keeps working as a no-op there (phones fade instead of sliding). */
.fx-line {
  display: block;
  clip-path: inset(-0.1em 0);
}
.fx-line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fx-line.is-in > span {
  transform: none;
}
/* hero text entrance */
.hero h1,
.hero__sub,
.hero__cta,
.hero__example {
  animation: hero-rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero__sub { animation-delay: 0.15s; }
.hero__cta { animation-delay: 0.3s; }
.hero__example { animation-delay: 0.4s; }
.hero__panel {
  animation: panel-rise 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s backwards;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes panel-rise {
  from { opacity: 0; transform: perspective(1600px) rotateX(22deg) translateY(90px); }
  to { opacity: 1; transform: perspective(1600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
}
/* float: the most-popular plan below */
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
/* strategy icon tiles spin in 3D on hover */
.strat__ico {
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}
.strat__card:hover .strat__ico {
  transform: perspective(500px) rotateY(360deg);
}
/* most-popular plan bobs */
.plan--pop {
  animation: float 6s ease-in-out infinite;
}
/* buttons: shine sweep on hover. 27 Oct (Ali): only the plan cards' "Start for $…" buttons keep it;
   every other button hovers without the sweep. */
#pricing .plan > a.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
#pricing .plan > a.btn::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -70%;
  width: 50%;
  height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
#pricing .plan > a.btn:hover::after {
  left: 130%;
}
/* proof numbers: 3D flip-in */
.proof__grid > div {
  animation: flip-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.proof__grid > div:nth-child(2) { animation-delay: 0.1s; }
.proof__grid > div:nth-child(3) { animation-delay: 0.2s; }
.proof__grid > div:nth-child(4) { animation-delay: 0.3s; }
@keyframes flip-in {
  from { opacity: 0; transform: perspective(800px) rotateX(-60deg); transform-origin: 50% 0; }
  to { opacity: 1; transform: none; }
}
/* cursor spotlight over dark sections */
.spot {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle, rgba(91, 108, 255, 0.16), transparent 60%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s;
}
.spot.on {
  opacity: 1;
}
/* parallax skies (fx.js sets --py) */
.mesh i,
.sub__sky i,
.hero__glow {
  translate: 0 calc(var(--py, 0) * 1px);
}
/* comparison rows: Strix cell pulses once when it enters */
.cmp__table td:nth-child(3) {
  position: relative;
}
.cmp__table tr.is-in td:nth-child(3)::before {
  content: '';
  position: absolute;
  inset: 4px 8px;
  border-radius: 8px;
  background: rgba(43, 92, 255, 0.12);
  animation: pulse-once 1.2s ease-out both;
  z-index: -1;
}
@keyframes pulse-once {
  from { opacity: 1; transform: scale(0.9); }
  to { opacity: 0; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .plan--pop, .proof__grid > div, .hero h1, .hero__sub, .hero__cta, .hero__example, .hero__panel {
    animation: none !important;
  }
  .spot { display: none; }
  .fx-line > span { transform: none; transition: none; }
}

/* 27 Oct (Task 1.5): counting numbers keep one digit width, so the figure does not jiggle its
   neighbours while it counts */
[data-count] {
  font-variant-numeric: tabular-nums;
}
