/* ==========================================================================
   VisionDocs — Landing page styles
   Companion to the Tailwind CDN config in templates/marketing/base.html.
   Covers everything utility classes can't express cleanly: gradients,
   blobs, marquees, floating animation, gradient borders, mockups.
   ========================================================================== */

html { scroll-behavior: smooth; }

/* ── Fluid containers ──
   Landing page uses a wide fluid container (not Tailwind's fixed max-w-7xl):
   large breathing room on desktop, but never over 1700px (1800px for the hero,
   which can afford to feel a touch more expansive). Horizontal padding scales
   smoothly between mobile and ultra-wide via clamp(). */
.container-landing {
  width: 100%;
  max-width: 1700px;
  margin-inline: auto;
  padding-inline: clamp(24px, 5vw, 80px);
}
.container-hero {
  width: 100%;
  max-width: 1800px;
  margin-inline: auto;
  padding-inline: clamp(24px, 5vw, 80px);
}

::selection { background: #5B3DFF; color: #fff; }

/* ── Navbar ── */
#siteNav.nav-scrolled {
  background: rgba(248, 250, 252, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: #5B3DFF;
  transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Hero ── */
.bg-grid {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.hero-blob-1 {
  width: 480px; height: 480px;
  top: -120px; left: -120px;
  background: radial-gradient(circle, #5B3DFF 0%, transparent 70%);
}
.hero-blob-2 {
  width: 520px; height: 520px;
  top: 10%; right: -180px;
  background: radial-gradient(circle, #06B6D4 0%, transparent 70%);
}

.gradient-text {
  background: linear-gradient(100deg, #5B3DFF 0%, #2563EB 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.float-card { animation: floaty 5s ease-in-out infinite; }
.float-card[data-float="2"] { animation-delay: 0.6s; animation-duration: 6s; }
.float-card[data-float="3"] { animation-delay: 1.2s; animation-duration: 5.5s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.progress-fill { transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1); }

.magnetic-btn { will-change: transform; }

/* ── Trust marquee ── */
.marquee-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track, .marquee-track-slow { will-change: transform; }

.tech-logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: #0F172A;
  opacity: 0.28;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.tech-logo:hover { opacity: 0.6; }

/* ── Stats ── */
.stat-item { position: relative; }

/* ── Feature cards ── */
.feature-card {
  position: relative;
  border-radius: 1.5rem;
  padding: 1px;
  background: linear-gradient(140deg, rgba(91,61,255,0.15), rgba(6,182,212,0.08) 60%, transparent);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -20px rgba(91, 61, 255, 0.25);
}
.feature-card-inner {
  background: #fff;
  border-radius: calc(1.5rem - 1px);
  padding: 2.25rem;
  height: 100%;
}
.feature-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s;
}
.feature-card:hover .feature-icon { transform: scale(1.08) rotate(-4deg); }
.feature-tag {
  background: #F8FAFC;
  border-radius: 0.6rem;
  padding: 0.5rem 0.7rem;
  font-weight: 500;
  font-size: 0.82rem;
}
.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #5B3DFF;
}

/* ── Live demo ── */
.demo-step { transition: opacity 0.3s ease; }
.demo-phase-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #E2E8F0;
  flex-shrink: 0;
  position: relative;
}
.demo-phase.active .demo-phase-dot { background: #5B3DFF; }
.demo-phase.active .demo-phase-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #5B3DFF;
  opacity: 0.4;
  animation: pulse-ring 1.2s ease-out infinite;
}
.demo-phase.done .demo-phase-dot { background: #10B981; }
.demo-phase.done span { color: #0F172A; }
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── Why cards ── */
.why-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -18px rgba(15, 23, 42, 0.15);
  border-color: transparent;
}
.why-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}

/* ── Timeline ── */
.timeline-step { text-align: left; position: relative; }
.timeline-dot {
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #E2E8F0;
  color: #5B3DFF;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.timeline-step.in-view .timeline-dot {
  border-color: #5B3DFF;
  box-shadow: 0 0 0 6px rgba(91, 61, 255, 0.1);
}

/* ── MacBook mockup ── */
.macbook-frame {
  background: #0F172A;
  border-radius: 1.25rem 1.25rem 0.4rem 0.4rem;
  padding: 0.55rem 0.55rem 0;
  box-shadow: 0 40px 80px -30px rgba(15, 23, 42, 0.5);
  position: relative;
}
.macbook-notch {
  position: absolute;
  top: 0.55rem; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 14px;
  background: #0F172A;
  border-radius: 0 0 10px 10px;
  z-index: 2;
}
.macbook-screen {
  background: linear-gradient(160deg, #1a1440 0%, #0F172A 55%);
  border-radius: 0.7rem 0.7rem 0.2rem 0.2rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.macbook-base {
  height: 14px;
  margin: 0 -12px;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: 0 0 10px 10px;
  position: relative;
}
.macbook-base::after {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 90px; height: 6px;
  background: #64748b;
  border-radius: 0 0 6px 6px;
}

/* ── Pricing ── */
.pricing-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -20px rgba(15, 23, 42, 0.18); }
.pricing-card-popular {
  border-color: #5B3DFF;
  box-shadow: 0 20px 50px -18px rgba(91, 61, 255, 0.35);
}
.pricing-badge {
  position: absolute;
  top: -0.8rem; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(100deg, #5B3DFF, #06B6D4);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-cta {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #F8FAFC;
  color: #0F172A;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: background 0.2s, color 0.2s;
}
.pricing-cta:hover { background: #0F172A; color: #fff; }
.pricing-cta-primary { background: #5B3DFF; color: #fff; border-color: transparent; }
.pricing-cta-primary:hover { background: #4a2fe0; color: #fff; }

/* ── Testimonials ── */
.testimonial-card {
  background: #F8FAFC;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1.25rem;
  padding: 1.75rem;
  width: 360px;
  flex-shrink: 0;
}
.avatar-badge {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

/* ── FAQ ── */
.faq-item {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1rem;
  overflow: hidden;
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: #0F172A;
  background: none;
  border: none;
  cursor: pointer;
}
.faq-chevron { transition: transform 0.3s ease; color: #94a3b8; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: #5B3DFF; }
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s;
  padding: 0 1.5rem;
  color: rgba(15, 23, 42, 0.6);
  font-size: 0.92rem;
  line-height: 1.6;
}
.faq-item.open .faq-panel { padding: 0 1.5rem 1.5rem; }

/* ── Footer ── */
.social-icon {
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.social-icon:hover { background: #5B3DFF; color: #fff; }

/* ── Scroll-reveal base state (animated in by landing.js / GSAP) ── */
[data-reveal], [data-hero-el] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-hero-el] { opacity: 1 !important; transform: none !important; }
  .float-card, .marquee-track, .marquee-track-slow { animation: none !important; }
}
