/* ============================================================
   TRADERS HUB — refresh/v1
   Layered on top of styles.css. Removing the <link> to this
   file reverts every change in this refresh.
   ------------------------------------------------------------
   Goals (surgical, not a rewrite):
   1. One quiet, modern accent system (single emerald tone).
   2. Tighter, more confident type scale.
   3. More generous vertical rhythm between sections.
   4. Product-card grid that feels intentional (equal headers).
   5. A single primary hero moment with subtle chart motion.
   6. Softer, glassier surfaces on cards; less border noise.
   ============================================================ */

/* ---- Tokens (nudges, not replacements) ---- */
:root {
  /* Slightly softer background so the emerald pops without shouting */
  --bg-deep: #050810;
  --bg-base: #080c14;
  --bg-card: #0f141d;
  --bg-card-hover: #141b26;
  --border: #1a2230;
  --border-strong: #253044;

  /* Single accent tone. No mixing emerald + emerald-bright inside cards. */
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-line: rgba(16, 185, 129, 0.35);

  /* Type scale, refined */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --tracking-tight: -0.025em;
  --tracking-tighter: -0.035em;

  /* Rhythm */
  --section-pad: clamp(72px, 10vw, 128px);
}

body {
  font-feature-settings: "ss01", "cv11", "cv02", "cv03";
  letter-spacing: -0.005em;
}

/* ---- Section rhythm ---- */
section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

/* ---- Nav: quieter, more confident ---- */
.nav {
  background: rgba(8, 12, 20, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.nav-links a {
  font-size: 14px;
  letter-spacing: -0.005em;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-top: clamp(80px, 12vw, 140px);
  padding-bottom: clamp(64px, 10vw, 120px);
  overflow: hidden;
}
.hero-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 13px;
  letter-spacing: -0.005em;
  color: #a7f3d0;
}
.hero-badge-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tracking-tighter);
  font-size: clamp(44px, 8vw, 92px);
  line-height: 1.02;
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}
.hero-headline-accent {
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 62ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: #b5bccb;
  margin-top: 24px;
}

/* Single primary CTA. Secondary is quieter. */
.hero-cta-row {
  gap: 14px;
  margin-top: 40px;
}
.btn-primary {
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--accent);
  color: #04120b;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 24px -8px rgba(16, 185, 129, 0.5);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 12px 32px -8px rgba(16, 185, 129, 0.6);
}
.btn-secondary {
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 500;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-primary);
}
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.02);
}

/* Hero emblem — smaller, softer glow. Less "logo dump", more mark. */
.hero .container > div:first-child img[alt="TradersHub emblem"] {
  width: 96px !important;
  height: 96px !important;
  border-radius: 22px !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 40px -20px rgba(16, 185, 129, 0.55) !important;
}

/* Hero proof: quieter, better rhythm */
.hero-proof {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  gap: 40px;
}
.hero-proof-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}
.hero-proof-num span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}
.hero-proof-lab {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}
.hero-proof-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
}

/* ---- Subtle EMA-line motion behind the hero ---- */
.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 75%);
}
.hero-ambient svg { width: 100%; height: 100%; display: block; }
.hero-ambient .ema-line {
  stroke: var(--accent);
  stroke-width: 1.25;
  fill: none;
  stroke-dasharray: 4 5;
  animation: ema-drift 22s linear infinite;
}
.hero-ambient .price-line {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.25;
  fill: none;
  animation: price-drift 30s linear infinite;
}
@keyframes ema-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-100px); }
}
@keyframes price-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-120px); }
}
.hero .container { position: relative; z-index: 1; }

/* ---- Section titles ---- */
.section-eyebrow, .section-lead {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
h2, .section-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}
.section-sub {
  font-size: clamp(15px, 1.2vw, 17px);
  color: #a3aab8;
  max-width: 62ch;
  line-height: 1.6;
}

/* ---- Product cards: unified, equal-headers, glassier surface ---- */
.products-grid, .product-cards, .price-grid {
  gap: 20px;
}
.product-card, .price-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 60%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 28px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}
.product-card:hover, .price-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.6);
}

/* Standardise the product-card headers so all three feel like siblings */
.product-card .product-tier,
.product-card .price-tier {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.product-card .product-title,
.product-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  font-size: 22px;
  line-height: 1.2;
  margin-top: 8px;
}
.product-card .product-tag {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}
.product-card .product-price {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin-top: 20px;
}
.product-card .product-price small {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
  margin-left: 4px;
}

/* Featured (indicator) card gets a subtle accent frame */
.product-card.featured {
  border-color: rgba(16, 185, 129, 0.25);
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0) 40%),
    var(--bg-card);
}

/* ---- Live demo terminal: crisper ---- */
.demo-panel, .demo-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.demo-panel-head, .demo-card-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
}
.code-block {
  background: #05080e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
}
.code-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---- Coverage tiles: quieter ---- */
.coverage-item, .market-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.coverage-item:hover, .market-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.04);
}

