/* ============================================================
   stim.live — dark, data-forward design system
   ============================================================ */
:root {
  --bg:        #0a0e14;   /* near-black with blue cast */
  --bg-elev:   #111722;   /* card surface */
  --bg-elev-2: #161d2b;   /* hover surface */
  --border:    #1f2937;   /* hairline borders */
  --text:      #e6edf3;   /* primary text */
  --text-dim:  #8b97a8;   /* secondary text */
  --accent:    #2dd4bf;   /* electric teal — primary glow */
  --accent-2:  #6366f1;   /* indigo — secondary */
  --accent-3:  #f472b6;   /* pink — chart accent */
  --good:      #34d399;
  --warn:      #fbbf24;

  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1200px;
  --glow:      0 0 0 1px rgba(45,212,191,.35), 0 8px 30px rgba(45,212,191,.18);
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono:      ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
a { color: inherit; text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; font-weight: 600; font-size: .95rem;
  padding: .7rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.7rem; font-size: 1.02rem; }
.btn-primary {
  background: linear-gradient(100deg, var(--accent), #22b8a6);
  color: #04201c; box-shadow: 0 6px 24px rgba(45,212,191,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(45,212,191,.5); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- wordmark + pulse ---------- */
.wordmark { display: inline-flex; align-items: center; gap: .12rem; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.wm-stim { color: #fff; }
.wm-live { color: var(--accent); text-shadow: 0 0 16px rgba(45,212,191,.6); }
.pulse {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  margin-right: .45rem; box-shadow: 0 0 0 0 rgba(45,212,191,.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45,212,191,.6); }
  70%  { box-shadow: 0 0 0 9px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(10,14,20,.72); backdrop-filter: blur(14px); border-bottom-color: var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links > a:not(.btn) { color: var(--text-dim); font-size: .92rem; font-weight: 500; transition: color .15s ease; }
.nav-links > a:not(.btn):hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 700px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(45,212,191,.16), transparent 70%),
              radial-gradient(closest-side, rgba(99,102,241,.16), transparent 70%);
  background-position: 30% 30%, 70% 40%; background-repeat: no-repeat;
  filter: blur(10px); z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .2rem; color: var(--text-dim); font-size: .85rem; font-weight: 600; letter-spacing: .01em; margin-bottom: 1.1rem; border: 1px solid var(--border); padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.02); }
.hero-copy h1 { margin-bottom: 1.1rem; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--text-dim); max-width: 33ch; margin-bottom: 1.8rem; }
.lead strong { color: var(--text); }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.2rem; color: var(--text-dim); font-size: .85rem; }

/* faux dashboard panel */
.hero-panel { background: linear-gradient(180deg, var(--bg-elev), #0d121b); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.panel-bar { display: flex; align-items: center; gap: 7px; padding: 4px 6px 12px; }
.panel-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.d1 { background: #ff5f57; } .dot.d2 { background: #febc2e; } .dot.d3 { background: #28c840; }
.panel-title { font-family: var(--mono); font-size: .72rem; color: var(--text-dim); margin-left: auto; }
.panel-chart { background: rgba(255,255,255,.015); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; }
.kpi-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 12px; }
.kpi { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.kpi-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.kpi-value { font-size: 1.25rem; font-weight: 700; margin: 2px 0; }
.kpi-trend { font-size: .72rem; color: var(--text-dim); }
.kpi-trend.up { color: var(--good); }

/* ---------- stat strip ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.012); }
.strip-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; padding: 2rem 24px; }
.stat { text-align: center; }
.stat-num { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; color: #fff; }
.stat-label { color: var(--text-dim); font-size: .85rem; margin-top: .25rem; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- generic section ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(99,102,241,.04), transparent); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem,4vw,3.2rem); }
.section-sub { color: var(--text-dim); font-size: 1.05rem; margin-top: .8rem; }

/* ---------- modules ---------- */
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.module {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; position: relative; transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}
.module:hover { transform: translateY(-4px); border-color: rgba(45,212,191,.45); box-shadow: var(--glow); }
.module-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.module-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.icon-teal   { color: var(--accent);   background: rgba(45,212,191,.12); }
.icon-indigo { color: #a5b4fc;          background: rgba(99,102,241,.14); }
.icon-pink   { color: var(--accent-3);  background: rgba(244,114,182,.12); }
.icon-good   { color: var(--good);      background: rgba(52,211,153,.12); }
.module-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); border: 1px solid var(--border); padding: .25rem .6rem; border-radius: 999px; }
.module h3 { font-size: 1.4rem; margin-bottom: .35rem; }
.module-prop { color: var(--accent); font-weight: 600; margin-bottom: 1rem; font-size: .98rem; }
.module-feats { list-style: none; margin-bottom: 1.2rem; }
.module-feats li { color: var(--text-dim); font-size: .92rem; padding-left: 1.4rem; position: relative; margin-bottom: .5rem; }
.module-feats li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px rgba(45,212,191,.7); }

/* module visuals */
.module-visual { border-top: 1px solid var(--border); padding-top: 14px; min-height: 64px; }
.module-visual.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-family: var(--mono); font-size: .72rem; color: var(--text-dim); background: var(--bg-elev-2); border: 1px solid var(--border); padding: .3rem .65rem; border-radius: 8px; }
.mock-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.mock-table th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.mock-table td { padding: 5px 8px; border-bottom: 1px solid rgba(31,41,55,.5); }
.mini-map { width: 100%; height: auto; }
.mini-map .mm-regions path { fill: rgba(52,211,153,.10); stroke: rgba(52,211,153,.5); stroke-width: 1; }
.mini-map .mm-regions path:nth-child(2) { fill: rgba(45,212,191,.14); }
.mini-map .mm-regions path:nth-child(3) { fill: rgba(99,102,241,.12); }
.mini-map .mm-dots circle { fill: var(--accent); filter: drop-shadow(0 0 4px rgba(45,212,191,.8)); }

/* ---------- connections hub ---------- */
.hub { max-width: 760px; margin: 0 auto; }
.hub-svg { width: 100%; height: auto; }
.hub-svg .spokes line { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 5 7; opacity: .5; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.hub-svg .nodes rect { fill: var(--bg-elev); stroke: var(--border); stroke-width: 1; }
.hub-svg .nodes text { fill: var(--text-dim); dominant-baseline: middle; text-anchor: middle; }
.hub-svg .hub-center circle { fill: url(#hubgrad); stroke: var(--accent); stroke-width: 2; filter: drop-shadow(0 0 18px rgba(45,212,191,.5)); }
.hub-svg .hub-center circle { fill: rgba(45,212,191,.10); }
.hub-svg .hub-stim { fill: #fff; font-weight: 800; font-size: 18px; font-family: var(--font); }
.hub-svg .hub-live { fill: var(--accent); font-weight: 800; font-size: 13px; font-family: var(--font); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.step { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.step-n { font-size: 1.6rem; font-weight: 800; color: var(--accent); margin-bottom: .8rem; opacity: .9; }
.step h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.step p { color: var(--text-dim); font-size: .94rem; }

/* ---------- cta / waitlist ---------- */
.cta { text-align: center; overflow: hidden; }
.cta-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(closest-side, rgba(45,212,191,.12), transparent 65%); background-position: 50% 40%; background-repeat: no-repeat; }
.cta-inner { position: relative; max-width: 620px; }
.waitlist-form { display: flex; gap: .6rem; margin: 1.8rem auto 0; max-width: 480px; }
.waitlist-input {
  flex: 1; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); padding: .9rem 1.3rem; font-size: 1rem; font-family: var(--font);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.waitlist-input::placeholder { color: #5f6b7c; }
.waitlist-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,212,191,.18); outline: none; }
.waitlist-status { margin-top: 1rem; min-height: 1.4rem; font-weight: 600; }
.waitlist-status.ok { color: var(--good); }
.waitlist-status.err { color: #fb7185; }
.form-msg { display: inline-block; margin: 0 auto .4rem; padding: .55rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.form-msg.success { color: var(--good); background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); }
.form-msg.error { color: #fb7185; background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.3); }
.cta-fine { color: var(--text-dim); font-size: .8rem; margin-top: 1.1rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; background: rgba(255,255,255,.01); }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.footer-blurb { color: var(--text-dim); font-size: .9rem; max-width: 38ch; margin-top: .8rem; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: .9rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-dim); font-size: .82rem; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { order: 2; }
  .module-grid, .steps { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
  .nav-links { gap: .9rem; }
  .nav-links > a:not(.btn) { display: none; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .waitlist-form { flex-direction: column; }
  .waitlist-form .btn { width: 100%; }
  .footer-grid { flex-direction: column; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .pulse { animation: none; }
  .hub-svg .spokes line { animation: none; }
}
