/* ==========================================================================
   BASE — typography & phần tử gốc
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    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 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--lh-heading);
    color: var(--color-heading);
    letter-spacing: -0.02em;
}

p {
    text-wrap: pretty;
}

a {
    transition: color var(--dur) var(--ease);
}

a:hover {
    color: var(--color-accent);
}

strong,
b {
    font-weight: 600;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

::selection {
    background: var(--color-accent);
    color: var(--color-white);
}

/* Icon SVG dùng sprite nội tuyến */
.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon--fill {
    fill: currentColor;
    stroke: none;
}

/* Ẩn nhưng vẫn đọc được bởi screen reader */
.screen-reader-text,
.sr-only {
    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 {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 1000;
    padding: 10px 18px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.skip-link:focus {
    top: 12px;
    color: var(--color-white);
}
