:root{
  --bg:#0B0B0C;
  --bg-soft:#111111;
  --panel:#161616;
  --panel-2:#1b1b1d;
  --line: rgba(255,255,255,0.08);
  --green:#6AFF6A;
  --orange:#FF9F45;
  --purple:#8B5CF6;
  --white:#F5F5F5;
  --gray:#888888;
  --font-display:'Space Grotesk', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'IBM Plex Mono', monospace;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--white);
  font-family:var(--font-body);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit; text-decoration:none;}
button{font-family:inherit; cursor:pointer;}
::selection{ background:rgba(106,255,106,0.25); color:#fff; }

/* ---------- Fixed 3D backdrop (home page only) ---------- */
#scene-canvas{
  position:fixed; top:0; left:0; width:100vw; height:100vh; z-index:0; display:block;
}
.scene-vignette{
  position:fixed; inset:0; z-index:1; pointer-events:none;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(11,11,12,0) 0%, rgba(11,11,12,0.55) 62%, rgba(11,11,12,0.96) 100%),
    linear-gradient(180deg, rgba(11,11,12,0.15) 0%, rgba(11,11,12,0) 18%, rgba(11,11,12,0) 78%, rgba(11,11,12,0.9) 100%);
}

/* ---------- Static page backdrop (subpages without the 3D scene) ---------- */
.static-bg{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(60% 50% at 18% -5%, rgba(106,255,106,0.07), transparent 60%),
    radial-gradient(55% 45% at 88% 0%, rgba(139,92,246,0.09), transparent 60%),
    var(--bg);
}

