/* ============================================================
   SILENT TRADER — Design Tokens
   Aesthetic: Trading-terminal meets editorial trust.
   Not a "fintech dashboard" — a quiet, disciplined desk at 2am
   watching gold move. Dark charcoal-navy, brass/gold accent used
   sparingly (it's literal — gold trading — but desaturated, not
   gaudy), monospace for anything numeric, humanist serif for
   editorial trust (long-form reading, E-E-A-T signal).
   ============================================================ */

:root {
  /* Color */
  --ink-950: #0b0f14;      /* base background — near-black navy, not pure black */
  --ink-900: #11161d;      /* card/panel background */
  --ink-800: #1a212b;      /* elevated panel / hover */
  --ink-700: #2a323d;      /* borders, dividers */
  --ink-600: #4a5560;      /* muted borders */
  --paper-100: #eef0ee;    /* primary text on dark */
  --paper-300: #a8b0b8;    /* secondary text */
  --paper-500: #6e7883;    /* tertiary / meta text */

  --brass-400: #d4af6a;    /* primary accent — muted brass gold */
  --brass-500: #c19a4f;    /* accent, hover/active */
  --brass-900: #3a2f1a;    /* accent tint background */

  --long-500: #4f9d7a;     /* bullish / long — desaturated green */
  --short-500: #c5605a;    /* bearish / short — desaturated red/brick */

  --line: rgba(238, 240, 238, 0.08);
  --line-strong: rgba(238, 240, 238, 0.16);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.25rem, 1.19rem + 0.3vw, 1.375rem);
  --step-2: clamp(1.6rem, 1.5rem + 0.5vw, 1.875rem);
  --step-3: clamp(2.1rem, 1.9rem + 1vw, 2.75rem);
  --step-4: clamp(2.8rem, 2.4rem + 2vw, 4rem);

  --radius-sm: 3px;
  --radius-md: 5px;

  --max-w: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--paper-100);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Faint background texture: a barely-visible candlestick wick grid,
   the signature ambient element — reads as "chart" without being a chart */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image:
    repeating-linear-gradient(90deg, var(--paper-100) 0 1px, transparent 1px 80px);
  mask-image: linear-gradient(to bottom, black, transparent 60%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 1em; color: var(--paper-300); }

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-400);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--brass-400);
  border-radius: 1px;
  display: inline-block;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo .dot { color: var(--brass-400); }

.main-nav { display: flex; gap: 32px; align-items: center; }
.main-nav a {
  font-size: var(--step--1);
  color: var(--paper-300);
  font-weight: 500;
  transition: color 0.15s ease;
  position: relative;
}
.main-nav a:hover { color: var(--paper-100); }
.main-nav a.active { color: var(--brass-400); }

.nav-cta {
  border: 1px solid var(--brass-500);
  color: var(--brass-400) !important;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--step--1) !important;
}
.nav-cta:hover { background: var(--brass-900); }

