/* ========================================
   ASP Associates — Design System (Light)
   base.css — Tokens, Reset, Typography, Grid
   ======================================== */

/* ---------- Google Fonts ---------- */
/* Loaded via <link> tags in HTML for performance */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors — Background */
  --bg-page: #F0F0F0;
  --bg-surface: #FFFFFF;
  --bg-dark: #0A0A0A;
  --bg-dark-surface: #141414;

  /* Colors — Text */
  --text-primary: #0A0A0A;
  --text-secondary: rgba(0, 0, 0, 0.55);
  --text-muted: rgba(0, 0, 0, 0.25);
  --text-on-dark: #FFFFFF;
  --text-on-dark-secondary: rgba(255, 255, 255, 0.55);
  --text-on-dark-muted: rgba(255, 255, 255, 0.38);

  /* Colors — Accent */
  --accent: #E7473C;
  --accent-hover: #D03D33;
  --accent-subtle: rgba(231, 71, 60, 0.08);
  --accent-border: rgba(231, 71, 60, 0.2);

  /* Colors — Semantic */
  --success: #4ADE80;

  /* Colors — Border */
  --border: rgba(0, 0, 0, 0.07);
  --border-dark: rgba(255, 255, 255, 0.07);

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

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.8125rem;    /* 13px */
  --text-base: 0.9375rem;  /* 15px */
  --text-md: 1rem;         /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.375rem;    /* 22px */
  --text-3xl: 1.5rem;      /* 24px */
  --text-4xl: 2.375rem;    /* 38px */
  --text-5xl: 3.25rem;     /* 52px */
  --text-6xl: 4rem;        /* 64px */

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-base: 16px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-reveal: 0.4s ease;

  /* Layout */
  --container-max: 1200px;
  --nav-height: 64px;
  --section-padding: 96px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ---------- Typography ---------- */
h1 {
  font-size: var(--text-5xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h3 {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h4 {
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

strong {
  font-weight: 700;
  color: var(--text-primary);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C13A30;
  margin-bottom: var(--space-6);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* Eyebrow without red line */
.eyebrow--plain {
  gap: 0;
}

.eyebrow--plain::before {
  display: none;
}

/* Eyebrow on dark background */
.eyebrow--dark {
  color: var(--accent);
}

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

.section {
  padding: var(--section-padding) 0;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Seamless grid (2px gap) */
.grid--seamless {
  gap: 2px;
}

/* ---------- Dark Panel ---------- */
.dark-panel {
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  color: var(--text-on-dark);
  padding: var(--space-16) var(--space-12);
}

.dark-panel h2,
.dark-panel h3,
.dark-panel h4,
.dark-panel strong {
  color: var(--text-on-dark);
}

.dark-panel p {
  color: var(--text-on-dark-secondary);
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: 2rem; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 64px;
    --nav-height: 56px;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: var(--text-md); }
  .container { padding: 0 var(--space-5); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .dark-panel { padding: var(--space-10) var(--space-6); border-radius: var(--radius-base); }
}