/* ---- CTA row on cards: consistent height feels intentional ---- */
.product-card .product-cta,
.product-card .btn-primary,
.product-card .btn-secondary {
  margin-top: auto;
}
.product-card {
  display: flex;
  flex-direction: column;
}

/* ---- Footer polish ---- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
}
.footer-brand-name { letter-spacing: 0.12em; }
.footer-legal {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ---- Selection + focus ---- */
::selection {
  background: rgba(16, 185, 129, 0.3);
  color: #ecfdf5;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
  .hero-ambient .ema-line,
  .hero-ambient .price-line { animation: none; }
  .btn-primary:hover, .product-card:hover, .price-card:hover { transform: none; }
}

/* ---- Mobile refinements ---- */
@media (max-width: 720px) {
  .hero-proof { gap: 24px; }
  .hero-proof-num { font-size: 24px; }
  section { padding-top: 72px; padding-bottom: 72px; }
  .product-card { padding: 22px; }
}

/* ============================================================
   LIVE DEMO · terminal aesthetic
   ============================================================ */
#demo .demo-card {
  margin-top: 40px;
  padding: 0;
  background: #05080e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

/* Terminal-style header bar */
#demo .demo-card::before {
  content: "";
  display: block;
  height: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)) ,
    #0a0f18;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background-position: 12px 12px, 0 0;
  background-repeat: no-repeat, repeat;
  position: relative;
}
#demo .demo-card {
  position: relative;
}
#demo .demo-card::after {
  content: "";
  position: absolute;
  top: 12px; left: 14px;
  width: 44px; height: 10px;
  background:
    radial-gradient(circle at 5px 5px, #f87171 4px, transparent 4.5px),
    radial-gradient(circle at 20px 5px, #fbbf24 4px, transparent 4.5px),
    radial-gradient(circle at 35px 5px, #10b981 4px, transparent 4.5px);
  pointer-events: none;
}

#demo .demo-search {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 10px;
}
#demo .demo-search input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 14px;
  flex: 1;
  transition: border-color 0.15s ease;
}
#demo .demo-search input::placeholder { color: var(--text-muted); }
#demo .demo-search input:focus {
  outline: none;
  border-color: var(--accent-line);
  background: rgba(16, 185, 129, 0.04);
}
#demo .demo-search button {
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: #04120b;
  border: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
#demo .demo-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.55);
}

#demo .demo-quick {
  padding: 14px 22px 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
}
#demo .demo-quick button {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
#demo .demo-quick button:hover {
  border-color: var(--accent-line);
  background: rgba(16, 185, 129, 0.06);
  color: #6ee7b7;
}

#demo .demo-grid {
  padding: 22px;
  gap: 14px;
}
#demo .demo-panel {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
#demo .demo-panel-head {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#demo .demo-panel-body { padding: 16px 14px; }

/* Terminal-style output typography */
#demo .signal-ticker,
#demo .frame-val,
#demo .sentiment-score,
#demo .meta-label,
#demo .signal-meta span {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

/* ============================================================
   PRODUCT CARDS · rebuild (indicator = flagship)
   ============================================================ */
#products .products-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 960px) {
  #products .products-grid { grid-template-columns: 1fr; }
}

#products .product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 55%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
#products .product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
}

#products .product-icon {
  font-size: 22px;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}
#products .product-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
  width: fit-content;
}
#products .product-tag-flagship {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}
#products .product-tag-free {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}
#products .product-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  font-size: 22px;
  line-height: 1.15;
  color: var(--text-primary);
}
#products .product-tagline {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
#products .product-features {
  list-style: none;
  margin: 20px 0 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
#products .product-features li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}
#products .product-features li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.75;
}
#products .product-price {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
#products .product-price-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}
#products .product-price-period {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}
#products .product-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.15s ease;
}
#products .product-cta-api {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#products .product-cta-api:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}
#products .product-cta-free {
  background: transparent;
  color: var(--text-secondary);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}
#products .product-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Flagship treatment (the middle indicator card) */
#products .product-card-feature {
  border-color: rgba(16, 185, 129, 0.32);
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.07) 0%, rgba(16, 185, 129, 0) 40%),
    var(--bg-card);
  box-shadow: 0 24px 60px -30px rgba(16, 185, 129, 0.35);
}
#products .product-card-feature::before {
  content: "★ Flagship";
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #04120b;
  box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.55);
}

/* Proof gallery inside the flagship card gets tighter */
#products .proof-gallery {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
#products .proof-gallery-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
#products .proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
#products .proof-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
#products .proof-thumb:hover {
  transform: translateY(-1px);
  border-color: var(--accent-line);
}
#products .proof-thumb img {
  display: block;
  width: 100%;
  height: 68px;
  object-fit: cover;
}
#products .proof-cap { display: none; }
#products .proof-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}
