/**
 * Capital Chronicle - Typography System
 * 
 * This file implements the "Hybrid Typographic System" that serves as the
 * core brand identity element for the Capital Chronicle. The system uses
 * a dual-font hierarchy:
 * 
 * - Inter (Sans-Serif): For headlines, UI elements, and data points
 *   Caters to the "Data-Driven Professional" audience segment
 * 
 * - Source Serif Pro (Serif): For article summaries and body copy
 *   Caters to the "Strategic Reader" audience segment
 */

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@400;600&display=swap');

/* Typography Utility Classes - Primary Headlines */

/* Hero H1 - Primary headline for hero sections */
.typography-hero-h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 700; /* Bold */
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--color-text-primary);
}

/* Section Header H2 - Section headings */
.typography-section-h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 600; /* SemiBold */
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--color-text-primary);
}

/* Card Title H3 - Article card headlines */
.typography-card-h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700; /* Bold */
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: var(--color-text-primary);
}

/* Supporting Link H4 - Secondary article links */
.typography-link-h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: normal;
    color: var(--color-text-primary);
}

/* Body Content Typography */

/* Article Summary - Lead paragraphs and article summaries */
.typography-article-summary {
    font-family: 'Source Serif Pro', serif;
    font-weight: 400; /* Regular */
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: normal;
    color: var(--color-text-secondary);
}

/* Author Byline - Article attribution */
.typography-byline {
    font-family: 'Source Serif Pro', serif;
    font-weight: 600; /* SemiBold */
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: normal;
    color: var(--color-text-tertiary);
}

/* Category Tag - Topic/section labels */
.typography-category-tag {
    font-family: 'Inter', sans-serif;
    font-weight: 700; /* Bold */
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    color: var(--color-accent-primary);
    text-transform: uppercase;
}

/* Timestamp - Publication dates */
.typography-timestamp {
    font-family: 'Source Serif Pro', serif;
    font-weight: 400; /* Regular */
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: normal;
    color: var(--color-text-tertiary);
}

/* Responsive Typography Adjustments */
@media screen and (max-width: 768px) {
    .typography-hero-h1 {
        font-size: 36px;
    }
    
    .typography-section-h2 {
        font-size: 28px;
    }
    
    .typography-card-h3 {
        font-size: 20px;
    }
    
    .typography-link-h4 {
        font-size: 16px;
    }
    
    .typography-article-summary {
        font-size: 15px;
    }
}

/* Body Text Variants */
.typography-body-text {
    font-family: 'Source Serif Pro', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
}

.typography-body-text-small {
    font-family: 'Source Serif Pro', serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

/* UI Text Variants */
.typography-ui-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.typography-ui-text-small {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

/* Ensuring that heading elements using typography classes maintain appropriate margins */
h1.typography-hero-h1,
h2.typography-section-h2,
h3.typography-card-h3,
h4.typography-link-h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
}

/* Paragraph elements using typography classes */
p.typography-article-summary,
p.typography-body-text,
p.typography-body-text-small {
    margin-top: 0;
    margin-bottom: 1em;
}

/* Last elements in a container should not have bottom margin */
*:last-child > p.typography-article-summary,
*:last-child > p.typography-body-text,
*:last-child > p.typography-body-text-small {
    margin-bottom: 0;
}

/* Additional Utility Classes for HTML Elements */

h1, .h1 {
    font-family: var(--font-family-headline);
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-h1);
    letter-spacing: var(--letter-spacing-h1);
    margin-top: 0;
    margin-bottom: 0.5em;
}

h2, .h2 {
    font-family: var(--font-family-headline);
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-h2);
    letter-spacing: var(--letter-spacing-h2);
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h3, .h3 {
    font-family: var(--font-family-headline);
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-h3);
    letter-spacing: var(--letter-spacing-h3);
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h4, .h4 {
    font-family: var(--font-family-headline);
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-h4);
    letter-spacing: var(--letter-spacing-h4);
    margin-top: 1em;
    margin-bottom: 0.5em;
}

p {
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-body);
    margin-top: 0;
    margin-bottom: 1em;
}

/* Font imports would typically go here, or in a separate file */
/* Example:
@font-face {
    font-family: 'Neue Haas Grotesk';
    src: url('../fonts/neue-haas-grotesk-regular.woff2') format('woff2'),
         url('../fonts/neue-haas-grotesk-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
*/ 