/* ============================================================
   UFUQ ERP - Shared Styles (Landing + Registration Pages)
   ============================================================ */

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== DARK HERO ===== */
.hero-dark {
  background: linear-gradient(135deg, #030712 0%, #0f172a 40%, #1e1b4b 70%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

/* Animated gradient mesh */
.hero-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 500px 300px at 80% 30%, rgba(139,92,246,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 50% 80%, rgba(6,182,212,0.08) 0%, transparent 70%);
  animation: meshMove 12s ease-in-out infinite;
}

@keyframes meshMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.02); }
  66% { transform: translate(-15px, 10px) scale(0.98); }
}

/* Grid dots overlay for hero */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}

/* ===== HERO ENTRANCE ANIMATIONS ===== */
@keyframes hero-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-animate { animation: hero-in 0.7s ease-out forwards; }
.hero-delay-1 { animation-delay: 0.1s; opacity: 0; }
.hero-delay-2 { animation-delay: 0.2s; opacity: 0; }
.hero-delay-3 { animation-delay: 0.35s; opacity: 0; }
.hero-delay-4 { animation-delay: 0.5s; opacity: 0; }

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
.float-animation { animation: float 6s ease-in-out infinite; }

/* ===== DASHBOARD MOCKUP ANIMATIONS ===== */
@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.bar-animate {
  transform-origin: bottom;
  animation: barGrow 1s ease-out forwards;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.2); }
  50% { box-shadow: 0 0 20px 5px rgba(59,130,246,0.1); }
}
.pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }

/* ===== TRUST BAR MARQUEE ===== */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
[dir="rtl"] @keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }

/* ===== CARD HOVER ===== */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
}
.bento-large { grid-column: span 2; grid-row: span 1; }
.bento-medium { grid-column: span 1; grid-row: span 1; }
.bento-small { grid-column: span 1; grid-row: span 1; }

@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-large { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-large { grid-column: span 1; }
}

/* Bento card glow on hover */
.bento-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}
.bento-card:hover::before { opacity: 1; }
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
}

/* Module-colored gradients for bento cards */
.bento-sales::before { background: linear-gradient(135deg, rgba(59,130,246,0.08), transparent 60%); }
.bento-accounting::before { background: linear-gradient(135deg, rgba(139,92,246,0.08), transparent 60%); }
.bento-inventory::before { background: linear-gradient(135deg, rgba(16,185,129,0.08), transparent 60%); }
.bento-pos::before { background: linear-gradient(135deg, rgba(249,115,22,0.08), transparent 60%); }
.bento-crm::before { background: linear-gradient(135deg, rgba(236,72,153,0.08), transparent 60%); }
.bento-hr::before { background: linear-gradient(135deg, rgba(6,182,212,0.08), transparent 60%); }
.bento-einvoice::before { background: linear-gradient(135deg, rgba(20,184,166,0.08), transparent 60%); }
.bento-multi::before { background: linear-gradient(135deg, rgba(99,102,241,0.08), transparent 60%); }

