/**
 * MKM Bix - Typography
 * All typography styles
 * @package MKM_Bix
 */

/* ==================== BASE TYPOGRAPHY ==================== */
body {
    font-family: var(--mkm-font-primary);
    font-size: var(--mkm-fs-base);
    font-weight: var(--mkm-fw-normal);
    line-height: var(--mkm-lh-normal);
    color: var(--mkm-gray-800);
}

/* ==================== HEADINGS ==================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: var(--mkm-fw-bold);
    line-height: var(--mkm-lh-tight);
    color: var(--mkm-gray-900);
    margin-bottom: var(--mkm-space-4);
}

h1, .h1 {
    font-size: var(--mkm-fs-4xl);
}

h2, .h2 {
    font-size: var(--mkm-fs-3xl);
}

h3, .h3 {
    font-size: var(--mkm-fs-2xl);
}

h4, .h4 {
    font-size: var(--mkm-fs-xl);
}

h5, .h5 {
    font-size: var(--mkm-fs-lg);
}

h6, .h6 {
    font-size: var(--mkm-fs-base);
}

/* ==================== PARAGRAPHS ==================== */
p {
    margin-bottom: var(--mkm-space-4);
}

p:last-child {
    margin-bottom: 0;
}

/* ==================== LINKS ==================== */
a {
    color: var(--mkm-primary);
    text-decoration: none;
    transition: color var(--mkm-transition-fast);
}

a:hover {
    color: var(--mkm-primary-dark);
}

/* ==================== LEAD TEXT ==================== */
.mkm-lead {
    font-size: var(--mkm-fs-xl);
    font-weight: var(--mkm-fw-light);
    line-height: var(--mkm-lh-relaxed);
    color: var(--mkm-gray-600);
}

/* ==================== SMALL TEXT ==================== */
.mkm-small,
small {
    font-size: var(--mkm-fs-sm);
}

.mkm-tiny {
    font-size: var(--mkm-fs-xs);
}

/* ==================== TEXT COLORS ==================== */
.text-primary { color: var(--mkm-primary); }
.text-secondary { color: var(--mkm-secondary); }
.text-success { color: var(--mkm-success); }
.text-danger { color: var(--mkm-danger); }
.text-warning { color: var(--mkm-warning); }
.text-info { color: var(--mkm-info); }
.text-muted { color: var(--mkm-gray-600); }
.text-white { color: var(--mkm-white); }
.text-dark { color: var(--mkm-gray-900); }

/* ==================== FONT WEIGHTS ==================== */
.fw-light { font-weight: var(--mkm-fw-light); }
.fw-normal { font-weight: var(--mkm-fw-normal); }
.fw-medium { font-weight: var(--mkm-fw-medium); }
.fw-semibold { font-weight: var(--mkm-fw-semibold); }
.fw-bold { font-weight: var(--mkm-fw-bold); }
.fw-extrabold { font-weight: var(--mkm-fw-extrabold); }

/* ==================== TEXT ALIGNMENT ==================== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* ==================== TEXT TRANSFORM ==================== */
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }
.text-normal-case { text-transform: none; }

/* ==================== TEXT DECORATION ==================== */
.text-underline { text-decoration: underline; }
.text-line-through { text-decoration: line-through; }
.text-no-decoration { text-decoration: none; }

