/* ===== Base & Tokens ===== */
:root {
  --bg: #0a0a12;
  --bg-alt: #100f1c;
  --surface: #15142450;
  --surface-solid: #17162a;
  --border: #2a2940;
  --text: #f2f1fa;
  --text-dim: #a5a3c2;
  --text-dimmer: #716f92;
  --purple: #8b5cf6;
  --purple-light: #b39dfd;
  --green: #95bf47;
  --green-light: #b6e07a;
  --pink: #f472b6;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Space Grotesk', Inter, sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: var(--purple); color: #fff; }

/* ===== Reveal on scroll =====
   Text is fully visible by default so the page reads correctly with JS
   disabled/blocked (e.g. sandboxed IDE previews). The hidden starting
   state only applies once the inline head script confirms JS is running
   by adding .js to <html>. */
.reveal {
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
}
html.js .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.hero .reveal { transition-delay: calc(var(--d, 0) * 90ms); }

/* ===== Scroll progress bar ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--green));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ===== Cursor glow (desktop only) ===== */
.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(139,92,246,0.14), transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s ease;
  opacity: 0;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-glow.active { opacity: 1; }
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 22px 0;
  transition: padding 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  padding: 12px 0;
  background: rgba(10, 10, 18, 0.75);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--purple), var(--green));
  color: #0a0a12;
  font-weight: 800;
}
.accent { color: var(--green); }
.main-nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.nav-link {
  font-size: 0.92rem;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 1.5px;
  background: linear-gradient(90deg, var(--purple), var(--green));
  transition: width 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { margin-left: 12px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.main-nav.open-mobile {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0; right: 0;
  background: rgba(16, 15, 28, 0.92);
  backdrop-filter: blur(14px);
  padding: 20px 28px;
  gap: 18px;
  border-bottom: 1px solid var(--border);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn-primary {
  background: linear-gradient(135deg, var(--purple), #6d3ff0);
  color: #fff;
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -6px rgba(139, 92, 246, 0.8);
}
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--purple-light);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}
.btn-small { padding: 9px 16px; font-size: 0.85rem; }
.btn-large { padding: 15px 28px; font-size: 1rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.blob-1 { width: 520px; height: 520px; background: var(--purple); top: -160px; left: -120px; animation: float1 16s ease-in-out infinite; }
.blob-2 { width: 420px; height: 420px; background: var(--green); bottom: -140px; right: -100px; opacity: 0.28; animation: float2 20s ease-in-out infinite; }
.blob-3 { width: 320px; height: 320px; background: var(--pink); top: 30%; right: 15%; opacity: 0.2; animation: float3 14s ease-in-out infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px, 40px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px, -30px); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px, 30px) scale(1.1); } }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-light);
  background: rgba(149, 191, 71, 0.1);
  border: 1px solid rgba(149, 191, 71, 0.25);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(149,191,71, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(149,191,71, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(149,191,71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(149,191,71, 0); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 900px;
  margin: 0 auto 24px;
}
.highlight-swap {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple-light), var(--green-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.highlight-swap.swap-out { opacity: 0; transform: translateY(8px); }
.hero-sub {
  max-width: 620px;
  margin: 0 auto 38px;
  color: var(--text-dim);
  font-size: 1.08rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 70px;
  flex-wrap: wrap;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 0.8rem; color: var(--text-dimmer); }

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dimmer);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}
.scroll-line { width: 1px; height: 34px; background: var(--border); position: relative; overflow: hidden; }
.scroll-dot { position: absolute; width: 100%; height: 10px; background: var(--green); animation: scrollDown 1.8s ease-in-out infinite; }
@keyframes scrollDown { 0% { top: -10px; } 100% { top: 34px; } }

/* ===== Section shared ===== */
section { position: relative; padding: 120px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-desc { color: var(--text-dim); font-size: 1.02rem; }

/* ===== Shopify Apps section ===== */
.apps { background: linear-gradient(180deg, transparent, rgba(149,191,71,0.04), transparent); }
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 22px;
}
.app-card {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}
.app-card:hover {
  border-color: rgba(149, 191, 71, 0.4);
  box-shadow: 0 20px 50px -20px rgba(149, 191, 71, 0.25);
}
.app-card-feature {
  grid-column: span 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(149,191,71,0.1));
  border-color: rgba(139, 92, 246, 0.35);
}
.app-card-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(149,191,71,0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.app-card-feature:hover .app-card-glow { opacity: 1; }
.app-icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple-light);
  margin-bottom: 18px;
  transition: transform 0.35s var(--ease), background 0.35s ease;
}
.app-card:hover .app-icon { transform: rotate(-6deg) scale(1.08); }
.shopify-icon { background: rgba(149, 191, 71, 0.15); color: var(--green-light); }
.app-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 10px; }
.app-card p { color: var(--text-dim); font-size: 0.94rem; }
.app-card-feature h3 { font-size: 1.4rem; }
.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}
.app-tags li {
  font-size: 0.76rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(149,191,71,0.3);
  color: var(--green-light);
}

