/* =========================================================================
   SITE-FX — the "Command Deck" marketing layer
   -------------------------------------------------------------------------
   A premium presentational layer that sits on top of base.css. Used by the
   /pro page and the redesigned home hero. Everything is namespaced `.fx-*`
   so it never collides with the terminal component primitives in base.css.

   Visual language: pure-ink canvas, a faint dotted grid, slow mint aurora
   glows, big confident display type, device-framed dashboard mocks, and
   restrained motion (float / pulse / shimmer / scroll-reveal) for the
   "live, fun, fast" energy — without ever fighting the data-dense terminal.

   Reuses the global color tokens declared on :root in base.css
   (--mint, --ink-950..600, --line, --muted, --coral, --amber, --azure).
   ========================================================================= */

:root {
  --fx-mint: #00d4a8;
  --fx-teal: #3ee0d0;
  --fx-glow: rgba(0, 212, 168, .55);
}

/* ── Ambient canvas ───────────────────────────────────────────────────────
   A section painted with the dotted grid + a soft mint aurora. Drop `.fx-grid`
   on a <section> wrapper; children sit above the ::before/::after layers. */
.fx-grid { position: relative; isolation: isolate; overflow: hidden; }
.fx-grid > * { position: relative; z-index: 2; }
.fx-grid::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 30%, #000 0%, transparent 80%);
          mask-image: radial-gradient(75% 70% at 50% 30%, #000 0%, transparent 80%);
}
/* Slow drifting mint aurora behind everything. */
.fx-aurora::after {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(45% 55% at 22% 18%, rgba(0, 212, 168, .20) 0%, transparent 60%),
    radial-gradient(40% 50% at 82% 8%, rgba(62, 224, 208, .14) 0%, transparent 65%),
    radial-gradient(55% 60% at 60% 120%, rgba(0, 212, 168, .10) 0%, transparent 70%);
  filter: blur(8px);
  animation: fx-aurora-drift 18s ease-in-out infinite alternate;
}
@keyframes fx-aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: .85; }
  100% { transform: translate3d(0, -3%, 0) scale(1.08); opacity: 1; }
}

/* ── Marketing type ───────────────────────────────────────────────────────
   Bigger and more confident than the terminal's dense scale. */
.fx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fx-mint);
}
.fx-eyebrow::before {
  content: ""; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--fx-mint));
}
.fx-display {
  font-weight: 800; letter-spacing: -.03em; line-height: 1.02; color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}
