/* ============================================================
   XYNETIC — design tokens
   Palette is a deliberate nod to old exchange-terminal displays
   (amber-on-black), not a generic crypto neon or AI-purple look.
   ============================================================ */

:root {
  /* color */
  --bg: #0A0C0E;
  --bg-raised: #101317;
  --bg-raised-2: #14181D;
  --border: #23282F;
  --border-soft: #1A1E23;
  --text: #E9E6DF;
  --text-dim: #8B909A;
  --text-faint: #5B616B;
  --accent: #E3A63E;
  --accent-soft: rgba(227, 166, 62, 0.12);
  --accent-dim: #8C6B2B;
  --up: #5FAE82;
  --down: #C1685C;

  /* type */
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* layout */
  --content-w: 1180px;
  --radius: 3px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

p { margin: 0; }

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

button { font-family: inherit; }

::selection {
  background: var(--accent);
  color: #0A0C0E;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow-label {
  font-size: 13px;
  color: var(--text-faint);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #14100A;
  border-color: var(--accent);
}
.btn-primary:hover { background: #edb455; border-color: #edb455; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-dim); }

/* ============================================================
   Nav
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 14, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.site-nav .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand svg { width: 22px; height: 22px; display: block; }

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: var(--text-dim);
}

.nav-links a { transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle { display: none; }

/* ============================================================
   Ticker strip
   ============================================================ */

.ticker-strip {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-raised);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  animation: ticker-scroll 38s linear infinite;
}

.ticker-strip:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 22px;
  font-size: 13px;
  border-right: 1px solid var(--border-soft);
  color: var(--text-dim);
}

.ticker-item .sym { color: var(--text); }
.ticker-item .up { color: var(--up); }
.ticker-item .down { color: var(--down); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: 84px 0 96px;
  border-bottom: 1px solid var(--border-soft);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 22px;
  opacity: 0;
  animation: rise 0.6s var(--ease) forwards;
}

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(95, 174, 130, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(95, 174, 130, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(95, 174, 130, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 174, 130, 0); }
}

.hero-copy h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  max-width: 12.5ch;
  opacity: 0;
  animation: rise 0.7s var(--ease) forwards;
  animation-delay: 0.08s;
}

.hero-copy .lede {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 16px;
  color: var(--text-dim);
  opacity: 0;
  animation: rise 0.7s var(--ease) forwards;
  animation-delay: 0.2s;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 34px;
  opacity: 0;
  animation: rise 0.7s var(--ease) forwards;
  animation-delay: 0.32s;
}

.hero-fine {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-faint);
  opacity: 0;
  animation: rise 0.7s var(--ease) forwards;
  animation-delay: 0.4s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* terminal panel used in hero + elsewhere */

.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
}

.panel-head .dot-live { animation: pulse 2.2s ease-out infinite; }

.feed-panel {
  opacity: 0;
  animation: rise 0.8s var(--ease) forwards;
  animation-delay: 0.22s;
}

.feed-window {
  height: 296px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
}

.feed-track {
  animation: feed-scroll 16s linear infinite;
}

@keyframes feed-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.feed-row {
  display: grid;
  grid-template-columns: 62px 66px 1fr auto;
  gap: 10px;
  padding: 9px 14px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
  white-space: nowrap;
}

.feed-row .t { color: var(--text-faint); }
.feed-row .action { font-weight: 600; }
.feed-row .action.buy { color: var(--up); }
.feed-row .action.sell { color: var(--down); }
.feed-row .action.scan,
.feed-row .action.signal { color: var(--accent); }
.feed-row .pair { color: var(--text); }
.feed-row .delta.up { color: var(--up); }
.feed-row .delta.down { color: var(--down); }

/* ============================================================
   Stats strip
   ============================================================ */

.stats {
  border-bottom: 1px solid var(--border-soft);
}

.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 34px 28px;
  border-left: 1px solid var(--border-soft);
}
.stat:first-child { border-left: none; }

.stat-num {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--accent);
}

.stat-label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ============================================================
   Section shell
   ============================================================ */

section { padding: 96px 0; }

