@import "tailwindcss";

/* Class-based dark mode (Tailwind v4): toggled by a `.dark` class on <html> */
@custom-variant dark (&:where(.dark, .dark *));

@theme {
  --color-primary-50: #f0f1ff;
  --color-primary-100: #e4e6ff;
  --color-primary-200: #c3c7ff;
  --color-primary-300: #a8b1ff;
  --color-primary-400: #8d9aff;
  --color-primary-500: #727dfd;
  --color-primary-600: #5d68e0;
  --color-primary-700: #4853c4;
  --color-primary-800: #343ea8;
  --color-primary-900: #2a318c;
}

/* Dana Font Faces */
@font-face {
  font-family: 'Dana';
  src: url('/fonts/dana_regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('/fonts/dana_medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('/fonts/dana_bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #f3f4f6;
  --foreground: #171717;
}

/* Dark palette is driven by the `.dark` class so the toggle controls it */
.dark {
  --background: #030712;
  --foreground: #ededed;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: 'Dana', 'Inter', var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Dana', 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 400;
}

/* Smooth theme transition for surfaces, borders and text */
*,
*::before,
*::after {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

/* Custom scrollbar that adapts to the theme */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.dark * {
  scrollbar-color: #374151 transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.dark *::-webkit-scrollbar-thumb {
  background-color: #374151;
}

::selection {
  background-color: #c3c7ff;
  color: #1f2937;
}
.dark ::selection {
  background-color: #4853c4;
  color: #f9fafb;
}