/* ===== Services (Branding / Landing Pages) ===== */
.service-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.service-panel {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px;
  transition: transform 0.4s var(--ease), border-color 0.4s ease;
}
.service-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.4);
}
.service-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-dimmer);
  display: block;
  margin-bottom: 20px;
}
.service-panel h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 12px; }
.service-panel p { color: var(--text-dim); margin-bottom: 20px; }
.check-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 14px; height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--purple), var(--green));
}

/* ===== Showcase ===== */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.showcase-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
}
.showcase-media {
  position: absolute; inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, hsl(var(--hue, 270) 70% 22%), hsl(calc(var(--hue, 270) + 40) 60% 14%));
  transition: transform 0.6s var(--ease);
}
.showcase-media span {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: -0.02em;
}
.showcase-card:hover .showcase-media { transform: scale(1.1); }
.showcase-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(0deg, rgba(6,6,12,0.94) 10%, rgba(6,6,12,0.5) 55%, transparent 100%);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.showcase-card:hover .showcase-overlay { opacity: 1; transform: translateY(0); }
.showcase-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-light);
  margin-bottom: 6px;
  font-weight: 700;
}
.showcase-overlay h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 8px; }
.showcase-overlay p { font-size: 0.86rem; color: var(--text-dim); }

/* ===== Customer Interaction ===== */
.interaction { background: linear-gradient(180deg, transparent, rgba(139,92,246,0.05), transparent); }
.interaction-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  margin-bottom: 80px;
}
.process-tabs { display: flex; flex-direction: column; gap: 6px; }
.process-tab {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.process-tab:hover { background: rgba(255,255,255,0.03); transform: translateX(4px); }
.process-tab.active {
  background: var(--surface-solid);
  border-color: var(--border);
}
.tab-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-dimmer);
  transition: color 0.3s ease;
}
.process-tab.active .tab-num { color: var(--green); }
.tab-copy { display: flex; flex-direction: column; gap: 3px; }
.tab-copy strong { font-size: 0.98rem; }
.tab-copy em { font-style: normal; font-size: 0.84rem; color: var(--text-dim); }

.process-display {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 280px;
  display: flex;
  align-items: center;
}
.process-panel { display: none; width: 100%; animation: fadeIn 0.5s var(--ease); }
.process-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.chat-mock { display: flex; flex-direction: column; gap: 12px; }
.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.chat-bubble.them { align-self: flex-start; background: #1f1e33; border-bottom-left-radius: 4px; }
.chat-bubble.us { align-self: flex-end; background: linear-gradient(135deg, var(--purple), #6d3ff0); color: #fff; border-bottom-right-radius: 4px; }

.preview-mock { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.preview-bar { display: flex; gap: 6px; padding: 12px 14px; background: #1c1b2e; }
.preview-bar span { width: 9px; height: 9px; border-radius: 50%; background: #3a3853; }
.preview-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.preview-line { height: 12px; border-radius: 6px; background: #24233a; }
.preview-line.w70 { width: 70%; }
.preview-line.w40 { width: 40%; }
.preview-line.w90 { width: 90%; }
.preview-line.w60 { width: 60%; }
.preview-badge {
  align-self: flex-start;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(139,92,246,0.15);
  color: var(--purple-light);
  margin-bottom: 4px;
}
.preview-badge.success { background: rgba(149,191,71,0.15); color: var(--green-light); }

.testimonials { max-width: 700px; margin: 0 auto; text-align: center; }
.testimonial-track { position: relative; min-height: 150px; }
.testimonial {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.testimonial.active { opacity: 1; transform: translateY(0); pointer-events: auto; position: relative; }
.testimonial p { font-size: 1.2rem; font-family: var(--font-display); font-weight: 500; margin-bottom: 20px; line-height: 1.5; }
.testimonial footer { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-dim); font-size: 0.88rem; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--c,270) 70% 60%), hsl(calc(var(--c,270) + 60) 70% 55%));
  display: inline-block;
}
.testimonial-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.testimonial-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  transition: background 0.3s ease, transform 0.3s ease;
}
.testimonial-dots button.active { background: var(--green); transform: scale(1.3); }

/* ===== CTA ===== */
.cta-box {
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(149,191,71,0.1));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 70px 40px;
  text-align: center;
}
.cta-box h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 14px; }
.cta-box p { color: var(--text-dim); margin-bottom: 32px; }
.cta-form { display: flex; gap: 12px; justify-content: center; max-width: 440px; margin: 0 auto; flex-wrap: wrap; }
.cta-form input {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 0.94rem;
}
.cta-form input:focus { outline: none; border-color: var(--purple-light); }
.form-note { margin-top: 16px; font-size: 0.8rem; color: var(--text-dimmer); }

/* ===== Footer ===== */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-dimmer);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .app-card-feature { grid-column: span 2; grid-template-columns: 1fr; text-align: left; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .service-split { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .interaction-layout { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 560px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-card-feature { grid-column: span 1; }
  .showcase-grid { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
  .nav-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
