/**
 * Typography System
 * Based on reference design with Helvetica Neue font stack
 * Optimized for readability across all devices
 */

/* Base Typography */
:root {
    /* Font Families */
    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    
    /* Font Sizes - Desktop */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-md: 0.9375rem;    /* 15px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    
    /* Line Heights */
    --leading-tight: 1.2;
    --leading-snug: 1.3;
    --leading-normal: 1.4;
    --leading-relaxed: 1.5;
    --leading-loose: 1.6;
    --leading-extra: 1.7;
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
}

/* Global Base Styles */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-loose);
    color: var(--text, #424242);
}

/* Headings */
h1 {
    font-size: 2.8rem;
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
}

h2 {
    font-size: 2.2rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
}

h3 {
    font-size: 1.4rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

h4 {
    font-size: 1.1rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

/* Paragraph */
p {
    font-size: var(--text-base);
    line-height: var(--leading-loose);
    margin-bottom: 1rem;
}

/* Links */
a {
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Navigation */
.nav-links a {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
}

/* Buttons */
.btn {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
    letter-spacing: 0.5px;
}

/* Section Titles */
.section-title h2 {
    font-size: 2.2rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
}

.section-title p {
    font-size: 0.95rem;
    line-height: var(--leading-loose);
}

/* News Cards */
.news-date {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.news-content h3 {
    font-size: 1.4rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.news-content p {
    font-size: var(--text-base);
    line-height: var(--leading-loose);
}

/* Conference Cards */
.conference-date {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.conference-content h3 {
    font-size: 1.4rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.conference-location {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
}

.conference-content p {
    font-size: var(--text-base);
    line-height: var(--leading-loose);
}

/* Event Items */
.event-day {
    font-size: 1.6rem;
    font-weight: var(--font-bold);
    line-height: 1;
}

.event-month {
    font-size: 0.8rem;
    line-height: var(--leading-tight);
}

.event-details h3 {
    font-size: 1.1rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.event-meta {
    font-size: 0.85rem;
    line-height: var(--leading-relaxed);
}

.event-description {
    font-size: 0.85rem;
    line-height: var(--leading-loose);
}

/* About Section */
.about-content h3 {
    font-size: 1.8rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
}

.about-content p {
    font-size: var(--text-base);
    line-height: var(--leading-extra);
}

.about-feature h4 {
    font-size: 1.1rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.about-feature p {
    font-size: 0.9rem;
    line-height: var(--leading-relaxed);
}

/* Highlights */
.highlight-card h3 {
    font-size: 1.4rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.highlight-card p {
    font-size: 0.95rem;
    line-height: var(--leading-extra);
}

/* Contact Section */
.contact-details h3 {
    font-size: 1.2rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.contact-details p {
    font-size: 0.95rem;
    line-height: var(--leading-extra);
}

/* Footer */
.footer-col h3 {
    font-size: 1.2rem;
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
}

.footer-links a {
    font-size: 0.9rem;
    line-height: var(--leading-relaxed);
}

.copyright {
    font-size: 0.85rem;
    line-height: var(--leading-relaxed);
}

/* Mobile Typography Adjustments */
@media (max-width: 768px) {
    /* Use system fonts on mobile for better performance */
    body {
        font-family: var(--font-system);
        font-size: var(--text-base);
        line-height: var(--leading-loose);
    }
    
    /* Mobile Navigation Menu */
    #mobile-nav-drawer ul li {
        margin-bottom: 12px;
    }
    
    #mobile-nav-drawer ul li a {
        font-size: var(--text-base);
        padding: 10px 12px;
        line-height: var(--leading-normal);
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 22px !important;
        font-weight: var(--font-bold);
        line-height: var(--leading-snug);
    }
    
    .hero p {
        font-size: var(--text-base) !important;
        line-height: var(--leading-loose);
    }
    
    /* Buttons */
    .btn {
        font-size: var(--text-sm);
        line-height: var(--leading-normal);
        letter-spacing: 0.5px;
    }
    
    /* Section Titles */
    .section-title h2 {
        font-size: 20px;
        font-weight: var(--font-semibold);
        line-height: var(--leading-snug);
    }
    
    .section-title p {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    /* Navigation */
    .nav-links a {
        font-size: var(--text-base);
        line-height: var(--leading-normal);
    }
    
    /* News Cards */
    .news-date {
        font-size: var(--text-sm);
        line-height: var(--leading-normal);
    }
    
    .news-content h3 {
        font-size: 17px;
        line-height: var(--leading-normal);
    }
    
    .news-content p {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    /* Conference Cards */
    .conference-date {
        font-size: var(--text-sm);
        line-height: var(--leading-normal);
    }
    
    .conference-content h3 {
        font-size: 17px;
        line-height: var(--leading-normal);
    }
    
    .conference-location {
        font-size: var(--text-md);
        line-height: var(--leading-relaxed);
    }
    
    .conference-content p {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    /* Event Items */
    .event-day {
        font-size: 28px;
        line-height: 1;
    }
    
    .event-month {
        font-size: var(--text-sm);
        line-height: var(--leading-tight);
    }
    
    .event-details h3 {
        font-size: 17px;
        line-height: var(--leading-normal);
    }
    
    .event-meta {
        font-size: var(--text-sm);
        line-height: var(--leading-relaxed);
    }
    
    .event-description {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    /* About Section */
    .about-content h3 {
        font-size: 19px;
        line-height: var(--leading-snug);
    }
    
    .about-content p {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    .about-feature h4 {
        font-size: var(--text-base);
        line-height: var(--leading-normal);
    }
    
    .about-feature p {
        font-size: var(--text-sm);
        line-height: var(--leading-relaxed);
    }
    
    /* Highlights */
    .highlight-card h3 {
        font-size: 17px;
        line-height: var(--leading-normal);
    }
    
    .highlight-card p {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    /* Contact Section */
    .contact-details h3 {
        font-size: 17px;
        line-height: var(--leading-normal);
    }
    
    .contact-details p {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    /* Footer */
    .footer-col h3 {
        font-size: 17px;
        line-height: var(--leading-normal);
    }
    
    .footer-links a {
        font-size: var(--text-md);
        line-height: var(--leading-relaxed);
    }
    
    .footer-col:first-child p {
        font-size: var(--text-md);
        line-height: var(--leading-loose);
    }
    
    .copyright {
        font-size: var(--text-sm);
        line-height: var(--leading-relaxed);
    }
}

/* Small Mobile Devices (≤480px) */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .hero h1 {
        font-size: 20px !important;
    }
    
    .section-title h2 {
        font-size: 19px;
    }
}

/* Utility Classes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-loose { line-height: var(--leading-loose); }
.leading-extra { line-height: var(--leading-extra); }

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