/* ==========================================================================
   Reseti, tipografia dhe ndihmesat e vogla.
   ========================================================================== */

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

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

body {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
ul, ol { padding: 0; list-style: none; }
code, pre { font-family: var(--mono); }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: var(--brand-soft-2); color: var(--ink); }

[hidden] { display: none !important; }

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

/* Shiritat e levizjes te holle, ne te dyja temat. */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* ---------------------------------------------------------------- ndihmesa */

.stack { display: grid; gap: var(--s-4); align-content: start; }
.stack-sm { display: grid; gap: var(--s-2); align-content: start; }
.stack-lg { display: grid; gap: var(--s-6); align-content: start; }

.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.row-top { align-items: flex-start; }
.row-nowrap { flex-wrap: nowrap; }
.spacer { flex: 1; }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.muted  { color: var(--ink-2); }
.subtle { color: var(--ink-3); }
.strong { font-weight: 600; }
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-md { font-size: var(--fs-md); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.gap-2 { gap: var(--s-2); }

.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;
}
