/* ========================================
   TYPOGRAPHY SYSTEM & FONT VARIABLES
======================================== */

/* CSS Custom Properties for Font Families */
:root {
  /* Font Family Variables */
  --font-family-headings: "Cormorant Garamond", Georgia, serif;
  --font-family-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Font Weight Variables */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Font Size Variables */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  --font-size-7xl: 4.5rem;    /* 72px */
  
  /* Line Height Variables */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* Letter Spacing Variables */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;
}

/* ========================================
   BASE TYPOGRAPHY STYLES
======================================== */

/* Body and Base Text */
body {
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: #FFFFFF;
  background-color: #000000;
  font-size: var(--font-size-base);
}

/* Paragraph Styles */
p {
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  margin-bottom: 1rem;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-headings);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 1rem;
  color: #FFFFFF;
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-light);
}

h2 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-light);
}

h3 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-normal);
}

h4 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-normal);
}

h5 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
}

h6 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

/* ========================================
   UTILITY CLASSES FOR TYPOGRAPHY
======================================== */

/* Font Family Utilities */
.font-headings {
  font-family: var(--font-family-headings);
}

.font-body {
  font-family: var(--font-family-body);
}

/* Font Weight Utilities */
.font-light {
  font-weight: var(--font-weight-light);
}

.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* Text Size Utilities */
.text-xs {
  font-size: var(--font-size-xs);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-base {
  font-size: var(--font-size-base);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.text-xl {
  font-size: var(--font-size-xl);
}

.text-2xl {
  font-size: var(--font-size-2xl);
}

.text-3xl {
  font-size: var(--font-size-3xl);
}

.text-4xl {
  font-size: var(--font-size-4xl);
}

.text-5xl {
  font-size: var(--font-size-5xl);
}

/* ========================================
   RESPONSIVE TYPOGRAPHY
======================================== */

/* Tablet Adjustments */
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.5rem;    /* 40px */
    --font-size-4xl: 2rem;      /* 32px */
    --font-size-3xl: 1.75rem;   /* 28px */
  }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  :root {
    --font-size-5xl: 2rem;      /* 32px */
    --font-size-4xl: 1.75rem;   /* 28px */
    --font-size-3xl: 1.5rem;    /* 24px */
  }
  
  body {
    font-size: 0.9rem; /* Slightly smaller base font on mobile */
  }
}

/* Small Mobile Adjustments */
@media (max-width: 320px) {
  :root {
    --font-size-5xl: 1.75rem;   /* 28px */
    --font-size-4xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.25rem;   /* 20px */
  }
}

/* ========================================
   PRINT TYPOGRAPHY
======================================== */
@media print {
  body {
    font-family: var(--font-family-body);
    color: black;
    background: white;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    color: black;
    page-break-after: avoid;
  }
  
  p {
    orphans: 3;
    widows: 3;
  }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
======================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    color: #FFFFFF;
    background-color: #000000;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #FFFFFF;
  }
}
