/* ==========================================================================
   LaraERP Modern Design System — Style.css
   Tailwind CSS compatible + Standalone utilities (Zero CDN dependency)
   ========================================================================== */

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Color Palette - Light Mode */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  /* Brand Colors */
  --brand-primary: #059669;
  --brand-primary-rgb: 5, 150, 105;
  --brand-primary-light: #10b981;
  --brand-primary-dark: #047857;
  --brand-accent: #0284c7;
  --brand-maroon: #9e2b3a;
  --brand-gold: #f59e0b;

  /* Shadows & Glass */
  --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);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 40px -10px rgba(16, 185, 129, 0.35);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-bg: rgba(255, 255, 255, 0.8);
}

.dark {
  /* Color Palette - Dark Mode */
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Brand Colors - Dark */
  --brand-primary: #10b981;
  --brand-primary-rgb: 16, 185, 129;
  --brand-primary-light: #34d399;
  --brand-primary-dark: #059669;
  --brand-accent: #38bdf8;
  --brand-maroon: #f87171;
  --brand-gold: #fbbf24;

  /* Shadows & Glass - Dark */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
  --shadow-glow: 0 0 50px -10px rgba(16, 185, 129, 0.3);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(15, 23, 42, 0.75);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-subtle);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 9999px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-primary);
}

/* Background Grids and Ambient Lights */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
}
.dark .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.ambient-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
.dark .ambient-glow {
  opacity: 0.35;
}

/* Glassmorphic Cards & Headers */
.glass-header {
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.glass-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--brand-primary-rgb), 0.4);
  box-shadow: var(--shadow-xl), 0 0 20px -5px rgba(var(--brand-primary-rgb), 0.2);
}

/* Gradients and Text Highlights */
.gradient-text-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dark .gradient-text-emerald {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-multi {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 14px 0 rgba(var(--brand-primary-rgb), 0.39);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--brand-primary-rgb), 0.5);
  background: linear-gradient(135deg, var(--brand-primary-light) 0%, var(--brand-primary) 100%);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(var(--brand-primary-rgb), 0.08);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

/* Nav Links */
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  text-decoration: none;
}
.nav-link:hover {
  color: var(--brand-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--brand-primary);
  transition: width 0.2s ease;
  border-radius: 2px;
}
.nav-link:hover::after {
  width: 100%;
}

/* Dots and Slider Indicators */
.dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background-color: var(--border-strong);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.dot.active {
  width: 2rem;
  background-color: var(--brand-primary);
  box-shadow: 0 0 10px rgba(var(--brand-primary-rgb), 0.5);
}

/* Reveal on Scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-float {
  animation: float 5s ease-in-out infinite;
}

@keyframes pulseSubtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse-subtle {
  animation: pulseSubtle 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spinSlow 25s linear infinite;
}

/* Interactive Tabs */
.tab-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
}
.tab-btn:hover {
  color: var(--text-main);
  background: rgba(var(--brand-primary-rgb), 0.05);
}
.tab-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.35);
}

.tab-pane {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tab-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  background-color: var(--bg-card);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item.open {
  border-color: rgba(var(--brand-primary-rgb), 0.4);
  box-shadow: 0 4px 15px -2px rgba(var(--brand-primary-rgb), 0.1);
}
.faq-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.0625rem;
  text-align: start;
  color: var(--text-main);
  background: transparent;
  cursor: pointer;
}
.faq-trigger svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-trigger svg {
  transform: rotate(180deg);
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.faq-item.open .faq-content {
  max-height: 500px;
  transition: max-height 0.4s ease-in-out;
  padding-bottom: 1.25rem;
}

/* Reviews Carousel Drag / Viewport */
#reviewsViewport {
  overflow: hidden;
  user-select: none;
}
#reviewsViewport.dragging {
  cursor: grabbing;
}
#reviewsTrack {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}
.review-card {
  flex: 0 0 100%;
  max-width: 100%;
}
@media (min-width: 768px) {
  .review-card {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}
@media (min-width: 1280px) {
  .review-card {
    flex: 0 0 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
  }
}

/* Live Mockup UI elements */
.mockup-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.mockup-header {
  background: rgba(var(--brand-primary-rgb), 0.04);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mockup-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
}

/* RTL Helpers */
[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}
[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}