/**
 * DOYIL Theme - Typography
 *
 * Global typography styles.
 */

/* ========== Font Face ========== */
/* Google Fonts (Poppins + Inter) loaded via wp_enqueue_style in inc/enqueue.php */

/* ========== Base Typography ========== */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
}

/* ========== Headings ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
    margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

/* ========== Paragraphs ========== */
p {
    margin: 0 0 var(--space-4);
    line-height: var(--leading-relaxed);
}

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

/* ========== Links ========== */
a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--color-accent-wood);
}

a:focus-visible {
    outline: 2px solid var(--color-accent-wood);
    outline-offset: 2px;
}

/* ========== Lists ========== */
ul, ol {
    margin: 0 0 var(--space-4);
    padding-left: var(--space-6);
}

ul ul, ol ol, ul ol, ol ul {
    margin-bottom: 0;
}

li {
    line-height: var(--leading-normal);
}

/* ========== Blockquotes ========== */
blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    border-left: 4px solid var(--color-accent-wood);
    background: var(--color-bg-secondary);
    font-style: italic;
    color: var(--color-text-secondary);
}

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

/* ========== Code ========== */
code, pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

code {
    background: var(--color-bg-tertiary);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

pre {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: var(--space-6);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--space-6) 0;
}

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

/* ========== Horizontal Rules ========== */
hr {
    border: 0;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-12) 0;
}

/* ========== Selection ========== */
::selection {
    background: var(--color-accent-wood);
    color: var(--color-text-light);
}

::-moz-selection {
    background: var(--color-accent-wood);
    color: var(--color-text-light);
}