/* ---------- CRT / grain overlay ---------- */
.crt-overlay{
  position:fixed; inset:0; z-index:60; pointer-events:none; mix-blend-mode:overlay; opacity:.5;
  background:repeating-linear-gradient(180deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 2px, transparent 3px);
  animation:flicker 6s infinite steps(60);
}
.grain-overlay{
  position:fixed; inset:0; z-index:59; pointer-events:none; opacity:.05; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes flicker{
  0%,100%{opacity:.5;} 41%{opacity:.5;} 42%{opacity:.38;} 43%{opacity:.5;} 71%{opacity:.5;} 72%{opacity:.42;} 73%{opacity:.5;}
}
@media (prefers-reduced-motion: reduce){ .crt-overlay{animation:none;} }

.cursor-glow{
  position:fixed; z-index:2; pointer-events:none; width:520px; height:520px; border-radius:50%;
  background:radial-gradient(circle, rgba(139,92,246,0.10) 0%, rgba(106,255,106,0.05) 40%, transparent 70%);
  transform:translate(-50%,-50%); transition:opacity .3s ease; opacity:0;
}

/* ---------- Navbar ---------- */
header.nav{
  position:fixed; top:0; left:0; right:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 32px;
  background:rgba(11,11,12,0.5);
  backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid var(--line);
}
.logo{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:700; font-size:17px; letter-spacing:.02em;}
.logo .mark{
  width:28px; height:28px; border-radius:6px;
  background:linear-gradient(135deg, var(--green), var(--purple));
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-size:11px; font-weight:700; color:#0B0B0C;
}
.logo .dim{ color:var(--gray); font-weight:400; font-family:var(--font-mono); font-size:12px; margin-left:2px;}
nav.links{ display:flex; gap:28px; font-size:14px; color:#cfcfcf; }
nav.links a{ position:relative; padding:4px 0; transition:color .2s ease;}
nav.links a:hover, nav.links a.active{ color:var(--white); }
nav.links a::after{
  content:""; position:absolute; left:0; bottom:-2px; width:0; height:1px; background:var(--green);
  transition:width .25s ease;
}
nav.links a:hover::after, nav.links a.active::after{ width:100%; }
.nav-actions{ display:flex; align-items:center; gap:12px; }
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 18px; border-radius:8px; font-size:13.5px; font-weight:600;
  border:1px solid var(--line); background:rgba(255,255,255,0.03);
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover{ transform:translateY(-2px); border-color:rgba(255,255,255,0.2); }
.btn.primary{ background:var(--green); color:#0B0B0C; border-color:var(--green); }
.btn.primary:hover{ box-shadow:0 0 24px rgba(106,255,106,0.35); }
.btn.ghost{ background:transparent; }
.btn.small{ padding:7px 12px; font-size:12px; }
.btn.large{ padding:16px 30px; font-size:15px; }

/* ---------- HERO (home page interactive editor) ---------- */
.hero-wrap{ position:relative; z-index:5; height:660vh; }
.hero-sticky-intro{
  position:sticky; top:0; height:100vh; display:flex; flex-direction:column; justify-content:flex-end;
  padding:0 0 64px 0; pointer-events:none;
}
.hero-copy{ padding:0 48px; max-width:760px; pointer-events:auto; transition:opacity .4s ease, transform .4s ease; will-change:opacity, transform; }
.eyebrow{
  font-family:var(--font-mono); font-size:12.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--green);
  display:flex; align-items:center; gap:10px; margin-bottom:18px;
}
.eyebrow::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 10px var(--green); animation:pulse 2s infinite; }
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.35;} }
h1.headline{
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(2.6rem, 6vw, 5.2rem); line-height:1.02; letter-spacing:-.01em; text-wrap:balance;
}
h1.headline .accent{ color:var(--green); }
.sub{ margin-top:22px; font-size:17px; color:#c7c7c7; max-width:520px; line-height:1.6; }
.hero-actions{ margin-top:32px; display:flex; gap:12px; flex-wrap:wrap; }

.app-toolbar{
  position:sticky; top:78px; z-index:20; margin:0 24px; pointer-events:auto;
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  padding:10px 12px; border-radius:12px;
  background:rgba(17,17,17,0.55); backdrop-filter:blur(16px) saturate(140%);
  border:1px solid var(--line);
  box-shadow:0 12px 30px rgba(0,0,0,.35);
}
.app-toolbar .grp{ display:flex; gap:6px; padding-right:10px; margin-right:4px; border-right:1px solid var(--line); }
.app-toolbar .grp:last-child{ border-right:none; }
.tbtn{
  font-family:var(--font-mono); font-size:11.5px; letter-spacing:.02em;
  color:#bdbdbd; background:rgba(255,255,255,0.03); border:1px solid var(--line);
  padding:8px 12px; border-radius:7px; display:flex; align-items:center; gap:7px;
  transition:all .18s ease;
}
.tbtn .dot{ width:6px; height:6px; border-radius:50%; background:var(--gray); transition:background .15s ease, box-shadow .15s ease;}
.tbtn:hover{ color:#fff; border-color:rgba(255,255,255,0.25); }
.tbtn.on{ color:#fff; border-color:rgba(106,255,106,0.4); background:rgba(106,255,106,0.06);}
.tbtn.on .dot{ background:var(--green); box-shadow:0 0 8px var(--green); }
.tbtn.on.mode-night .dot{ background:var(--purple); box-shadow:0 0 8px var(--purple); }

.scroll-cue{
  position:absolute; bottom:28px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.15em; color:var(--gray); text-transform:uppercase;
  pointer-events:none;
}
.scroll-cue .track{ width:1px; height:34px; background:linear-gradient(180deg, var(--green), transparent); position:relative; overflow:hidden;}
.scroll-cue .track::after{ content:""; position:absolute; top:-100%; left:0; width:100%; height:100%; background:var(--white); animation:scrolldown 1.8s infinite; }
@keyframes scrolldown{ to{ top:100%; } }

.tool-panel{
  position:absolute; width:328px; max-width:82vw; z-index:15;
  padding:0; border-radius:14px; overflow:hidden;
  background:rgba(22,22,22,0.6); backdrop-filter:blur(18px) saturate(150%);
  border:1px solid var(--line);
  box-shadow:0 20px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  opacity:0; transition:opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1);
}
.tool-panel.left{ left:48px; transform:translateX(-40px); }
.tool-panel.right{ right:48px; transform:translateX(40px); }
.tool-panel.in-view{ opacity:1; transform:translateX(0); }
.tool-panel .titlebar{
  display:flex; align-items:center; gap:8px; padding:10px 14px;
  background:rgba(255,255,255,0.03); border-bottom:1px solid var(--line);
}
.tool-panel .tlt{ width:8px; height:8px; border-radius:50%; }
.tool-panel .tlt.g{ background:var(--green); }
.tool-panel .tlt.o{ background:var(--orange); }
.tool-panel .tlt.p{ background:var(--purple); }
.tool-panel .titlebar span{ margin-left:6px; font-family:var(--font-mono); font-size:11px; color:var(--gray); letter-spacing:.04em; }
.tool-panel .body{ padding:20px; }
.tool-panel .tag{ font-family:var(--font-mono); font-size:11px; color:var(--green); letter-spacing:.08em; }
.tool-panel h3{ font-family:var(--font-display); font-size:22px; margin-top:8px; font-weight:600; }
.tool-panel p{ margin-top:10px; font-size:13.5px; line-height:1.55; color:#b8b8b8; }
.tool-panel .chips{ display:flex; gap:6px; flex-wrap:wrap; margin-top:14px; }
.tool-panel .chips span{
  font-family:var(--font-mono); font-size:10.5px; padding:5px 9px; border-radius:6px;
  background:rgba(255,255,255,0.04); border:1px solid var(--line); color:#a9a9a9;
}

/* ---------- Section shells ---------- */
section{ position:relative; z-index:5; background:var(--bg); }
.container{ max-width:1240px; margin:0 auto; padding:0 32px; }
.section-pad{ padding:130px 0; }
.section-head{ max-width:640px; margin-bottom:64px; }
.section-head.center{ text-align:center; max-width:700px; margin:0 auto 64px; }
.kicker{ font-family:var(--font-mono); font-size:12px; color:var(--orange); letter-spacing:.14em; text-transform:uppercase; margin-bottom:14px; }
.section-head h2{ font-family:var(--font-display); font-size:clamp(1.9rem, 3.4vw, 3rem); font-weight:700; letter-spacing:-.01em; }
.section-head p{ margin-top:16px; color:#a6a6a6; font-size:16px; line-height:1.6; }

/* ---------- Subpage header banner ---------- */
.page-header{
  position:relative; z-index:5; padding:170px 0 80px; border-bottom:1px solid var(--line);
  background:
    radial-gradient(60% 100% at 20% 0%, rgba(106,255,106,0.08), transparent 60%),
    radial-gradient(55% 100% at 85% 0%, rgba(139,92,246,0.10), transparent 60%);
}
.page-header .kicker{ margin-bottom:16px; }
.page-header h1{
  font-family:var(--font-display); font-weight:700; letter-spacing:-.01em;
  font-size:clamp(2.2rem, 5vw, 3.6rem); line-height:1.05; max-width:820px;
}
.page-header h1 .accent{ color:var(--green); }
.page-header p{ margin-top:20px; color:#b6b6b6; font-size:16.5px; max-width:640px; line-height:1.65; }
.page-header .hero-actions{ margin-top:32px; }

/* ---------- Showcase capability cards ---------- */
.capability-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; margin-top:26px; }
.capability{
  padding:26px; border-radius:14px; background:var(--panel); border:1px solid var(--line);
  transition:transform .25s ease, border-color .25s ease;
}
.capability:hover{ transform:translateY(-4px); border-color:rgba(255,255,255,0.18); }
.capability .icon{
  width:38px; height:38px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.04); margin-bottom:16px; font-family:var(--font-mono); font-size:14px;
}
.capability h4{ font-family:var(--font-display); font-size:17px; font-weight:600; }
.capability p{ margin-top:8px; font-size:13.5px; color:#a0a0a0; line-height:1.55; }

/* ---------- Features / systems grid (overview) ---------- */
.systems{ display:grid; grid-template-columns:repeat(3, 1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:16px; overflow:hidden; }
@media (max-width:720px){ .systems{ grid-template-columns:1fr 1fr; } }
@media (max-width:460px){ .systems{ grid-template-columns:1fr; } }
.system{ background:var(--bg-soft); padding:26px 22px; position:relative; }
.system::before{
  content:""; position:absolute; top:0; left:0; width:100%; height:2px;
  background:linear-gradient(90deg, var(--accent, var(--green)), transparent); opacity:.8;
}
.system .num{ font-family:var(--font-mono); font-size:11px; color:var(--gray); }
.system h4{ font-family:var(--font-display); font-size:16.5px; margin-top:10px; font-weight:600; }
.system ul{ list-style:none; margin-top:12px; display:flex; flex-direction:column; gap:6px; }
.system li{ font-size:12.5px; color:#9c9c9c; position:relative; padding-left:14px; }
.system li::before{ content:"—"; position:absolute; left:0; color:#4d4d4d; }

/* ---------- Feature detail cards (Features page) ---------- */
.feature-detail{
  display:grid; grid-template-columns:220px 1fr; gap:40px; padding:44px 0;
  border-top:1px solid var(--line);
}
.feature-detail:last-child{ padding-bottom:0; }
@media (max-width:720px){ .feature-detail{ grid-template-columns:1fr; gap:16px; } }
.feature-detail .fd-label{ font-family:var(--font-mono); }
.feature-detail .fd-label .num{ font-size:12px; color:var(--gray); display:block; margin-bottom:8px; }
.feature-detail .fd-label h3{ font-family:var(--font-display); font-size:22px; font-weight:600; line-height:1.2; }
.feature-detail .fd-body p{ color:#b3b3b3; font-size:15px; line-height:1.7; }
.feature-detail .fd-body p + p{ margin-top:14px; }
.feature-detail .tag-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:18px; }
.feature-detail .tag-row span{
  font-family:var(--font-mono); font-size:11px; padding:6px 10px; border-radius:6px;
  background:rgba(255,255,255,0.04); border:1px solid var(--line); color:#a9a9a9;
}

/* ---------- How-to-use page ---------- */
.howto-nav{
  display:flex; gap:10px; flex-wrap:wrap; margin-bottom:60px;
}
.howto-nav a{
  font-family:var(--font-mono); font-size:12px; padding:9px 14px; border-radius:20px;
  border:1px solid var(--line); color:#c8c8c8; transition:all .2s ease;
}
.howto-nav a:hover{ border-color:rgba(255,255,255,0.3); color:#fff; }

.howto-block{ padding:56px 0; border-top:1px solid var(--line); scroll-margin-top:100px; }
.howto-block:first-of-type{ border-top:none; padding-top:0; }
.howto-head{ display:flex; align-items:baseline; gap:16px; margin-bottom:28px; flex-wrap:wrap; }
.howto-head .idx{ font-family:var(--font-mono); font-size:13px; color:var(--accent, var(--green)); }
.howto-head h2{ font-family:var(--font-display); font-size:clamp(1.5rem,2.6vw,2.1rem); font-weight:700; }
.howto-head p{ color:#a6a6a6; font-size:15px; max-width:560px; }

.howto-steps{ list-style:none; display:flex; flex-direction:column; gap:18px; counter-reset:step; }
.howto-steps li{
  display:grid; grid-template-columns:40px 1fr; gap:18px; padding:18px 20px;
  background:var(--panel); border:1px solid var(--line); border-radius:12px;
}
.howto-steps li .n{
  font-family:var(--font-mono); font-size:13px; font-weight:600; color:#0B0B0C;
  background:var(--accent, var(--green)); width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.howto-steps li .t{ font-family:var(--font-display); font-size:15.5px; font-weight:600; margin-bottom:4px; }
.howto-steps li .d{ font-size:13.5px; color:#adadad; line-height:1.6; }
.howto-steps li .d code{
  font-family:var(--font-mono); font-size:12px; color:var(--green);
  background:rgba(0,0,0,0.35); padding:1px 6px; border-radius:4px;
}

.control-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:14px; overflow:hidden; margin-top:20px;}
.control-grid div{ background:var(--bg-soft); padding:18px 20px; }
.control-grid .key{ font-family:var(--font-mono); font-size:12px; color:var(--green); }
.control-grid .desc{ font-size:13px; color:#a6a6a6; margin-top:6px; }

/* ---------- Download page ---------- */
.download-hero{
  text-align:center; padding:20px 0 10px;
}
.download-hero .btn.large{ margin-top:6px; }
.scroll-hint{
  display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:40px;
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.15em; color:var(--gray); text-transform:uppercase;
}
.scroll-hint .track{ width:1px; height:34px; background:linear-gradient(180deg, var(--green), transparent); position:relative; overflow:hidden;}
.scroll-hint .track::after{ content:""; position:absolute; top:-100%; left:0; width:100%; height:100%; background:var(--white); animation:scrolldown 1.8s infinite; }

.download-card{
  max-width:560px; margin:0 auto; padding:48px 44px; border-radius:22px;
  background:linear-gradient(180deg, rgba(106,255,106,0.06), var(--panel) 45%);
  border:1px solid rgba(106,255,106,0.35);
  text-align:center; box-shadow:0 30px 80px rgba(0,0,0,0.45);
  scroll-margin-top:110px;
}
.download-card .plat{ font-family:var(--font-mono); font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--green); margin-bottom:14px; }
.download-card .filename{ font-family:var(--font-display); font-size:26px; font-weight:700; }
.download-card .filemeta{ margin-top:8px; font-family:var(--font-mono); font-size:12.5px; color:var(--gray); }
.download-card .btn{ width:100%; justify-content:center; margin-top:26px; }
.download-card .small-text{ margin-top:16px; font-size:12.5px; color:var(--gray); }

.meta-row{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:20px;
  margin-top:56px; text-align:center;
}
.meta-row div{ padding:24px; border-radius:18px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06); }
.meta-row strong{ display:block; font-size:1.15rem; margin-bottom:6px; font-family:var(--font-display); }
.meta-row span{ color:var(--gray); font-size:12.5px; }

.other-platforms{ margin-top:70px; }
.plat-row{ display:grid; grid-template-columns:repeat(2,1fr); gap:20px; margin-top:22px; }
@media (max-width:640px){ .plat-row{ grid-template-columns:1fr; } }
.plat-card{
  padding:24px; border-radius:14px; background:var(--panel); border:1px dashed var(--line);
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.plat-card .name{ font-family:var(--font-display); font-weight:600; font-size:15px; }
.plat-card .status{ font-family:var(--font-mono); font-size:11px; color:var(--gray); margin-top:4px; }

/* ---------- Footer ---------- */
footer{
  position:relative; z-index:5;
  border-top:1px solid var(--line); padding:80px 0 40px;
  background:
    radial-gradient(60% 140% at 15% 0%, rgba(106,255,106,0.06), transparent 60%),
    radial-gradient(60% 140% at 85% 0%, rgba(139,92,246,0.08), transparent 60%),
    var(--bg);
}
.footer-top{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:40px; }
.footer-cols{ display:flex; gap:64px; flex-wrap:wrap; }
.fcol h5{ font-family:var(--font-mono); font-size:11.5px; color:var(--gray); letter-spacing:.1em; text-transform:uppercase; margin-bottom:16px; }
.fcol a{ display:block; font-size:13.5px; color:#c9c9c9; margin-bottom:10px; transition:color .18s ease; }
.fcol a:hover{ color:var(--green); }
.foot-bottom{ display:flex; justify-content:space-between; margin-top:60px; padding-top:24px; border-top:1px solid var(--line); font-size:12px; color:var(--gray); flex-wrap:wrap; gap:12px;}

@media (max-width:900px){
  nav.links{ display:none; }
  .capability-row{ grid-template-columns:1fr; }
  .tool-panel{ width:280px; }
  .app-toolbar{ overflow-x:auto; }
}
