/* ── Custom Properties ── */
:root {
  --bg: #050505;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-card: rgba(139, 92, 246, 0.12);
  --text: #f5f5f5;
  --text-muted: #a1a1aa;
  --accent-start: #7c3aed;
  --accent-end: #a855f7;
  --gradient: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  --radius: 16px;
  --max-w: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.08), transparent);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Interactive Grid Background ── */
.grid-bg-wrapper {
  position: fixed;
  top: -80%;
  left: -30%;
  right: -30%;
  bottom: -30%;
  z-index: 0;
  perspective: 800px;
  overflow: hidden;
}

.grid-bg-fade {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 8%, transparent 92%, var(--bg) 100%);
}

.grid-bg {
  width: 100%;
  height: 100%;
  opacity: 0.45;
  transform: rotateX(45deg) rotateZ(12deg);
  transform-origin: 50% 50%;
}

/* ── Utilities ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.4s ease;
}

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

.btn:active {
  transform: translateY(-1px);
  transition-duration: 0.1s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.2);
  position: relative;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient);
  opacity: 0;
  filter: blur(16px);
  z-index: -1;
  transition: opacity 0.4s ease;
}

.btn-primary:hover {
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover::after {
  opacity: 0.35;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.4s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── Scroll Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-scale {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-scale.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── Hero Entrance Keyframes ── */
@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-fade-scale {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.12; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.18; transform: translateX(-50%) scale(1.05); }
}

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

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 16px 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  animation: hero-fade-up 0.6s var(--ease-out) both;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav.scrolled .nav-logo,
.nav.scrolled .nav-links {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.nav-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(124,92,252,0.30), rgba(124,92,252,0.12));
  box-shadow: 0 0 14px rgba(124,92,252,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-icon svg {
  display: block;
  margin-left: 4.5px;
  margin-top: 1.5px;
}

.nav-logo-text {
  font-family: 'Red Hat Display', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
  position: relative;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gradient);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .nav-btn {
  padding: 10px 22px;
  font-size: 0.875rem;
  box-shadow: none;
  color: #fff !important;
}

.nav-btn:hover {
  box-shadow: 0 6px 32px rgba(124, 58, 237, 0.5);
}

.nav-btn::after {
  display: none;
}

/* ── Hero ── */
.hero {
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22) 0%, rgba(168, 85, 247, 0.1) 40%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.14) 0%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 8s ease-in-out 2s infinite;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-top {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  margin-top: -100px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
  animation: hero-fade-up 0.7s var(--ease-out) 0.1s both;
}

.hero-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: badge-pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
  animation: hero-fade-up 0.8s var(--ease-out) 0.2s both;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
  animation: hero-fade-up 0.8s var(--ease-out) 0.35s both;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: hero-fade-up 0.8s var(--ease-out) 0.5s both;
}

.hero-preview {
  margin-top: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-card);
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
  opacity: 0;
  transform: scale(0.92) translateY(60px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), box-shadow 0.4s ease;
}

.hero-preview.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.25);
}

.hero-preview::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.5), transparent 50%, rgba(168, 85, 247, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-preview img {
  width: 100%;
  display: block;
}

.hero-preview-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.08));
}

/* ── Section shared ── */
section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

footer {
  position: relative;
  z-index: 1;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0), rgba(168, 85, 247, 0.7), rgba(124, 58, 237, 0), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 40px rgba(124, 58, 237, 0.12);
}

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

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.5);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── Semantic Demo ── */
.semantic-demo {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.demo-query,
.demo-results {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 24px 28px;
  backdrop-filter: blur(12px);
}

.demo-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.demo-input {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 500;
}

.demo-input svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.demo-typed {
  color: var(--text);
}

.demo-cursor {
  color: var(--accent-start);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  50% { opacity: 0; }
}

.demo-arrow {
  display: flex;
  justify-content: center;
  padding: 12px 0;
  color: var(--text-muted);
  opacity: 0.3;
}

.demo-result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}

.demo-result.show {
  opacity: 1;
  transform: translateX(0);
}

.demo-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.badge-pdf { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-xls { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-ppt { background: rgba(251, 146, 60, 0.15); color: #fb923c; }

.demo-filename {
  font-size: 0.9rem;
  color: #d4d4d8;
  font-weight: 500;
}

/* ── Popup Preview ── */
.popup-preview {
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-card);
  overflow: hidden;
  background: var(--bg-card);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}

.popup-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2);
}

.popup-preview img {
  width: 100%;
  display: block;
}

/* ── How it works ── */
.steps-wrapper {
  position: relative;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}

/* Animated connecting line (single line, icons cover it) */
.steps-line {
  position: absolute;
  top: 36px;
  left: 16.666%;
  right: 16.666%;
  height: 2px;
  z-index: 0;
}

.steps-line-track {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.steps-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--gradient);
  background-size: 200% 100%;
  animation: gradient-shift 3s ease infinite;
  transition: width 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.steps-line-fill.animate {
  width: 100%;
}


.step {
  text-align: center;
  position: relative;
}

.step-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #050505;
  border: 2px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.4s var(--ease-spring), background 0.5s ease;
}

.step-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-muted);
  stroke-width: 1.8;
  fill: none;
  transition: stroke 0.5s ease, filter 0.5s ease;
}

/* Activate steps sequentially when line animates */
.step.step-active .step-icon {
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.3), inset 0 0 14px rgba(124, 58, 237, 0.08);
  background: #0a0714;
}

.step.step-active .step-icon svg {
  stroke: #c4b5fd;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.step:hover .step-icon {
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: 0 0 36px rgba(124, 58, 237, 0.35);
  transform: scale(1.1);
}

.step:hover .step-icon svg {
  stroke: #c4b5fd;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ── Download CTA ── */
.cta {
  text-align: center;
  padding: 80px 0 100px;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 64px 40px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease;
}

.cta-box:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, rgba(168, 85, 247, 0.06) 40%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 5s ease-in-out infinite;
}

.cta-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.6), transparent);
}

.cta-box .section-title {
  position: relative;
  z-index: 1;
}

.cta-box .section-subtitle {
  position: relative;
  z-index: 1;
  margin: 0 auto 36px;
}

.cta-box .btn {
  position: relative;
  z-index: 1;
}

/* ── Footer ── */
.footer {
  border-top: none;
  padding: 32px 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient);
  transition: width 0.3s var(--ease-out);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-links a:hover::after {
  width: 100%;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps-line {
    display: none;
  }

  .cta-box {
    padding: 48px 24px;
  }

  .hero {
    padding: 100px 24px 60px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
