/* ============================================================
   HVID — Global Design System
   Human Verification Identity
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Palette */
  --color-bg:         #08080F;
  --color-surface:    #111118;
  --color-surface-2:  #1C1C28;
  --color-surface-3:  #24243A;
  --color-border:     rgba(255,255,255,0.07);
  --color-border-hover: rgba(255,255,255,0.14);

  /* Accent */
  --color-primary:    #5B5FEF;
  --color-primary-h:  #6E72FF;
  --color-secondary:  #A78BFA;
  --color-green:      #34D399;
  --color-amber:      #FBBF24;
  --color-red:        #F87171;

  /* Text */
  --color-text-primary:   #F0F0FA;
  --color-text-secondary: #8888AA;
  --color-text-muted:     #555566;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(91,95,239,0.15);

  /* Transitions */
  --transition-fast:   150ms ease-out;
  --transition-normal: 220ms ease-out;
  --transition-slow:   350ms ease-out;

  /* Layout */
  --max-width:     1200px;
  --sidebar-width: 240px;
  --nav-height:    64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

img, svg { display: block; }

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

ul, ol { list-style: none; }

/* --- Typography --- */
.text-xs   { font-size: 11px; line-height: 1.5; }
.text-sm   { font-size: 13px; line-height: 1.5; }
.text-base { font-size: 15px; line-height: 1.6; }
.text-lg   { font-size: 18px; line-height: 1.5; }
.text-xl   { font-size: 22px; line-height: 1.4; }
.text-2xl  { font-size: 28px; line-height: 1.3; }
.text-3xl  { font-size: 36px; line-height: 1.2; }
.text-4xl  { font-size: 48px; line-height: 1.15; }
.text-5xl  { font-size: 64px; line-height: 1.1; }

.font-light    { font-weight: 300; }
.font-regular  { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }

.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }
.text-accent    { color: var(--color-primary); }

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px var(--space-6);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.05); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 16px rgba(91,95,239,0.35);
}
.btn-primary:hover {
  background: var(--color-primary-h);
  box-shadow: 0 4px 24px rgba(91,95,239,0.5);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
  background: var(--color-surface);
}

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-3);
  border-color: var(--color-border-hover);
}

.btn-sm {
  padding: 7px var(--space-4);
  font-size: 13px;
}

.btn-lg {
  padding: 14px var(--space-8);
  font-size: 15px;
  border-radius: var(--radius-lg);
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: rgba(17,17,24,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-verified {
  background: rgba(52,211,153,0.12);
  color: var(--color-green);
  border: 1px solid rgba(52,211,153,0.25);
}

.badge-pending {
  background: rgba(251,191,36,0.12);
  color: var(--color-amber);
  border: 1px solid rgba(251,191,36,0.25);
}

.badge-unverified {
  background: rgba(248,113,113,0.12);
  color: var(--color-red);
  border: 1px solid rgba(248,113,113,0.25);
}

.badge-neutral {
  background: var(--color-surface-2);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* --- Form Inputs --- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.input {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 11px var(--space-4);
  color: var(--color-text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
}

.input::placeholder { color: var(--color-text-muted); }

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(91,95,239,0.15);
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--color-border);
  width: 100%;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-surface-3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: #333348; }

/* --- Dot indicator --- */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.animate-fadeUp  { animation: fadeUp 0.5s ease-out both; }
.animate-fadeIn  { animation: fadeIn 0.4s ease-out both; }

/* Staggered delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* --- Skeleton / Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-surface-3) 50%, var(--color-surface-2) 75%);
  background-size: 600px;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-md);
}

/* --- Responsive helpers --- */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-4); }
}
