/* ============================================
   Inovexa ERP — Shared Stylesheet
   ============================================ */

/* ── Theme Custom Properties ─────────────────
   Navy & electric colors stored as raw RGB
   triplets so Tailwind's opacity utilities
   (bg-navy/50 etc.) work correctly.
   ─────────────────────────────────────────── */
:root {
  /* Dark mode (default) */
  --navy:           15  23  42;   /* #0f172a */
  --navy-light:     30  41  59;   /* #1e293b */
  --navy-mid:       51  65  85;   /* #334155 */
  --electric:       59 130 246;   /* #3b82f6 */
  --electric-dark:  37  99 235;   /* #2563eb */
  --electric-light: 96 165 250;   /* #60a5fa */
}

html.light-mode {
  --navy:           248 250 252;  /* #f8fafc */
  --navy-light:     255 255 255;  /* #ffffff */
  --navy-mid:       241 245 249;  /* #f1f5f9 */
  --electric:        37  99 235;  /* #2563eb  — darker for legibility on light bg */
  --electric-dark:   29  78 216;  /* #1d4ed8 */
  --electric-light:  59 130 246;  /* #3b82f6 */
}

/* ── Base ─────────────────────────────────── */
*, body { font-family: 'Inter', sans-serif; }
html   { scroll-behavior: smooth; }

