/* =========================================================
   ZalNax.Ai — Brand System & Custom Styles
   ========================================================= */

:root {
  --navy-900: #0A1128;
  --navy-800: #0F1A3D;
  --navy-700: #17236B;
  --navy-600: #1E3A8A;
  --blue-500: #2E5BFF;
  --cyan-400: #22D3EE;
  --cyan-300: #67E8F9;
  --purple-500: #7C3AED;
  --magenta-500: #D946EF;
  --white: #FFFFFF;
  --gray-100: #F1F5F9;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-700: #334155;

  --gradient-brand: linear-gradient(135deg, #22D3EE 0%, #2E5BFF 45%, #7C3AED 75%, #D946EF 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.18) 0%, rgba(46, 91, 255, 0.18) 45%, rgba(124, 58, 237, 0.18) 75%, rgba(217, 70, 239, 0.18) 100%);

  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.35);
  --shadow-card: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --shadow-elev: 0 20px 60px -20px rgba(46, 91, 255, 0.5);
}

/* ---------- Base ---------- */
* {
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--navy-900);
  color: var(--gray-100);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------- Background textures ---------- */
.bg-mesh {
  background-color: var(--navy-900);
  background-image:
    radial-gradient(at 20% 10%, rgba(34, 211, 238, 0.15) 0, transparent 50%),
    radial-gradient(at 80% 0%, rgba(124, 58, 237, 0.18) 0, transparent 50%),
    radial-gradient(at 60% 100%, rgba(217, 70, 239, 0.12) 0, transparent 50%),
    radial-gradient(at 0% 60%, rgba(46, 91, 255, 0.15) 0, transparent 50%);
}
.bg-grid {
  background-image:
    linear-gradient(rgba(203, 213, 225, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 213, 225, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
.bg-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* ---------- Gradient utilities ---------- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}
.gradient-border {
  position: relative;
  background: var(--navy-800);
  border-radius: 1rem;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.btn-gradient {
  background: var(--gradient-brand);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 600;
  transition: all 0.4s ease;
  box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.6);
}
.btn-gradient:hover {
  background-position: 100% 100%;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(124, 58, 237, 0.8);
}
.btn-outline {
  border: 1px solid rgba(203, 213, 225, 0.25);
  background: rgba(15, 26, 61, 0.4);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(46, 91, 255, 0.15);
  transform: translateY(-2px);
}

/* ---------- Glass cards ---------- */
.glass-card {
  background: rgba(15, 26, 61, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(203, 213, 225, 0.1);
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.glass-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-6px);
  box-shadow: var(--shadow-elev);
}
.glass-card-static {
  background: rgba(15, 26, 61, 0.55);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(203, 213, 225, 0.1);
  border-radius: 1rem;
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient-brand-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan-300);
  transition: all 0.3s ease;
}
.glass-card:hover .icon-box {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ---------- Navbar ---------- */
.nav-blur {
  background: rgba(10, 17, 40, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.08);
}
.nav-link {
  position: relative;
  color: var(--gray-300);
  font-weight: 500;
  padding: 0.5rem 0.25rem;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--gradient-brand);
  transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero-wrap {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.8;
}
.hero-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.45), rgba(34, 211, 238, 0.15) 50%, transparent 70%);
  filter: blur(80px);
  animation: float 10s ease-in-out infinite;
  pointer-events: none;
}
.hero-orb.one { top: -10%; right: -10%; }
.hero-orb.two { bottom: -15%; left: -10%; animation-delay: -5s; background: radial-gradient(circle at 50% 50%, rgba(217, 70, 239, 0.4), rgba(46, 91, 255, 0.15) 50%, transparent 70%); }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.1); }
}

/* ---------- Marquee (client logos) ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 4rem;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 4rem;
  flex-shrink: 0;
  animation: scroll 30s linear infinite;
}
@keyframes scroll {
  to { transform: translateX(-100%); }
}

/* ---------- Timeline (process) ---------- */
.process-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0.3;
  transform: translateY(-50%);
}
@media (max-width: 1024px) {
  .process-line { display: none; }
}
.process-step .step-num {
  background: var(--gradient-brand);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 2;
}

