/* ===== FutureSight Styles (root) =====
   - Background parallax stays behind content
   - Clicks never intercepted by background
   - Content always above background
==================================================== */

/* ===== Base / Theme ===== */
*{ box-sizing:border-box; }
:root{
  --clr-bg1:#05090f; --clr-bg2:#05070a;
  --clr-text:#e6f0ff; --clr-muted:#95a6bd;
  --clr-accent:#22c55e; /* green */
  --teal:#2ce3d3;
  --radius:14px; --border:1px solid #14202e;
}
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  color:var(--clr-text);
  background: linear-gradient(180deg, var(--clr-bg1) 0%, var(--clr-bg2) 100%);
  background-attachment: fixed;
}
a{ color:inherit; text-decoration:none; } /* remove underline site-wide */

.container{ max-width:1200px; margin-inline:auto; padding-inline:1rem; }
.container-wide{ max-width:1280px; margin-inline:auto; padding-inline:1.25rem; }
.container-narrow{ max-width:960px; margin-inline:auto; padding-inline:1.25rem; }
.section{ margin-block:2rem; }
.row{ display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }
.center{ justify-content:center; text-align:center; }
.center-stack{ display:flex; flex-direction:column; align-items:center; gap:.9rem; text-align:center; }
.max-600{ max-width:600px; margin-inline:auto; }
.max-420{ max-width:420px; }

/* ===== Nav + Pill Nav ===== */
.nav{ position:sticky; top:0; z-index:10; background: rgba(5,8,12,.75); backdrop-filter: blur(10px); border-bottom:1px solid rgba(255,255,255,.06); }
.nav__inner{ display:flex; align-items:center; justify-content:space-between; height:68px; }
.brand{ display:flex; align-items:center; gap:.6rem; }
.brand__logo{ width:42px; height:42px; object-fit:contain; }
.brand__name{ font-weight:800; letter-spacing:.04em; }

/* Gradient text to match buttons */
.grad-text{ background: linear-gradient(90deg,var(--clr-accent),var(--teal)); -webkit-background-clip:text; background-clip:text; color:transparent; }

.menu-toggle{ display:none; background:transparent; color:#cfe8ff; border:0; font-size:1.4rem; }
.menu--mobile{ display:none; flex-direction:column; gap:.75rem; padding:.75rem 1rem 1rem; border-bottom:1px solid rgba(255,255,255,.06); }
.menu--mobile.open{ display:flex; }
@media (max-width: 980px){ .pill-nav{ display:none; } .menu-toggle{ display:block; } }

/* Pill Nav */
.pill-nav{
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.10);
}
.pill-link{
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #cfe8ff;
  transition: color .2s ease, transform .2s ease;
}
.pill-link:hover{ color:#eafff6; transform: translateY(-1px); }
.pill-indicator{
  position: absolute; top:6px; bottom:6px; left:6px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--clr-accent), var(--teal));
  box-shadow: 0 6px 22px rgba(0,255,170,.25);
  transition: left .35s cubic-bezier(.22,1,.36,1), width .35s cubic-bezier(.22,1,.36,1);
}

/* ===== Parallax / Background Layers (fixed: always behind) ===== */
html, body { isolation: isolate; } /* predictable stacking root */

.parallax{
  position:fixed; inset:0;
  z-index:-1;                /* <<< critical: behind all content */
  pointer-events:none;       /* cannot intercept clicks */
  overflow:hidden;
}
.parallax .layer{
  position:absolute; inset:0;
  transform: translate3d(0,0,0);
  will-change: transform;
  z-index:auto;              /* inherit parent's -1 stacking */
  pointer-events:none;
  mix-blend-mode: normal;    /* avoid tinting content */
}

/* canvases fill viewport without creating scrollbars */
.dot-grid-canvas, .market-lines-canvas{
  display:block; width:100%; height:100%;
}

