@import 'tailwindcss';
@import 'tw-animate-css';
@import 'shadcn/tailwind.css';

@custom-variant dark (&:is(.dark *));

@theme inline {
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --color-foreground: var(--foreground);
  --color-background: var(--background);

  /* Fast'n Fit brand tokens */
  --color-brand-yellow: var(--brand-yellow);
  --color-brand-brown: var(--brand-brown);
  --color-brand-green: var(--brand-green);
  --color-brand-red: var(--brand-red);
  --color-brand-purple: var(--brand-purple);

  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-3xl: calc(var(--radius) * 2.2);
  --radius-4xl: calc(var(--radius) * 2.6);

  --font-sans: 'DM Sans', 'DM Sans Fallback', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Bricolage Grotesque Fallback', sans-serif;
}

:root {
  color-scheme: light;

  /* Brand Colors */
  --brand-yellow: #ffbb1c;
  --brand-brown: #472813;
  --brand-green: #62b12f;
  --brand-red: #ed3535;
  --brand-purple: #7918d6;

  /* Semantic tokens mapped to brand */
  --background: #ffffff;
  --foreground: #472813;
  --card: #ffffff;
  --card-foreground: #472813;
  --popover: #ffffff;
  --popover-foreground: #472813;
  --primary: #7918d6;
  --primary-foreground: #ffffff;
  --secondary: #ffbb1c;
  --secondary-foreground: #472813;
  --muted: #fff8e7;
  --muted-foreground: #7a5a3a;
  --accent: #62b12f;
  --accent-foreground: #ffffff;
  --destructive: #ed3535;
  --border: #f0e2cc;
  --input: #f0e2cc;
  --ring: #7918d6;
  --radius: 1.25rem;

  --sidebar: #ffffff;
  --sidebar-foreground: #472813;
  --sidebar-primary: #7918d6;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #ffbb1c;
  --sidebar-accent-foreground: #472813;
  --sidebar-border: #f0e2cc;
  --sidebar-ring: #7918d6;
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground font-sans;
  }
}

/* Custom animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(3deg); }
  66% { transform: translateY(-6px) rotate(-2deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(-3deg); }
  66% { transform: translateY(-16px) rotate(2deg); }
}

@keyframes bouncePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

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

/* RGB border glow animation */
@keyframes rgbRotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rgbRotate2 {
  0%   { transform: rotate(180deg); }
  100% { transform: rotate(540deg); }
}

/* Stars parallax animations */
@keyframes animStar {
  from { transform: translateY(0px); }
  to   { transform: translateY(-2000px); }
}

@keyframes animStar2 {
  from { transform: translateY(0px); }
  to   { transform: translateY(-2000px); }
}

@keyframes animStar3 {
  from { transform: translateY(0px); }
  to   { transform: translateY(-2000px); }
}

.animate-float { animation: float 4s ease-in-out infinite; }
.animate-float-reverse { animation: floatReverse 5s ease-in-out infinite; }
.animate-float-slow { animation: float 7s ease-in-out infinite; }
.animate-bounce-pulse { animation: bouncePulse 2s ease-in-out infinite; }
.animate-spin-slow { animation: spinSlow 8s linear infinite; }
.animate-wiggle { animation: wiggle 2s ease-in-out infinite; }
.animate-slide-in-up { animation: slideInUp 0.6s ease-out forwards; }
.animate-fade-in-scale { animation: fadeInScale 0.5s ease-out forwards; }

/* Delay utilities */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }
.delay-700 { animation-delay: 0.7s; }
.delay-1000 { animation-delay: 1s; }
.delay-1500 { animation-delay: 1.5s; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #fff8e7; }
::-webkit-scrollbar-thumb { background: #ffbb1c; border-radius: 3px; }
