/* ================================================
   Multi-Agent System — Shared Styles
   Theme: Dark (#0B0D17), Accent: Indigo (#4F46E5)
   ================================================ */

/* === Base === */
* { font-family: 'Inter', system-ui, sans-serif; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: #0B0D17; color: #E0E7FF; margin: 0; }

/* === Scroll Progress Bar === */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #4F46E5, #7C3AED, #4F46E5);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

/* === Animated Gradient Blobs === */
.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite;
}

.gradient-blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.05));
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.gradient-blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12), rgba(79, 70, 229, 0.04));
  top: -100px;
  right: -150px;
  animation-delay: -4s;
}

.gradient-blob-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.03));
  bottom: -100px;
  left: 30%;
  animation-delay: -2s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

/* === Glassmorphism Nav === */
.nav-glass {
  background: rgba(11, 13, 23, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-glass.nav-scrolled {
  background: rgba(11, 13, 23, 0.85);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(79, 70, 229, 0.1);
}

/* === Gradient Text === */
.text-gradient {
  background: linear-gradient(135deg, #E0E7FF, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Glass Cards === */
.glass-card {
  background: rgba(17, 19, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.glass-card-hover {
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card-hover:hover {
  border-color: rgba(79, 70, 229, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.12), 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* === Glow Effects === */
.glow-violet {
  box-shadow: 0 0 80px rgba(79, 70, 229, 0.15);
}

.glow-sm {
  box-shadow: 0 0 40px rgba(79, 70, 229, 0.1);
}

/* === Browser Frame === */
.browser-frame {
  background: #111328;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #1A1D35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.browser-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.browser-url {
  margin-left: 12px;
  flex: 1;
  background: rgba(11, 13, 23, 0.5);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
  color: rgba(224, 231, 255, 0.3);
}

/* === Skeleton Animations === */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes skeletonToRendered {
  0%, 10% { opacity: 1; }
  15% { opacity: 0.6; }
  20%, 70% { opacity: 1; }
  75% { opacity: 0.6; }
  80%, 100% { opacity: 1; }
}

@keyframes fillHeader {
  0%, 20% { background: #1f2037; }
  30%, 80% { background: #111328; }
  90%, 100% { background: #1f2037; }
}

@keyframes fillHero {
  0%, 20% { background: #1f2037; }
  30%, 80% { background: linear-gradient(135deg, #4F46E5, #6366f1); }
  90%, 100% { background: #1f2037; }
}

@keyframes fillContent {
  0%, 20% { background: #1f2037; opacity: 0.5; }
  30%, 80% { background: #1A1D35; opacity: 1; }
  90%, 100% { background: #1f2037; opacity: 0.5; }
}

@keyframes fillFooter {
  0%, 20% { background: #1f2037; }
  30%, 80% { background: #0B0D17; }
  90%, 100% { background: #1f2037; }
}

@keyframes textAppear {
  0%, 20% { opacity: 0; width: 0; }
  35%, 80% { opacity: 1; width: 60%; }
  90%, 100% { opacity: 0; width: 0; }
}

@keyframes textAppearShort {
  0%, 20% { opacity: 0; width: 0; }
  35%, 80% { opacity: 1; width: 40%; }
  90%, 100% { opacity: 0; width: 0; }
}

.anim-header { animation: fillHeader 6s ease-in-out infinite; }
.anim-hero { animation: fillHero 6s ease-in-out infinite; }
.anim-content { animation: fillContent 6s ease-in-out infinite; }
.anim-footer { animation: fillFooter 6s ease-in-out infinite; }
.anim-text { animation: textAppear 6s ease-in-out infinite; }
.anim-text-short { animation: textAppearShort 6s ease-in-out infinite; }
.anim-content:nth-child(2) { animation-delay: 0.15s; }
.anim-content:nth-child(3) { animation-delay: 0.3s; }

/* === Demo Page Step Animations === */
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typeText {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes agentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
}

@keyframes agentActivate {
  0% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.02); border-color: #4F46E5; }
  100% { opacity: 1; transform: scale(1); border-color: #10B981; }
}

@keyframes wireframeAppear {
  from { opacity: 0; transform: scaleY(0.8); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes colorSweep {
  0% { filter: grayscale(100%); }
  100% { filter: grayscale(0%); }
}

@keyframes contentFill {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes finalReveal {
  0% { opacity: 0; transform: scale(0.98); box-shadow: 0 0 0 rgba(79, 70, 229, 0); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 60px rgba(79, 70, 229, 0.2); }
}

.demo-step { opacity: 0; }
.demo-step.active { animation: stepFadeIn 0.6s ease forwards; }
.demo-step.done { opacity: 1; }

.agent-card-demo {
  opacity: 0.3;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}

.agent-card-demo.activating {
  animation: agentPulse 1s ease infinite;
  opacity: 1;
  border-color: #4F46E5;
}

.agent-card-demo.completed {
  opacity: 1;
  border-color: #10B981;
}

/* Wireframe build animation */
.wireframe-block {
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: all 0.4s ease;
}

.wireframe-block.visible {
  opacity: 1;
  transform: scaleY(1);
}

/* Color sweep on the preview */
.preview-grayscale {
  filter: grayscale(100%);
  transition: filter 1.5s ease;
}

.preview-colorized {
  filter: grayscale(0%);
}

/* === Agent Activity Indicators === */
.agent-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.agent-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(224, 231, 255, 0.2);
  transition: background 0.3s ease;
}

.agent-indicator.active .dot {
  background: #4F46E5;
  animation: agentPulse 1.5s ease infinite;
}

.agent-indicator.done .dot {
  background: #10B981;
}

/* === Scroll Reveal with Stagger === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* === Agent Step (Timeline) === */
.agent-step {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.agent-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-progress {
  transition: height 0.3s ease;
}

/* === Tab System === */
.tab-btn {
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: #4F46E5;
  color: white;
}

/* === Template Gallery === */
.template-card .template-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.template-card:hover .template-overlay {
  opacity: 1;
}

/* === Pricing === */
.pricing-highlight {
  border: 2px solid #4F46E5;
  position: relative;
}

.pricing-highlight::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #4F46E5;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Pricing toggle */
.pricing-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.pricing-toggle-track {
  width: 48px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.pricing-toggle-track.active {
  background: #4F46E5;
}

.pricing-toggle-thumb {
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

.pricing-toggle-track.active .pricing-toggle-thumb {
  transform: translateX(22px);
}

/* Annual badge */
.annual-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}

/* === FAQ Accordion === */
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(79, 70, 229, 0.2);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: #E0E7FF;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: white;
}

.faq-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
  color: rgba(224, 231, 255, 0.4);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: #4F46E5;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(224, 231, 255, 0.5);
}

/* === Mobile Menu === */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 400px;
}

/* === Buttons === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: #4F46E5;
  color: white;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  background: #5B52F0;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35), 0 0 40px rgba(79, 70, 229, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: transparent;
  color: white;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(79, 70, 229, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1);
}

/* === Nav === */
.nav-link {
  font-size: 14px;
  color: rgba(224, 231, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4F46E5, #7C3AED);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: white;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: white;
}

.nav-link.active::after {
  width: 100%;
}

/* === Footer === */
.footer-link {
  font-size: 14px;
  color: rgba(224, 231, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: white;
}

/* === Feature Matrix === */
.feature-matrix {
  width: 100%;
  border-collapse: collapse;
}

.feature-matrix th {
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #E0E7FF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-matrix td {
  padding: 12px 16px;
  font-size: 14px;
  color: rgba(224, 231, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.feature-matrix tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* === Comparison Table === */
.compare-check {
  color: #10B981;
}

.compare-x {
  color: rgba(224, 231, 255, 0.2);
}

/* === Checkmark SVG helper === */
.check-icon {
  width: 16px;
  height: 16px;
  color: #4F46E5;
  flex-shrink: 0;
}

/* === Section Divider === */
.section-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-divider-gradient {
  position: relative;
}

.section-divider-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.4), transparent);
}

/* === Animated Counter === */
.counter-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* === Testimonial Card === */
.testimonial-card {
  background: rgba(17, 19, 40, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.2);
}

/* === Pricing Card Elevated === */
.pricing-elevated {
  transform: scale(1.04);
  box-shadow: 0 16px 60px rgba(79, 70, 229, 0.15), 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10;
  position: relative;
}

/* === Hero Floating Mockup === */
.hero-mockup {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* === ZeDigital Product Grid === */
.product-card {
  background: rgba(17, 19, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.product-card:hover {
  border-color: rgba(79, 70, 229, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.1);
  background: rgba(17, 19, 40, 0.6);
}

.product-card .product-name {
  font-size: 13px;
  font-weight: 600;
  color: #E0E7FF;
  margin-top: 8px;
}

.product-card .product-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 18px;
}

/* === Parallax Layer === */
.parallax-layer {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* === Responsive Helpers === */
@media (max-width: 768px) {
  .feature-matrix {
    font-size: 13px;
  }

  .feature-matrix th,
  .feature-matrix td {
    padding: 10px 8px;
  }
}

/* === Template Gallery Filter === */
.filter-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: #1A1D35;
  color: rgba(224, 231, 255, 0.6);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: white;
}

.filter-btn.active {
  background: #4F46E5;
  color: white;
}

/* === Copy Button === */
.copy-btn {
  font-size: 11px;
  color: #4F46E5;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  border-color: rgba(79, 70, 229, 0.3);
  color: white;
}

/* === Legal Pages === */
.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #E0E7FF;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: rgba(224, 231, 255, 0.9);
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal-content p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(224, 231, 255, 0.5);
  margin-bottom: 16px;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(224, 231, 255, 0.5);
  margin-bottom: 4px;
}

.legal-content a {
  color: #4F46E5;
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}
