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

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

:root {
  /* Shifted to sophisticated, muted tones with subtle depth */
  /* Soft warm gray with subtle texture feel */
  --background: oklch(0.97 0.004 75);
  --foreground: oklch(0.12 0.005 265);

  /* Card with subtle elevation */
  --card: oklch(0.995 0.002 75);
  --card-foreground: oklch(0.12 0.005 265);

  --popover: oklch(0.995 0.002 75);
  --popover-foreground: oklch(0.12 0.005 265);

  /* Sophisticated muted violet-blue accent - futuristic but controlled */
  --primary: oklch(0.42 0.09 270);
  --primary-foreground: oklch(0.99 0 0);

  /* Warmer secondary tones */
  --secondary: oklch(0.94 0.005 75);
  --secondary-foreground: oklch(0.12 0.005 265);

  --muted: oklch(0.94 0.005 75);
  --muted-foreground: oklch(0.48 0.015 265);

  /* Accent for highlights - warm amber for scientific precision */
  --accent: oklch(0.88 0.08 85);
  --accent-foreground: oklch(0.12 0.005 265);

  --destructive: oklch(0.55 0.2 25);
  --destructive-foreground: oklch(0.99 0 0);

  /* Softer borders for layering */
  --border: oklch(0.89 0.004 265);
  --input: oklch(0.89 0.004 265);
  --ring: oklch(0.42 0.09 270);

  --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);

  /* Larger radius for modern feel */
  --radius: 0.75rem;

  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  /* Dark mode with deep, rich blacks and subtle warmth */
  --background: oklch(0.11 0.008 265);
  --foreground: oklch(0.96 0.003 75);
  --card: oklch(0.14 0.008 265);
  --card-foreground: oklch(0.96 0.003 75);
  --popover: oklch(0.14 0.008 265);
  --popover-foreground: oklch(0.96 0.003 75);
  --primary: oklch(0.58 0.12 270);
  --primary-foreground: oklch(0.99 0 0);
  --secondary: oklch(0.18 0.008 265);
  --secondary-foreground: oklch(0.96 0.003 75);
  --muted: oklch(0.18 0.008 265);
  --muted-foreground: oklch(0.55 0.015 265);
  --accent: oklch(0.72 0.12 85);
  --accent-foreground: oklch(0.11 0.008 265);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.22 0.008 265);
  --input: oklch(0.22 0.008 265);
  --ring: oklch(0.58 0.12 270);
  --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.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

@theme inline {
  --font-sans: var(--font-dm-sans), "Geist", "Geist Fallback";
  --font-display: var(--font-bricolage), "Geist", "Geist Fallback";
  --font-mono: var(--font-geist-mono), "Geist Mono", "Geist Mono Fallback";
  --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);
  --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);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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);
}

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

