/* ============================================================
   TRUEVENCE DESIGN SYSTEM - BASE / RESET
   ============================================================ */

/* ============================================================
   BOX SIZING RESET
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================================
   HTML / BODY
   ============================================================ */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6,
.font-display {
    font-family: var(--font-display);
    margin: 0;
    line-height: 1.2;
}

h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 700; }

.mono {
    font-family: var(--font-mono);
}

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

svg {
    display: block;
    flex-shrink: 0;
}

/* ============================================================
   FORMS
   ============================================================ */
button {
    font-family: inherit;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 14.5px;
}

textarea {
    resize: vertical;
    min-height: 70px;
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
    background: var(--violet);
    color: #fff;
}

::-moz-selection {
    background: var(--violet);
    color: #fff;
}

/* ============================================================
   LINKS
   ============================================================ */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ============================================================
   FOCUS STATES (ACCESSIBILITY)
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove default focus for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--slate-lt); }
.text-center { text-align: center; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-lt);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
