/* ============================================================
   AL MOIZ SOFTWARE — Refined Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── CSS Variables ── */
:root {
  --ink:       #0d0a14;
  --plum:      #4B0082;
  --plum-mid:  #6B2FA1;
  --plum-soft: #9B59B6;
  --plum-glow: rgba(75, 0, 130, 0.18);
  --cream:     #F8F5FC;
  --lavender:  #EDE7F6;
  --white:     #ffffff;
  --muted:     #6B7280;
  --border:    rgba(75, 0, 130, 0.12);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;

  --shadow-card: 0 4px 24px rgba(75, 0, 130, 0.08);
  --shadow-hover: 0 16px 48px rgba(75, 0, 130, 0.18);
  --shadow-glow: 0 0 40px rgba(75, 0, 130, 0.25);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Bricolage Grotesque', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--lavender); }
::-webkit-scrollbar-thumb { background: var(--plum); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--plum-mid); }

/* ── Navbar ── */
.navbar {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(248, 245, 252, 0.88);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(75,0,130,0.06);
}

/* ── Hero gradient ── */
.hero-gradient {
  background: linear-gradient(160deg, #F8F5FC 0%, #EDE7F6 60%, #E4D8F2 100%);
}

/* ── Buttons ── */
.btn-primary {
  background: var(--plum);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px rgba(75,0,130,0.3);
  transition: all 0.25s ease;
}
.btn-primary:hover {
  background: var(--plum-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(75,0,130,0.38);
}

.btn-outline {
  border: 1.5px solid var(--plum);
  color: var(--plum);
  border-radius: 50px;
  font-weight: 600;
  background: transparent;
  transition: all 0.25s ease;
}
.btn-outline:hover {
  background: rgba(75,0,130,0.06);
  transform: translateY(-2px);
}

/* ── Section label ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--plum);
  background: rgba(75,0,130,0.08);
  border: 1px solid rgba(75,0,130,0.15);
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
}

/* ── Feature Panels (video section) ── */
.feature-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.feature-panel::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.6s ease;
}
.feature-panel:hover::before { left: 100%; }
.feature-panel:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.35); }

/* ── Feature Cards (Why Choose Us) ── */
.feature-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: cardFadeInUp 0.7s ease-out both;
}
.feature-card:nth-child(1) { animation-delay: 0.08s; }
.feature-card:nth-child(2) { animation-delay: 0.16s; }
.feature-card:nth-child(3) { animation-delay: 0.24s; }
.feature-card:nth-child(4) { animation-delay: 0.32s; }
.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(75,0,130,0.2);
}

/* ── Stat cards ── */
.stat-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.stat-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  box-shadow: 0 32px 64px rgba(75, 0, 130, 0.18) !important;
  border-color: rgba(75, 0, 130, 0.25) !important;
}

/* ── Article Cards ── */
.article-card {
  border-radius: var(--radius-md);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.article-card:hover { transform: translateY(-6px); }

/* ── Timeline Card ── */
.timeline-card {
  transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform, opacity;
}
.timeline-card:hover { transform: translateX(0) translateY(-8px) !important; }

/* ── Zoom overlay ── */
#zoom-overlay {
  background: linear-gradient(45deg, #1a0b2e, #2d1b69);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#zoom-image {
  filter: drop-shadow(0 0 50px rgba(88, 28, 135, 0.5));
  transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#video-section { transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
#feature-overlays { transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* ── Products section ── */
.product-tab-content { transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.product-tab-content.opacity-0 { opacity: 0; transform: translateY(32px); pointer-events:none; }
.product-tab-content.opacity-100 { opacity: 1; transform: translateY(0); pointer-events: auto; }
.content-wrapper { transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important; }
.product-card { animation: fadeInScale 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }

#hero-section {
  position: fixed;
  top: 64px; left: 0;
  width: 100%;
  height: calc(100vh - 64px);
  z-index: 30;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.6s ease;
}
#hero-section:not(.active) {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  z-index: -1;
}
#parallax-container { position: relative; height: 200vh; }
#mockup-container { position: relative; }
#mobile-mockup { z-index: 30; filter: drop-shadow(0 10px 25px rgba(0,0,0,0.2)); }
#desktop-mockup, #desktop-straight { z-index: 10; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12)); }
#products-section { position: relative; display: block; height: 400vh; background: #ECE1F5; }
#products-viewport {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: 40 !important;
  pointer-events: auto;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s ease-out;
}
#why-choose-us { position: relative; z-index: 20; }
.mobile-menu { transition: all 0.3s ease-in-out; }

