/* ==========================================================================
   Joovili - Professional Custom Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables for consistent theming
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-primary-light: #6366f1;
  --color-secondary: #7c3aed;
  --color-accent: #0ea5e9;
  --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 rgb(79 70 229 / 0.4);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base & Typography
   -------------------------------------------------------------------------- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #c7d2fe;
  color: #1e1b4b;
}

/* --------------------------------------------------------------------------
   Prose Content
   -------------------------------------------------------------------------- */
.prose h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.prose p {
  color: #475569;
  line-height: 1.625;
  margin-bottom: 1rem;
}

.prose ul {
  color: #475569;
}

.prose ul > * + * {
  margin-top: 0.5rem;
}

.prose a {
  color: #4f46e5;
  text-decoration: underline;
  text-decoration-color: #a5b4fc;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.prose a:hover {
  color: #4338ca;
}

/* --------------------------------------------------------------------------
   Card Components
   -------------------------------------------------------------------------- */
.card {
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background-color: #fff;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(203, 213, 225, 0.8);
  transform: translateY(-2px);
}

.card-body {
  padding: 1.5rem;
}

.card-elevated {
  border-radius: 1rem;
  background-color: #fff;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgb(0 0 0 / 0.02);
  border: none;
}

.card-glass {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Feature card with gradient accent */
.feature-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  overflow: hidden;
  transition: all var(--transition-slow);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #0ea5e9);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Button Components
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #334155;
  transition: all var(--transition-fast);
}

.btn:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #4f46e5;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  border-color: #4f46e5;
  background-color: #4f46e5;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: #4338ca;
  border-color: #4338ca;
  box-shadow: var(--shadow-lg), 0 0 20px -5px rgb(79 70 229 / 0.4);
}

.btn-secondary {
  border-color: #7c3aed;
  background-color: #7c3aed;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: #6d28d9;
  border-color: #6d28d9;
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  border-color: transparent;
  background-color: transparent;
  color: #475569;
}

.btn-ghost:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.btn-outline-primary {
  border-color: #4f46e5;
  background-color: transparent;
  color: #4f46e5;
}

.btn-outline-primary:hover {
  background-color: #eef2ff;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  border-radius: 0.75rem;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

.btn-pill {
  border-radius: 9999px;
}

/* --------------------------------------------------------------------------
   Badge Components
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #f8fafc;
  color: #475569;
}

.badge-primary {
  background-color: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.badge-success {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.badge-warning {
  background-color: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.badge-danger {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* --------------------------------------------------------------------------
   Form Elements
   -------------------------------------------------------------------------- */
.input {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #0f172a;
  transition: box-shadow 0.2s;
}

.input::placeholder {
  color: #94a3b8;
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #4f46e5;
  border-color: #4f46e5;
}

.input-lg {
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
}

.input-group {
  display: flex;
}

.input-group .input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* --------------------------------------------------------------------------
   Animations & Transitions
   -------------------------------------------------------------------------- */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes gradient-x {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

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

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

.animate-scale-in {
  animation: scale-in 0.4s ease-out forwards;
}

.animate-slide-in-right {
  animation: slide-in-right 0.5s ease-out forwards;
}

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

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

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.animate-gradient-x {
  background-size: 200% 200%;
  animation: gradient-x 3s ease infinite;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* --------------------------------------------------------------------------
   Hover Effects
   -------------------------------------------------------------------------- */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.hover-glow {
  transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow);
}

.hover-scale {
  transition: transform var(--transition-fast);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-scale:active {
  transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   Icon Containers
   -------------------------------------------------------------------------- */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: #e0e7ff;
  color: #4f46e5;
}

.icon-box-sm {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.125rem;
}

.icon-box-md {
  width: 3rem;
  height: 3rem;
  font-size: 1.25rem;
}

.icon-box-lg {
  width: 4rem;
  height: 4rem;
  font-size: 1.5rem;
}

.icon-box-gradient {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   Dividers & Decorations
   -------------------------------------------------------------------------- */
.divider {
  border-top: 1px solid #e2e8f0;
}

.divider-gradient {
  height: 2px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.gradient-text {
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #0ea5e9);
  border-radius: inherit;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* --------------------------------------------------------------------------
   Background Patterns
   -------------------------------------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

.bg-dots {
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* --------------------------------------------------------------------------
   Testimonial Cards
   -------------------------------------------------------------------------- */
.testimonial-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: -1rem;
  left: -0.5rem;
  font-size: 4rem;
  color: #c7d2fe;
  font-family: serif;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Pricing Cards
   -------------------------------------------------------------------------- */
.pricing-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.pricing-card:hover {
  box-shadow: var(--shadow-xl);
}

.pricing-card-featured {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.pricing-card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #a855f7);
}

/* --------------------------------------------------------------------------
   Stats Display
   -------------------------------------------------------------------------- */
.stat-box {
  text-align: center;
  padding: 1.5rem;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 3rem;
  }
}

.stat-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

/* --------------------------------------------------------------------------
   Scrollbar Styling
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --------------------------------------------------------------------------
   Focus States (Accessibility)
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #4f46e5;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.glass {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background-color: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-balance {
  text-wrap: balance;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Container max widths */
.container-tight {
  max-width: 48rem;
}

.container-wide {
  max-width: 80rem;
}

/* --------------------------------------------------------------------------
   Hero Section Enhancements
   -------------------------------------------------------------------------- */
.hero-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.3), transparent),
    linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
}

.hero-pattern {
  background-image:
    radial-gradient(at 40% 40%, rgba(99, 102, 241, 0.15) 0, transparent 50%),
    radial-gradient(at 90% 10%, rgba(139, 92, 246, 0.12) 0, transparent 40%),
    radial-gradient(at 20% 80%, rgba(236, 72, 153, 0.08) 0, transparent 50%);
}

/* --------------------------------------------------------------------------
   Section Styles
   -------------------------------------------------------------------------- */
.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.section-sm {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-sm {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.section-header {
  text-align: center;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 4rem;
  }
}

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-subtitle {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: #475569;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* Gradient sections */
.section-gradient-light {
  background: linear-gradient(135deg, #f8fafc 0%, #fff 50%, rgba(238, 242, 255, 0.3) 100%);
}

.section-gradient-primary {
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #a855f7);
  color: #fff;
}

.section-gradient-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.nav-link-active {
  color: #4f46e5;
  background-color: #eef2ff;
  font-weight: 600;
}

.nav-link-active:hover {
  background-color: #e0e7ff;
}

/* --------------------------------------------------------------------------
   List Styles
   -------------------------------------------------------------------------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list > * + * {
  margin-top: 0.75rem;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.check-list li::before {
  content: '';
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  border-radius: 9999px;
  background-color: #d1fae5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310b981'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
  }

  .card, .btn {
    box-shadow: none;
    border: 1px solid #e2e8f0;
  }
}
