/* Qooe Tunes Design System · base — reset, typography, focus, motion primitives, utilities. */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--surface-app); color: var(--text);
  font: var(--fw-regular) var(--fs-15) / var(--lh-body) var(--font-sans);
  letter-spacing: var(--tracking-tight);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent; overflow: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: -0.02em; }
p { margin: 0; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent-text); text-decoration: none; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--line-focus); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }

/* scrollbars: thin, quiet */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* motion primitives — every arrival fades and rises a little; nothing pops */
@keyframes ds-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ds-in-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes ds-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ds-scale-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ds-pulse { 50% { opacity: .4; } }
@keyframes ds-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes ds-spin { to { transform: rotate(360deg); } }
@keyframes ds-indeterminate { from { transform: translateX(-60%); } to { transform: translateX(160%); } }

/* utilities */
.mono { font-family: var(--font-mono); font-size: var(--fs-12); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--text-2); }
.fa { font-family: var(--font-fa); direction: rtl; unicode-bidi: plaintext; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

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

/* Right-to-left and Persian text: no negative tracking (it breaks joined letters) */
:lang(fa), [dir="rtl"] { letter-spacing: 0; }
