/* ============================================
   BASE — Reset, globals, fonts, scrollbar
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  color: var(--text-primary);
  background-color: var(--bg-app);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  transition: background-color var(--transition-theme), color var(--transition-theme);
}

/* ── Links ── */
a {
  color: var(--color-accent-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-300); }

/* ── Selection ── */
::selection {
  background: var(--color-primary-500);
  color: #fff;
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--color-primary-400);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* ── Images ── */
img, video, canvas {
  display: block;
  max-width: 100%;
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Buttons ── */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ── Inputs ── */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}
textarea { resize: vertical; }

/* ── Tables ── */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ── Code ── */
code, pre, kbd {
  font-family: var(--font-mono);
}

/* ── SR Only ── */
.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;
}

/* ── Utility: Hidden ── */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.no-scroll { overflow: hidden; }

/* ── Utility: Text ── */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
