/* ============================================
   BASE.CSS — Reset, Variables, Typography
   ============================================ */

/* CSS Custom Properties */
:root {
  /* Text on light backgrounds */
  --text-primary: #1a202c;
  --text-body: #2d3748;
  --text-secondary: #4a5568;

  /* Text on dark backgrounds */
  --text-on-dark: #ffffff;
  --text-on-dark-secondary: #e2e8f0;

  /* Brand colors */
  --brand: #1e5fa8;
  --brand-dark: #164785;
  --brand-light: #2b7bd4;
  --accent: #e8a838;
  --accent-dark: #d4952e;
  --accent-light: #f0be5e;

  /* Backgrounds */
  --bg-dark: #0f1923;
  --bg-dark-light: #1a2a3a;
  --bg-white: #ffffff;
  --bg-off-white: #f7f8fa;
  --bg-light-gray: #eef0f4;

  /* Borders & Shadows */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08);

  /* Spacing */
  --section-padding: 80px;
  --section-padding-mobile: 50px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

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

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #1e5fa8 0%, #2b7bd4 100%);
  --gradient-hero: linear-gradient(135deg, #0f1923 0%, #1a3a5c 50%, #0f1923 100%);
  --gradient-accent: linear-gradient(135deg, #e8a838 0%, #f0be5e 100%);
  --gradient-card-hover: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);

  /* Brand tints */
  --brand-tint-5: #f0f5fb;
  --brand-tint-10: #e1ecf7;
  --brand-tint-20: #c3d9ef;

  /* Icon backgrounds */
  --icon-bg: #eef4fb;
  --icon-bg-hover: #dceaf7;
}

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

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

body {
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-dark);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin-bottom: 1em;
  font-size: 1rem;
  line-height: 1.75;
}

p:last-child {
  margin-bottom: 0;
}

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

/* Section Title Patterns */
.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

.section-subtitle.centered {
  margin-left: auto;
  margin-right: auto;
}

.text-center {
  text-align: center;
}

/* Dark section text overrides */
.bg-dark,
.hero,
.page-hero,
.contact-box,
.mid-cta,
.cta-banner,
.testimonials-section,
footer,
.stats-bar {
  color: var(--text-on-dark);
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.hero h1, .hero h2, .hero h3,
.page-hero h1, .page-hero h2, .page-hero h3,
.contact-box h1, .contact-box h2, .contact-box h3,
.mid-cta h1, .mid-cta h2, .mid-cta h3,
.cta-banner h1, .cta-banner h2, .cta-banner h3,
.testimonials-section h1, .testimonials-section h2, .testimonials-section h3,
footer h1, footer h2, footer h3, footer h4,
.stats-bar h1, .stats-bar h2, .stats-bar h3 {
  color: var(--text-on-dark);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.bg-dark p, .bg-dark li, .bg-dark span, .bg-dark a,
.hero p, .hero li, .hero span,
.page-hero p, .page-hero li, .page-hero span,
.contact-box p, .contact-box li, .contact-box span, .contact-box a,
.mid-cta p, .mid-cta li, .mid-cta span,
.cta-banner p, .cta-banner li, .cta-banner span,
.testimonials-section p, .testimonials-section li, .testimonials-section span,
footer p, footer li, footer span, footer a,
.stats-bar p, .stats-bar li, .stats-bar span {
  color: var(--text-on-dark-secondary);
}

.bg-dark a:hover, .contact-box a:hover, footer a:hover {
  color: var(--text-on-dark);
}

/* Fade-up animation */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-up:nth-child(2) { transition-delay: 0.04s; }
.fade-up:nth-child(3) { transition-delay: 0.08s; }
.fade-up:nth-child(4) { transition-delay: 0.12s; }
.fade-up:nth-child(5) { transition-delay: 0.16s; }
.fade-up:nth-child(6) { transition-delay: 0.2s; }
.fade-up:nth-child(7) { transition-delay: 0.24s; }
.fade-up:nth-child(8) { transition-delay: 0.28s; }
.fade-up:nth-child(9) { transition-delay: 0.32s; }
.fade-up:nth-child(10) { transition-delay: 0.36s; }
.fade-up:nth-child(11) { transition-delay: 0.4s; }

/* Selection */
::selection {
  background: var(--brand);
  color: var(--text-on-dark);
}
