/* ==========================================================================
   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-primary);
  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 – Zacks family greens + gold accent */
  --color-primary: #124734;        /* green/700 — deep green from Zacks wordmark */
  --color-primary-dark: #011F17;   /* green/950 — near-black green */
  --color-primary-light: #156044;  /* green/600 */
  --color-accent: #E8C97A;         /* gold/300 — premium gold accent */
  --color-accent-dark: #D9AE4E;    /* gold/400 */
  --color-accent-light: #F6DC98;   /* gold/200 */
  --color-success: #1B7B58;        /* green/500 */

  /* Neutrals — warm cream & gray palette */
  --color-bg: #EAE5DB;             /* cream/300 — warm page background */
  --color-bg-alt: #F2EDE6;         /* cream/200 — subtle section variation */
  --color-bg-dark: #011F17;        /* green/950 — dark sections */
  --color-surface: #FFFFFF;        /* cards, panels, modals */
  --color-surface-raised: #FDFCFA; /* cream/50 — elevated surfaces */
  --color-text: #252220;           /* neutral/800 — warm dark */
  --color-text-light: #FFFFFF;
  --color-muted: #807C73;          /* neutral/500 — warm gray */
  --color-border: #D2CEC6;         /* neutral/300 — warm border */

  /* Typography */
  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", Calibri, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", 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;     /* card/sm, button/md */
  --radius-md: 12px;    /* card/md, card/panel */
  --radius-lg: 16px;    /* card/lg, overlay/modal */
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

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

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

/* --- Typography --- */
h1, h2 {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  line-height: 1.20;
  color: var(--color-text);
}

h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.025em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.02em; color: var(--color-primary); }
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); }
.text-accent { color: var(--color-primary); font-weight: var(--weight-semibold); }

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--color-muted);
  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);
  position: relative;
}

/* Subtle ambient gradient — premium depth on cream sections */
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(18, 71, 52, 0.025) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 30%, rgba(232, 201, 122, 0.03) 0%, transparent 50%);
}

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

.section--alt::before {
  background:
    radial-gradient(ellipse at 80% 60%, rgba(18, 71, 52, 0.03) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 30%, rgba(232, 201, 122, 0.03) 0%, transparent 50%);
}

.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);
}

/* Gold hairline divider between sections */
.section + .section::after,
.section + .cta-band::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(60%, 560px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(232, 201, 122, 0.25) 30%,
    rgba(232, 201, 122, 0.4) 50%,
    rgba(232, 201, 122, 0.25) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.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); }
}
