/* ============================================================
   AdsOvercharge — Design System Foundation
   Custom Properties, Reset, Typography, Layout
   ============================================================ */

/* -------------------------------------------------------
   0. Custom Properties
   ------------------------------------------------------- */
:root {
  /* Primary palette — Deep Midnight Navy */
  --color-primary:       #1E3A5F;
  --color-primary-light: #2B5EA7;
  --color-primary-dark:  #0B1628;
  --color-primary-rgb:   30, 58, 95;

  /* Accent palette — Electric Royal Blue */
  --color-accent:        #4A90E2;
  --color-accent-hover:  #357ABD;
  --color-accent-light:  rgba(74, 144, 226, 0.12);
  --color-accent-rgb:    74, 144, 226;

  /* Surface palette — cool tones */
  --color-bg:            #F7F9FC;
  --color-bg-white:      #FFFFFF;
  --color-surface-warm:  #FDF8F3;
  --color-surface-cool:  #EDF2FA;

  /* Text palette */
  --color-text:          #111827;
  --color-text-muted:    #475569;
  --color-text-light:    #94A3B8;
  --color-border:        #E2E8F0;
  --color-border-light:  #F1F5F9;

  /* Shadows — layered for realism */
  --shadow-xs:   0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md:   0 4px 16px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.07), 0 4px 12px rgba(0,0,0,.03);
  --shadow-xl:   0 24px 60px rgba(0,0,0,.09), 0 8px 20px rgba(0,0,0,.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02);
  --shadow-card-hover: 0 20px 50px rgba(30,58,95,.08), 0 8px 16px rgba(0,0,0,.04);

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;

  --font-size-xs:    0.75rem;
  --font-size-sm:    0.875rem;
  --font-size-base:  1rem;
  --font-size-lg:    1.125rem;
  --font-size-xl:    1.25rem;

  --lh-body:    1.7;
  --lh-heading: 1.12;

  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;
  --fw-extra:   800;

  /* Spacing scale */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out:    cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast:   180ms;
  --t-base:   300ms;
  --t-slow:   500ms;

  /* Layout */
  --container-max: 1240px;
  --header-height: 80px;
}


/* -------------------------------------------------------
   1. Reset & Base
   ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
fieldset { border: none; }
::selection { background: rgba(var(--color-accent-rgb), .2); color: var(--color-primary-dark); }


/* -------------------------------------------------------
   2. Typography
   ------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  color: var(--color-text);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.75rem, 6vw, 4.25rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.375rem, 3vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); font-weight: var(--fw-semi); }

p { margin-bottom: var(--space-md); color: var(--color-text-muted); }
p:last-child { margin-bottom: 0; }

.lead { font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.65; color: var(--color-text-muted); }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-white { color: #fff; }
.text-center { text-align: center; }
strong, b { font-weight: var(--fw-semi); }

/* Section label with accent line */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}
.section-label::before {
  display: none;
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* -------------------------------------------------------
   3. Layout
   ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section { padding: var(--space-5xl) 0; }
.section-sm { padding: var(--space-4xl) 0; }

.grid { display: grid; gap: var(--space-xl); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.mx-auto { margin: 0 auto; }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
