/* ==========================================================================
   base.css — Reset, Design Tokens, Typography, Layout Primitives
   ========================================================================== */

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--color-primary-dark);
}

ul,
ol {
  list-style: none;
}

/* --- Design Tokens --- */
:root {
  /* Brand Colors – derived from Zacks Data logo greens */
  --color-primary: #124734;        /* deep green from wordmark */
  --color-primary-dark: #0d3527;
  --color-primary-light: #1a5e46;
  --color-accent: #399909;         /* bright green "DATA" */
  --color-accent-dark: #2d7a07;
  --color-accent-light: #4db812;
  --color-success: #15803d;

  /* Neutrals */
  --color-bg: #ffffff;
  --color-bg-alt: #f7faf8;
  --color-bg-dark: #0f2a20;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-light: #ffffff;
  --color-muted: #5a6872;
  --color-border: #dce5e0;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Borders & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.025em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.02em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
}

.text-muted { color: var(--color-muted); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }

.eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

/* --- Layout Primitives --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--space-24);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-text-light);
}

.section__header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

.section__header .eyebrow {
  margin-bottom: var(--space-4);
}

.section__header p {
  font-size: var(--text-lg);
  color: var(--color-muted);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }

  .section {
    padding-block: var(--space-16);
  }

  .container {
    padding-inline: var(--space-4);
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}
