/* ==================================================
   TYPOGRAPHY SYSTEM
   B2B Industrial - Clear Hierarchy
   ================================================== */

/* ========================================
   BASE TYPOGRAPHY
   ======================================== */

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-regular);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   HEADINGS
   Clear hierarchy with consistent spacing
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--font-size-h1);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: var(--font-size-h4);
    margin-bottom: var(--space-sm);
}

h5 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
}

h6 {
    font-size: var(--font-size-small);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   BODY TEXT
   ======================================== */

p {
    margin: 0 0 var(--space-md) 0;
    line-height: var(--line-height-normal);
}

p:last-child {
    margin-bottom: 0;
}

/* Text Variants */
.text-large {
    font-size: 1.125rem;
    line-height: var(--line-height-relaxed);
}

.text-small {
    font-size: var(--font-size-small);
}

.text-tiny {
    font-size: var(--font-size-tiny);
}

/* ========================================
   TEXT COLORS
   ======================================== */

.text-primary {
    color: var(--color-text-primary);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-tertiary {
    color: var(--color-text-tertiary);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-accent {
    color: var(--color-accent);
}

.text-success {
    color: var(--color-success);
}

.text-warning {
    color: var(--color-warning);
}

/* ========================================
   FONT WEIGHTS
   ======================================== */

.font-regular {
    font-weight: var(--font-weight-regular);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.font-black {
    font-weight: var(--font-weight-black);
}

/* ========================================
   LINE HEIGHTS
   ======================================== */

.lh-tight {
    line-height: var(--line-height-tight);
}

.lh-normal {
    line-height: var(--line-height-normal);
}

.lh-relaxed {
    line-height: var(--line-height-relaxed);
}

/* ========================================
   TEXT STYLES
   ======================================== */

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-justify {
    text-align: justify;
}

/* ========================================
   MONOSPACE (Numbers, Code)
   ======================================== */

.font-mono {
    font-family: var(--font-family-mono);
}

code,
kbd,
pre,
samp {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
}

/* ========================================
   SECTION TITLES (Standardized)
   ======================================== */

.section-title {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

.section-subtitle {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: var(--space-xl);
    line-height: var(--line-height-normal);
}

.section-intro {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    max-width: 800px;
    margin: 0 auto var(--space-2xl) auto;
}

/* ========================================
   METRIC NUMBERS (Dashboard)
   ======================================== */

.metric-number {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-metric);
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
    line-height: 1;
    display: block;
}

.metric-number-large {
    font-size: var(--font-size-metric-large);
}

.metric-label {
    font-size: var(--font-size-tiny);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    font-weight: var(--font-weight-semibold);
}

.metric-unit {
    font-size: 0.6em;
    opacity: 0.8;
}

/* ========================================
   LINKS
   ======================================== */

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ========================================
   LISTS
   ======================================== */

ul, ol {
    margin: 0 0 var(--space-md) 0;
    padding-left: var(--space-xl);
}

ul ul,
ol ol,
ul ol,
ol ul {
    margin-bottom: 0;
}

li {
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-normal);
}

/* Clean List (No bullets) */
.list-clean {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-clean li {
    margin-bottom: var(--space-md);
}

/* Inline List */
.list-inline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.list-inline li {
    margin: 0;
}

/* ========================================
   BLOCKQUOTES
   ======================================== */

blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl);
    border-left: 3px solid var(--color-primary);
    background: var(--color-bg-secondary);
    font-style: italic;
    color: var(--color-text-secondary);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* ========================================
   HORIZONTAL RULES
   ======================================== */

hr {
    border: 0;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-2xl) 0;
}

/* ========================================
   EMPHASIS & STRONG
   ======================================== */

strong,
b {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

em,
i {
    font-style: italic;
}

/* ========================================
   SMALL TEXT
   ======================================== */

small {
    font-size: var(--font-size-small);
}

/* ========================================
   MARK / HIGHLIGHT
   ======================================== */

mark {
    background: var(--color-warning);
    color: var(--color-bg-primary);
    padding: 0.1em 0.3em;
    border-radius: 2px;
}

/* ========================================
   TEXT TRUNCATION
   ======================================== */

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   TEXT SELECTION
   ======================================== */

::selection {
    background: var(--color-primary);
    color: var(--color-text-primary);
}

::-moz-selection {
    background: var(--color-primary);
    color: var(--color-text-primary);
}

/* ========================================
   FOCUS VISIBLE (Accessibility)
   ======================================== */

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
