/* =========================================================
   BASE.CSS
   Production reset + accessibility foundation
   ========================================================= */

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

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

html:focus-within {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

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

button {
    border: 0;
}

button,
select {
    cursor: pointer;
}

input,
select,
textarea {
    max-width: 100%;
}

textarea {
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: inherit;
}

ul,
ol {
    padding-inline-start: 1.25rem;
}

/* Better keyboard accessibility */
:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--dq-focus);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Selection */
::selection {
    background: rgba(43, 156, 141, 0.26);
    color: var(--dq-black);
}

/* RTL/LTR helpers */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="ltr"] {
    direction: ltr;
}

/* Disable animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}