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

@font-face {
  font-family: "Geist Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/GeistSans-Variable.woff2") format("woff2");
}

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

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --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-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
  --font-sans: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

:root {
  --radius: 0.625rem;
  --shadow-xs: 0 1px 2px oklch(0 0 0 / 0.04);
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.06), 0 1px 2px oklch(0 0 0 / 0.04);
  --shadow-md: 0 4px 8px -2px oklch(0 0 0 / 0.08), 0 2px 4px -2px oklch(0 0 0 / 0.04);
  --background: oklch(0.985 0.002 260);
  --foreground: oklch(0.13 0.028 260);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.13 0.028 260);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.13 0.028 260);
  --primary: oklch(0.488 0.185 264);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.958 0.008 264);
  --secondary-foreground: oklch(0.25 0.03 264);
  --muted: oklch(0.955 0.006 264);
  --muted-foreground: oklch(0.50 0.015 264);
  --accent: oklch(0.955 0.012 264);
  --accent-foreground: oklch(0.25 0.03 264);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.920 0.005 264);
  --input: oklch(0.920 0.005 264);
  --ring: oklch(0.488 0.185 264);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.975 0.004 264);
  --sidebar-foreground: oklch(0.13 0.028 260);
  --sidebar-primary: oklch(0.488 0.185 264);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.955 0.012 264);
  --sidebar-accent-foreground: oklch(0.25 0.03 264);
  --sidebar-border: oklch(0.915 0.008 264);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  --shadow-xs: 0 1px 2px oklch(0 0 0 / 0.15);
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.20), 0 1px 2px oklch(0 0 0 / 0.15);
  --shadow-md: 0 4px 8px -2px oklch(0 0 0 / 0.30), 0 2px 4px -2px oklch(0 0 0 / 0.20);
  --background: oklch(0.10 0.018 264);
  --foreground: oklch(0.95 0.01 264);
  --card: oklch(0.145 0.020 264);
  --card-foreground: oklch(0.95 0.01 264);
  --popover: oklch(0.145 0.020 264);
  --popover-foreground: oklch(0.95 0.01 264);
  --primary: oklch(0.68 0.20 264);
  --primary-foreground: oklch(0.12 0 0);
  --secondary: oklch(0.22 0.025 264);
  --secondary-foreground: oklch(0.90 0.01 264);
  --muted: oklch(0.22 0.02 264);
  --muted-foreground: oklch(0.65 0.015 264);
  --accent: oklch(0.22 0.03 264);
  --accent-foreground: oklch(0.90 0.01 264);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(0.26 0.025 264);
  --input: oklch(0.26 0.025 264);
  --ring: oklch(0.65 0.19 264);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.14 0.022 264);
  --sidebar-foreground: oklch(0.95 0.01 264);
  --sidebar-primary: oklch(0.65 0.19 264);
  --sidebar-primary-foreground: oklch(0.95 0.01 264);
  --sidebar-accent: oklch(0.22 0.03 264);
  --sidebar-accent-foreground: oklch(0.90 0.01 264);
  --sidebar-border: oklch(0.26 0.025 264);
  --sidebar-ring: oklch(0.556 0 0);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground antialiased;
    font-feature-settings: "rlig" 1, "calt" 1;
  }
  button, a, [role="button"], input, select, textarea {
    touch-action: manipulation;
  }
}

/* Shimmer animation for skeletons */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Subtle fade-in for page transitions */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.35s ease-out both;
}

.animate-delay-75 { animation-delay: 75ms; }
.animate-delay-150 { animation-delay: 150ms; }
.animate-delay-225 { animation-delay: 225ms; }
.animate-delay-300 { animation-delay: 300ms; }

.press-scale {
  transition: transform 0.12s ease;
}
.press-scale:active {
  transform: scale(0.97);
}

/* Smooth gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), oklch(0.60 0.22 290));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtle noise texture overlay for depth */
.noise-overlay {
  position: relative;
}
.noise-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Privacy email blur — padding lets the blur feather naturally instead of
   being hard-clipped by overflow:hidden on parent containers (e.g. truncate).
   Negative margin cancels out the extra space so layout stays unchanged. */
.privacy-blur {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  padding: 4px 8px;
  margin: -4px -8px;
}

/* Card hover lift */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up {
    animation: none;
  }
  .animate-delay-75, .animate-delay-150, .animate-delay-225, .animate-delay-300 {
    animation-delay: 0ms;
  }
  .card-hover {
    transition: none;
  }
  .card-hover:hover {
    transform: none;
  }
  .press-scale {
    transition: none;
  }
  .press-scale:active {
    transform: none;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: oklch(0.7 0 0 / 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: oklch(0.6 0 0 / 0.4);
}
