@import 'tailwindcss';
@import 'tw-animate-css';

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

:root {
  /* Light mode - warm paper tones */
  --background: oklch(0.98 0.005 90);
  --foreground: oklch(0.18 0.01 270);
  --card: oklch(0.96 0.005 90);
  --card-foreground: oklch(0.18 0.01 270);
  --popover: oklch(0.98 0.005 90);
  --popover-foreground: oklch(0.18 0.01 270);
  --primary: oklch(0.18 0.01 270);
  --primary-foreground: oklch(0.98 0.005 90);
  --secondary: oklch(0.94 0.005 90);
  --secondary-foreground: oklch(0.25 0.01 270);
  --muted: oklch(0.92 0.005 90);
  --muted-foreground: oklch(0.45 0.01 270);
  --accent: oklch(0.65 0.15 145);
  --accent-foreground: oklch(0.15 0.02 145);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.577 0.245 27.325);
  --border: oklch(0.88 0.005 90);
  --input: oklch(0.92 0.005 90);
  --ring: oklch(0.65 0.15 145);
  --radius: 0.5rem;
}

.dark {
  /* Fly.io-inspired: Deep navy with vibrant accents */
  --background: oklch(0.10 0.02 260);
  --foreground: oklch(0.95 0.01 100);
  --card: oklch(0.14 0.02 260);
  --card-foreground: oklch(0.95 0.01 100);
  --popover: oklch(0.14 0.02 260);
  --popover-foreground: oklch(0.95 0.01 100);
  --primary: oklch(0.95 0.01 100);
  --primary-foreground: oklch(0.10 0.02 260);
  --secondary: oklch(0.20 0.02 260);
  --secondary-foreground: oklch(0.90 0.01 100);
  --muted: oklch(0.18 0.02 260);
  --muted-foreground: oklch(0.65 0.01 100);
  --accent: oklch(0.65 0.22 280);
  --accent-foreground: oklch(0.98 0.01 100);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.95 0.01 100);
  --border: oklch(0.28 0.02 260);
  --input: oklch(0.20 0.02 260);
  --ring: oklch(0.65 0.22 280);
}

@theme inline {
  --font-sans: 'Inter', 'Inter Fallback', system-ui, sans-serif;
  --font-serif: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

/* Fly.io-style gradient backgrounds */
.bg-gradient-mesh {
  background:
    radial-gradient(at 0% 0%, oklch(0.4 0.22 280 / 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, oklch(0.5 0.20 220 / 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, oklch(0.4 0.15 190 / 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, oklch(0.5 0.22 280 / 0.15) 0px, transparent 50%);
}

/* Subtle glow effects */
.glow-accent {
  box-shadow: 0 0 40px oklch(0.70 0.22 280 / 0.3);
}

.glow-cyan {
  box-shadow: 0 0 40px oklch(0.70 0.15 200 / 0.3);
}

/* Selection colors */
::selection {
  background: oklch(0.70 0.22 280 / 0.4);
}

.dark ::selection {
  background: oklch(0.70 0.22 280 / 0.5);
}
