@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

:root {
  /* Default backgrounds */
  --background: #ffffff;
  --foreground: #171717;

  /* RIMA Design Tokens (Section 5) */
  --rima-primary: #12308e;
  --rima-secondary: #0a192f;
  --rima-accent: #e62243;
  --rima-background: #030408;
  --rima-surface: #0f111a;
  --rima-card: rgba(255, 255, 255, 0.03);
  --rima-border: rgba(255, 255, 255, 0.05);
  --rima-text: #ffffff;
  --rima-muted: #a0aec0;
  --rima-success: #34d399;
  --rima-warning: #f59e0b;
  --rima-danger: #ef4444;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-inter), sans-serif;
  --font-heading: var(--font-outfit), sans-serif;
  
  /* Expose RIMA tokens to Tailwind as text-rima-primary, bg-rima-bg, etc. */
  --color-rima-primary: var(--rima-primary);
  --color-rima-secondary: var(--rima-secondary);
  --color-rima-accent: var(--rima-accent);
  --color-rima-bg: var(--rima-background);
  --color-rima-surface: var(--rima-surface);
  --color-rima-card: var(--rima-card);
  --color-rima-border: var(--rima-border);
  --color-rima-text: var(--rima-text);
  --color-rima-muted: var(--rima-muted);
  --color-rima-success: var(--rima-success);
  --color-rima-warning: var(--rima-warning);
  --color-rima-danger: var(--rima-danger);
}

@utility font-heading {
  font-family: var(--font-heading);
}

body {
  background: var(--rima-background);
  color: var(--rima-text);
  font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading) !important;
}

/* RIMA Dashboard / My Account Logged In Background */
body.dashboard-mode {
  background: radial-gradient(circle at top right, #00122e, #0A192F, #00122e) !important;
  color: #ffffff;
}

/* Custom Scrollbar for a premium feel */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--rima-background);
}
::-webkit-scrollbar-thumb {
  background: var(--rima-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rima-muted);
}

@keyframes gradient-x {
  0%, 100% {
    background-size: 200% 200%;
    background-position: left center;
  }
  50% {
    background-size: 200% 200%;
    background-position: right center;
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@utility animate-gradient-x {
  animation: gradient-x 3s ease infinite;
}

@utility animate-shimmer {
  animation: shimmer 1.5s infinite;
}
