/* =====================================================
   fx.css: the shared visual layer (Tron-style neon on the dark navy grid,
   deep-blue linework on light). Loaded after style.css (and home.css /
   landing.css where present) on every main page. Motion is transform and
   opacity only; prefers-reduced-motion turns all of it off.
   ===================================================== */

:root {
  --neon: #0369A1;
  --neon-2: #0284C7;
  --neon-soft: rgba(2, 132, 199, 0.16);
  --neon-glow: 0 0 0 transparent;
  --grid-line: rgba(2, 132, 199, 0.07);
  --card-glass: rgba(255, 255, 255, 0.78);
  --h2-from: #0B2540;
  --h2-to: #0369A1;
}
[data-theme="dark"] {
  --neon: #38BDF8;
  --neon-2: #0284C7;
  --neon-soft: rgba(56, 189, 248, 0.14);
  --neon-glow: 0 0 18px rgba(56, 189, 248, 0.35);
  --grid-line: rgba(56, 189, 248, 0.055);
  --card-glass: rgba(19, 28, 43, 0.72);
  --h2-from: #F1F6FC;
  --h2-to: #7DD3FC;
  --bg: #070B14;
  --bg-alt: #0B1220;
}


/* Metric-matched fallback for Inter: while the web font loads, text set in
   this face takes the same space as Inter, so the swap does not re-wrap
   the headline and shift the page (layout shift). */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Nimbus Sans"), local("NimbusSans-Regular");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}
body { font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }

@property --fx-a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ---- Page background: faint grid + slow gradient mesh ------------------- */
body { position: relative; }
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 85%);
}
body::after {
  inset: -20%;
  background:
    radial-gradient(40% 35% at 20% 30%, rgba(2, 132, 199, 0.10), transparent 70%),
    radial-gradient(35% 30% at 80% 70%, rgba(56, 189, 248, 0.07), transparent 70%);
  animation: fxMesh 40s ease-in-out infinite alternate;
}
@keyframes fxMesh {
  from { transform: translate3d(-3%, -2%, 0) rotate(0deg); }
  to   { transform: translate3d(3%, 2%, 0) rotate(8deg); }
}
/* Sections let the page grid through; alternate sections tint it. */
[data-theme="dark"] .section-alt { background: rgba(11, 18, 32, 0.78); }
.section-alt { background: rgba(247, 249, 252, 0.82); }

/* ---- Header: glass, neon base line, reading progress -------------------- */
.site-header { transition: background-color 280ms ease, border-color 280ms ease; }
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon) 50%, transparent);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}
.site-header.is-scrolled::after { opacity: 0.55; }
.site-header.is-scrolled { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12) !important; }
.scroll-progress.is-docked {
  position: absolute;
  top: auto;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-2), var(--neon));
  box-shadow: var(--neon-glow);
}
.nav-links a:not(.cta) { position: relative; }
.nav-links a:not(.cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--neon);
  box-shadow: var(--neon-glow);
  transform: scaleX(0);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:not(.cta):hover::after,
.nav-links a:not(.cta):focus-visible::after { transform: scaleX(1); }
@media (max-width: 900px) { .nav-links a:not(.cta)::after { display: none; } }

/* ---- Type: gradient headings, neon eyebrows ------------------------------ */
.section:not(.h-hw):not(.section-cta) h2:not(.explain-panel-title),
.lp-hero h1, .h-hero h1 {
  background: linear-gradient(100deg, var(--h2-from) 10%, var(--h2-to) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--h2-to);
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--neon);
}
.section-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--neon);
  box-shadow: var(--neon-glow);
}
.section-head-center .section-eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--neon);
  box-shadow: var(--neon-glow);
}

/* ---- Buttons --------------------------------------------------------------- */
.btn { transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease, background-color 220ms ease, border-color 220ms ease, color 220ms ease; }
.btn-primary { box-shadow: 0 6px 20px rgba(2, 132, 199, 0.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(2, 132, 199, 0.38); }
[data-theme="dark"] .btn-primary:hover { background: #7DD3FC; color: #082F49; box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.5), 0 0 28px rgba(56, 189, 248, 0.45); }
.btn-secondary { background: var(--card-glass); }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: var(--neon-glow); }
.btn:focus-visible,
.h-term-tab:focus-visible,
.h-copy:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Neon cards: hover lift, cursor glow, tracing border ------------------ */
:is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure, .h-score,
    .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .lp-person, .h-faq-item, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout) {
  position: relative;
  isolation: isolate;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 320ms ease, border-color 320ms ease, background-color 280ms ease;
}
:is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure, .h-score,
    .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .lp-person, .h-faq-item, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout)::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background:
    conic-gradient(from var(--fx-a), transparent 0 62%, var(--neon) 80%, #E0F2FE 84%, var(--neon) 88%, transparent 100%);
  -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);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
  z-index: 1;
}
:is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure, .h-score,
    .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .lp-person, .h-faq-item, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--neon-soft), transparent 70%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
  z-index: -1;
}
@media (hover: hover) {
  :is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure,
      .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout):hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(2, 18, 40, 0.18), var(--neon-glow);
  }
  :is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure, .h-score,
      .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .lp-person, .h-faq-item, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout):hover::after {
    opacity: 1;
    animation: fxTrace 2.4s linear infinite;
  }
  :is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure, .h-score,
      .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .lp-person, .h-faq-item, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout):hover::before { opacity: 1; }
}
@keyframes fxTrace { to { --fx-a: 360deg; } }
[data-theme="light"] :is(.fx-card, .h-stat, .h-pillars > div, .lp-related a, .lp-facts > div, .lp-person) { box-shadow: 0 1px 2px rgba(11, 37, 64, 0.06), 0 6px 18px rgba(2, 132, 199, 0.06); }

