/**
 * RVRSE Base — Resets, body, and global utilities
 * Brand Book V2 · DEC-009
 */

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-obsidian);
  color: var(--color-pearl);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ─── Webkit Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar           { width: 6px; height: 6px; }
::-webkit-scrollbar-track     { background: var(--color-onyx); }
::-webkit-scrollbar-thumb     { background: var(--color-steel); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

/* ─── Selection ──────────────────────────────────────────────────── */
::selection {
  background: rgba(76, 79, 184, 0.35);
  color: var(--color-ivory);
}

/* ─── Focus Ring (keyboard nav) ──────────────────────────────────── */
:focus-visible {
  outline: 2px solid rgba(76, 79, 184, 0.55);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* ─── Toast animation ────────────────────────────────────────────── */
@keyframes slideInRight {
  from { transform: translateX(16px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes fadeInUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes pulseRing {
  0%, 100% { transform: scale(1);   opacity: 0.2; }
  50%       { transform: scale(1.1); opacity: 0.08; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ─── Skeleton loading ────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-graphite) 25%,
    var(--color-steel)    50%,
    var(--color-graphite) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-card);
}

/* ─── Utility ─────────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.invisible { visibility: hidden; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
