/* ============================================================
   TRADE ANOMALY AI — landing stylesheet
   Terminal-dark: true black, one green accent, nothing decorative.
   Mirrors docs/DESIGN_SYSTEM.md so the site and the app read as one product.
   ============================================================ */

:root {
  --bg: #000000;
  --bg-elevated: #0a0d0a;
  --surface: #0e120f;
  --surface-alt: #131813;
  --border: #1e2a20;
  --border-active: rgba(43, 224, 107, 0.35);

  --green: #2be06b;
  --green-dim: #1fa855;
  --red: #ff4d4d;
  --amber: #ffa83c;

  --text: #ffffff;
  --text-2: #8c948c;
  --text-3: #5a625b;
  --on-green: #04140a;

  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --nav-h: 66px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* Numbers must not jitter, on the site as in the app. */
.num { font-variant-numeric: tabular-nums; }

.accent { color: var(--green); }
.muted { color: var(--text-2); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 84px 0; border-top: 1px solid var(--border); }
.section-title { text-align: center; }
.section-sub {
  text-align: center;
  color: var(--text-2);
  max-width: 620px;
  margin: 0 auto 48px;
}

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ---------- wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark .mark { width: 26px; height: 26px; flex: none; }
.wordmark .tail { color: var(--green); }

/* ---------- nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-2); font-size: 14.5px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.lang-switch { display: flex; gap: 2px; padding: 3px; background: var(--surface-alt); border-radius: 10px; }
.lang-switch a {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.lang-switch a.active { background: rgba(43, 224, 107, 0.16); color: var(--green); }
.lang-switch a:hover { text-decoration: none; }

.burger {
  display: none;
  width: 40px; height: 40px;
  background: none; border: 0; cursor: pointer;
  color: var(--text);
}
.burger span { display: block; height: 2px; background: currentColor; margin: 5px auto; width: 20px; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-dim); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-active); }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
}
.store-badge:hover { border-color: var(--border-active); text-decoration: none; }
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.store-badge small { display: block; font-size: 10.5px; color: var(--text-2); letter-spacing: 0.04em; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 84px; position: relative; overflow: hidden; }
.hero::after {
  /* One ambient glow, bottom right, as on the splash. Content screens stay
     flat so the numbers read cleanly. */
  content: "";
  position: absolute;
  right: -18%;
  bottom: -32%;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(43, 224, 107, 0.16), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero p.lead { font-size: 18px; color: var(--text-2); max-width: 520px; }
.hero .tagline { margin-bottom: 18px; }
.disclaimer-line { font-size: 12.5px; color: var(--text-3); margin-top: 22px; }

.phone {
  justify-self: center;
  width: min(300px, 78vw);
  border-radius: 42px;
  padding: 10px;
  background: #0c0f0c;
  border: 1px solid var(--border);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
}
.phone img {
  border-radius: 33px;
  /* The screenshot is a full phone screen and would make the hero absurdly
     tall; the top of the Radar is the part worth showing. */
  max-height: 560px;
  object-fit: cover;
  object-position: top;
}

/* ---------- cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.card .icon { width: 26px; height: 26px; color: var(--green); margin-bottom: 14px; }
.card .tag {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text-2);
}
.card .tag.free { color: var(--green); background: rgba(43, 224, 107, 0.14); }

/* ---------- how it works ---------- */
.steps { counter-reset: step; }
.step { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step);
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: 2px; }
.step p { margin: 0; color: var(--text-2); font-size: 14.5px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--border-active); }
.plan .badge {
  position: absolute;
  top: -11px; right: 18px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--green);
  color: var(--on-green);
  font-size: 11px;
  font-weight: 700;
}
.plan .price { font-size: 30px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.plan .per { color: var(--text-2); font-size: 13.5px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; }
.plan li { position: relative; padding-left: 24px; margin-bottom: 8px; font-size: 14.5px; color: var(--text-2); }
.plan li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.plan .btn { margin-top: auto; }

/* The free plan is a list, not a purchasable card — same tick marks, no price. */
.plan-free-list { list-style: none; padding: 0; margin: 14px 0 0; columns: 2; column-gap: 26px; }
.plan-free-list li { position: relative; padding-left: 24px; margin-bottom: 8px; font-size: 14.5px; color: var(--text-2); break-inside: avoid; }
.plan-free-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
@media (max-width: 900px) { .plan-free-list { columns: 1; } }
.plan-foot { text-align: center; color: var(--text-3); font-size: 12.5px; margin-top: 22px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.faq-q::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-item.open .faq-q::after { transform: rotate(-135deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-a p { color: var(--text-2); font-size: 14.5px; padding-bottom: 20px; margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0 56px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-note { color: var(--text-3); font-size: 12.5px; margin-top: 26px; max-width: 720px; }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2em; }
.legal p, .legal li { color: var(--text-2); font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal .updated { color: var(--text-3); font-size: 13px; }
.legal .callout {
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 16px 18px;
  margin: 22px 0;
}
.legal .callout p { color: var(--text); margin: 0; font-size: 14.5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero p.lead { max-width: none; }
  .grid-3, .plans { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 20px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }
  .nav-open .nav-links { display: flex; }
  .nav-links a { padding: 8px 0; font-size: 16px; }
  .burger { display: block; }
  .section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Legal pages
   They were written against an earlier markup and use their own class names.
   Mapping them here keeps one stylesheet for the whole site rather than a
   second one that would drift away from the first.
   ============================================================ */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--text); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo .accent { color: var(--green); }

.legal-main { padding: 48px 0 80px; }
.legal-wrap { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 20px; }
.legal-wrap h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal-wrap h2 { font-size: 1.25rem; margin-top: 2.2em; }
.legal-wrap h3 { font-size: 1.02rem; margin-top: 1.6em; }
.legal-wrap p, .legal-wrap li, .legal-wrap td { color: var(--text-2); font-size: 15px; }
.legal-wrap strong { color: var(--text); }
.legal-wrap ul, .legal-wrap ol { padding-left: 20px; }
.legal-wrap li { margin-bottom: 6px; }
.legal-updated { color: var(--text-3); font-size: 13px; }

.legal-callout {
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 16px 18px;
  margin: 24px 0;
}
.legal-callout p { color: var(--text); margin: 0 0 0.6em; }
.legal-callout p:last-child { margin-bottom: 0; }

.legal-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  display: block;
  overflow-x: auto;
}
.legal-wrap th, .legal-wrap td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal-wrap th { color: var(--text); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }

.footer-bottom { color: var(--text-3); font-size: 12.5px; margin-top: 22px; }
.footer-bottom a { color: var(--text-2); }
