/* ============================================================
   BLUEPRINT ADVISORY — DESIGN SYSTEM
   style.css — Tokens, Reset, Typography, Layout, Utilities
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --color-navy:        #0D1B3E;
  --color-navy-mid:    #162347;
  --color-navy-light:  #1E2F5E;
  --color-slate:       #3C5078;
  --color-slate-light: #5A709A;
  --color-gold:        #C8A96A;
  --color-gold-light:  #D9BE8A;
  --color-gold-muted:  #E8D5A8;
  --color-off-white:   #F9F9F7;
  --color-white:       #FFFFFF;
  --color-charcoal:    #2C2C2C;
  --color-gray-dark:   #444444;
  --color-gray-mid:    #6B6B6B;
  --color-gray-light:  #A8A8A8;
  --color-gray-pale:   #E8E8E4;
  --color-divider:     #D8D5CC;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, sans-serif;

  /* Font sizes (fluid scale) */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md:   1.125rem;   /* 18px */
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  1.875rem;   /* 30px */
  --text-3xl:  2.25rem;    /* 36px */
  --text-4xl:  3rem;       /* 48px */
  --text-5xl:  3.75rem;    /* 60px */
  --text-6xl:  4.5rem;     /* 72px */

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --container-max:   1200px;
  --container-prose: 720px;
  --container-wide:  1400px;

  /* Borders */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(13,27,62,0.08), 0 1px 2px rgba(13,27,62,0.06);
  --shadow-md:  0 4px 12px rgba(13,27,62,0.10), 0 2px 4px rgba(13,27,62,0.06);
  --shadow-lg:  0 16px 40px rgba(13,27,62,0.14), 0 4px 8px rgba(13,27,62,0.06);
  --shadow-xl:  0 32px 64px rgba(13,27,62,0.18);

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

  /* Z-index scale */
  --z-nav:     100;
  --z-modal:   200;
  --z-tooltip: 300;
}

/* ── 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-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl),  2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p { line-height: 1.75; }

.text-display {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-lead {
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-gray-dark);
}

.text-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.text-caption {
  font-size: var(--text-sm);
  color: var(--color-gray-mid);
}

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

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

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

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

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

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ── Flex Utilities ── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* ── Spacing Utilities ── */
.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section--sm {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section--lg {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* ── Text Alignment ── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ── Color Utilities ── */
.text-navy   { color: var(--color-navy); }
.text-slate  { color: var(--color-slate); }
.text-gold   { color: var(--color-gold); }
.text-white  { color: var(--color-white); }
.text-gray   { color: var(--color-gray-mid); }

.bg-navy      { background-color: var(--color-navy); }
.bg-navy-mid  { background-color: var(--color-navy-mid); }
.bg-off-white { background-color: var(--color-off-white); }
.bg-white     { background-color: var(--color-white); }
.bg-gold      { background-color: var(--color-gold); }
.bg-slate     { background-color: var(--color-slate); }

/* ── Section Backgrounds ── */
.section-dark {
  background-color: var(--color-navy);
  color: var(--color-off-white);
}

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

.section-dark p,
.section-dark .text-lead {
  color: rgba(255,255,255,0.80);
}

.section-mid {
  background-color: var(--color-navy-mid);
  color: var(--color-off-white);
}

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

.section-pale {
  background-color: var(--color-gray-pale);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background-color: var(--color-divider);
  border: none;
}

.divider--gold {
  height: 2px;
  width: 48px;
  background-color: var(--color-gold);
  border: none;
}

/* ── Section Header ── */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header .text-label {
  display: block;
  margin-bottom: var(--space-3);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--color-gray-dark);
  max-width: 600px;
}

.section-dark .section-header p,
.section-mid .section-header p {
  color: rgba(255, 255, 255, 0.85);
}

.section-header.text-center p {
  margin-left: auto;
  margin-right: auto;
}

/* ── Prose (Article) ── */
.prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.prose h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.prose p {
  margin-bottom: var(--space-6);
  color: var(--color-gray-dark);
}

.prose ul, .prose ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: var(--space-2);
  color: var(--color-gray-dark);
}

.prose strong {
  color: var(--color-charcoal);
  font-weight: 600;
}

.prose blockquote {
  border-left: 3px solid var(--color-gold);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  background: rgba(200,169,106,0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.prose blockquote p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-navy);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --space-24: 4rem;
    --space-32: 5rem;
    --space-20: 3.5rem;
  }

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

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

@media (max-width: 480px) {
  :root {
    --space-24: 3rem;
    --space-16: 2.5rem;
  }
}
