
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 224 71.4% 4.1%;
    --card: 0 0% 100%;
    --card-foreground: 224 71.4% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 224 71.4% 4.1%;
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 0 0% 100%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 262.1 83.3% 57.8%;
    --radius: 0.75rem;
  }
 
  .dark {
    --background: 224 71.4% 4.1%;
    --foreground: 210 20% 98%;
    --card: 224 71.4% 4.1%;
    --card-foreground: 210 20% 98%;
    --popover: 224 71.4% 4.1%;
    --popover-foreground: 210 20% 98%;
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 0 0% 100%;
    --secondary: 215 27.9% 16.9%;
    --secondary-foreground: 210 20% 98%;
    --muted: 215 27.9% 16.9%;
    --muted-foreground: 217.9 10.6% 64.9%;
    --accent: 215 27.9% 16.9%;
    --accent-foreground: 210 20% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 20% 98%;
    --border: 215 27.9% 16.9%;
    --input: 215 27.9% 16.9%;
    --ring: 262.1 83.3% 57.8%;
  }
}

@layer base {
  * {
    border-color: hsl(var(--border));
  }
  body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-feature-settings: "rlig" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
    font-display: swap;
  }
  
  html {
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Critical above-the-fold styles - inline for fastest LCP */
.hero-section {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
  background: linear-gradient(to right, #2563eb, #9333ea, #2563eb);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.75;
  color: hsl(var(--muted-foreground));
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.5rem 1.5rem;
  background-color: hsl(var(--secondary));
  border-radius: 9999px;
  color: hsl(var(--foreground));
  font-weight: 500;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }
  .hero-subtitle {
    font-size: 1.25rem;
  }
  .hero-badge {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  .hero-section {
    margin-bottom: 4rem;
  }
}

.main-bg {
  background-color: hsl(var(--background));
}

.tool-card {
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
}

.touch-manipulation {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  min-width: 44px;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

*:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* Blog post content link styling */
.prose a {
  color: #8b5cf6; /* Paars */
  font-weight: 600; /* Bold */
  text-decoration: underline;
  text-decoration-color: #a78bfa; /* Lichter paars voor de underline */
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.prose a:hover {
  color: #7c3aed; /* Donkerder paars bij hover */
  text-decoration-color: #8b5cf6;
}

.dark .prose a {
  color: #a78bfa; /* Lichter paars voor dark mode */
  text-decoration-color: #c4b5fd;
}

.dark .prose a:hover {
  color: #c4b5fd; /* Nog lichter paars voor dark mode hover */
  text-decoration-color: #a78bfa;
}

/* Fix for sticky blog post title */
article h1 {
  position: static !important;
}