/* ---- Section dividers: a neon hairline with a light running along it ---- */
.section { position: relative; }
.section:not(.section-cta):not(.h-hw)::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1100px, 86%);
  height: 1px;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent 0, var(--neon) 50%, transparent 100%) 0 0 / 22% 100% no-repeat,
    linear-gradient(90deg, transparent, var(--border-strong) 20%, var(--border-strong) 80%, transparent);
  opacity: 0.8;
  animation: fxRun 7s linear infinite;
  pointer-events: none;
}
@keyframes fxRun {
  from { background-position: -30% 0, 0 0; }
  to   { background-position: 130% 0, 0 0; }
}

/* ---- Perspective neon floor (hero, hardware, CTA) ------------------------ */
.fx-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  perspective: 340px;
  perspective-origin: 50% 0%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 92%);
  mask-image: linear-gradient(to top, #000 10%, transparent 92%);
}
.fx-floor::before {
  /* the horizon line */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon) 30%, var(--neon) 70%, transparent);
  box-shadow: 0 0 22px 4px var(--neon-soft);
  opacity: 0.55;
}
.fx-floor-plane {
  position: absolute;
  left: -60%; right: -60%;
  top: 0;
  height: 260%;
  transform-origin: 50% 0;
  transform: rotateX(76deg);
  background-image:
    linear-gradient(var(--neon) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--neon) 1.5px, transparent 1.5px);
  background-size: 72px 72px;
  opacity: 0.22;
  animation: fxFloor 4s linear infinite;
  will-change: transform;
}
[data-theme="light"] .fx-floor-plane { opacity: 0.12; }
@keyframes fxFloor {
  from { transform: rotateX(76deg) translate3d(0, -72px, 0); }
  to   { transform: rotateX(76deg) translate3d(0, 0, 0); }
}
.section-cta .fx-floor-plane,
.h-hw .fx-floor-plane { background-image: linear-gradient(rgba(186, 230, 253, 0.9) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(186, 230, 253, 0.9) 1.5px, transparent 1.5px); opacity: 0.16; }
.section-cta .fx-floor::before,
.h-hw .fx-floor::before { background: linear-gradient(90deg, transparent, #BAE6FD 30%, #BAE6FD 70%, transparent); }
.section-cta > .container,
.h-hw > .container { position: relative; z-index: 1; }

/* ---- Stagger the children of revealed groups ----------------------------- */
:is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 320ms ease, border-color 320ms ease;
}
:is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal.in-view > * { opacity: 1; transform: none; }
:is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal.in-view > :nth-child(2) { transition-delay: 90ms, 90ms, 0s, 0s; }
:is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal.in-view > :nth-child(3) { transition-delay: 180ms, 180ms, 0s, 0s; }
:is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal.in-view > :nth-child(4) { transition-delay: 270ms, 270ms, 0s, 0s; }
:is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal.in-view > :nth-child(n+5) { transition-delay: 340ms, 340ms, 0s, 0s; }
/* A hovered card must lift immediately even when its group has a delay. */
:is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal.in-view > :hover { transition-delay: 0s; }

/* ---- Scroll-driven: headings and numbers settle as they scroll in ------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .section h2:not(.explain-panel-title), .fx-vp {
      animation: fxSettle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    .hero-orb, .hero-orb-b, .h-hero .fx-floor {
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
      animation-timing-function: linear;
      animation-fill-mode: both;
    }
    .hero-orb { animation-name: fxParallaxA; }
    .hero-orb-b { animation-name: fxParallaxB; }
    .h-hero .fx-floor { animation-name: fxParallaxFloor; }
  }
  .fx-no-sda .section h2:not(.explain-panel-title),
  .fx-no-sda .fx-vp {
    opacity: calc(0.35 + 0.65 * var(--vp, 1));
    transform: translate3d(0, calc((1 - var(--vp, 1)) * 26px), 0) scale(calc(0.95 + 0.05 * var(--vp, 1)));
  }
  .fx-no-sda .hero-orb { transform: translate3d(0, calc(var(--sy, 0) * 0.35px), 0); animation: none; }
  .fx-no-sda .hero-orb-b { transform: translate3d(0, calc(var(--sy, 0) * -0.2px), 0); animation: none; }
}
@keyframes fxSettle {
  from { opacity: 0.35; transform: translate3d(0, 22px, 0) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes fxParallaxA { to { transform: translate3d(-40px, 260px, 0); } }
@keyframes fxParallaxB { to { transform: translate3d(60px, -140px, 0); } }
/* The orbs are soft gradients already; a live blur filter on a moving
   layer costs a re-raster per frame. */
.hero-orb, .hero-orb-b { filter: none; }
@keyframes fxParallaxFloor { to { transform: translate3d(0, 90px, 0); opacity: 0.2; } }

/* ---- Generic page heroes (landing pages, about, compare, press, …) ------ */
.lp-hero, .encl-hero, .seg-hero, .compare-intro, .legal-doc-header { position: relative; }
.lp-hero { overflow: hidden; padding-bottom: 5rem; }
.lp-hero > .container { position: relative; z-index: 1; }
.lp-crumbs { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.04em; }

/* ---- Tables get a neon header rule --------------------------------------- */
.lp-table thead tr, .h-table thead tr { border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, var(--neon), transparent) 1; }
.lp-table tbody tr, .h-table tbody tr { transition: background-color 200ms ease; }
.lp-table tbody tr:hover { background: var(--neon-soft); }

