/**
 * Tieu Hao Pro global CSS base.
 *
 * Scope: browser normalization, document defaults and accessible media behavior.
 * Component/layout styling belongs to later CSS modules.
 */

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--thp-color-surface);
    color: var(--thp-color-text);
    font-family: var(--thp-font-base);
    font-size: var(--thp-font-size-md);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
optgroup,
select,
textarea {
    font: inherit;
}

button,
input,
select,
textarea {
    margin: 0;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--thp-color-action);
    outline-offset: 3px;
}

::selection {
    background: var(--thp-color-brand-soft);
    color: var(--thp-color-brand-deep);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
