/**
 * PMERIT Typography System
 * Version: 2.0
 * Last Updated: October 2025
 * 
 * Typography styles using Montserrat (headings) and Inter (body)
 * Based on: .copilot/Pmerit-theme_typography.html
 * 
 * MUST load theme-variables.css and base.css BEFORE this file
 */

/* ========================================
   GOOGLE FONTS IMPORT
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');


/* ========================================
   HEADINGS (Montserrat)
   ======================================== */

h1, .h1 {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);  /* 32px */
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

h2, .h2 {
    font-family: var(--font-primary);
    font-size: var(--text-2xl);  /* 24px */
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

h3, .h3 {
    font-family: var(--font-primary);
    font-size: var(--text-xl);  /* 20px */
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

h4, .h4 {
    font-family: var(--font-primary);
    font-size: var(--text-lg);  /* 18px */
    font-weight: var(--weight-medium);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

h5, .h5 {
    font-family: var(--font-primary);
    font-size: var(--text-base);  /* 16px */
    font-weight: var(--weight-medium);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

h6, .h6 {
    font-family: var(--font-primary);
    font-size: var(--text-sm);  /* 14px */
    font-weight: var(--weight-medium);
    line-height: var(--leading-normal);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ========================================
   BODY TEXT (Inter)
   ======================================== */

p, .body-text {
    font-family: var(--font-secondary);
    font-size: var(--text-base);  /* 16px */
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.body-text-large {
    font-size: var(--text-lg);  /* 18px */
    line-height: var(--leading-relaxed);
}

.body-text-small {
    font-size: var(--text-sm);  /* 14px */
}


/* ========================================
   TEXT STYLES
   ======================================== */

/* Lead text (intro paragraphs) */
.lead {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
}

/* Muted text */
.text-muted {
    color: var(--text-muted);
}

/* Small text */
small, .text-small {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

/* Extra small text */
.text-xs {
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
}

/* Strong emphasis */
strong, .font-bold {
    font-weight: var(--weight-bold);
}

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

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

/* Italic */
em, .italic {
    font-style: italic;
}


/* ========================================
   DISPLAY TEXT (Hero headings)
   ======================================== */

.display-1 {
    font-family: var(--font-primary);
    font-size: var(--text-4xl);  /* 40px */
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

.display-2 {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);  /* 32px */
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

/* Responsive display text */
@media (min-width: 768px) {
    .display-1 {
        font-size: 48px;
    }
    
    .display-2 {
        font-size: 40px;
    }
}


/* ========================================
   LINKS
   ======================================== */

a, .link {
    color: var(--text-link);
    text-decoration: none;
    font-weight: var(--weight-medium);
    transition: color var(--transition-fast);
}

a:hover, .link:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

a:active, .link:active {
    color: var(--text-link-hover);
}

/* Subtle link (looks like normal text until hover) */
.link-subtle {
    color: var(--text-primary);
    text-decoration: none;
}

.link-subtle:hover {
    color: var(--text-link);
    text-decoration: underline;
}


/* ========================================
   LISTS
   ======================================== */

ul.list, ol.list {
    margin-left: var(--space-5);
    margin-bottom: var(--space-4);
}

ul.list {
    list-style-type: disc;
}

ol.list {
    list-style-type: decimal;
}

ul.list li,
ol.list li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-2);
}

/* Unstyled list */
.list-unstyled {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}


/* ========================================
   BLOCKQUOTES
   ======================================== */

blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-4);
    margin-left: 0;
    margin-bottom: var(--space-4);
    font-style: italic;
    color: var(--text-secondary);
}

blockquote p {
    margin-bottom: var(--space-2);
}

blockquote cite {
    display: block;
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-2);
}


/* ========================================
   CODE & PRE
   ======================================== */

code {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875em;
    padding: 2px 6px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--color-accent);
}

pre {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    padding: var(--space-4);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    margin-bottom: var(--space-4);
}

pre code {
    padding: 0;
    background: none;
    border: none;
    color: inherit;
}


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

/* Tablet & Desktop */
@media (min-width: 768px) {
    h1, .h1 {
        font-size: 40px;
    }
    
    h2, .h2 {
        font-size: 28px;
    }
    
    h3, .h3 {
        font-size: 22px;
    }
    
    p, .body-text {
        font-size: var(--text-base);
    }
    
    .lead {
        font-size: var(--text-xl);
    }
}

/* Large Desktop */
@media (min-width: 1024px) {
    h1, .h1 {
        font-size: 48px;
    }
    
    h2, .h2 {
        font-size: 32px;
    }
}


/* ========================================
   GRADIENT TEXT
   ======================================== */

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


/* ========================================
   TEXT UTILITIES
   ======================================== */

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

/* Text transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Text decoration */
.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* Text wrapping */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-wrap {
    white-space: normal;
}

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

/* Line clamping (multiple lines) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


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

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible text (for keyboard navigation) */
.focus-text:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}