/* ---------- Stats counter ---------- */
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
}

/* ---------- Service cards ---------- */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service-card:hover::after { opacity: 1; }

/* ---------- Tech logos grid ---------- */
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(15, 26, 61, 0.6);
  border: 1px solid rgba(203, 213, 225, 0.12);
  border-radius: 999px;
  color: var(--gray-300);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
}
.tech-pill:hover {
  border-color: var(--cyan-400);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(34, 211, 238, 0.4);
}

/* ---------- Testimonial ---------- */
.testimonial-card {
  background: rgba(15, 26, 61, 0.55);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(203, 213, 225, 0.1);
  border-radius: 1.25rem;
  padding: 2rem;
  height: 100%;
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid rgba(203, 213, 225, 0.1);
  background: rgba(15, 26, 61, 0.4);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s;
}
.faq-item[open] {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(15, 26, 61, 0.7);
}
.faq-item summary {
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #fff;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--cyan-400);
  transition: transform 0.3s;
  font-weight: 300;
}
.faq-item[open] summary::after { content: '−'; transform: rotate(180deg); }
.faq-item .faq-body {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-300);
  line-height: 1.7;
}

/* ---------- Form ---------- */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(10, 17, 40, 0.6);
  border: 1px solid rgba(203, 213, 225, 0.15);
  border-radius: 0.5rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
  background: rgba(10, 17, 40, 0.9);
}
.form-input::placeholder { color: var(--gray-500); }
textarea.form-input { min-height: 140px; resize: vertical; }
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
}
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2322D3EE'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 111.08 1.04l-4.25 4.39a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

.toast {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 100;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  color: #fff;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.show { transform: translateX(0); }
.toast.success { background: linear-gradient(135deg, #22D3EE, #10B981); }
.toast.error { background: linear-gradient(135deg, #F43F5E, #D946EF); }

/* ---------- Floating buttons ---------- */
.fab-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.5);
  animation: pulse 2.5s ease-in-out infinite;
  transition: transform 0.2s;
}
.fab-whatsapp:hover { transform: scale(1.1); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.7); }
  50% { box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.5), 0 0 0 14px rgba(37, 211, 102, 0); }
}
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 5.5rem;
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s;
  box-shadow: var(--shadow-glow);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: 28rem;
  padding: 1.25rem;
  background: rgba(15, 26, 61, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(203, 213, 225, 0.15);
  border-radius: 0.75rem;
  color: var(--gray-300);
  font-size: 0.875rem;
  box-shadow: var(--shadow-card);
  transform: translateY(calc(100% + 2rem));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cookie-banner.show { transform: translateY(0); }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient-brand);
  z-index: 60;
  transition: width 0.1s linear;
}

/* ---------- Mobile drawer ---------- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(10, 17, 40, 0.98);
  backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 6rem 2rem 2rem;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  display: block;
  padding: 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(203, 213, 225, 0.08);
}

/* ---------- Filter pills (portfolio) ---------- */
.filter-pill {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: rgba(15, 26, 61, 0.5);
  border: 1px solid rgba(203, 213, 225, 0.12);
  color: var(--gray-300);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
}
.filter-pill.active, .filter-pill:hover {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
}

/* ---------- Pricing highlight ---------- */
.pricing-card.featured {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--navy-800), var(--navy-800)) padding-box,
    var(--gradient-brand) border-box;
  position: relative;
  transform: scale(1.03);
  z-index: 2;
}
.pricing-card.featured .badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: #fff;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Utility ---------- */
.section-pad { padding: 5rem 0; }
@media (min-width: 1024px) { .section-pad { padding: 7rem 0; } }
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 1rem;
}
.divider-grad {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), transparent);
}

/* Hide scrollbar on marquee etc */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* AOS override to not fight our CSS */
[data-aos] { pointer-events: auto; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-orb, .marquee-track, .fab-whatsapp { animation: none !important; }
}

/* ---------- Focus ring ---------- */
:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Prevent dark flashes on image load ---------- */
img { max-width: 100%; height: auto; }

/* ---------- Brand logo ---------- */
.brand-logo {
  /* Navbar/footer logo rendered as-is. */
}
