/* =========================================================
   MoonRadar — shared stylesheet
   Built on the Sudsy design system (tokens imported first).
   Direction: Sudsy foundations, trading restraint.
   ========================================================= */

@import url('sudsy-tokens.css');

:root {
  /* ---- Trading semantics (added to Sudsy palette) ---- */
  --gain:      #2BE58A;   /* profit green — harmonized with aqua */
  --gain-dim:  #16361f;
  --loss:      #FF4D62;   /* loss red */
  --loss-dim:  #3a1620;
  --news:      var(--warning);   /* amber caution */

  --gain-wash: rgba(43, 229, 138, 0.14);
  --loss-wash: rgba(255, 77, 98, 0.14);
  --blue-wash-2: rgba(59, 231, 255, 0.12);
  --news-wash: rgba(255, 200, 87, 0.13);

  --glow-gain: 0 0 18px rgba(43, 229, 138, 0.45);
  --glow-loss: 0 0 18px rgba(255, 77, 98, 0.45);

  /* ---- Layout ---- */
  --maxw: 1200px;
  --nav-h: 64px;

  /* calmer surface set for the trading product */
  --panel:   rgba(255,255,255,0.035);
  --panel-2: rgba(255,255,255,0.055);
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--fg1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::selection { background: rgba(59,231,255,.3); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum','zero'; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blue);
}
.muted { color: var(--fg3); }
.fg2 { color: var(--fg2); }

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(8,7,16,0.66);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--stroke-1);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark {
  width: 24px; height: 24px; position: relative; flex: none;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand b { color: var(--fg1); }
.brand span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  font-size: 14px; color: var(--fg2); font-weight: 500;
  padding: 8px 13px; border-radius: var(--r-pill);
  transition: color var(--dur-fast) var(--ease-smooth), background var(--dur-fast) var(--ease-smooth);
}
.nav-links a:hover { color: var(--fg1); background: var(--glass-2); }
.nav-links a.active { color: var(--blue); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(8,7,16,0.96); backdrop-filter: blur(24px);
    padding: 12px; border-bottom: 1px solid var(--stroke-1);
    transform: translateY(-120%); transition: transform var(--dur-base) var(--ease-smooth);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--r-2);
    background: var(--glass-2); border: 1px solid var(--stroke-2); color: var(--fg1); cursor: pointer;
  }
  .nav-right .btn-sm { display: none; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform var(--dur-fast) var(--ease-smooth), filter var(--dur-fast) var(--ease-smooth), background var(--dur-fast), border-color var(--dur-fast);
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn i { font-size: 18px; }
.btn-primary {
  background: var(--grad-liquid); color: var(--void);
  box-shadow: 0 0 24px rgba(59,231,255,.28), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: var(--glass-2); color: var(--fg1); border-color: var(--stroke-2);
}
.btn-ghost:hover { background: var(--glass-3); border-color: var(--stroke-3); }
.btn-outline { background: transparent; color: var(--blue); border-color: rgba(59,231,255,.4); }
.btn-outline:hover { background: var(--blue-wash-2); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* =========================================================
   Glass panels / cards
   ========================================================= */
.panel {
  background: var(--panel);
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
}
.panel.glass { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.panel-pad { padding: 24px; }
.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--stroke-1);
}
.panel-head h3 { margin: 0; font-size: 17px; }
.panel-head .panel-sub { font-size: 12.5px; color: var(--fg3); margin-left: auto; }

.card-active {
  border-color: rgba(59,231,255,.4);
  box-shadow: 0 0 0 1px rgba(59,231,255,.15), 0 0 40px rgba(59,231,255,.12);
}

/* =========================================================
   Badges / tags
   ========================================================= */
.tag {
  font-family: var(--font-body); font-weight: 700; font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid transparent; line-height: 1; white-space: nowrap;
}
.tag i { font-size: 12px; }
.tag-gain  { background: var(--gain-wash); color: var(--gain); border-color: rgba(43,229,138,.32); }
.tag-loss  { background: var(--loss-wash); color: var(--loss); border-color: rgba(255,77,98,.32); }
.tag-blue  { background: var(--blue-wash-2); color: var(--blue); border-color: rgba(59,231,255,.3); }
.tag-purple{ background: rgba(138,92,255,.16); color: var(--purple-wash); border-color: rgba(138,92,255,.36); }
.tag-news  { background: var(--news-wash); color: var(--news); border-color: rgba(255,200,87,.32); }
.tag-mute  { background: var(--glass-2); color: var(--fg3); border-color: var(--stroke-2); }
.tag-foam  { background: var(--foam); color: var(--void); }

/* live dot */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gain); box-shadow: 0 0 0 0 rgba(43,229,138,.6); animation: pulse-dot 2s var(--ease-smooth) infinite; flex: none; }
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(43,229,138,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(43,229,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,229,138,0); }
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--fg2);
  padding: 6px 12px 6px 11px; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--stroke-2); white-space: nowrap;
}

