/* ============================================================
   DRIVESMART ACADEMY — DESIGN SYSTEM
   Premium light theme | Blue + Yellow | Apple/Tesla clarity
   Web4Budget Demo
   ============================================================ */

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

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Primary — Trust Blue */
  --color-primary:        #1A56DB;
  --color-primary-light:  #3B82F6;
  --color-primary-dark:   #1E40AF;
  --color-primary-rgb:    26, 86, 219;

  /* Accent — Energy Yellow */
  --color-accent:         #F59E0B;
  --color-accent-light:   #FCD34D;
  --color-accent-dark:    #D97706;
  --color-accent-rgb:     245, 158, 11;

  /* Backgrounds */
  --color-white:          #FFFFFF;
  --color-off-white:      #F8F9FC;
  --color-light:          #F1F4F9;
  --color-light-blue:     #EFF6FF;
  --color-border:         #E2E8F0;
  --color-border-light:   #F1F5F9;

  /* Text */
  --color-text:           #0F172A;
  --color-text-mid:       #334155;
  --color-text-light:     #64748B;
  --color-text-muted:     #94A3B8;

  /* States */
  --color-success:        #059669;
  --color-success-bg:     #ECFDF5;
  --color-error:          #DC2626;
  --color-error-bg:       #FEF2F2;
  --color-warning:        #D97706;
  --color-warning-bg:     #FFFBEB;

  /* Web4Budget brand */
  --color-w4b:            #E63329;

  /* Typography */
  --font-family:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:    clamp(0.70rem, 0.68rem + 0.10vw, 0.80rem);
  --text-sm:    clamp(0.80rem, 0.78rem + 0.10vw, 0.90rem);
  --text-base:  clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --text-lg:    clamp(1.10rem, 1.05rem + 0.25vw, 1.30rem);
  --text-xl:    clamp(1.30rem, 1.20rem + 0.50vw, 1.75rem);
  --text-2xl:   clamp(1.75rem, 1.50rem + 1.25vw, 2.75rem);
  --text-3xl:   clamp(2.25rem, 1.80rem + 2.25vw, 3.75rem);
  --text-4xl:   clamp(2.75rem, 2.00rem + 3.75vw, 5.00rem);

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extrabold:800;
  --weight-black:    900;

  --leading-tight:   1.15;
  --leading-snug:    1.35;
  --leading-normal:  1.60;
  --leading-relaxed: 1.80;

  /* Spacing */
  --space-xs:   0.25rem;
  --space-sm:   0.50rem;
  --space-md:   0.75rem;
  --space-base: 1.00rem;
  --space-lg:   1.50rem;
  --space-xl:   2.00rem;
  --space-2xl:  3.00rem;
  --space-3xl:  4.00rem;
  --space-4xl:  6.00rem;
  --space-5xl:  8.00rem;

  /* Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(15,23,42,0.05);
  --shadow-sm:  0 2px 8px rgba(15,23,42,0.08);
  --shadow-md:  0 4px 16px rgba(15,23,42,0.10);
  --shadow-lg:  0 8px 32px rgba(15,23,42,0.12);
  --shadow-xl:  0 16px 48px rgba(15,23,42,0.15);
  --shadow-blue: 0 8px 32px rgba(26,86,219,0.20);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 350ms cubic-bezier(0.34,1.56,0.64,1);

  /* Layout */
  --container-max:  1200px;
  --container-wide: 1400px;
  --nav-height:     72px;
}

/* ── CSS Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }
h1,h2,h3,h4,h5,h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

/* ── Typography Utilities ─────────────────────────────────── */
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }

.font-light    { font-weight: var(--weight-light); }
.font-regular  { font-weight: var(--weight-regular); }
.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }
.font-black    { font-weight: var(--weight-black); }

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-muted   { color: var(--color-text-light); }
.text-primary { color: var(--color-primary); }
.text-accent  { color: var(--color-accent); }
.text-white   { color: var(--color-white); }

/* ── Section Variants ─────────────────────────────────────── */
.section { padding: var(--space-5xl) 0; }
.section--sm { padding: var(--space-3xl) 0; }
.section--lg { padding: clamp(5rem, 10vw, 9rem) 0; }

.section--white    { background: var(--color-white); }
.section--off-white { background: var(--color-off-white); }
.section--light    { background: var(--color-light); }
.section--light-blue { background: var(--color-light-blue); }
.section--blue     { background: var(--color-primary); color: var(--color-white); }
.section--dark     { background: var(--color-text); color: var(--color-white); }

.section--blue h1,
.section--blue h2,
.section--blue h3,
.section--blue p,
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--color-white); }

/* ── Section Header ───────────────────────────────────────── */
.section-header { text-align: center; max-width: 680px; margin: 0 auto var(--space-3xl); }
.section-header h2 { font-size: var(--text-2xl); font-weight: var(--weight-extrabold); margin-bottom: var(--space-base); }
.section-header p  { font-size: var(--text-lg); color: var(--color-text-light); line-height: var(--leading-relaxed); }
.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.08);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}
.section--blue .section-label {
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.15);
}
.section-divider {
  width: 48px; height: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  margin: var(--space-lg) auto 0;
}

/* ── Fade-in Animation ────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ── Utility ──────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-xl); }
.container--wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--space-xl); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-base { gap: var(--space-base); }
.gap-lg { gap: var(--space-lg); }
.mt-sm { margin-top: var(--space-sm); }
.mt-base { margin-top: var(--space-base); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-base { margin-bottom: var(--space-base); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
