/* ============================================================
   Base — Zacks Connect AI
   Minimal resets + element defaults wired to the tokens so the
   system renders correctly the moment styles.css is linked.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Headings ------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--text-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---- Links ---------------------------------------------- */
a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}
a:hover { color: var(--zk-ai-spark); }

/* ---- Financial figures ---------------------------------- */
.figure, .mono, code, kbd, samp {
  font-family: var(--font-mono);
  font-feature-settings: var(--figure-features);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---- Focus-visible: brand green ring --------------------- */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}

/* ---- Selection ------------------------------------------ */
::selection {
  background: var(--zk-spark-a16);
  color: var(--text);
}

/* ---- Custom scrollbar (dark) ---------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

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

/* ---- Utility: orbital ambient glow ---------------------- */
.zk-glow-hero { background-image: var(--glow-hero); }
.zk-texture-grid {
  background-image: var(--texture-grid);
  background-size: var(--texture-grid-size);
}