.fx-display--md { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.fx-grad {
  background: linear-gradient(100deg, var(--fx-mint), var(--fx-teal) 55%, #aef7e8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fx-lede { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted); line-height: 1.55; }

/* ── Buttons ──────────────────────────────────────────────────────────────*/
.fx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 700;
  letter-spacing: .01em; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.fx-btn--primary {
  color: #04130f;
  background: linear-gradient(180deg, #25e9c2, var(--fx-mint));
  box-shadow: 0 10px 30px -10px var(--fx-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.fx-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px var(--fx-glow); }
.fx-btn--ghost { color: #fff; background: rgba(255, 255, 255, .04); border-color: var(--line); }
.fx-btn--ghost:hover { border-color: rgba(0, 212, 168, .5); color: var(--fx-mint); transform: translateY(-2px); }
.fx-btn--lg { padding: 15px 30px; font-size: 15px; border-radius: 14px; }

/* ── Gold/Pro badge ───────────────────────────────────────────────────────*/
.fx-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fx-mint); background: rgba(0, 212, 168, .10);
  border: 1px solid rgba(0, 212, 168, .35);
}
.fx-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: var(--fx-mint);
  box-shadow: 0 0 0 4px rgba(0, 212, 168, .18); animation: fx-pulse 2s ease-in-out infinite;
}
@keyframes fx-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }

/* ── Device frame — a faux browser window wrapping a dashboard mock ────────*/
.fx-device {
  border-radius: 16px; border: 1px solid var(--line); background: var(--ink-900);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .02),
              0 0 60px -20px rgba(0, 212, 168, .25);
  overflow: hidden;
}
.fx-device__bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .015);
}
.fx-device__dot { width: 10px; height: 10px; border-radius: 999px; background: #2a3142; }
.fx-device__url {
  margin-left: 10px; flex: 1; font-size: 11px; color: var(--dim); font-family: 'JetBrains Mono', monospace;
  background: var(--ink-800); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px;
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-device__body { padding: 16px; }

/* Tilt the hero device a touch, level it on hover. */
.fx-tilt { transform: perspective(1600px) rotateX(8deg) rotateY(-6deg) scale(.99); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.fx-tilt:hover { transform: perspective(1600px) rotateX(2deg) rotateY(-2deg) scale(1); }
@media (max-width: 900px) { .fx-tilt, .fx-tilt:hover { transform: none; } }

/* Gentle float for hero glassware. */
.fx-float { animation: fx-float 7s ease-in-out infinite; }
@keyframes fx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ── Mock dashboard primitives (data-less fakes that read as the terminal) ─*/
.fx-mock-tape {
  display: flex; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px;
  background: var(--ink-950); margin-bottom: 12px;
}
.fx-mock-tape span {
  display: inline-flex; gap: 6px; align-items: baseline; padding: 8px 12px;
  border-right: 1px solid var(--line); font-size: 11px; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}
.fx-mock-tape b { color: var(--muted); font-weight: 600; }
.fx-mock-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--ink-900); padding: 14px;
}
.fx-mock-row {
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center;
  padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.fx-mock-row:last-child { border-bottom: none; }
.fx-mock-sym { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #fff; min-width: 48px; }
.fx-mock-meta { font-family: 'JetBrains Mono', monospace; color: var(--muted); text-align: right; }
.fx-chip-a { color: var(--fx-mint); background: rgba(0, 212, 168, .14); }
.fx-chip-b { color: var(--amber); background: rgba(255, 167, 38, .14); }
.fx-chip-c { color: var(--azure); background: rgba(66, 165, 245, .14); }
.fx-mock-grade {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 10px;
  padding: 2px 6px; border-radius: 4px; letter-spacing: .03em;
}
/* Faux candle/area spark drawn with gradients — purely decorative. */
.fx-mock-chart {
  height: 120px; border-radius: 10px; border: 1px solid var(--line); position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 212, 168, .16), transparent 70%),
    var(--ink-950);
}
.fx-mock-chart::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(255,255,255,.025) 26px 27px);
}
.fx-mock-line {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
  background:
    radial-gradient(120% 80% at 20% 90%, rgba(0,212,168,.35), transparent 55%),
    radial-gradient(120% 80% at 75% 70%, rgba(62,224,208,.30), transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
          mask-image: linear-gradient(180deg, transparent, #000 30%);
}

/* ── Perspective showcase (the "multi-monitor" band) ──────────────────────*/
.fx-stage {
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 18px; align-items: center;
  perspective: 1800px;
}
.fx-stage > * { transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.fx-stage > :nth-child(1) { transform: rotateY(18deg) translateZ(-40px) scale(.92); opacity: .9; }
.fx-stage > :nth-child(3) { transform: rotateY(-18deg) translateZ(-40px) scale(.92); opacity: .9; }
.fx-stage > :nth-child(2) { transform: translateZ(20px); z-index: 3; }
.fx-stage:hover > :nth-child(1) { transform: rotateY(12deg) translateZ(-20px) scale(.95); }
.fx-stage:hover > :nth-child(3) { transform: rotateY(-12deg) translateZ(-20px) scale(.95); }
@media (max-width: 900px) {
  .fx-stage { grid-template-columns: 1fr; perspective: none; }
  .fx-stage > * { transform: none !important; opacity: 1 !important; }
  .fx-stage > :nth-child(1), .fx-stage > :nth-child(3) { display: none; }
}

/* ── Feature tabs (the "Analyze faster" carousel) ─────────────────────────*/
.fx-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  transition: all .15s; white-space: nowrap;
}
.fx-tab:hover { color: #fff; border-color: rgba(0, 212, 168, .4); }
.fx-tab.is-active {
  color: #04130f; background: linear-gradient(180deg, #25e9c2, var(--fx-mint)); border-color: transparent;
  box-shadow: 0 8px 22px -10px var(--fx-glow);
}
.fx-tab svg { width: 16px; height: 16px; }
.fx-panel { display: none; }
.fx-panel.is-active { display: block; animation: fx-fade-up .45s ease both; }

/* ── Exclusive cards carousel ─────────────────────────────────────────────*/
.fx-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px;
  scrollbar-width: thin;
}
.fx-rail::-webkit-scrollbar { height: 8px; }
.fx-rail::-webkit-scrollbar-thumb { background: var(--ink-700); border-radius: 999px; }
.fx-rail > * { scroll-snap-align: start; }
@media (min-width: 1024px) { .fx-rail { grid-auto-columns: 1fr; overflow: visible; } }

.fx-card {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 60%), var(--ink-900);
  overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .25s;
}
.fx-card:hover {
  transform: translateY(-4px); border-color: rgba(0, 212, 168, .4);
  box-shadow: 0 24px 50px -24px rgba(0, 212, 168, .35);
}
.fx-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--fx-mint), transparent);
  opacity: 0; transition: opacity .25s;
}
.fx-card:hover::before { opacity: 1; }
.fx-card__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  color: var(--fx-mint); background: rgba(0, 212, 168, .10); border: 1px solid rgba(0, 212, 168, .25);
  margin-bottom: 14px;
}
.fx-card__icon svg { width: 22px; height: 22px; }

