/* ============================================================
   JTSense — Shared design system
   Dark cyberpunk · electric blue · terminal UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ---- Surfaces ---- */
  --bg:            #05070f;
  --bg-2:          #070b16;
  --panel:         #0b1120;
  --panel-2:       #0e1527;
  --panel-3:       #121b30;
  --line:          rgba(86,130,210,0.16);
  --line-strong:   rgba(96,150,240,0.30);

  /* ---- Brand blues ---- */
  --blue:          #2b8cff;
  --blue-bright:   #4ea2ff;
  --blue-deep:     #1b63ff;
  --blue-ink:      #0a3aa8;
  --cyan:          #46e6ff;
  --glow:          rgba(43,140,255,0.55);

  /* ---- Semantic ---- */
  --up:            #27d98a;
  --down:          #ff5b7a;
  --purple:        #a855f7;
  --amber:         #ffb13b;

  /* ---- Text ---- */
  --tx:            #e9eefb;
  --tx-soft:       #aeb9d2;
  --tx-mute:       #76849f;
  --tx-dim:        #4d5a73;

  /* ---- Type ---- */
  --f-display: 'Chakra Petch', sans-serif;
  --f-body:    'Space Grotesk', sans-serif;
  --f-mono:    'JetBrains Mono', monospace;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;

  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(43,140,255,0.32); color: #fff; }

a { color: inherit; text-decoration: none; }

h1,h2,h3,h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }

.mono { font-family: var(--f-mono); }
.up   { color: var(--up); }
.down { color: var(--down); }

/* Custom scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg-2); }
*::-webkit-scrollbar-thumb { background: #1b2740; border-radius: 6px; border: 2px solid var(--bg-2); }
*::-webkit-scrollbar-thumb:hover { background: #283a5e; }

/* ============================================================
   Eyebrow / kicker
   ============================================================ */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-mono);
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--blue-bright);
}
.kicker::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 10px 2px var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  letter-spacing: 0.01em;
  padding: 12px 22px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer; user-select: none;
  transition: transform .15s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #04122e;
  background: linear-gradient(180deg, #6fb4ff, var(--blue));
  box-shadow: 0 6px 26px -6px var(--glow), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn-primary:hover { box-shadow: 0 10px 34px -6px var(--glow), inset 0 1px 0 rgba(255,255,255,.5); transform: translateY(-1px); }
.btn-ghost {
  color: var(--tx); background: rgba(20,30,52,0.5);
  border-color: var(--line-strong); backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--blue); background: rgba(31,55,95,0.55); }

/* ============================================================
   Site header
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 48px);
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6,9,17,0.78);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(43,140,255,.5)); }
.brand .wordmark { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: 0.04em; }
.brand .wordmark b { color: var(--blue-bright); font-weight: 700; }
.brand .wordmark span { font-weight: 500; color: var(--tx); letter-spacing: 0.12em; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em;
  color: var(--tx-soft); transition: color .18s ease; position: relative;
}
.nav-links a:hover { color: var(--tx); }
.nav-links a::after {
  content:''; position:absolute; left:0; bottom:-6px; height:1.5px; width:0;
  background: var(--blue-bright); transition: width .22s ease;
}
.nav-links a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.x-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--tx-soft);
  transition: all .18s ease;
}
.x-link:hover { border-color: var(--blue); color: #fff; background: rgba(31,55,95,.5); }
.x-link svg { width: 16px; height: 16px; }

@media (max-width: 880px){ .nav-links { display: none; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), #04060d);
  padding: 64px clamp(18px,4vw,48px) 36px;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.footer-brand .wordmark { font-family: var(--f-display); font-weight:700; font-size: 22px; letter-spacing:.04em; margin: 16px 0 12px; }
.footer-brand p { color: var(--tx-mute); font-size: 14px; max-width: 340px; }
.footer-col h5 { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--tx-dim); margin: 0 0 16px; }
.footer-col a { display: block; color: var(--tx-soft); font-size: 14px; margin-bottom: 11px; transition: color .15s; }
.footer-col a:hover { color: var(--blue-bright); }
.footer-bottom { display:flex; align-items:center; justify-content: space-between; padding-top: 26px; flex-wrap: wrap; gap: 16px; }
.footer-bottom .copy { color: var(--tx-dim); font-family: var(--f-mono); font-size: 12px; }
.footer-bottom .built { color: var(--tx-mute); font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; }
.footer-bottom .built b { color: var(--blue-bright); font-weight: 600; }
@media (max-width: 760px){ .footer-top { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   Utility chips / badges
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--tx-soft);
  background: rgba(20,32,56,.5);
}
.tag-narrative { color: var(--blue-bright); border-color: rgba(78,162,255,.4); background: rgba(43,140,255,.1); }
.tag-whale     { color: var(--purple);     border-color: rgba(168,85,247,.4); background: rgba(168,85,247,.1); }
.tag-flow      { color: var(--cyan);        border-color: rgba(70,230,255,.34); background: rgba(70,230,255,.08); }
.tag-token     { color: var(--amber);       border-color: rgba(255,177,59,.4); background: rgba(255,177,59,.1); }
.tag-risk      { color: var(--down);         border-color: rgba(255,91,122,.4); background: rgba(255,91,122,.1); }