/* ── Custom select ── */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3e%3cpath d='M19 14l-7 7m0 0l-7-7m7 7V3'%3e%3c/path%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25em 1.25em;
  padding-right: 3rem !important;
}
select option { color: black !important; background-color: rgb(28, 0, 56) !important; }

/* ── Force white text in dark sections ── */
#testimonials-section *:not(.text-yellow-400):not(.text-purple-600):not(button) { color: white !important; }
#contact-section * { color: white !important; }
#contact-section input::placeholder, #contact-section textarea::placeholder { color: rgba(255,255,255,0.6) !important; }
#contact-section input, #contact-section textarea, #contact-section select { color: white !important; }

/* ── AI Automation Section ── */
#ai-automation-section {
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

#ai-automation-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(107,47,161,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(75,0,130,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.ai-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.ai-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(107,47,161,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.ai-card:hover { border-color: rgba(107,47,161,0.4); transform: translateY(-6px); box-shadow: 0 20px 48px rgba(75,0,130,0.25); }
.ai-card:hover::before { opacity: 1; }

.ai-flow-step {
  position: relative;
}
.ai-flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 23px; top: 48px;
  width: 2px;
  height: calc(100% - 16px);
  background: linear-gradient(to bottom, rgba(107,47,161,0.6), rgba(107,47,161,0.1));
}

.ai-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--plum), var(--plum-mid));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(75,0,130,0.35);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  padding: 5px 12px;
  border-radius: 99px;
}
.ai-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  animation: pulseDot 1.8s ease-in-out infinite;
}

.ai-stat-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  transition: all 0.3s ease;
}
.ai-stat-pill:hover { background: rgba(107,47,161,0.15); border-color: rgba(107,47,161,0.3); }

/* ── Pulse dot ── */
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%        { opacity: 0.5; transform: scale(0.7); }
}

/* ── Ticket animation ── */
.ticket-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  animation: slideInTicket 0.5s ease both;
}
@keyframes slideInTicket {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Animations ── */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes cardFadeInUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}
@keyframes floatNumber {
  0%   { opacity: 0; transform: translateY(20px) scale(0.8); }
  50%  { opacity: 1; transform: translateY(-10px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(75,0,130,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(75,0,130,0); }
}
@keyframes growBar {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
@keyframes wave {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(-25%); }
}
@keyframes countUpGlow {
  0%   { transform: scale(1); text-shadow: none; }
  50%  { transform: scale(1.08); text-shadow: 0 0 20px rgba(75,0,130,0.4); }
  100% { transform: scale(1); text-shadow: none; }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(75,0,130,0.1); }
  50%       { border-color: rgba(75,0,130,0.4); }
}
@keyframes pulseCounter {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

.animate-float { animation: float 5s ease-in-out infinite; }
.pulse-glow    { animation: pulse-glow 2s ease-in-out infinite; }
.bar-animated  { transform-origin: bottom; animation: growBar 0.6s cubic-bezier(0.175,0.885,0.32,1.275) forwards; }
.wave-bg       { position: absolute; width: 200%; height: 100%; background: linear-gradient(45deg, transparent 30%, rgba(88,28,135,0.05) 50%, transparent 70%); animation: wave 20s linear infinite; }
.animated-border { animation: borderGlow 2s ease-in-out infinite; }
.counter.animating { animation: countUpGlow 0.5s ease; color: var(--plum); }
.floating-number { position: absolute; font-weight: bold; color: var(--plum); opacity: 0; pointer-events: none; animation: floatNumber 1.5s ease-out forwards; }
.gradient-border { position: relative; border: double 2px transparent; background-image: linear-gradient(white,white), linear-gradient(135deg,#4B0082,#6B2FA1); background-origin: border-box; background-clip: padding-box,border-box; }
.animate-pulse-glow { animation: pulse-glow 2s cubic-bezier(0.4,0,0.6,1) infinite; }
.icon-3d { transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.175,0.885,0.32,1.275); }
.icon-3d:hover { transform: rotateY(15deg) rotateX(10deg) translateZ(10px); }
.chart-container { position: relative; overflow: hidden; border-radius: 12px; }
.chart-tooltip { position: absolute; background: white; border-radius: 8px; padding: 8px 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); font-size: 12px; pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 100; }
.chart-tooltip.show { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .timeline-card { width: 100%; margin: 20px 0 !important; }
  .timeline-card.left-card, .timeline-card.right-card { transform: none !important; }
  .ai-flow-step:not(:last-child)::after { display: none; }
}
