/**
 * Xperto Media - Typography Styles
 * Headings, text styles, links, utilities
 * Requires: variables.css to be loaded first
 */

/* ========================================
   Base Typography
   ======================================== */

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
}

/* ========================================
   Headings
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

/* Remove top margin when heading is first child */
h1:first-child, h2:first-child, h3:first-child,
h4:first-child, h5:first-child, h6:first-child {
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    text-shadow: 0 2px 20px rgba(132, 189, 0, 0.3);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

h4 {
    font-size: 1.2rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.9rem;
}

/* Section Titles (Infographics, special sections) */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================================
   Paragraphs
   ======================================== */

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

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

.lead,
.intro {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    line-height: 1.8;
}

.text-small {
    font-size: 0.85rem;
}

.text-large {
    font-size: 1.15rem;
}

/* ========================================
   Links
   ======================================== */

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--color-golden);
}

/* ========================================
   Text Colors
   ======================================== */

.text-primary {
    color: var(--color-primary);
}

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

.text-golden {
    color: var(--color-golden);
}

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

.text-white {
    color: #ffffff;
}

/* ========================================
   Text Alignment
   ======================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Text Utility Combinations */
.text-muted-center {
    color: var(--color-text-muted);
    text-align: center;
}

.text-muted-sm {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.text-center-mb {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   Font Weights
   ======================================== */

.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* ========================================
   Lists
   ======================================== */

ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
}

li {
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.list-unstyled {
    list-style: none;
    padding-left: 0;
}

.list-muted {
    color: var(--color-text-muted);
}

.list-muted li {
    color: var(--color-text-muted);
}

.list-inline {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.list-inline li {
    margin-bottom: 0;
}

/* Check mark list */
.list-check {
    list-style: none;
    padding-left: 0;
}

.list-check li {
    position: relative;
    padding-left: 1.75rem;
}

.list-check li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* Icon list (SVG icons as bullets) */
.icon-list {
    list-style: none;
    padding-left: 0;
    margin: var(--spacing-lg) 0;
}

.icon-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.6;
}

.icon-list li svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

/* ========================================
   Blockquotes
   ======================================== */

blockquote {
    background: var(--color-bg-card);
    border-left: 4px solid var(--color-primary);
    padding: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
}

blockquote p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin: 0;
}

blockquote cite,
blockquote .attribution {
    display: block;
    margin-top: var(--spacing-md);
    font-style: normal;
    font-size: 0.95rem;
    color: var(--color-primary);
}

/* ========================================
   Code
   ======================================== */

code {
    font-family: 'Monaco', 'Consolas', monospace;
    background: var(--color-bg-card);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--color-primary);
}

pre {
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
}

pre code {
    background: none;
    padding: 0;
}

/* ========================================
   Horizontal Rules
   ======================================== */

hr {
    border: 0;
    border-top: 1px solid rgba(132, 189, 0, 0.2);
    margin: var(--spacing-xl) 0;
}

/* ========================================
   Selection
   ======================================== */

::selection {
    background: var(--color-primary);
    color: #000;
}

::-moz-selection {
    background: var(--color-primary);
    color: #000;
}

/* ========================================
   Responsive Typography
   ======================================== */

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}
