/* =====================================================================
   VIBELINK DESIGN SYSTEM — Base / Element Defaults
   Depends on: tokens.css
   ===================================================================== */

body {
  font-family: var(--vl-font-sans);
  font-size: var(--vl-text-md);
  font-weight: var(--vl-weight-regular);
  line-height: var(--vl-leading-normal);
  color: var(--vl-text-primary);
  background-color: var(--vl-bg-base);
}

/* ---- Headings ---- */
h1, .vl-h1 {
  font-size: var(--vl-text-4xl);
  font-weight: var(--vl-weight-bold);
  line-height: var(--vl-leading-tight);
  letter-spacing: var(--vl-tracking-tight);
}
h2, .vl-h2 {
  font-size: var(--vl-text-3xl);
  font-weight: var(--vl-weight-bold);
  line-height: var(--vl-leading-tight);
  letter-spacing: var(--vl-tracking-tight);
}
h3, .vl-h3 {
  font-size: var(--vl-text-2xl);
  font-weight: var(--vl-weight-semibold);
  line-height: var(--vl-leading-snug);
}
h4, .vl-h4 {
  font-size: var(--vl-text-xl);
  font-weight: var(--vl-weight-semibold);
  line-height: var(--vl-leading-snug);
}
h5, .vl-h5 {
  font-size: var(--vl-text-lg);
  font-weight: var(--vl-weight-semibold);
}
h6, .vl-h6 {
  font-size: var(--vl-text-md);
  font-weight: var(--vl-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--vl-tracking-wide);
  color: var(--vl-text-secondary);
}

/* ---- Text utilities ---- */
.vl-text-lead      { font-size: var(--vl-text-lg); color: var(--vl-text-secondary); }
.vl-text-sm        { font-size: var(--vl-text-sm); }
.vl-text-xs        { font-size: var(--vl-text-xs); }
.vl-text-secondary { color: var(--vl-text-secondary); }
.vl-text-tertiary  { color: var(--vl-text-tertiary); }
.vl-text-brand     { color: var(--vl-brand); }
.vl-text-accent    { color: var(--vl-accent); }
.vl-text-gradient {
  background: var(--vl-gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

a {
  color: var(--vl-text-link);
  transition: color var(--vl-duration-fast) var(--vl-ease-standard);
}
a:hover { color: var(--vl-accent-hover); }

code, pre, kbd {
  font-family: var(--vl-font-mono);
  font-size: 0.9em;
}
code {
  background: var(--vl-bg-inset);
  padding: 0.15em 0.4em;
  border-radius: var(--vl-radius-sm);
  border: 1px solid var(--vl-border-subtle);
}
pre {
  background: var(--vl-bg-inset);
  padding: var(--vl-space-4);
  border-radius: var(--vl-radius-md);
  border: 1px solid var(--vl-border-subtle);
  overflow-x: auto;
}
pre code {
  background: none;
  padding: 0;
  border: none;
}
kbd {
  background: var(--vl-bg-surface-2);
  border: 1px solid var(--vl-border-default);
  border-bottom-width: 2px;
  border-radius: var(--vl-radius-sm);
  padding: 0.1em 0.45em;
  font-size: 0.8em;
}

hr {
  border: none;
  border-top: 1px solid var(--vl-border-subtle);
  margin: var(--vl-space-5) 0;
}

/* ---- Accessible focus ring (keyboard only) ---- */
:focus-visible {
  outline: 2px solid var(--vl-border-focus);
  outline-offset: 2px;
  border-radius: var(--vl-radius-sm);
}

/* ---- Selection ---- */
::selection {
  background: var(--vl-brand);
  color: var(--vl-on-brand);
}

/* ---- Custom scrollbar ---- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--vl-neutral-700) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--vl-neutral-700);
  border-radius: var(--vl-radius-pill);
  border: 2px solid var(--vl-bg-base);
}
*::-webkit-scrollbar-thumb:hover { background: var(--vl-neutral-600); }

/* ---- Layout helpers ---- */
.vl-container {
  width: 100%;
  max-width: var(--vl-container-xl);
  margin-inline: auto;
  padding-inline: var(--vl-space-5);
}
.vl-stack > * + * { margin-top: var(--vl-space-4); }
.vl-row {
  display: flex;
  align-items: center;
  gap: var(--vl-space-3);
  flex-wrap: wrap;
}
.vl-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