/* Prevent FOUC when restoring saved theme */
html:not(.light-mode),
html.light-mode {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Light mode: override fixed Tailwind slate utilities ── */
html.light-mode .text-white,
html.light-mode .text-slate-100 { color: #0f172a !important; }
html.light-mode .text-slate-300  { color: #334155 !important; }
html.light-mode .text-slate-400  { color: #475569 !important; }
html.light-mode .text-slate-500  { color: #64748b !important; }
html.light-mode .text-slate-600  { color: #64748b !important; }
html.light-mode .text-slate-700  { color: #94a3b8 !important; }

/* Status / semantic colours — darken for light bg readability */
html.light-mode .text-green-400  { color: #16a34a !important; }
html.light-mode .text-red-400    { color: #dc2626 !important; }
html.light-mode .text-yellow-400 { color: #ca8a04 !important; }

/* ── Light mode: border overrides ─────────── */
html.light-mode .border-slate-700 { border-color: #cbd5e1 !important; }
html.light-mode .border-slate-800 { border-color: #e2e8f0 !important; }
html.light-mode .border-slate-600 { border-color: #d1d5db !important; }
html.light-mode .divide-slate-800 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e2e8f0 !important;
}

/* ── Light mode: background overrides ─────── */
html.light-mode .bg-slate-800  { background-color: #f1f5f9 !important; }
html.light-mode .bg-slate-700  { background-color: #e2e8f0 !important; }

/* pricing table alternating section headers */
html.light-mode .bg-navy\/40   { background-color: rgba(37, 99, 235, 0.05) !important; }

/* table head row */
html.light-mode table thead    { background-color: #f8fafc; }
html.light-mode tbody          { background-color: #ffffff; }
html.light-mode .hover\:bg-navy\/40:hover {
  background-color: rgba(37, 99, 235, 0.05) !important;
}

/* ── Light mode: hero gradient ─────────────── */
html.light-mode .hero-bg {
  background: linear-gradient(-45deg, #dbeafe, #eff6ff, #bfdbfe, #e0f2fe);
  background-size: 400% 400%;
  animation: grad-shift 10s ease infinite;
}

/* ── Light mode: navbar solid ──────────────── */
html.light-mode .navbar-solid {
  background-color: #ffffff !important;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.12) !important;
}

/* ── Light mode: mobile nav dropdown links ── */
html.light-mode [x-show="open"] a,
html.light-mode [x-show="open"] button.theme-toggle {
  color: #334155 !important;
}
html.light-mode [x-show="open"] a.text-white,
html.light-mode [x-show="open"] a[class*="text-white"] {
  color: #0f172a !important;
}
html.light-mode [x-show="open"] .border-slate-700 {
  border-color: #e2e8f0 !important;
}

/* ── Light mode: gradient text ─────────────── */
html.light-mode .grad-text {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Light mode: glow ──────────────────────── */
html.light-mode .glow {
  box-shadow: 0 4px 32px rgba(37, 99, 235, 0.18);
}

/* ── Light mode: dot background ─────────────── */
html.light-mode .dot-bg {
  background-image: radial-gradient(circle, rgba(37, 99, 235, 0.14) 1px, transparent 1px);
}

/* ── Light mode: form inputs ─────────────────── */
html.light-mode .form-input {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html.light-mode .form-input::placeholder { color: #94a3b8 !important; }
html.light-mode .form-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* ── Light mode: theme toggle button ────────── */
html.light-mode .theme-toggle {
  border-color: #cbd5e1 !important;
}
html.light-mode .theme-toggle:hover {
  border-color: #2563eb !important;
  background-color: rgba(37, 99, 235, 0.08) !important;
}
html.light-mode .theme-toggle .icon-sun,
html.light-mode .theme-toggle .icon-moon {
  color: #475569 !important;
}
html.light-mode .icon-sun-mobile,
html.light-mode .icon-moon-mobile { color: #475569 !important; }

/* ── Navbar: always solid background ─────── */
#navbar {
  background-color: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html.light-mode #navbar {
  background-color: rgba(248, 250, 252, 0.97) !important;
  border-bottom: 1px solid #e2e8f0;
}
.navbar-solid {
  background-color: #0f172a !important;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

/* ── Hero gradient (dark mode default) ─────── */
@keyframes grad-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-bg {
  background: linear-gradient(-45deg, #0f172a, #0f2550, #1e293b, #0a1628);
  background-size: 400% 400%;
  animation: grad-shift 10s ease infinite;
}

/* ── Floating animation (hero mockup) ──────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}
.float { animation: float 4s ease-in-out infinite; }

/* ── Marquee ──────────────────────────────── */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-inner { animation: marquee 28s linear infinite; }

/* ── Card hover lift ──────────────────────── */
.card-hover { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(59, 130, 246, 0.18);
}

/* ── Module card hover ──────────────────────── */
.module-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.module-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5) !important;
}

/* ── Pricing plan card ──────────────────────── */
.plan-card { transition: transform 0.25s ease; }
.plan-card:hover { transform: translateY(-4px); }

/* ── Integration logo hover ─────────────────── */
.integration-logo { transition: transform 0.2s ease, opacity 0.2s ease; }
.integration-logo:hover { transform: scale(1.08); opacity: 1 !important; }

/* ── Gradient text (dark mode) ──────────────── */
.grad-text {
  background: linear-gradient(135deg, #3b82f6, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Blue glow ──────────────────────────────── */
.glow { box-shadow: 0 0 40px rgba(59, 130, 246, 0.28); }

/* ── Back-to-top button ──────────────────────── */
#backToTop { transition: opacity 0.3s ease, transform 0.3s ease; }

/* ── Play button pulse ring ──────────────────── */
@keyframes pulse-ring {
  0%   { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.6);  opacity: 0; }
}
.play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #3b82f6;
  animation: pulse-ring 1.6s ease-out infinite;
  z-index: -1;
}

/* ── Dot / grid background ──────────────────── */
.dot-bg {
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Form inputs ─────────────────────────────── */
.form-input {
  background: #1e293b;
  border: 1px solid #334155;
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  font-size: 0.875rem;
}
.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-input::placeholder { color: #64748b; }
.form-check { accent-color: #3b82f6; }

/* ── Contact success animation ──────────────── */
@keyframes success-pop {
  0%   { transform: scale(0.8); opacity: 0; }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1);   opacity: 1; }
}
.success-anim { animation: success-pop 0.5s ease forwards; }

/* ── Page-enter fade ─────────────────────────── */
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}
body { animation: page-in 0.3s ease both; }