/* ── FAQ accordion (native <details>) ─────────────────────────────────────*/
.fx-faq { border: 1px solid var(--line); border-radius: 14px; background: var(--ink-900); overflow: hidden; }
.fx-faq + .fx-faq { margin-top: 10px; }
.fx-faq > summary {
  list-style: none; cursor: pointer; padding: 18px 20px; font-size: 15px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.fx-faq > summary::-webkit-details-marker { display: none; }
.fx-faq > summary::after {
  content: "+"; color: var(--fx-mint); font-size: 22px; font-weight: 300; line-height: 1; transition: transform .2s;
}
.fx-faq[open] > summary::after { transform: rotate(45deg); }
.fx-faq[open] > summary { color: var(--fx-mint); }
.fx-faq__body { padding: 0 20px 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ── Stat strip (proof numbers) ───────────────────────────────────────────*/
.fx-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .fx-stats { grid-template-columns: repeat(4, 1fr); } }
.fx-stat { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--ink-900); text-align: center; }
.fx-stat__num {
  font-family: 'JetBrains Mono', monospace; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700;
  color: #fff; line-height: 1;
}
.fx-stat__num .fx-grad { font-family: inherit; }
.fx-stat__label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin-top: 8px; }

/* ── Section rhythm ───────────────────────────────────────────────────────*/
.fx-section { padding: clamp(56px, 9vw, 110px) 0; }
.fx-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }

/* ── Final CTA band ───────────────────────────────────────────────────────*/
.fx-cta {
  position: relative; border: 1px solid rgba(0, 212, 168, .3); border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(80% 140% at 50% 0%, rgba(0, 212, 168, .18), transparent 60%),
    linear-gradient(180deg, var(--ink-900), var(--ink-950));
  padding: clamp(36px, 6vw, 72px);
}

/* ── Scroll reveal ────────────────────────────────────────────────────────
   Elements start hidden + nudged, then `.is-in` removes it. JS adds the class
   via IntersectionObserver; a no-JS / reduced-motion fallback shows them. */
.fx-reveal { opacity: 1; transform: none; }
.fx-js .fx-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.fx-js .fx-reveal.is-in { opacity: 1; transform: none; }
.fx-reveal[data-fx-delay="1"] { transition-delay: .08s; }
.fx-reveal[data-fx-delay="2"] { transition-delay: .16s; }
.fx-reveal[data-fx-delay="3"] { transition-delay: .24s; }
.fx-reveal[data-fx-delay="4"] { transition-delay: .32s; }

@keyframes fx-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .fx-reveal, .fx-js .fx-reveal { opacity: 1 !important; transform: none !important; }
  .fx-aurora::after, .fx-float, .fx-dot { animation: none !important; }
  .fx-panel.is-active { animation: none; }
}
