/* ============================================
   BASE - Proctor IQ
   Reset · Variables · Typography · Utilities
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

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

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---- Design Tokens ---- */
:root {
  /* Backgrounds */
  --bg-base:     #080b14;
  --bg-surface:  #0d1117;
  --bg-elevated: #111827;

  /* Glass */
  --glass-bg:           rgba(255, 255, 255, 0.03);
  --glass-bg-hover:     rgba(255, 255, 255, 0.06);
  --glass-border:       rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(255, 255, 255, 0.14);

  /* Brand */
  --primary:       #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark:  #2563eb;
  --primary-glow:  rgba(59, 130, 246, 0.18);

  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-glow:  rgba(99, 102, 241, 0.18);

  --success: #10b981;
  --error:   #ef4444;

  /* Text */
  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing (4pt grid) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Radius */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:          0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:          0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg:          0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow-blue:   0 0 32px rgba(59,130,246,0.22);
  --shadow-glow-indigo: 0 0 32px rgba(99,102,241,0.22);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;

  /* Layout */
  --container-max:    1200px;
  --container-narrow: 800px;
  --nav-height:       72px;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem,    5vw,  3.75rem); }
h2 { font-size: clamp(1.5rem,  3.5vw, 2.5rem); }
h3 { font-size: clamp(1.125rem,2vw,  1.5rem);  }
h4 { font-size: 1.125rem; }

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

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

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

/* ---- Section ---- */
.section { padding-block: var(--sp-24); }
.section--sm { padding-block: var(--sp-16); }
.section--lg { padding-block: var(--sp-32); }

.section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-3);
}

.section__header {
  margin-bottom: var(--sp-16);
}

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

.section__title { margin-bottom: var(--sp-4); }

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Utilities ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal--d1 { transition-delay: 80ms;  }
.reveal--d2 { transition-delay: 160ms; }
.reveal--d3 { transition-delay: 240ms; }
.reveal--d4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