/* ===== FEATURE EXPLORER TABS ===== */
.explorer-tab {
  position: relative;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #6b7280;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: color 0.25s, background 0.25s;
  border: none;
  background: transparent;
}
.explorer-tab:hover { color: #374151; background: rgba(0,0,0,0.03); }
.explorer-tab.active {
  color: #2563eb;
  background: #eff6ff;
}
.explorer-content {
  animation: fadeSlideUp 0.4s ease-out;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== TESTIMONIALS - GLASS MORPHISM ===== */
.testimonial-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
}

/* ===== STATS - GRADIENT NUMBERS ===== */
.stat-number {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== COUNTER ANIMATION ===== */
@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
.count-animate { animation: countUp 0.5s ease-out forwards; }

/* ===== PRICING ===== */
/* Toggle */
.pricing-toggle input:checked + .pricing-toggle-track { background-color: #2563eb; }
.pricing-toggle input:checked + .pricing-toggle-track .pricing-toggle-thumb { transform: translateX(1.25rem); }

/* Glow border for popular plan */
.glow-border {
  box-shadow: 0 0 0 1px rgba(37,99,235,0.3), 0 0 40px -5px rgba(37,99,235,0.2);
}

/* Price transition */
.price-transition {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.price-changing {
  opacity: 0;
  transform: translateY(-8px);
}

/* Feature comparison table */
.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}
.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: #374151;
}
[dir="rtl"] .comparison-table th:first-child,
[dir="rtl"] .comparison-table td:first-child {
  text-align: right;
}

/* ===== HOW IT WORKS - CONNECTING LINES ===== */
.step-connector {
  position: absolute;
  top: 2rem;
  width: 100%;
  height: 2px;
}
.step-connector::after {
  content: '';
  position: absolute;
  top: 0;
  left: 60%;
  right: -40%;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #a78bfa);
  border-radius: 1px;
}
[dir="rtl"] .step-connector::after {
  left: auto;
  right: 60%;
  left: -40%;
  background: linear-gradient(270deg, #2563eb, #a78bfa);
}

/* ===== FAQ ===== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform 0.3s ease; }

/* ===== CTA - ANIMATED GRADIENT ===== */
.cta-gradient {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 30%, #7c3aed 60%, #2563eb 100%);
  background-size: 200% 200%;
  animation: ctaGradientMove 8s ease infinite;
}
@keyframes ctaGradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== NAVBAR SCROLL ===== */
.navbar-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
/* Dark navbar for dark hero */
.navbar-dark.navbar-scrolled {
  background: rgba(3, 7, 18, 0.92) !important;
  border-bottom-color: rgba(255,255,255,0.08) !important;
}

/* ===== MOBILE MENU SLIDE ===== */
.mobile-menu-enter {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}
.mobile-menu-enter.open {
  max-height: 500px;
  opacity: 1;
}

/* ===== REGISTRATION PAGE STYLES (preserved) ===== */
/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  border: 2px solid #d1d5db;
  color: #9ca3af;
  background: white;
}
.step-circle.active { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.step-circle.completed { border-color: #10b981; color: white; background: #10b981; }
.step-line { width: 60px; height: 2px; background: #d1d5db; transition: background 0.3s ease; }
.step-line.completed { background: #10b981; }

/* Subdomain input */
.subdomain-input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.3s;
}
.subdomain-input-wrapper:focus-within { border-color: #2563eb; }
.subdomain-input-wrapper input {
  border: none;
  outline: none;
  padding: 0.75rem 1rem;
  font-size: 1.125rem;
  flex: 1;
  min-width: 0;
}
.subdomain-input-wrapper .suffix {
  padding: 0.75rem 1rem;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 1.125rem;
  white-space: nowrap;
  border-left: 2px solid #d1d5db;
}

/* Provisioning animation */
.provisioning-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: #9ca3af;
  transition: color 0.3s;
}
.provisioning-step.active { color: #2563eb; }
.provisioning-step.completed { color: #10b981; }
.provisioning-step .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.provisioning-step.completed .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Plan card selection */
.plan-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.plan-card:hover { border-color: #93c5fd; }
.plan-card.selected { border-color: #2563eb; background: #eff6ff; }

/* Toggle switch (AR pricing) */
.toggle-switch {
  position: relative;
  width: 56px;
  height: 28px;
  background: #d1d5db;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-switch.active { background: #2563eb; }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.active::after { transform: translateX(28px); }

/* Pricing card */
.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.pricing-card.popular { position: relative; }
.pricing-card.popular .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  padding: 4px 16px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
[dir="rtl"] .pricing-card.popular .popular-badge {
  left: 50%;
  transform: translateX(-50%);
}

/* Feature cards */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Password toggle */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s;
}
.password-toggle:hover { color: #4b5563; }

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .subdomain-input-wrapper { flex-direction: row-reverse; }
[dir="rtl"] .subdomain-input-wrapper .suffix { border-left: none; border-right: 2px solid #d1d5db; }
[dir="rtl"] .toggle-switch::after { left: auto; right: 2px; }
[dir="rtl"] .toggle-switch.active::after { transform: translateX(-28px); }
[dir="rtl"] .marquee-track { animation-direction: reverse; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .step-line { width: 30px; }
  .step-circle { width: 32px; height: 32px; font-size: 0.75rem; }
}