.section-head {
  max-width: 58ch;
  margin-bottom: 52px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.section-head .lede {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 15.5px;
  max-width: 52ch;
}

/* ============================================================
   How it works
   ============================================================ */

.steps {
  border-top: 1px solid var(--border-soft);
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
}

.steps-row::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  transform-origin: left;
  transform: scaleX(0);
}

.steps-row.in-view::before {
  transform: scaleX(1);
  transition: transform 1.1s var(--ease);
}

.step {
  padding: 0 32px 0 0;
  position: relative;
}

.step:first-child { padding-left: 0; }

.step-index {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent);
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
}

.step h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-dim);
  font-size: 14.5px;
  max-width: 34ch;
}

/* ============================================================
   Feature panels
   ============================================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
}

.feature {
  background: var(--bg);
  padding: 30px 28px;
}

.feature-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 20px;
  color: var(--accent);
}
.feature-icon svg { width: 100%; height: 100%; }

.feature h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 9px;
}

.feature p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 34ch;
}

/* ============================================================
   Signal demo
   ============================================================ */

.demo .wrap > .panel {
  overflow: hidden;
}

.demo-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
}

.demo-chart {
  padding: 26px 26px 10px;
  border-right: 1px solid var(--border);
}

.demo-chart svg { width: 100%; height: auto; display: block; }

.demo-log {
  padding: 4px 0;
}

.demo-log .log-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}

.demo-log .log-row:last-child { border-bottom: none; }
.demo-log .t { color: var(--text-faint); }
.demo-log .msg { color: var(--text-dim); }
.demo-log .msg b { color: var(--text); font-weight: 600; }
.demo-log .msg.buy b { color: var(--up); }
.demo-log .msg.sell b { color: var(--down); }

/* ============================================================
   Security
   ============================================================ */

.security .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.security-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.security-item {
  display: flex;
  gap: 16px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border-soft);
}
.security-item:last-child { border: none; padding-bottom: 0; }

.security-item .mark {
  color: var(--accent);
  font-size: 14px;
  padding-top: 2px;
}

.security-item h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 6px;
}

.security-item p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 42ch;
}

/* ============================================================
   CTA band
   ============================================================ */

.cta-band {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-raised);
}

.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 58px 32px;
}

.cta-band h2 {
  font-size: clamp(24px, 3vw, 32px);
  max-width: 18ch;
}

.cta-band .lede {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 15px;
}

.cta-actions { display: flex; gap: 12px; flex-shrink: 0; }

/* ============================================================
   Footer
   ============================================================ */

footer { padding: 56px 0 40px; }

.foot-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
}

.foot-brand .brand { margin-bottom: 14px; }

.foot-brand p {
  color: var(--text-dim);
  font-size: 13.5px;
  max-width: 32ch;
}

.foot-col h5 {
  font-size: 12.5px;
  color: var(--text-faint);
  font-weight: 400;
  margin-bottom: 14px;
}

.foot-col ul { list-style: none; margin: 0; padding: 0; }

.foot-col li { margin-bottom: 10px; }

.foot-col a {
  font-size: 13.5px;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.foot-col a:hover { color: var(--text); }

.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-faint);
}

.foot-bottom .disclaimer { max-width: 62ch; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .feed-panel { max-width: 520px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(2n) { border-left: 1px solid var(--border-soft); }
  .stat:nth-child(2n+1) { border-left: none; }
  .stat { border-top: 1px solid var(--border-soft); }
  .stat:nth-child(-n+2) { border-top: none; }
  .steps-row { grid-template-columns: 1fr; gap: 36px; }
  .steps-row::before { display: none; }
  .step { padding-right: 0; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-body { grid-template-columns: 1fr; }
  .demo-chart { border-right: none; border-bottom: 1px solid var(--border); }
  .security .wrap { grid-template-columns: 1fr; gap: 40px; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .foot-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 20px; }
  .nav-links { display: none; }
  section { padding: 64px 0; }
  .hero { padding: 52px 0 64px; }
  .features-grid { grid-template-columns: 1fr; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .foot-top { grid-template-columns: 1fr; gap: 30px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .demo-log .log-row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 12px 18px;
  }
  .demo-log .t { font-size: 11px; }
  .panel-head {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
}
