/* MyBenefit Font Declarations */
/* System font stack - no external font dependencies */

/* Font Face Declarations for System Fonts */

/* Segoe UI - Windows/Modern Systems */
@font-face {
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 400;
  src: local('Segoe UI'), local('SegoeUI'), sans-serif;
  font-display: swap;
}

@font-face {
  font-family: 'Segoe UI';
  font-style: italic;
  font-weight: 400;
  src: local('Segoe UI Italic'), local('SegoeUI-Italic'), sans-serif;
  font-display: swap;
}

@font-face {
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 600;
  src: local('Segoe UI Semibold'), local('SegoeUI-Semibold'), sans-serif;
  font-display: swap;
}

@font-face {
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 700;
  src: local('Segoe UI Bold'), local('SegoeUI-Bold'), sans-serif;
  font-display: swap;
}

/* San Francisco - macOS/iOS */
@font-face {
  font-family: '-apple-system';
  font-style: normal;
  font-weight: 400;
  src: local('-apple-system'), local('BlinkMacSystemFont'), sans-serif;
  font-display: swap;
}

/* System Font Stack Fallback */
@font-face {
  font-family: 'system-ui';
  font-style: normal;
  font-weight: 400;
  src: local('system-ui'), local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI'), local('Roboto'), sans-serif;
  font-display: swap;
}

/* Heading Font Stack */
:root {
  --mybenefit-heading-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Roboto, sans-serif;
}

/* Default Font Stack for Body */
:root {
  --mybenefit-body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Roboto, 'Noto Sans', Arial, sans-serif;
}

/* Monospace Font Stack for Code */
:root {
  --mybenefit-mono-font: 'Monaco', 'Courier New', 'Courier', monospace;
}

/* Font Classes for Specific Use Cases */

/* Headings - System fonts with optimal rendering */
h1, h2, h3, h4, h5, h6,
.heading-1, .heading-2, .heading-3, .heading-4, .heading-5, .heading-6 {
  font-family: var(--mybenefit-heading-font);
  font-weight: 700;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body Text - Clear, readable system fonts */
body, p, 
.body-text, .text-body {
  font-family: var(--mybenefit-body-font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Small Text */
small, .small,
.text-small,
.caption {
  font-family: var(--mybenefit-body-font);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
}

/* Code and Technical Text */
code, pre, kbd, samp,
.code, .monospace {
  font-family: var(--mybenefit-mono-font);
  font-size: 0.9em;
}

/* Light Font Weight */
.font-light,
.text-light {
  font-weight: 300;
}

/* Normal Font Weight (Default) */
.font-normal,
.text-normal {
  font-weight: 400;
}

/* Medium Font Weight */
.font-medium,
.text-medium {
  font-weight: 500;
}

/* Semibold Font Weight */
.font-semibold,
.text-semibold {
  font-weight: 600;
}

/* Bold Font Weight */
.font-bold,
.text-bold,
strong, b {
  font-weight: 700;
}

/* Extra Bold Font Weight */
.font-extrabold,
.text-extrabold {
  font-weight: 800;
}

/* Black Font Weight */
.font-black,
.text-black {
  font-weight: 900;
}

/* Text Rendering Classes */
.text-smooth {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text-sharp {
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

/* Font Size Scale */
.text-xs {
  font-size: 0.75rem;
  line-height: 1;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

/* Line Height Utilities */
.leading-tight {
  line-height: 1.25;
}

.leading-snug {
  line-height: 1.375;
}

.leading-normal {
  line-height: 1.5;
}

.leading-relaxed {
  line-height: 1.625;
}

.leading-loose {
  line-height: 2;
}

/* Letter Spacing Utilities */
.tracking-tighter {
  letter-spacing: -0.05em;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.tracking-normal {
  letter-spacing: 0;
}

.tracking-wide {
  letter-spacing: 0.025em;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.tracking-widest {
  letter-spacing: 0.1em;
}

/* Text Transform Utilities */
.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.normal-case {
  text-transform: none;
}

/* Text Decoration Utilities */
.underline {
  text-decoration: underline;
}

.line-through {
  text-decoration: line-through;
}

.no-underline {
  text-decoration: none;
}

/* Whitespace Utilities */
.whitespace-normal {
  white-space: normal;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.whitespace-pre {
  white-space: pre;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.whitespace-pre-line {
  white-space: pre-line;
}

/* Word Break Utilities */
.break-normal {
  overflow-wrap: normal;
  word-break: normal;
}

.break-words {
  overflow-wrap: break-word;
}

.break-all {
  word-break: break-all;
}

/* Responsive Font Sizes */
@media (max-width: 768px) {
  :root {
    --mybenefit-heading-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mybenefit-body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  }
  
  .text-4xl {
    font-size: 1.875rem;
  }
  
  .text-3xl {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .text-5xl {
    font-size: 1.875rem;
  }
  
  .text-4xl {
    font-size: 1.5rem;
  }
  
  .text-3xl {
    font-size: 1.25rem;
  }
}

/* Print Styles */
@media print {
  body {
    font-family: Georgia, serif;
    font-size: 12pt;
    line-height: 1.6;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  p {
    orphans: 3;
    widows: 3;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
  :root {
    --mybenefit-heading-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    font-feature-settings: "kern" 1;
  }
  
  code {
    font-family: 'Monaco', 'Courier New', monospace;
  }
}

/* Font Feature Settings for Optimized Rendering */
h1, h2, h3, h4, h5, h6,
body, p {
  font-feature-settings: "kern" 1;
  font-kerning: auto;
}

/* OpenType Features for Better Typography */
.font-features-normal {
  font-feature-settings: "kern" 1;
}

.font-features-off {
  font-feature-settings: "kern" 0;
}

.font-variant-numeric {
  font-variant-numeric: tabular-nums;
}

.font-variant-caps {
  font-variant-caps: small-caps;
}
