:root {
  /* Brand Colors - Matching Main Website */
  --color-primary: #2190b0;
  --color-primary-hover: #1a8bcd;
  --color-primary-active: #13759c;
  --color-primary-rgb: 33, 144, 176;
  --color-teal-300: #32b8c6;
  --color-teal-600: #1d7480;

  /* Light Mode (Default) */
  --color-background: #fffdf6;
  --color-surface: #ffffff;
  --color-text: #182628;
  --color-text-secondary: #4f6b77;
  --color-border: #e0e2e2;
  --color-card-border: rgba(94, 82, 64, 0.12);

  /* Dark Mode Colors */
  --color-dark-bg: #1f2121;
  --color-dark-surface: #262828;
  --color-dark-text: #f8fafc;
  --color-dark-text-secondary: #cbd5e1;
  --color-dark-border: #334155;

  /* Spacing & Effects */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Typography - Matching Main Site */
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-weight-normal: 400;
  font-weight-medium: 500;
  font-weight-semibold: 600;
  font-weight-bold: 700;

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: var(--color-dark-bg);
    --color-surface: var(--color-dark-surface);
    --color-text: var(--color-dark-text);
    --color-text-secondary: var(--color-dark-text-secondary);
    --color-border: var(--color-dark-border);
    --color-card-border: rgba(119, 124, 124, 0.2);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.25), 0 4px 6px -4px rgb(0 0 0 / 0.25);
  }
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  transition: background-color var(--duration-normal) var(--ease-standard),
    color var(--duration-normal) var(--ease-standard);
}

/* ======================================
   Particle Effects & Scroll Animations
   ====================================== */

/* Particles Container */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.8;
}

/* Smooth scrolling enhancements */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Scroll animations base */
[data-scroll-animation] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-scroll-animation].scroll-animated {
  opacity: 1;
  transform: translateY(0);
}

/* Performance optimizations */
.particles-canvas {
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Utility Classes */
.max-w-6xl {
  max-width: 72rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-3 {
  gap: 0.75rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.pb-24 {
  padding-bottom: 6rem;
}

.h-10 {
  height: 2.5rem;
}

.w-10 {
  width: 2.5rem;
}

.w-4 {
  width: 1rem;
}

.h-4 {
  height: 1rem;
}

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

.rounded-full {
  border-radius: 9999px;
}

.text-white {
  color: white;
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.text-center {
  text-align: center;
}

.tracking-wide {
  letter-spacing: 0.025em;
}

.opacity-80 {
  opacity: 0.8;
}

.opacity-60 {
  opacity: 0.6;
}

.opacity-70 {
  opacity: 0.7;
}

.opacity-50 {
  opacity: 0.5;
}

.transition {
  transition: all var(--duration-fast) var(--ease-standard);
}

.hover\:text-primary:hover {
  color: var(--color-primary);
}

.text-primary {
  color: var(--color-primary);
}

.inline-flex {
  display: inline-flex;
}

.gap-1 {
  gap: 0.25rem;
}

.grid {
  display: grid;
}

.gap-8 {
  gap: 2rem;
}

/* Responsive Grid */
@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Tool Card Styles - Premium Design */
.tool-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-teal-600) 100%);
  transition: transform var(--duration-normal) var(--ease-standard),
    box-shadow var(--duration-normal) var(--ease-standard);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--color-primary-rgb), 0.1),
    transparent
  );
  transition: left 0.6s;
  z-index: 1;
}

.tool-card:hover::before {
  left: 100%;
}

.tool-card-inner {
  background: var(--color-surface);
  border-radius: calc(var(--radius-lg) - 2px);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.tool-card-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.tool-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  line-height: 1;
}

.tool-card h3 {
  transition: color var(--duration-fast) var(--ease-standard);
  margin-bottom: 0.5rem;
}

.group:hover h3 {
  color: var(--color-primary);
}

.coming-soon {
  background: linear-gradient(135deg, var(--color-text-secondary) 0%, #6b7280 100%);
  opacity: 0.8;
  cursor: default;
}

.coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.coming-soon::before {
  display: none;
}

/* Link Styles */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

header a:hover {
  color: var(--color-primary);
}

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

/* Footer */
footer {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Active navigation state */
nav a.active {
  color: var(--color-primary) !important;
  font-weight: 600;
  position: relative;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* Parallax elements */
[data-parallax] {
  will-change: transform;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  .text-4xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .text-2xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tool-card-inner {
    padding: 1.25rem;
  }

  .pb-24 {
    padding-bottom: 4rem;
  }

  .mb-12 {
    margin-bottom: 2rem;
  }

  .particles-container {
    opacity: 0.5;
  }
  
  [data-scroll-animation] {
    transform: translateY(20px);
  }
}

@media (max-width: 480px) {
  .tool-card-inner {
    padding: 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .h-10,
  .w-10 {
    height: 2rem;
    width: 2rem;
  }

  .py-8 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  [data-scroll-animation],
  .tool-card,
  .particles-container {
    animation: none !important;
    transition: none !important;
  }
  
  .particles-container {
    display: none;
  }
}
