/* ═══════════════════════════════════════════
   ZAKII.AI LANDING PAGE — CUSTOM STYLES
   ═══════════════════════════════════════════ */

/* ── Base ────────────────────────────────── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(0, 212, 255, 0.25);
  color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0f1e;
}
::-webkit-scrollbar-thumb {
  background: #1a1f2e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2a2f3e;
}

/* ── Navigation ──────────────────────────── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  will-change: transform;
}

/* ── Scroll Reveal Animations ────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-150 { transition-delay: 0.15s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* ── Chat Demo ───────────────────────────── */
.chat-msg {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chat-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

.msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.customer-msg {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  margin-left: auto;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.ai-msg {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.15);
  color: #e5e7eb;
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: rgba(0, 212, 255, 0.6);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ── ROI Calculator Sliders ──────────────── */
.roi-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: #00d4ff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4), 0 0 4px rgba(0, 212, 255, 0.2);
  transition: box-shadow 0.2s ease;
}

.roi-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.6), 0 0 6px rgba(0, 212, 255, 0.3);
}

.roi-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: #00d4ff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

/* ── FAQ Accordion ───────────────────────── */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-content {
  max-height: 500px;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-item.active {
  background: rgba(255, 255, 255, 0.02);
}

/* ── Select Dropdown Arrow ───────────────── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* ── Feature Cards Hover Glow ────────────── */
.feature-card > div {
  position: relative;
}

.feature-card > div::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.feature-card > div:hover::before {
  opacity: 1;
}

/* ── Mobile Sticky CTA ──────────────────── */
#mobileCta.visible {
  transform: translateY(0);
}

/* ── Counter Animation ──────────────────── */
[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* ── Gradient Text Fallback ─────────────── */
@supports not (background-clip: text) {
  .bg-clip-text {
    color: #00d4ff;
  }
}

/* ── Form Focus Ring ─────────────────────── */
input:focus,
select:focus {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ── Pricing Card Glow ──────────────────── */
.pricing-card {
  position: relative;
}

.pricing-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f59e0b, #d97706, #f59e0b, #fbbf24);
  background-size: 300% 300%;
  animation: pricingGlow 4s ease-in-out infinite;
  opacity: 0.4;
  z-index: -1;
}

@keyframes pricingGlow {
  0%, 100% { background-position: 0% 50%; opacity: 0.3; }
  50% { background-position: 100% 50%; opacity: 0.5; }
}

/* ── Control Section Mockup ────────────── */
.control-whisper {
  transition: border-color 0.3s ease;
}

.control-whisper:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

.control-btn {
  transition: all 0.2s ease;
}

.control-btn:hover {
  transform: translateY(-1px);
}

/* ── Special Offers Shimmer ────────────── */
.special-offers-pill {
  position: relative;
  overflow: hidden;
}

.special-offers-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* ── Free Trial Badge Pulse ────────────── */
.free-trial-badge {
  animation: trialPulse 3s ease-in-out infinite;
}

@keyframes trialPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ── Word-by-Word Reveal ───────────────── */
.word-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.word-reveal.revealed span {
  opacity: 1;
  transform: translateY(0);
}

/* ── Background Gradient Mesh Drift ────── */
.mesh-orb {
  will-change: transform;
}

.mesh-orb-1 { animation: meshDrift1 20s ease-in-out infinite; }
.mesh-orb-2 { animation: meshDrift2 25s ease-in-out infinite; }
.mesh-orb-3 { animation: meshDrift3 22s ease-in-out infinite; }

@keyframes meshDrift1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(50px, -30px); }
  66% { transform: translate(-30px, 50px); }
}

@keyframes meshDrift2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-40px, 60px); }
  66% { transform: translate(60px, -20px); }
}

@keyframes meshDrift3 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, 40px); }
  66% { transform: translate(-50px, -30px); }
}

/* ── Comparison Section ────────────────── */
.comparison-generic {
  border-left: 3px solid rgba(239, 68, 68, 0.3);
}

.comparison-zakii {
  border-left: 3px solid rgba(0, 212, 255, 0.5);
}

.comparison-zakii.revealed {
  animation: cyanPulse 0.6s ease-out;
}

@keyframes cyanPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.25); }
  100% { box-shadow: 0 0 0 20px rgba(0, 212, 255, 0); }
}

.vs-glow {
  animation: vsGlow 3s ease-in-out infinite;
}

@keyframes vsGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.15); }
  50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.3); }
}

/* ── Intelligence Hub ──────────────────── */
.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.15);
  animation: radarPulse 4s ease-out infinite;
}

.radar-ring:nth-child(2) { animation-delay: 1s; }
.radar-ring:nth-child(3) { animation-delay: 2s; }
.radar-ring:nth-child(4) { animation-delay: 3s; }

@keyframes radarPulse {
  0% { transform: scale(0.3); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.pillar-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.08);
}

/* ── Lead Sources Marquee ──────────────── */
.marquee-track {
  display: flex;
  animation: marquee 35s linear infinite;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Hero Chat Tab Switcher ────────────── */
.chat-tab {
  transition: all 0.3s ease;
  cursor: pointer;
}

.chat-tab.active-generic {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.chat-tab.active-zakii {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
}

.chat-tab-content {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chat-tab-content.fade-out {
  opacity: 0;
  transform: translateX(10px);
}

/* Generic bot message style */
.generic-msg {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.12);
  color: #9ca3af;
  border-bottom-left-radius: 4px;
}

/* ── Magnetic CTA Button ───────────────── */
.magnetic-btn {
  transition: transform 0.15s ease;
}

/* ── 3D Tilt Card ──────────────────────── */
.tilt-card {
  transition: transform 0.15s ease;
  transform-style: preserve-3d;
}

/* ── Responsive Adjustments ─────────────── */
@media (max-width: 768px) {
  .msg-bubble {
    max-width: 90%;
    font-size: 12px;
  }

  #chatDemo {
    min-height: 320px;
  }

  /* Pricing card mobile adjustments */
  .pricing-card {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 70px;
  }

  /* Lead sources horizontal scroll on mobile */
  .lead-sources-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .lead-sources-scroll::-webkit-scrollbar {
    display: none;
  }
}

/* ── Intelligence Hub Responsive ───────── */
@media (max-width: 1024px) {
  .hub-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .hub-center {
    position: relative;
    margin-bottom: 1rem;
  }

  .pillar-card {
    width: 100%;
    max-width: 400px;
  }
}

/* ── Accessibility: 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;
  }

  .marquee-track {
    animation: none !important;
  }

  .word-reveal span {
    opacity: 1 !important;
    transform: none !important;
  }
}