/* Subtle broad grid lines (overlay) */
.grid-lines{
  background-image:
    linear-gradient(to right, rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  mix-blend-mode: overlay; opacity:.18;
  z-index:auto; pointer-events:none;
}

/* Seamless, tileable noise overlay (no visible tiles) */
.noise-overlay{
  pointer-events:none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 55%),
    radial-gradient(100% 120% at 50% 120%, rgba(0,0,0,.62) 0%, rgba(0,0,0,0) 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='7' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%%' height='100%%' filter='url(#n)'/></svg>");
  background-size: 100% 100%, 100% 100%, 280px 280px;
  background-repeat: no-repeat, no-repeat, repeat;
  mix-blend-mode: soft-light;
  opacity: .18;
  filter: contrast(110%) brightness(108%);
  z-index:auto;
}

/* ===== Content Layer Guard (content above background) ===== */
header, main, section, footer,
.container, .container-wide, .center-stack, .section{
  position:relative; z-index:1;
}
/* Keep nav above everything if sticky/fixed */
header.nav{ z-index:10; }

/* ===== Hero ===== */
.hero{ padding: 14vh 0 10vh; }
.hero h1{ font-size: clamp(2.4rem, 5.6vw, 4rem); line-height:1.05; margin:0; }
.hero__sub{ color:#9bb2ca; font-size: clamp(1rem, 2vw, 1.15rem); }
.btn-row{ display:flex; gap:.75rem; flex-wrap:wrap; margin-top:.6rem; }

.hero-title{
  display:inline-flex; align-items:center; gap:.6rem; font-weight:800; letter-spacing:.04em;
  color:#cfe9dd; transition: color .25s ease, text-shadow .25s ease, transform .25s ease;
}
.hero-title:hover{
  color:#e9fff5;
  text-shadow: 0 0 6px rgba(0,255,170,.45), 0 0 18px rgba(44,227,211,.25);
  transform: translateY(-1px);
}

/* ===== Bento + Quick Links unified ===== */
.bento-grid{ display:grid; gap:14px; grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px){ .bento-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px){ .bento-grid{ grid-template-columns: 1fr; } }

.bento-card, .quick__card, .price-card{
  position:relative; overflow:hidden; border-radius:16px;
  padding:18px; background:#0a0d11; border:1px solid #14202e; color:#d9ecff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display:flex; flex-direction:column; gap:.5rem;
}
.bento-card:hover, .quick__card:hover, .price-card:hover{ transform: translateY(-4px); }

.star-border{ border:1px solid #14202e; background:#0a0d11; }
.star-border::before{
  content:""; position:absolute; inset:-2px; padding:1px; border-radius:18px;
  background: conic-gradient(from 0deg,
    rgba(0,255,170,.25),
    rgba(44,227,211,.18),
    rgba(0,160,255,.12),
    rgba(255,0,160,.12),
    rgba(0,255,170,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: starSpin 8s linear infinite; pointer-events:none;
}
@keyframes starSpin { to{ transform: rotate(360deg); } }

.bento-span-2{ grid-column: span 2; min-height: 220px; }
.bento-hdr{ display:flex; align-items:center; gap:.5rem; }
.bento-hdr h3{ margin:0; color:#d9ecff; }
.bento-card p, .bento-card .ticks li, .quick__card p{ color:#9bb2ca; }
.bento-footer{ margin-top:auto; }
.spark{ width:8px; height:8px; border-radius:50%; background: var(--clr-accent); box-shadow: 0 0 14px rgba(34,197,94,.8); display:inline-block; }

.grid-2{ display:grid; grid-template-columns:repeat(2,minmax(260px,1fr)); gap:18px; }
@media (max-width: 600px){ .grid-2{ grid-template-columns:1fr; } }

.mini-bars{ display:flex; gap:4px; margin-top:auto; }
.mini-bars span{ width:12%; height:34px; background: linear-gradient(180deg, var(--teal), var(--clr-accent)); opacity:.85; border-radius:6px; transform-origin: bottom; animation: pump 2.2s ease-in-out infinite; }
.mini-bars span:nth-child(2){ animation-delay: .2s; } .mini-bars span:nth-child(3){ animation-delay: .4s; }
.mini-bars span:nth-child(4){ animation-delay: .6s; } .mini-bars span:nth-child(5){ animation-delay: .8s; }
@keyframes pump { 0%,100%{ transform: scaleY(.6);} 50%{ transform: scaleY(1);} }

/* ===== Lists / Pricing / Buttons ===== */
.section-title{ color:#cfe8ff; font-weight:800; letter-spacing:.4px; margin-bottom:.6rem; }
.pricing{ display:grid; gap:14px; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); }
.price{ font-size:2rem; font-weight:800; }
.per{ font-size:1rem; color:var(--clr-muted); }

.btn{ display:inline-flex; align-items:center; gap:.5rem; padding:.6rem 1rem; border-radius:999px; border:1px solid rgba(255,255,255,.12); background:#0f1318; color:#e6f0ff; cursor:pointer; }
.btn:hover{ background:#13211a; border-color: rgba(0,255,170,.35); color:#bfffe2; }
.btn--ghost{ background: transparent; border-color: rgba(255,255,255,.18); color:#cfe8ff; }
.btn--primary{ background:linear-gradient(90deg,var(--clr-accent),var(--teal)); color:#06140d; border-color:transparent; }

.footer{ margin-top: 2.5rem; border-top:1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.4); padding: 1rem 0; color:#9ab0c8; }
.footer a{ color:#9ab0c8; } .footer a:hover{ color:#bfffe2; }

/* ===== Section Bubble ===== */
.section-bubble{ position:relative; }
.section-bubble::before{
  content:""; position:absolute; inset:-36px -16px;
  background:
    radial-gradient(600px 280px at 30% 20%, rgba(0,255,170,.08), transparent 60%),
    radial-gradient(500px 240px at 80% 10%, rgba(0,160,255,.06), transparent 60%);
  filter: blur(12px); z-index:-1; pointer-events:none;
}

/* ===== Gradual Blur (section reveal) ===== */
[data-animate="blur-in"]{
  transform: translateY(12px);
  opacity:.6;
  filter: blur(12px);
  transition: transform .7s cubic-bezier(.22,1,.36,1),
             opacity .7s cubic-bezier(.22,1,.36,1),
             filter .7s cubic-bezier(.22,1,.36,1);
  will-change: transform, opacity, filter;
}
.is-visible{ transform: translateY(0); opacity:1; filter: blur(0); }

/* ===== GradualBlur overlay (vanilla port of component) ===== */
.gradual-blur{ position: relative; }
.gradual-blur[data-gb]{ position: absolute; left:0; right:0; pointer-events:none; }
.gradual-blur[data-position="bottom"]{ bottom:0; }
.gradual-blur[data-position="top"]{ top:0; }
.gradual-blur > .gb-layer{ position:absolute; inset:0; -webkit-backdrop-filter: blur(0.5rem); backdrop-filter: blur(0.5rem); }
@supports not (backdrop-filter: blur(1px)) {
  .gradual-blur > .gb-layer{ background: rgba(0,0,0,0.3); opacity:0.5; }
}
/* --- Global background layering (matches homepage behavior) --- */
html, body { height: 100%; isolation: isolate; }

/* Background stack always behind content */
.parallax {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Make sure real content is above */
header, main, section, footer, .container, .container-wide {
  position: relative;
  z-index: 1;
}
/* Keep the header on top of any backgrounds */
.nav {
  position: sticky;          /* stays at top on scroll */
  top: 0;
  z-index: 1000;             /* higher than any background */
  background: rgba(12,16,22,.66); /* subtle glass so content doesn't show through */
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  border-bottom: 1px solid rgba(148,163,184,.08);
}

/* If you have a mobile drawer/menu */
.menu--mobile { z-index: 1001; }

/* Push decorative layers behind everything */
.grid-dots,
.parallax,
.parallax-layer,
.background-glow,
.hero-bg,
.starry-sky {
  z-index: -1 !important;
  pointer-events: none;      /* make them click-through */
  position: fixed;           /* most of these are fixed anyway */
  inset: 0;
}

/* Optional: ensure page content isn't covered by the sticky header */
:root { --nav-h: 72px; }     /* tweak to your header height */
main, .page, .content {
  padding-top: var(--nav-h);
}
/* === Fix header always on top === */
.nav, header {
  z-index: 99999 !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: auto;
}

/* === Push all background effects behind everything === */
.grid-dots,
.parallax,
.parallax-layer,
.background-glow,
.hero-bg,
.starry-sky,
canvas#bg,
.bg-canvas,
.bg-dots,
.bg-glow {
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
  opacity: 1;
}

/* === Prevent content from sitting under header === */
body,
main,
.page,
.content,
.app-content {
  position: relative;
  z-index: 10;
  padding-top: 80px; /* adjust if your header is taller */
}
/* --- Keep header above everything --- */
header, .nav {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 2147483647 !important; /* maxed */
  pointer-events: auto !important;
  isolation: isolate; /* new stacking context */
}

/* --- Push background/decoration layers behind (common names + safety nets) --- */
.grid-dots, .bg-dots, .parallax, .parallax-layer,
.background-glow, .bg-glow, .hero-bg, .starry-sky,
.bg-overlay, .blur-overlay, .decor, [data-bg], [data-overlay],
canvas#bg, canvas.bg, .bg-canvas {
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

/* Extra safety: ANY full-screen element with backdrop-filter goes behind */
*[style*="backdrop-filter"]:not(header):not(.nav) {
  z-index: -1 !important;
  pointer-events: none !important;
}

/* --- Ensure content isn't under the fixed header --- */
body, main, .page, .content, .app-content, #root {
  position: relative;
  z-index: 10;
  padding-top: 80px; /* adjust to your header height */
}/* Header container from the portal */
#fs-global-header {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 2147483647 !important;
  isolation: isolate !important;
  pointer-events: auto !important;
}

/* Push any full-screen decoration behind */
.grid-dots, .bg-dots, .parallax, .parallax-layer,
.background-glow, .bg-glow, .hero-bg, .starry-sky,
.bg-overlay, .blur-overlay, .decor, [data-bg], [data-overlay],
canvas#bg, canvas.bg, .bg-canvas {
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

/* If some element with backdrop-filter still overlays, neuter it */
*[style*="backdrop-filter"]:not(#fs-global-header *):not(#fs-global-header) {
  z-index: -1 !important;
  pointer-events: none !important;
}
/* Header container created by the portal */
#fs-global-header {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 2147483647 !important;
  isolation: isolate !important;
  pointer-events: auto !important;
}

/* If any full-screen overlay still overlaps, send it behind */
*[style*="backdrop-filter"]:not(#fs-global-header *):not(#fs-global-header) {
  z-index: -1 !important;
  pointer-events: none !important;
}

