@import "tailwindcss";
@import "tw-animate-css";
@plugin "@tailwindcss/typography";

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

@theme inline {
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
  --color-border: hsl(var(--border));
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));

  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));
  --color-card-border: hsl(var(--card-border));

  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));
  --color-popover-border: hsl(var(--popover-border));

  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-primary-border: var(--primary-border);

  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));
  --color-secondary-border: var(--secondary-border);

  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-muted-border: var(--muted-border);

  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));
  --color-accent-border: var(--accent-border);

  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));
  --color-destructive-border: var(--destructive-border);

  --color-sidebar: hsl(var(--sidebar));
  --color-sidebar-foreground: hsl(var(--sidebar-foreground));
  --color-sidebar-border: hsl(var(--sidebar-border));
  --color-sidebar-primary: hsl(var(--sidebar-primary));
  --color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
  --color-sidebar-primary-border: var(--sidebar-primary-border);
  --color-sidebar-accent: hsl(var(--sidebar-accent));
  --color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
  --color-sidebar-accent-border: var(--sidebar-accent-border);
  --color-sidebar-ring: hsl(var(--sidebar-ring));

  --font-sans: var(--app-font-sans);
  --font-serif: var(--app-font-serif);
  --font-mono: var(--app-font-mono);

  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
}

:root {
  /* Light, calm, premium SaaS palette */
  --background: 210 40% 98%;          /* #F8FAFC */
  --foreground: 222 47% 11%;          /* slate-900 */
  --card: 0 0% 100%;                  /* #FFFFFF */
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 217 91% 60%;             /* #3B82F6 */
  --primary-foreground: 0 0% 100%;
  --secondary: 173 80% 40%;           /* teal-500 */
  --secondary-foreground: 0 0% 100%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;    /* slate-500 */
  --accent: 262 83% 66%;              /* violet-500 */
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 214 32% 91%;              /* #E2E8F0 */
  --input: 214 32% 91%;
  --ring: 217 91% 60%;

  --sidebar: 0 0% 100%;
  --sidebar-foreground: 222 47% 11%;
  --sidebar-border: 214 32% 91%;
  --sidebar-primary: 217 91% 60%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 210 40% 96%;
  --sidebar-accent-foreground: 222 47% 11%;
  --sidebar-ring: 217 91% 60%;

  --app-font-sans: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
  --app-font-serif: Georgia, serif;
  --app-font-mono: "IBM Plex Mono", Menlo, monospace;
  --radius: 1rem;
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply font-sans antialiased text-foreground;
    background-color: #F8FAFC;
  }
}

/* Soft glassmorphism — light, very subtle blur */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid #E2E8F0;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

/* Light gradient background with floating blobs (Apple / SaaS style) */
.os-bg {
  position: relative;
  background-color: #F8FAFC;
  overflow-x: hidden;
}

.os-bg::before,
.os-bg::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.55;
}

.os-bg::before {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle at 30% 30%, #C7D2FE 0%, #A5B4FC 40%, transparent 70%);
  animation: blobFloat 18s ease-in-out infinite alternate;
}

.os-bg::after {
  width: 560px;
  height: 560px;
  bottom: -200px;
  right: -160px;
  background: radial-gradient(circle at 60% 60%, #A7F3D0 0%, #99F6E4 35%, transparent 70%);
  animation: blobFloat 22s ease-in-out infinite alternate-reverse;
}

.os-bg > * {
  position: relative;
  z-index: 1;
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 25px) scale(0.98); }
}

/* Gradient icon tile helpers */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.icon-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.22);
}
.icon-tile-blue   { background: linear-gradient(135deg, #60A5FA, #3B82F6); }
.icon-tile-purple { background: linear-gradient(135deg, #C084FC, #8B5CF6); }
.icon-tile-green  { background: linear-gradient(135deg, #34D399, #10B981); }
.icon-tile-orange { background: linear-gradient(135deg, #FDBA74, #F59E0B); }
.icon-tile-pink   { background: linear-gradient(135deg, #F9A8D4, #EC4899); }
.icon-tile-teal   { background: linear-gradient(135deg, #5EEAD4, #14B8A6); }

/* Top bar variant — flat very-light glass, no heavy border */
.topbar-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

/* Floating dock — macOS-like but lighter */
.dock-glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

/* Card hover lift */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}
