/* ==========================================================================
   BASE – typography & phần tử gốc
   ========================================================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-stretch: var(--font-stretch);
    line-height: var(--lh-body);
    color: var(--color-text);
    background: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 700;
    line-height: var(--lh-heading);
}

p {
    font-stretch: var(--font-stretch-text);
    text-wrap: pretty;
}

a {
    transition: color var(--duration) var(--ease);
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

::selection {
    background: var(--color-primary);
    color: #fff;
}

/* Icon SVG dùng sprite: <svg class="icon"><use href="#icon-x"/></svg> */
.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    fill: none;
}

/* Ẩn nhưng vẫn đọc được bởi screen reader (tên class giống WordPress) */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    width: auto;
    height: auto;
    clip: auto;
    padding: 10px 16px;
    background: #fff;
    color: var(--color-heading);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}