/* Custom utilities for artistic checkout design */
@layer utilities {
  /* Ultra-soft shadow for floating cards */
  .shadow-float {
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.04), 0 4px 16px -4px rgba(0, 0, 0, 0.06), 0 8px 32px -8px
      rgba(0, 0, 0, 0.08);
  }

  /* Elevated card shadow */
  .shadow-elevated {
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.06), 0 8px 32px -8px rgba(0, 0, 0, 0.1), 0 16px 64px -16px
      rgba(0, 0, 0, 0.12);
  }

  /* Subtle background texture */
  .bg-texture {
    background-image: radial-gradient(circle at 20% 50%, oklch(0.98 0.01 270) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, oklch(0.98 0.01 85) 0%, transparent 50%);
  }

  /* Focus state with glow */
  .focus-glow:focus-within {
    box-shadow: 0 0 0 3px oklch(0.42 0.09 270 / 0.1), 0 2px 8px -2px rgba(0, 0, 0, 0.04), 0 4px 16px -4px
      rgba(0, 0, 0, 0.06);
  }

  /* Medical-grade gradient backgrounds */
  .bg-medical-gradient {
    background: linear-gradient(135deg,
      oklch(0.97 0.004 75) 0%,
      oklch(0.98 0.01 270) 50%,
      oklch(0.97 0.006 85) 100%);
  }

  .bg-hero-gradient {
    background: linear-gradient(180deg,
      oklch(0.96 0.008 270) 0%,
      oklch(0.98 0.004 75) 100%);
    position: relative;
  }

  .bg-hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 20% 20%, oklch(0.58 0.12 270 / 0.08) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, oklch(0.72 0.12 85 / 0.06) 0%, transparent 50%);
    pointer-events: none;
  }

  .bg-accent-gradient {
    background: linear-gradient(135deg, oklch(0.58 0.12 270) 0%, oklch(0.52 0.10 280) 100%);
  }

  .bg-service-card {
    background: linear-gradient(135deg,
      oklch(0.995 0.002 75) 0%,
      oklch(0.98 0.008 270 / 0.4) 100%);
  }

  /* Icon glow effects */
  .icon-glow-primary {
    filter: drop-shadow(0 0 8px oklch(0.58 0.12 270 / 0.3));
  }

  .icon-glow-accent {
    filter: drop-shadow(0 0 8px oklch(0.72 0.12 85 / 0.4));
  }

  /* Animated gradient border */
  .border-gradient {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(var(--card), var(--card)) padding-box,
                linear-gradient(135deg, oklch(0.58 0.12 270), oklch(0.72 0.12 85)) border-box;
  }

  /* Floating animation */
  @keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
  }

  .animate-float {
    animation: float 3s ease-in-out infinite;
  }

  /* Fade in up animation */
  @keyframes fade-in-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
  }

  /* Stagger delays for sequential animations */
  .delay-100 { animation-delay: 0.1s; }
  .delay-200 { animation-delay: 0.2s; }
  .delay-300 { animation-delay: 0.3s; }
  .delay-400 { animation-delay: 0.4s; }
  .delay-500 { animation-delay: 0.5s; }
  .delay-600 { animation-delay: 0.6s; }

  /* Pulse glow animation for icons */
  @keyframes pulse-glow {
    0%, 100% {
      filter: drop-shadow(0 0 4px oklch(0.58 0.12 270 / 0.2));
    }
    50% {
      filter: drop-shadow(0 0 12px oklch(0.58 0.12 270 / 0.4));
    }
  }

  .animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
  }

  /* Gradient text */
  .text-gradient-primary {
    background: linear-gradient(135deg, oklch(0.42 0.09 270), oklch(0.58 0.12 270));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .text-gradient-accent {
    background: linear-gradient(135deg, oklch(0.58 0.12 270), oklch(0.72 0.12 85));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Decorative corner accent */
  .corner-accent::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, oklch(0.72 0.12 85 / 0.15) 50%);
    border-radius: 0 0.75rem 0 0;
  }

  /* Medical grid pattern background */
  .bg-medical-grid {
    background-image:
      linear-gradient(oklch(0.89 0.004 265 / 0.3) 1px, transparent 1px),
      linear-gradient(90deg, oklch(0.89 0.004 265 / 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: -1px -1px;
  }
}

.dark {
  /* Dark mode gradient adjustments */
  .bg-medical-gradient {
    background: linear-gradient(135deg,
      oklch(0.11 0.008 265) 0%,
      oklch(0.13 0.010 270) 50%,
      oklch(0.12 0.008 280) 100%);
  }

  .bg-hero-gradient {
    background: linear-gradient(180deg,
      oklch(0.13 0.012 270) 0%,
      oklch(0.11 0.008 265) 100%);
  }

  .bg-service-card {
    background: linear-gradient(135deg,
      oklch(0.14 0.008 265) 0%,
      oklch(0.16 0.012 270 / 0.6) 100%);
  }

  .bg-medical-grid {
    background-image:
      linear-gradient(oklch(0.22 0.008 265 / 0.4) 1px, transparent 1px),
      linear-gradient(90deg, oklch(0.22 0.008 265 / 0.4) 1px, transparent 1px);
  }
}
