/* ============================================================
   BASE.CSS — Global Element & Typography Styles
   ============================================================ */

html {
  font-size: 16px;
  scroll-padding-top: var(--nav-height);
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: var(--leading-normal);
  min-height: 100dvh;
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

/* ---- Paragraphs ---- */
p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ---- Links ---- */
a {
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

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

/* ---- Text Selection ---- */
::selection {
  background-color: rgba(59, 130, 246, 0.28);
  color: var(--color-text-primary);
}

/* ---- Gradient Text Utility ---- */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ---- Prevent body scroll when mobile menu open ---- */
body.nav-open {
  overflow: hidden;
}