/* =========================================================
   Section scaffolding
   ========================================================= */
section { position: relative; }
.section { padding-block: 96px; }
.section-sm { padding-block: 64px; }
.section-head { max-width: 760px; }
.section-head h2 { margin: 14px 0 0; font-size: clamp(28px, 4vw, 40px); }
.section-head p { margin: 16px 0 0; font-size: 17px; color: var(--fg2); text-wrap: pretty; }
.center { text-align: center; margin-inline: auto; }

.divider { height: 1px; background: var(--stroke-1); border: 0; margin: 0; }

/* =========================================================
   Stat / metric blocks
   ========================================================= */
.stat-num { font-family: var(--font-mono); font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.metric-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }

/* =========================================================
   Tables (signal stream, scoreboard, etc.)
   ========================================================= */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-family: var(--font-mono); font-weight: 500;
  font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--fg3);
  padding: 10px 14px; border-bottom: 1px solid var(--stroke-1); white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--stroke-1); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--dur-fast); }
.tbl tbody tr:hover { background: var(--glass-1); }
.tbl .t-token { font-family: var(--font-mono); font-weight: 600; color: var(--fg1); }
.tbl .t-time  { font-family: var(--font-mono); color: var(--fg3); font-size: 13px; }
.row-open { box-shadow: inset 3px 0 0 var(--gain); }
.row-skip { opacity: 0.62; }
.row-suppress { box-shadow: inset 3px 0 0 var(--loss); opacity: 0.78; }

/* slide-in for newly streamed rows */
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-10px); background: rgba(59,231,255,.08); }
  to   { opacity: 1; transform: translateY(0); }
}
.row-new { animation: slide-in 0.5s var(--ease-smooth); }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  margin-top: 96px;
  border-top: 1px solid var(--stroke-1);
  background: rgba(6,6,12,0.5);
  padding-block: 56px 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); margin: 0 0 16px; font-weight: 500; }
.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links a { font-size: 14.5px; color: var(--fg2); transition: color var(--dur-fast); }
.footer-links a:hover { color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--stroke-1); }
.footer-bottom .disclaimer { font-size: 12.5px; color: var(--fg-mute); max-width: 560px; }
.footer-social { display: flex; gap: 10px; margin-left: auto; }
.footer-social a {
  width: 38px; height: 38px; border-radius: var(--r-2);
  background: var(--glass-2); border: 1px solid var(--stroke-1);
  display: inline-flex; align-items: center; justify-content: center; color: var(--fg2);
  transition: all var(--dur-fast);
}
.footer-social a:hover { color: var(--blue); border-color: rgba(59,231,255,.3); background: var(--blue-wash-2); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } .footer-brand { grid-column: auto; } .footer-social { margin-left: 0; } .footer-bottom { flex-direction: column; align-items: flex-start; } }

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-smooth), transform .7s var(--ease-smooth); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto; }
}

/* shine sweep for hero accents */
@keyframes shine { 0% { background-position: -150% 0; } 100% { background-position: 250% 0; } }

/* count-up helper hidden state */
[data-count] { font-variant-numeric: tabular-nums; }

/* ===== Signup form — shared across landing / debrief / issue pages =====
   The email input must read as part of the dark glass surface, not as a
   bright-white browser default. We reset appearance, force background on
   autofill, and lift the surface slightly on focus. */
.signup { display: flex; gap: 10px; max-width: 480px; flex-wrap: wrap; position: relative; }
.signup input[type="email"] {
  flex: 1; min-width: 220px;
  padding: 14px 18px;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  border: 1px solid var(--stroke-2);
  color: var(--fg1);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.signup input[type="email"]:focus {
  border-color: rgba(59,231,255,.5);
  background: var(--glass-3);
}
.signup input[type="email"]::placeholder { color: var(--fg-mute); }
.signup input[type="email"]:-webkit-autofill,
.signup input[type="email"]:-webkit-autofill:hover,
.signup input[type="email"]:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--slab-2) inset;
  -webkit-text-fill-color: var(--fg1);
  caret-color: var(--fg1);
  transition: background-color 9999s ease-in-out 0s;
}
.signup-note { font-size: 12.5px; color: var(--fg-mute); margin-top: 14px; font-family: var(--font-mono); }
.subscribe-success {
  padding: 14px 18px; border-radius: var(--r-pill);
  background: rgba(43,229,138,0.10); border: 1px solid rgba(43,229,138,0.35);
  color: var(--gain); font-family: var(--font-mono); font-size: 14px;
  display: inline-flex; align-items: center; gap: 10px; max-width: 480px;
}
