/* ═══════════════════════════════════════════════════════════════
   STORMBOT DESIGN SYSTEM v3 — violet · lime · near-black
   Shared layer used by landing, blog, leaderboard, app shell.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* surfaces */
  --bg:           #0a0a0f;
  --bg-deep:      #050509;
  --surface-1:    #14141d;
  --surface-2:    #1c1c2a;
  --surface-3:    #25253a;
  --border:       rgba(139, 92, 246, 0.10);
  --border-strong:rgba(139, 92, 246, 0.28);
  --border-lime:  rgba(132, 204, 22, 0.30);

  /* text */
  --text:         #f5f5f7;
  --text-muted:   #a8a8b8;
  --text-dim:     #6b6b7c;

  /* brand */
  --violet:       #8b5cf6;
  --violet-bright:#a78bfa;
  --violet-deep:  #6d28d9;
  --lime:         #84cc16;
  --lime-bright:  #a3e635;
  --lime-deep:    #65a30d;
  --magenta:      #ec4899;
  --amber:        #f59e0b;
  --red:          #ef4444;
  --cyan:         #22d3ee;

  /* gradients */
  --grad-violet-magenta: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-violet-lime:    linear-gradient(135deg, #8b5cf6 0%, #84cc16 100%);
  --grad-bg-glow:        radial-gradient(ellipse at top, rgba(139,92,246,0.15) 0%, transparent 50%);

  /* radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* shadows */
  --shadow-violet: 0 0 0 1px rgba(139, 92, 246, 0.20), 0 8px 32px -8px rgba(139, 92, 246, 0.35);
  --shadow-lime:   0 0 0 1px rgba(132, 204, 22, 0.25), 0 8px 32px -8px rgba(132, 204, 22, 0.30);
  --shadow-card:   0 1px 0 0 rgba(255,255,255,0.04) inset, 0 8px 24px -12px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 1200px 600px at 20% -10%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 1000px 500px at 80% 10%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 800px 400px at 50% 100%, rgba(132, 204, 22, 0.06) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ─── grid texture overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 80%);
}

/* ─── primitives ─── */
.bento {
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.bento:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.bento::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.bento:hover::before { opacity: 1; }

.bento-glow {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-violet);
}
.bento-lime {
  border-color: var(--border-lime);
  box-shadow: var(--shadow-lime);
}

/* ─── utility text ─── */
.grad-text {
  background: var(--grad-violet-magenta);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-text-lime {
  background: linear-gradient(135deg, #a3e635 0%, #84cc16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─── eyebrow / chip ─── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.20);
  color: var(--violet-bright);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow.lime {
  background: rgba(132, 204, 22, 0.08);
  border-color: rgba(132, 204, 22, 0.25);
  color: var(--lime-bright);
}
.eyebrow.magenta {
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.25);
  color: var(--magenta);
}

/* ─── pulse dot ─── */
.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--lime-bright);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.6);
  animation: pulse-ring 2s cubic-bezier(0.66, 0, 0, 1) infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(163, 230, 53, 0); }
}

