/**
 * Ecopetróleo "Impulso Dominicano" - Typography
 * Text styles, headings, and typographic utilities
 */

/* ========================================
   BASE TYPOGRAPHY
   ======================================== */
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-wide);
    color: var(--color-text-primary);
}

/* ========================================
   HEADINGS
   ======================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-display);
    font-weight: var(--font-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--color-text-primary);
}

h1, .h1 {
    font-size: var(--text-5xl);
}

h2, .h2 {
    font-size: var(--text-4xl);
}

h3, .h3 {
    font-size: var(--text-3xl);
}

h4, .h4 {
    font-size: var(--text-2xl);
}

h5, .h5 {
    font-size: var(--text-xl);
}

h6, .h6 {
    font-size: var(--text-lg);
}

/* Hero Titles */
.title-hero {
    font-family: var(--font-display);
    font-size: clamp(var(--text-5xl), 10vw, var(--text-9xl));
    line-height: var(--leading-none);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
}

.title-section {
    font-family: var(--font-display);
    font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
    line-height: var(--leading-none);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

/* ========================================
   BODY TEXT
   ======================================== */
p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

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

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

.text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

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

/* Lead paragraph */
.lead {
    font-size: var(--text-xl);
    line-height: var(--leading-loose);
    color: var(--color-text-secondary);
    max-width: 65ch;
}

/* ========================================
   ACCENT TEXT (Quotes, Manifesto)
   ======================================== */
.text-accent {
    font-family: var(--font-accent);
    font-style: italic;
}

.quote {
    font-family: var(--font-accent);
    font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
    font-style: italic;
    font-weight: var(--font-normal);
    line-height: var(--leading-snug);
    color: var(--color-text-primary);
}

.quote--small {
    font-size: var(--text-xl);
}

blockquote {
    font-family: var(--font-accent);
    font-size: var(--text-xl);
    font-style: italic;
    line-height: var(--leading-relaxed);
    padding-left: var(--space-6);
    border-left: 3px solid var(--color-gold);
    color: var(--color-text-secondary);
}

/* ========================================
   MONOSPACE (Data, Numbers)
   ======================================== */
.text-mono {
    font-family: var(--font-mono);
    letter-spacing: var(--tracking-normal);
}

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.number-badge {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-gold);
    letter-spacing: var(--tracking-wider);
}

/* ========================================
   LINKS
   ======================================== */
a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color var(--duration-micro) var(--ease-standard);
}

a:hover {
    color: var(--color-text-primary);
}

.link-subtle {
    color: var(--color-text-secondary);
}

.link-subtle:hover {
    color: var(--color-gold);
}

/* ========================================
   COLOR UTILITIES
   ======================================== */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-red { color: var(--color-eco-red); }
.text-blue { color: var(--color-eco-blue); }
.text-gold { color: var(--color-gold); }
.text-green { color: var(--color-eco-green-medium); }
.text-success { color: var(--color-success); }

/* ========================================
   ALIGNMENT
   ======================================== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ========================================
   FONT WEIGHT
   ======================================== */
.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); }

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

/* ========================================
   LISTS
   ======================================== */
.list {
    list-style: none;
    padding-left: 0;
}

.list--bullets {
    padding-left: var(--space-6);
}

.list--bullets li {
    position: relative;
    padding-left: var(--space-4);
    margin-bottom: var(--space-2);
}

.list--bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background-color: var(--color-gold);
    border-radius: 50%;
}

.list--numbered {
    counter-reset: list-counter;
    padding-left: var(--space-6);
}

.list--numbered li {
    counter-increment: list-counter;
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-3);
}

.list--numbered li::before {
    content: counter(list-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-gold);
}

/* ========================================
   SPECIAL TEXT EFFECTS
   ======================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-eco-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-outline {
    -webkit-text-stroke: 1px var(--color-text-primary);
    -webkit-text-fill-color: transparent;
}

/* Highlight within text */
.highlight {
    color: var(--color-eco-red);
}

.highlight--gold {
    color: var(--color-gold);
}

/* ========================================
   MAX-WIDTH UTILITIES
   ======================================== */
.max-w-prose { max-width: 65ch; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }

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

/* Tablet (768px+) */
@media (min-width: 768px) {
    h1, .h1 {
        font-size: var(--text-6xl);
    }

    h2, .h2 {
        font-size: var(--text-5xl);
    }

    h3, .h3 {
        font-size: var(--text-4xl);
    }

    .lead {
        font-size: var(--text-xl);
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    h1, .h1 {
        font-size: var(--text-7xl);
    }

    h2, .h2 {
        font-size: var(--text-6xl);
    }

    h3, .h3 {
        font-size: var(--text-5xl);
    }

    h4, .h4 {
        font-size: var(--text-3xl);
    }
}

/* Wide (1280px+) */
@media (min-width: 1280px) {
    h1, .h1 {
        font-size: var(--text-8xl);
    }
}
