/* ============================================================
   TRADER DADDY — DESIGN TOKENS
   Brand: cornflower blue + amber gold (from logo)
   ============================================================ */

:root {
  /* —— Surfaces (deep ink → near-black) —— */
  --bg-0: oklch(13% 0.012 240);
  --bg-1: oklch(16% 0.012 240);
  --bg-2: oklch(20% 0.012 240);
  --bg-3: oklch(24% 0.012 240);
  --line: oklch(28% 0.012 240);
  --line-strong: oklch(36% 0.012 240);

  /* —— Ink (text) —— */
  --ink-0: oklch(98% 0.005 240);
  --ink-1: oklch(88% 0.008 240);
  --ink-2: oklch(68% 0.012 240);
  --ink-3: oklch(48% 0.012 240);
  --ink-4: oklch(36% 0.012 240);

  /* —— Accent: brand blue (from logo) —— */
  --acc:    oklch(63% 0.20 255);
  --acc-hi: oklch(72% 0.20 255);
  --acc-lo: oklch(50% 0.20 255);
  --acc-bg: oklch(63% 0.20 255 / 0.12);
  --acc-line: oklch(63% 0.20 255 / 0.32);

  /* —— Gold accent (candlestick / glasses detail) —— */
  --gold:    oklch(78% 0.16 75);
  --gold-bg: oklch(78% 0.16 75 / 0.12);
  --gold-line: oklch(78% 0.16 75 / 0.30);

  /* —— Semantic (gain/loss) —— */
  --gain: oklch(72% 0.18 145);
  --loss: oklch(70% 0.20 25);
  --warn: oklch(82% 0.16 85);

  /* —— Type —— */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;

  /* —— Radii / shadow —— */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 16px;
  --r-4: 22px;
  --shadow-1: 0 1px 0 oklch(100% 0 0 / 0.04) inset, 0 8px 24px -12px oklch(0% 0 0 / 0.6);
  --shadow-2: 0 1px 0 oklch(100% 0 0 / 0.06) inset, 0 24px 60px -20px oklch(0% 0 0 / 0.7);

  /* —— Motion —— */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* —— Reset / base —— */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--acc); color: oklch(15% 0.012 240); }

/* —— Type scale —— */
.t-display {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink-0);
}
.t-h1 {
  font-size: clamp(28px, 3.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--ink-0);
}
.t-h2 {
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--ink-0);
}
.t-h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--ink-0);
}
.t-body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-1);
}
.t-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.t-mono-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.t-mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}
.t-serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* —— Layout primitives —— */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

.hairline { height: 1px; background: var(--line); width: 100%; }
.hairline-strong { height: 1px; background: var(--line-strong); width: 100%; }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--acc);
  color: oklch(98% 0.005 240);
}
.btn-primary:hover {
  background: var(--acc-hi);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px oklch(63% 0.20 255 / 0.4);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink-0);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--ink-3);
}
.btn-quiet {
  color: var(--ink-1);
  padding: 10px 14px;
}
.btn-quiet:hover { color: var(--ink-0); }

/* —— Pill / chip —— */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acc);
  animation: pulse 1.8s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 oklch(63% 0.20 255 / 0.5); }
  70%  { box-shadow: 0 0 0 8px oklch(63% 0.20 255 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(63% 0.20 255 / 0); }
}

/* —— Cards —— */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

/* —— Grid bg pattern —— */
.grid-bg {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
}

/* —— Sections —— */
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* —— Font variants (toggled via data-font on <html>) —— */
[data-font="sans"] .t-display,
[data-font="sans"] .t-serif-italic {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.03em;
}
[data-font="playfair"] .t-display {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
}
[data-font="playfair"] .t-serif-italic {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-style: italic;
}

/* —— Numeric / table —— */
.num-pos { color: var(--gain); }
.num-neg { color: var(--loss); }

/* Utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; } .gap-12 { gap: 48px; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