/* ─── buttons ─── */
.btn-storm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, filter .15s ease;
  white-space: nowrap;
}
.btn-storm-primary {
  background: var(--grad-violet-magenta);
  color: #fff;
  box-shadow: 0 8px 32px -8px rgba(236, 72, 153, 0.6), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.btn-storm-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 12px 40px -8px rgba(236, 72, 153, 0.8), 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.btn-storm-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-storm-secondary:hover {
  background: var(--surface-3);
  border-color: var(--violet);
}
.btn-storm-lime {
  background: var(--lime);
  color: #0a0a0f;
  box-shadow: 0 8px 32px -8px rgba(132, 204, 22, 0.5), 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.btn-storm-lime:hover {
  background: var(--lime-bright);
  transform: translateY(-1px);
}

/* ─── typography ─── */
.h-display {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.h-section {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.mono {
  font-family: 'JetBrains Mono', 'Courier Prime', ui-monospace, monospace;
}

/* ─── faq accordion ─── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
  overflow: hidden;
  transition: border-color .25s ease;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item.open { border-color: var(--violet); }
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: inherit;
}
.faq-q svg { flex-shrink: 0; color: var(--violet); transition: transform .3s ease; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.faq-item.open .faq-a { max-height: 1200px; }
.faq-a-inner {
  padding: 0 24px 24px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 15px;
}
.faq-a-inner strong { color: var(--text); }
.faq-a-inner code {
  background: var(--surface-3);
  color: var(--lime-bright);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ─── ticker (marquee) ─── */
.ticker-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
  overflow: hidden;
  position: relative;
  padding: 12px 0;
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker-scroll 50s linear infinite;
  font-size: 13px;
  color: var(--text-muted);
}
.ticker-track .dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; margin-right: 8px; vertical-align: middle; }
.ticker-track .dot.lime { background: var(--lime); }
.ticker-track .dot.violet { background: var(--violet); }
.ticker-track .dot.magenta { background: var(--magenta); }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── live trade notification ─── */
.ltn {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
  border: 1px solid var(--border-lime);
  border-radius: var(--r-md);
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(132,204,22,0.15) inset;
  transform: translateY(150%);
  opacity: 0;
  transition: transform .5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .3s ease;
  max-width: 320px;
  pointer-events: none;
}
.ltn.show { transform: translateY(0); opacity: 1; }
.ltn-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(132, 204, 22, 0.12);
  color: var(--lime-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ltn-icon svg { width: 16px; height: 16px; stroke: currentColor; }
.ltn-wallet { font-size: 11px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; display: flex; align-items: center; gap: 6px; }
.ltn-wallet .pulse { width: 6px; height: 6px; border-radius: 999px; background: var(--lime); animation: pulse-ring 2s infinite; }
.ltn-action { font-size: 13px; color: var(--text); margin-top: 2px; font-weight: 500; }
.ltn-action .amount { color: var(--lime-bright); font-weight: 700; margin-left: 6px; font-family: 'JetBrains Mono', monospace; }

/* ─── poll modal ─── */
.poll-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 9, 0.88);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.poll-overlay.active { display: flex; }
.poll-modal {
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  max-width: 560px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 80px -16px rgba(139, 92, 246, 0.4);
  max-height: 90vh;
  overflow-y: auto;
}
.poll-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.poll-close:hover { background: var(--surface-3); color: var(--text); }
.poll-option {
  position: relative;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  cursor: pointer;
  overflow: hidden;
  background: var(--surface-1);
  transition: border-color .2s ease;
}
.poll-option:hover { border-color: var(--border-strong); }
.poll-option.selected { border-color: var(--violet); background: rgba(139, 92, 246, 0.06); }
.poll-option.voted .poll-option-bar {
  width: var(--bar-width, 0%);
}
.poll-option-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.18) 0%, rgba(236, 72, 153, 0.10) 100%);
  transition: width .8s cubic-bezier(0.25,0.46,0.45,0.94);
  pointer-events: none;
}
.poll-option-content { position: relative; z-index: 1; }
.poll-option-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.poll-option-label { font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid var(--text-dim);
  position: relative;
  flex-shrink: 0;
  transition: border-color .15s ease;
}
.poll-option.selected .radio-dot { border-color: var(--violet); }
.poll-option.selected .radio-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--violet);
}
.poll-option-pct { font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--violet-bright); }
.poll-option-desc { color: var(--text-muted); font-size: 13px; margin-top: 4px; padding-left: 24px; }
.poll-option-votes { color: var(--text-dim); font-size: 12px; font-family: 'JetBrains Mono', monospace; margin-top: 4px; padding-left: 24px; }
.poll-vote-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  background: var(--grad-violet-magenta);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.poll-vote-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.poll-vote-btn:not(:disabled):hover { filter: brightness(1.1); transform: translateY(-1px); }
.poll-voted-msg { display: none; color: var(--lime-bright); text-align: center; font-size: 13px; margin-top: 12px; font-weight: 600; }
.poll-voted-msg.show { display: block; }

/* ─── nav ─── */
.storm-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--border);
}

/* ─── animations ─── */
@keyframes float-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: float-up .7s ease-out both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── code blocks ─── */
.code-block {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-family: 'JetBrains Mono', 'Courier Prime', monospace;
  font-size: 13px;
  color: var(--lime-bright);
  overflow-x: auto;
  line-height: 1.6;
}

/* ─── scrollbar ─── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--violet-deep); }

/* ─── selection ─── */
::selection { background: rgba(139, 92, 246, 0.4); color: #fff; }

/* ─── responsive helper ─── */
.container-storm {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .container-storm { padding: 0 40px; }
}