/* ---- Reduced motion: everything static, final state ---------------------- */
@media (prefers-reduced-motion: reduce) {
  body::after, .fx-floor-plane, .section::after, .hero-orb, .hero-orb-b { animation: none !important; }
  :is(.h-quotes, .h-pillars, .lp-related, .lp-facts, .h-checked, .lp-checklist, .h-stats-grid, .h-faq).reveal > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  :is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure, .h-score,
      .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .lp-person, .h-faq-item, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout, .btn) { transition: none !important; transform: none !important; }
  :is(.fx-card, .h-stat, .h-quotes figure, .h-pillars > div, .h-molt-col figure, .h-score,
      .h-checked-item, .lp-related a, .lp-facts > div, .lp-checklist li, .lp-person, .h-faq-item, .research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout)::after { animation: none !important; }
}

/* ---- Subpage backdrop: glow + neon floor behind the page header -------- */
.fx-top {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 620px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(70% 80% at 70% 0%, rgba(2, 132, 199, 0.20), transparent 70%), radial-gradient(50% 60% at 10% 30%, rgba(56, 189, 248, 0.08), transparent 70%);
}
[data-theme="light"] .fx-top { background: radial-gradient(70% 80% at 70% 0%, rgba(2, 132, 199, 0.10), transparent 70%), linear-gradient(180deg, #EEF5FB, transparent); }
.fx-top .fx-floor { height: 52%; }
@media (max-width: 700px) { .fx-top { height: 480px; } }

/* Page headings on the subpages share the gradient title treatment. */
.encl-hero h1, .seg-hero h1, .research-intro h1, .compare-intro h1, .legal-doc-header h1, .demo-hero h1, .encl-sec h2, .encl-close h2, .research-card h2 {
  background: linear-gradient(100deg, var(--h2-from) 10%, var(--h2-to) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.encl-hero h1 .dim { -webkit-text-fill-color: var(--text-muted); }
:is(.research-card, .press-card, .seg-card, .secure-card, .step3, .demo-callout) { border-radius: 16px; }
:is(.research-card, .press-card, .seg-card, .secure-card, .step3) { background: var(--card-glass); }
.encl-sec { border-top-color: transparent !important; border-image: linear-gradient(90deg, transparent, var(--border-strong), transparent) 1; }

/* Decorative chrome mark on the right of left-aligned page heroes. */
.fx-hero-wrap { position: relative; }
.fx-hero-mark {
  position: absolute;
  right: 0; top: 50%;
  width: min(400px, 34vw);
  height: min(400px, 34vw);
  margin-top: calc(min(400px, 34vw) / -2);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  animation: float 8s ease-in-out infinite;
}
@media (max-width: 1000px) { .fx-hero-mark { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .fx-hero-mark { animation: none; } }

/* Side gutters on pages whose own padding shorthand zeroed the container's
   horizontal padding (compare, research, 404). */
main.compare-main, main.research-main { padding-left: 28px; padding-right: 28px; }
main.section > .container[style*="padding:4rem 0"] { padding-left: 28px !important; padding-right: 28px !important; }
@media (max-width: 720px) {
  main.compare-main, main.research-main { padding-left: 16px; padding-right: 16px; }
  main.section > .container[style*="padding:4rem 0"] { padding-left: 16px !important; padding-right: 16px !important; }
}

/* Nav: nine links do not fit between ~720px and ~1180px (the bar used to
   clip "Talk to sales"). Tighten first, then switch to the menu button. */
@media (max-width: 1240px) and (min-width: 1081px) {
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 0.9rem; }
  .brand { padding-right: 1rem; }
}
@media (max-width: 1080px) and (min-width: 721px) {
  .menu-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 14px 28px 18px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; width: 100%; }
  .nav-links a.cta { text-align: center; margin-top: 8px; padding: 12px 18px; }
  .nav-links a:not(.cta)::after { display: none; }
  .nav-right { margin-left: auto; }
}

/* Demo page: wide endpoint tables scroll inside their box at every width
   (the page only enabled this below 720px; 760–840px overflowed). */
.table-scroll { overflow-x: auto; max-width: 100%; }
