/* ==========================================================================
   typography.css — SuaraBaca Base Typography
   ========================================================================== */

/* ── BASE TYPOGRAPHY ─────────────────────────────────────────────── */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.65;
    color: var(--sb-text);
    background-color: var(--sb-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    color: var(--sb-heading);
    line-height: 1.25;
    margin-top: 0;
}

h1 { font-size: 2.875rem; }  /* 46px */
h2 { font-size: 1.75rem; }   /* 28px */
h3 { font-size: 1.4375rem; } /* 23px */
h4 { font-size: 1.1875rem; } /* 19px */
h5 { font-size: 1rem; }      /* 16px */
h6 { font-size: 0.875rem; }  /* 14px */

p {
    margin-top: 0;
    margin-bottom: 1.25em;
}

a {
    color: var(--sb-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--sb-link-hover);
    text-decoration: underline;
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--sb-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul, ol {
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.4em;
}

/* Blockquote */
blockquote {
    border-left: 4px solid var(--sb-primary);
    padding: 0.75em 1.25em;
    margin: 1.5em 0;
    background-color: var(--sb-surface);
    color: var(--sb-muted);
    font-style: italic;
}

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

/* Code */
code, pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875em;
}

pre {
    background: var(--sb-surface);
    border: 1px solid var(--sb-border);
    border-radius: 4px;
    padding: 1em 1.25em;
    overflow-x: auto;
    line-height: 1.6;
}

code {
    background: var(--sb-surface);
    border-radius: 3px;
    padding: 0.1em 0.4em;
    color: var(--sb-secondary);
}

/* HR */
hr {
    border: none;
    border-top: 1px solid var(--sb-border);
    margin: 2em 0;
}

/* Strong */
strong, b {
    font-weight: 700;
    color: var(--sb-heading);
}

/* Figcaption */
figcaption {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: var(--sb-muted);
    padding: 8px 0;
    line-height: 1.5;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
}

th, td {
    border: 1px solid var(--sb-border);
    padding: 10px 14px;
    text-align: left;
}

th {
    background-color: var(--sb-surface);
    font-weight: 600;
    color: var(--sb-heading);
}

/* Responsive table wrapper */
.wp-block-table { overflow-x: auto; }

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 1rem;
    background: var(--sb-secondary);
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}