.nav-toggle { display: none; background: none; border: none; color: var(--paper-100); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 860px) {
  .main-nav { position: fixed; top: 65px; left: 0; right: 0; bottom: 0; background: var(--ink-950); flex-direction: column; padding: 32px 24px; gap: 24px; align-items: flex-start; transform: translateX(100%); transition: transform 0.25s ease; overflow-y:auto;}
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--step--1);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--brass-400); color: var(--ink-950); }
.btn-primary:hover { background: var(--brass-500); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--paper-100); }
.btn-ghost:hover { border-color: var(--brass-400); color: var(--brass-400); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lede { font-size: var(--step-1); color: var(--paper-300); max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat .num { font-family: var(--font-mono); font-size: var(--step-2); color: var(--brass-400); display: block; }
.stat .label { font-size: var(--step--1); color: var(--paper-500); }

/* Ticker card — signature element for hero */
.ticker-card {
  background: var(--ink-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 24px;
}
.ticker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ticker-head .name { font-weight: 700; }
.ticker-head .badge { font-family: var(--font-mono); font-size: 0.7rem; background: var(--brass-900); color: var(--brass-400); padding: 3px 8px; border-radius: 3px; letter-spacing: 0.05em; }
.ticker-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--step--1); }
.ticker-row:last-child { border-bottom: none; }
.ticker-row .sym { color: var(--paper-300); font-family: var(--font-body); font-weight: 500; }
.up { color: var(--long-500); }
.down { color: var(--short-500); }
.ticker-note { margin-top: 16px; font-size: 0.72rem; color: var(--paper-500); font-family: var(--font-mono); }

/* ---------- Section scaffolding ---------- */
.section { padding: 80px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; gap: 24px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 8px; }
.section-head .desc { color: var(--paper-500); max-width: 50ch; margin: 0; }
.view-all { font-family: var(--font-mono); font-size: var(--step--1); color: var(--brass-400); white-space: nowrap; border-bottom: 1px solid var(--brass-500); padding-bottom: 2px; }

.alt-bg { background: var(--ink-900); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Tier / Learn cards ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tier-card {
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tier-card:hover { border-color: var(--brass-500); transform: translateY(-3px); }
.tier-level { font-family: var(--font-mono); font-size: var(--step--1); color: var(--brass-400); margin-bottom: 12px; display:block;}
.tier-card h3 { font-size: var(--step-1); margin-bottom: 10px; }
.tier-card p { font-size: var(--step--1); margin-bottom: 20px; }
.tier-list { list-style: none; padding: 0; margin: 0 0 20px; }
.tier-list li {
  font-size: var(--step--1);
  color: var(--paper-300);
  padding: 8px 0 8px 20px;
  border-top: 1px solid var(--line);
  position: relative;
}
.tier-list li::before {
  content: "→";
  position: absolute; left: 0; color: var(--brass-500);
}
.tier-link { font-family: var(--font-mono); font-size: var(--step--1); color: var(--paper-100); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.tier-card:hover .tier-link { color: var(--brass-400); border-color: var(--brass-400); }

/* ---------- Article cards ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.article-card { display: flex; flex-direction: column; }
.article-thumb {
  aspect-ratio: 16/10;
  background: var(--ink-800);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.article-thumb .tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(11,15,20,0.85);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--brass-400);
  padding: 4px 9px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}
.article-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--paper-500); margin-bottom: 8px; }
.article-card h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.article-card p { font-size: var(--step--1); }
.article-card a.stretch { position: relative; }

/* Ad slot — clearly labeled placeholder, styled to sit naturally in-flow */
.ad-slot {
  border: 1px dashed var(--ink-600);
  border-radius: var(--radius-md);
  background: var(--ink-900);
  padding: 18px;
  text-align: center;
  color: var(--paper-500);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  margin: 40px 0;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-col h4 { font-size: var(--step--1); color: var(--paper-500); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); font-weight: 500; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--paper-300); font-size: var(--step--1); }
.footer-col a:hover { color: var(--brass-400); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--paper-500); flex-wrap: wrap; gap: 12px; }
.footer-disclaimer { font-size: 0.78rem; color: var(--paper-500); max-width: 900px; margin: 0 0 32px; padding: 16px 20px; background: var(--ink-900); border-left: 2px solid var(--brass-500); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .tier-grid, .article-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass-400); outline-offset: 2px; }

/* Fade-in on load (orchestrated, not scattered) */
.fade-up { animation: fadeUp 0.6s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Article / long-form reading ---------- */
.article-header { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-family: var(--font-mono); font-size: 0.75rem; color: var(--paper-500); margin-bottom: 20px; }
.breadcrumb a { color: var(--paper-500); }
.breadcrumb a:hover { color: var(--brass-400); }
.article-header h1 { font-size: var(--step-3); max-width: 20ch; }
.article-header-meta { display:flex; gap:20px; flex-wrap:wrap; font-family:var(--font-mono); font-size:0.78rem; color:var(--paper-500); margin-top:20px; }
.article-header-meta span { display:flex; align-items:center; gap:6px; }

.article-body { max-width: 720px; margin: 0 auto; padding: 56px 24px; }
.article-body h2 { font-size: var(--step-2); margin-top: 2.2em; margin-bottom: 0.6em; }
.article-body h3 { font-size: var(--step-1); margin-top: 1.8em; margin-bottom: 0.5em; font-family: var(--font-body); }
.article-body p { font-size: 1.05rem; color: var(--paper-300); line-height: 1.75; }
.article-body ul, .article-body ol { color: var(--paper-300); font-size: 1.05rem; line-height: 1.75; padding-left: 1.3em; }
.article-body li { margin-bottom: 0.5em; }
.article-body strong { color: var(--paper-100); }

.callout {
  background: var(--ink-900);
  border-left: 3px solid var(--brass-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 32px 0;
}
.callout p { margin: 0; font-size: 0.98rem; }
.callout .callout-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--brass-400); letter-spacing: 0.06em; display: block; margin-bottom: 8px; }

.example-box {
  background: var(--ink-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.example-box .ex-title { color: var(--brass-400); font-size: 0.72rem; letter-spacing: 0.06em; margin-bottom: 14px; display:block; }
.example-box .ex-row { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); color: var(--paper-300); }
.example-box .ex-row:first-of-type { border-top: none; }
.example-box .ex-row .result { color: var(--brass-400); font-weight: 500; }

.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.92rem; }
.article-body th, .article-body td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.article-body th { font-family: var(--font-mono); font-size: 0.72rem; color: var(--paper-500); letter-spacing: 0.05em; text-transform: uppercase; }

.key-takeaways {
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 40px 0;
}
.key-takeaways h3 { margin-top:0; font-size: 1rem; font-family: var(--font-mono); color: var(--brass-400); letter-spacing: 0.03em; }
.key-takeaways ul { margin-bottom: 0; }

.article-nav-next {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.article-nav-next .label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--paper-500); display:block; margin-bottom:6px; }
.article-nav-next .title { font-weight: 700; font-size: 1.05rem; }
.article-nav-next a:hover .title { color: var(--brass-400); }

.author-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--paper-500);
}
.author-strip strong { color: var(--paper-100); }
