/* WallVault — Design tokens */
:root {
  /* Warm-tinted dark base */
  --bg-0: #0a0908;        /* base */
  --bg-1: #111110;        /* surface */
  --bg-2: #171614;        /* card */
  --bg-3: #1e1d1a;        /* elevated */
  --bg-hover: #1c1b18;

  /* Hairlines — warm low-opacity */
  --line-1: rgba(245, 230, 210, 0.06);
  --line-2: rgba(245, 230, 210, 0.10);
  --line-3: rgba(245, 230, 210, 0.16);

  /* Text — warm whites */
  --fg-0: #f5efe6;        /* primary */
  --fg-1: #cfc8bd;        /* secondary */
  --fg-2: #8a857c;        /* tertiary */
  --fg-3: #5a554d;        /* quaternary */

  /* Accent — electric violet */
  --accent: #7C5CFF;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --accent-line: rgba(124, 92, 255, 0.32);
  --accent-fg: #b8a5ff;

  /* Status */
  --ok: #6ee7a4;
  --warn: #f5b94a;
  --err: #ff6b6b;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Easings */
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Type */
  --font-ui: "Geist", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-ui);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

#root { height: 100vh; width: 100vw; overflow: hidden; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* Scrollbars — thin warm */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(245, 230, 210, 0.08);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: rgba(245, 230, 210, 0.14); background-clip: padding-box; }

/* Selection */
::selection { background: var(--accent-soft); color: var(--fg-0); }

/* Grain overlay utility */
.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.18  0 0 0 0 0.15  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.18;
  mix-blend-mode: overlay;
}

/* Shimmer for skeletons */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg,
    rgba(245, 230, 210, 0.03) 0%,
    rgba(245, 230, 210, 0.08) 50%,
    rgba(245, 230, 210, 0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

/* Focus ring — accent, subtle */
.focus-ring:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 280ms var(--ease-out); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
.slide-in-right { animation: slideInRight 320ms var(--ease-spring); }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.scale-in { animation: scaleIn 220ms var(--ease-spring); }
