/* ==========================================================================
   XenERP — custom styles
   Tailwind Play CDN handles the bulk of styling; this file holds the few
   helpers, gradients and component polish that are easier in plain CSS.
   ========================================================================== */

:root {
  --brand: #6366f1;        /* indigo-500 */
  --brand-dark: #4f46e5;   /* indigo-600 */
  --teal: #3b82f6;         /* blue-500 */
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* offset for sticky nav on anchor jumps */
}

body {
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Brand gradient utilities ------------------------------------------------ */
.bg-brand-gradient {
  background-image: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
}
.bg-brand-gradient-soft {
  background-image: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
}
.text-brand-gradient {
  background-image: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Mesh background for hero / CTA */
.bg-mesh {
  background-color: #f8fafc;
  background-image:
    radial-gradient(at 18% 22%, rgba(99, 102, 241, 0.16) 0px, transparent 50%),
    radial-gradient(at 84% 12%, rgba(59, 130, 246, 0.14) 0px, transparent 50%),
    radial-gradient(at 70% 88%, rgba(79, 70, 229, 0.10) 0px, transparent 50%);
}

/* Cards ------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(99, 102, 241, 0.35);
  border-color: #c4b5fd;
}

/* Primary button ---------------------------------------------------------- */
.btn-primary {
  background-image: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(59, 130, 246, 0.6);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 28px -10px rgba(59, 130, 246, 0.7);
}
.btn-secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: #a78bfa;
  background: #f5f3ff;
}

/* Pills / badges ---------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .875rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}
.pill-brand {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

/* Section anchor offset helper ------------------------------------------- */
.section-anchor::before {
  content: "";
  display: block;
  height: 0;
}

/* Mobile nav -------------------------------------------------------------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
#mobile-menu.open {
  max-height: 420px;
}

/* FAQ accordion ----------------------------------------------------------- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform .2s ease;
}

/* Module tabs ------------------------------------------------------------- */
.module-panel {
  display: none;
}
.module-panel.active {
  display: block;
}
.module-tab.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

/* Nav link underline ------------------------------------------------------ */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #6366f1;
  transition: width .2s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Pricing highlight ------------------------------------------------------- */
.tier-popular {
  border-color: #6366f1;
  box-shadow: 0 30px 60px -30px rgba(99, 102, 241, 0.45);
}

/* Decorative grid --------------------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Respect reduced motion -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
