/* =================================
   PROJECT-WIDE FONT DEFINITIONS
   ================================= */

/* Miki Font Family - Primary UI Font */
@font-face {
    font-family: 'Miki';
    src: url("../fonts/kontrapunkt-miki-cufonfonts/KontrapunktMikiRegular.2921f3ee607c.otf") format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Miki';
    src: url("../fonts/kontrapunkt-miki-cufonfonts/KontrapunktMikiBold.d3f92fee18eb.otf") format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Miki';
    src: url("../fonts/kontrapunkt-miki-cufonfonts/KontrapunktMikiExtraBold.082ef2ab31d7.otf") format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* =================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ================================= */

:root {
    /* Font Families */
    --font-primary: 'Miki', Arial, sans-serif;
    
    /* Font Weights - matching actual font files */
    --font-weight-normal: 400;
    --font-weight-bold: 700;
    --font-weight-extra-bold: 800;
    
    /* Font Sizes */
    --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 */
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
}

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

html {
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: #191919;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin: 0 0 1rem 0;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

/* Text elements */
p {
    margin: 0 0 1rem 0;
    line-height: var(--line-height-normal);
}

/* Links */
a {
    color: #4A90E2;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #357ABD;
    text-decoration: underline;
}

/* Form elements */
input, textarea, select, button {
    font-family: var(--font-primary);
    font-size: inherit;
}

/* Code elements - using system monospace since we don't have a mono font */
code, pre, kbd, samp {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* =================================
   UTILITY CLASSES
   ================================= */

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

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

/* Font 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); }

/* Line Height Utilities */
.leading-tight { line-height: var(--line-height-tight); }
.leading-normal { line-height: var(--line-height-normal); }
.leading-relaxed { line-height: var(--line-height-relaxed); }

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

/* Font loading fallback styles */
.font-loading * {
    font-family: Arial, sans-serif !important;
}

.fonts-loaded *,
.fonts-timeout * {
    font-family: var(--font-primary) !important;
}
