/**
 * WealthFromAI Typography System
 *
 * Headlines: Outfit - Modern, geometric, authoritative
 * Body: DM Sans - Clean, readable, professional
 * Data: Space Grotesk - Technical, precise, numbers
 * Mono: JetBrains Mono - Code blocks, technical content
 *
 * @package WealthFromAI
 * @version 1.0.0
 */

/* ===========================
   BASE TYPOGRAPHY
   =========================== */

body {
    font-family: var(--wfai-font-body);
    font-size: var(--wfai-text-base);
    font-weight: var(--wfai-font-normal);
    line-height: var(--wfai-leading-relaxed);
    color: var(--wfai-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===========================
   HEADINGS
   =========================== */

h1, h2, h3, h4, h5, h6,
.wfai-h1, .wfai-h2, .wfai-h3, .wfai-h4, .wfai-h5, .wfai-h6 {
    font-family: var(--wfai-font-heading);
    font-weight: var(--wfai-font-bold);
    line-height: var(--wfai-leading-tight);
    letter-spacing: var(--wfai-tracking-tight);
    color: var(--wfai-text);
    margin-top: 0;
    margin-bottom: var(--wfai-space-4);
}

/* Heading 1 - Hero, Page Titles */
h1, .wfai-h1 {
    font-size: var(--wfai-text-5xl);
    font-weight: var(--wfai-font-extrabold);
    line-height: var(--wfai-leading-none);
    letter-spacing: var(--wfai-tracking-tighter);
}

/* Heading 2 - Section Titles */
h2, .wfai-h2 {
    font-size: var(--wfai-text-4xl);
    line-height: var(--wfai-leading-tight);
}

/* Heading 3 - Subsection Titles */
h3, .wfai-h3 {
    font-size: var(--wfai-text-3xl);
}

/* Heading 4 - Card Titles, Article Titles */
h4, .wfai-h4 {
    font-size: var(--wfai-text-2xl);
}

/* Heading 5 - Small Section Titles */
h5, .wfai-h5 {
    font-size: var(--wfai-text-xl);
}

/* Heading 6 - Labels, Captions */
h6, .wfai-h6 {
    font-size: var(--wfai-text-lg);
    font-weight: var(--wfai-font-semibold);
}

/* Display Headings - Extra Large */
.wfai-display-1 {
    font-family: var(--wfai-font-heading);
    font-size: var(--wfai-text-6xl);
    font-weight: var(--wfai-font-extrabold);
    line-height: var(--wfai-leading-none);
    letter-spacing: var(--wfai-tracking-tighter);
}

.wfai-display-2 {
    font-family: var(--wfai-font-heading);
    font-size: clamp(2.5rem, 2rem + 3vw, 3.5rem);
    font-weight: var(--wfai-font-extrabold);
    line-height: var(--wfai-leading-none);
    letter-spacing: var(--wfai-tracking-tighter);
}

/* ===========================
   HEADING WITH GRADIENT
   =========================== */

.wfai-heading-gradient {
    background: var(--wfai-gradient-mint-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wfai-heading-gradient-mint {
    background: linear-gradient(135deg, var(--wfai-secondary) 0%, var(--wfai-secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wfai-heading-gradient-gold {
    background: linear-gradient(135deg, var(--wfai-accent) 0%, var(--wfai-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   PARAGRAPHS & BODY TEXT
   =========================== */

p {
    margin-top: 0;
    margin-bottom: var(--wfai-space-4);
    line-height: var(--wfai-leading-relaxed);
}

/* Lead paragraph - larger intro text */
.wfai-lead {
    font-size: var(--wfai-text-xl);
    line-height: var(--wfai-leading-relaxed);
    color: var(--wfai-text-secondary);
}

/* Small text */
.wfai-small,
small {
    font-size: var(--wfai-text-sm);
}

.wfai-xs {
    font-size: var(--wfai-text-xs);
}

/* Article body text */
.wfai-prose {
    font-size: var(--wfai-text-base);
    line-height: var(--wfai-leading-loose);
    color: var(--wfai-text-secondary);
}

.wfai-prose p {
    margin-bottom: var(--wfai-space-6);
}

.wfai-prose strong {
    color: var(--wfai-text);
    font-weight: var(--wfai-font-semibold);
}

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

a {
    color: var(--wfai-secondary);
    text-decoration: none;
    transition: color var(--wfai-duration-fast) var(--wfai-ease-default);
}

a:hover {
    color: var(--wfai-secondary-light);
}

a:focus-visible {
    outline: 2px solid var(--wfai-secondary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Underline link style */
.wfai-link-underline {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.wfai-link-underline:hover {
    text-decoration-thickness: 2px;
}

/* Gold link variant */
.wfai-link-gold {
    color: var(--wfai-accent);
}

.wfai-link-gold:hover {
    color: var(--wfai-accent-light);
}

/* Subtle link (muted color) */
.wfai-link-subtle {
    color: var(--wfai-text-muted);
}

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

/* ===========================
   DATA & NUMBERS
   =========================== */

.wfai-data,
.wfai-number,
.wfai-stat {
    font-family: var(--wfai-font-data);
}

/* Large stat numbers */
.wfai-stat-value {
    font-family: var(--wfai-font-data);
    font-size: var(--wfai-text-4xl);
    font-weight: var(--wfai-font-bold);
    line-height: var(--wfai-leading-none);
    color: var(--wfai-secondary);
}

.wfai-stat-value-gold {
    color: var(--wfai-accent);
}

/* Data labels */
.wfai-data-label {
    font-family: var(--wfai-font-data);
    font-size: var(--wfai-text-xs);
    text-transform: uppercase;
    letter-spacing: var(--wfai-tracking-wider);
    color: var(--wfai-text-muted);
}

/* Percentage/change indicators */
.wfai-change-positive {
    color: var(--wfai-success);
}

.wfai-change-negative {
    color: var(--wfai-error);
}

/* ===========================
   CODE & TECHNICAL TEXT
   =========================== */

code, pre, kbd, samp {
    font-family: var(--wfai-font-mono);
}

/* Inline code */
code {
    font-size: 0.875em;
    padding: 0.125em 0.375em;
    background-color: var(--wfai-surface);
    border: 1px solid var(--wfai-border-default);
    border-radius: var(--wfai-radius-sm);
    color: var(--wfai-secondary);
}

/* Code blocks */
pre {
    background-color: var(--wfai-surface);
    border: 1px solid var(--wfai-border-default);
    border-radius: var(--wfai-radius-lg);
    padding: var(--wfai-space-4);
    overflow-x: auto;
    margin: var(--wfai-space-6) 0;
}

pre code {
    padding: 0;
    background: none;
    border: none;
    font-size: var(--wfai-text-sm);
    line-height: var(--wfai-leading-relaxed);
    color: var(--wfai-text);
}

/* Keyboard input */
kbd {
    font-size: 0.875em;
    padding: 0.125em 0.5em;
    background-color: var(--wfai-surface-lighter);
    border: 1px solid var(--wfai-border);
    border-radius: var(--wfai-radius-sm);
    box-shadow: inset 0 -1px 0 var(--wfai-border);
}

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

ul, ol {
    margin-top: 0;
    margin-bottom: var(--wfai-space-4);
    padding-left: var(--wfai-space-6);
}

li {
    margin-bottom: var(--wfai-space-2);
    line-height: var(--wfai-leading-relaxed);
}

/* Nested lists */
ul ul, ul ol, ol ul, ol ol {
    margin-top: var(--wfai-space-2);
    margin-bottom: 0;
}

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

/* Custom checkmark list */
.wfai-list-check {
    list-style: none;
    padding-left: 0;
}

.wfai-list-check li {
    position: relative;
    padding-left: var(--wfai-space-6);
}

.wfai-list-check li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--wfai-secondary);
    font-weight: var(--wfai-font-bold);
}

/* Arrow list */
.wfai-list-arrow {
    list-style: none;
    padding-left: 0;
}

.wfai-list-arrow li {
    position: relative;
    padding-left: var(--wfai-space-6);
}

.wfai-list-arrow li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--wfai-secondary);
}

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

blockquote {
    margin: var(--wfai-space-6) 0;
    padding: var(--wfai-space-4) var(--wfai-space-6);
    border-left: 4px solid var(--wfai-secondary);
    background-color: var(--wfai-surface);
    border-radius: 0 var(--wfai-radius-lg) var(--wfai-radius-lg) 0;
}

blockquote p {
    font-style: italic;
    color: var(--wfai-text-secondary);
    margin-bottom: 0;
}

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

blockquote cite::before {
    content: '\2014 ';
}

/* Gold accent blockquote */
.wfai-blockquote-gold {
    border-left-color: var(--wfai-accent);
}

/* Featured quote - larger styling */
.wfai-blockquote-featured {
    padding: var(--wfai-space-8);
    text-align: center;
    border-left: none;
    border-radius: var(--wfai-radius-xl);
    background: var(--wfai-glass-bg);
}

.wfai-blockquote-featured p {
    font-size: var(--wfai-text-2xl);
    font-family: var(--wfai-font-heading);
    font-style: normal;
    color: var(--wfai-text);
}

/* ===========================
   HORIZONTAL RULES
   =========================== */

hr {
    border: none;
    height: 1px;
    background-color: var(--wfai-border);
    margin: var(--wfai-space-8) 0;
}

/* Decorative divider */
.wfai-divider-gradient {
    height: 2px;
    background: var(--wfai-gradient-mint-gold);
    border: none;
}

/* ===========================
   LABELS & TAGS
   =========================== */

.wfai-label {
    font-family: var(--wfai-font-body);
    font-size: var(--wfai-text-xs);
    font-weight: var(--wfai-font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--wfai-tracking-wider);
    color: var(--wfai-text-muted);
}

.wfai-overline {
    font-family: var(--wfai-font-data);
    font-size: var(--wfai-text-xs);
    font-weight: var(--wfai-font-medium);
    text-transform: uppercase;
    letter-spacing: var(--wfai-tracking-widest);
    color: var(--wfai-secondary);
}

.wfai-overline-gold {
    color: var(--wfai-accent);
}

/* ===========================
   TEXT UTILITIES - COLORS
   =========================== */

.wfai-text-primary { color: var(--wfai-text); }
.wfai-text-secondary-color { color: var(--wfai-secondary); }
.wfai-text-accent { color: var(--wfai-accent); }
.wfai-text-muted { color: var(--wfai-text-muted); }
.wfai-text-subtle { color: var(--wfai-text-subtle); }
.wfai-text-success { color: var(--wfai-success); }
.wfai-text-warning { color: var(--wfai-warning); }
.wfai-text-error { color: var(--wfai-error); }
.wfai-text-info { color: var(--wfai-info); }

/* ===========================
   TEXT UTILITIES - ALIGNMENT
   =========================== */

.wfai-text-left { text-align: left; }
.wfai-text-center { text-align: center; }
.wfai-text-right { text-align: right; }
.wfai-text-justify { text-align: justify; }

/* ===========================
   TEXT UTILITIES - TRANSFORM
   =========================== */

.wfai-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--wfai-tracking-wider);
}
.wfai-lowercase { text-transform: lowercase; }
.wfai-capitalize { text-transform: capitalize; }
.wfai-normal-case { text-transform: none; }

/* ===========================
   TEXT UTILITIES - WEIGHT
   =========================== */

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

/* ===========================
   TEXT UTILITIES - DECORATION
   =========================== */

.wfai-underline { text-decoration: underline; }
.wfai-line-through { text-decoration: line-through; }
.wfai-no-underline { text-decoration: none; }

/* ===========================
   TEXT UTILITIES - OVERFLOW
   =========================== */

.wfai-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

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

/* ===========================
   TEXT UTILITIES - SPACING
   =========================== */

.wfai-tracking-tighter { letter-spacing: var(--wfai-tracking-tighter); }
.wfai-tracking-tight { letter-spacing: var(--wfai-tracking-tight); }
.wfai-tracking-normal { letter-spacing: var(--wfai-tracking-normal); }
.wfai-tracking-wide { letter-spacing: var(--wfai-tracking-wide); }
.wfai-tracking-wider { letter-spacing: var(--wfai-tracking-wider); }
.wfai-tracking-widest { letter-spacing: var(--wfai-tracking-widest); }

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

/* ===========================
   FONT FAMILY UTILITIES
   =========================== */

.wfai-font-heading { font-family: var(--wfai-font-heading); }
.wfai-font-body { font-family: var(--wfai-font-body); }
.wfai-font-data { font-family: var(--wfai-font-data); }
.wfai-font-mono { font-family: var(--wfai-font-mono); }

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

@media (max-width: 767px) {
    h1, .wfai-h1 {
        margin-bottom: var(--wfai-space-3);
    }

    h2, .wfai-h2 {
        margin-bottom: var(--wfai-space-3);
    }

    .wfai-display-1 {
        font-size: var(--wfai-text-5xl);
    }

    blockquote {
        padding: var(--wfai-space-3) var(--wfai-space-4);
    }

    .wfai-blockquote-featured {
        padding: var(--wfai-space-6);
    }

    .wfai-blockquote-featured p {
        font-size: var(--wfai-text-xl);
    }
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    code {
        background: #eee;
        color: #000;
    }
}