/* ==================== BLOCKQUOTE ==================== */
blockquote,
.mkm-blockquote {
    margin: var(--mkm-space-6) 0;
    padding: var(--mkm-space-6);
    background: var(--mkm-gray-50);
    border-left: 4px solid var(--mkm-primary);
    font-style: italic;
    font-size: var(--mkm-fs-lg);
    color: var(--mkm-gray-700);
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite,
.mkm-blockquote cite {
    display: block;
    margin-top: var(--mkm-space-4);
    font-size: var(--mkm-fs-sm);
    font-style: normal;
    color: var(--mkm-gray-600);
}

blockquote cite::before {
    content: '— ';
}

/* ==================== CODE ==================== */
code {
    font-family: var(--mkm-font-mono);
    font-size: 0.875em;
    background: var(--mkm-gray-100);
    padding: 2px 6px;
    border-radius: var(--mkm-radius-sm);
    color: var(--mkm-danger);
}

pre {
    font-family: var(--mkm-font-mono);
    font-size: var(--mkm-fs-sm);
    background: var(--mkm-gray-900);
    color: var(--mkm-gray-100);
    padding: var(--mkm-space-6);
    border-radius: var(--mkm-radius);
    overflow-x: auto;
    margin-bottom: var(--mkm-space-6);
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ==================== HORIZONTAL RULE ==================== */
hr {
    border: none;
    border-top: 1px solid var(--mkm-gray-200);
    margin: var(--mkm-space-8) 0;
}

/* ==================== MARK / HIGHLIGHT ==================== */
mark,
.mkm-mark {
    background: var(--mkm-warning-light);
    padding: 2px 4px;
    border-radius: var(--mkm-radius-sm);
}

/* ==================== ABBREVIATION ==================== */
abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* ==================== ADDRESS ==================== */
address {
    font-style: normal;
    margin-bottom: var(--mkm-space-4);
}

/* ==================== LISTS ==================== */
.mkm-list {
    margin-bottom: var(--mkm-space-4);
    padding-left: var(--mkm-space-6);
}

.mkm-list li {
    margin-bottom: var(--mkm-space-2);
}

.mkm-list-disc {
    list-style-type: disc;
}

.mkm-list-decimal {
    list-style-type: decimal;
}

.mkm-list-none {
    list-style: none;
    padding-left: 0;
}

/* ==================== DEFINITION LIST ==================== */
dl {
    margin-bottom: var(--mkm-space-4);
}

dt {
    font-weight: var(--mkm-fw-semibold);
    margin-bottom: var(--mkm-space-1);
}

dd {
    margin-bottom: var(--mkm-space-4);
    margin-left: var(--mkm-space-6);
}

/* ==================== CONTENT TYPOGRAPHY ==================== */
.mkm-content h1,
.mkm-content h2,
.mkm-content h3,
.mkm-content h4,
.mkm-content h5,
.mkm-content h6 {
    margin-top: var(--mkm-space-8);
    margin-bottom: var(--mkm-space-4);
}

.mkm-content h1:first-child,
.mkm-content h2:first-child,
.mkm-content h3:first-child,
.mkm-content h4:first-child,
.mkm-content h5:first-child,
.mkm-content h6:first-child {
    margin-top: 0;
}

.mkm-content p {
    margin-bottom: var(--mkm-space-4);
    line-height: var(--mkm-lh-relaxed);
}

.mkm-content ul,
.mkm-content ol {
    margin-bottom: var(--mkm-space-4);
    padding-left: var(--mkm-space-8);
}

.mkm-content ul {
    list-style-type: disc;
}

.mkm-content ol {
    list-style-type: decimal;
}

.mkm-content li {
    margin-bottom: var(--mkm-space-2);
    line-height: var(--mkm-lh-relaxed);
}

.mkm-content img {
    border-radius: var(--mkm-radius);
    margin: var(--mkm-space-6) 0;
}

.mkm-content a {
    text-decoration: underline;
    text-decoration-color: var(--mkm-primary-light);
    text-underline-offset: 2px;
}

.mkm-content a:hover {
    text-decoration-color: var(--mkm-primary);
}

.mkm-content table {
    width: 100%;
    margin-bottom: var(--mkm-space-6);
    border: 1px solid var(--mkm-gray-300);
}

.mkm-content th,
.mkm-content td {
    padding: var(--mkm-space-3) var(--mkm-space-4);
    border: 1px solid var(--mkm-gray-300);
    text-align: left;
}

.mkm-content th {
    background: var(--mkm-gray-100);
    font-weight: var(--mkm-fw-semibold);
}

.mkm-content figure {
    margin: var(--mkm-space-6) 0;
}

.mkm-content figcaption {
    font-size: var(--mkm-fs-sm);
    color: var(--mkm-gray-600);
    text-align: center;
    margin-top: var(--mkm-space-2);
}