* { -webkit-font-smoothing: antialiased; }
body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }

:root {
  --brand:     #402BCA;
  --brand2:    #5e47ec;
  --secondary: #4DA1A9;
  --accent:    #FF7700;
  --ink:       #0a0a0a;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Light mode base — polished, gradient washes ──────────────────── */
body {
  background-color: #fafafa;
  color: #0a0a0a;
  background-image:
    radial-gradient(at 20% 10%, rgba(64,43,202,0.05) 0px, transparent 50%),
    radial-gradient(at 80% 30%, rgba(77,161,169,0.05) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(255,119,0,0.04) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ── Subtle drifting dot grid behind everything (light + dark) ────── */
body::before {
  content: '';
  position: fixed;
  inset: -50px;
  background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1.5px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: -1;
  animation: drift 90s linear infinite;
}
html.dark body::before {
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1.5px);
}
@keyframes drift {
  from { background-position: 0 0; }
  to   { background-position: 36px 36px; }
}

/* ── commit logo ──────────────────────────────────────────────────── */
.logo {
  display: inline-block;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  border-bottom: 2.5px solid #402BCA;
  padding-bottom: 2px;
}
.logo .dark   { color: #0a0a0a; }
.logo .accent { color: #402BCA; }
html.dark .logo .dark   { color: #ffffff; }
html.dark .logo .accent { color: #8270ff; }


/* ── Step cards ───────────────────────────────────────────────────── */
.step-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  transition: transform 0.7s var(--ease),
              border-color 0.6s var(--ease),
              box-shadow 0.7s var(--ease),
              background 0.5s var(--ease);
  will-change: transform;
}
.step-card:hover {
  transform: translateY(-6px);
  border-color: rgba(64,43,202,0.25);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 20px 50px -16px rgba(64,43,202,0.25),
              0 6px 18px -8px rgba(64,43,202,0.12);
}
.step-num {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 0.7rem; font-weight: 700;
  color: #402BCA; letter-spacing: 0.15em;
}
html.dark .step-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.06);
}
html.dark .step-card:hover {
  border-color: rgba(130,112,255,0.35);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 20px 50px -16px rgba(130,112,255,0.35),
              0 6px 18px -8px rgba(130,112,255,0.18);
}
html.dark .step-num { color: #8270ff; }

/* ── Feature cards (bento) ────────────────────────────────────────── */
.feature-card {
  position: relative;
  padding: 1.75rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  transition: transform 0.7s var(--ease),
              border-color 0.6s var(--ease),
              background 0.5s var(--ease),
              box-shadow 0.7s var(--ease);
  will-change: transform;
  overflow: hidden;
}
.feature-card::after {
  /* Subtle gradient sheen — slow fade in/out, position lerped from JS */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(64,43,202,0.12), transparent 45%);
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  pointer-events: none;
  border-radius: inherit;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(64,43,202,0.3);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 20px 50px -16px rgba(64,43,202,0.22),
              0 6px 18px -8px rgba(64,43,202,0.10);
}
.feature-card:hover::after { opacity: 1; }
html.dark .feature-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.06);
}
html.dark .feature-card:hover {
  border-color: rgba(130,112,255,0.4);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 20px 50px -16px rgba(130,112,255,0.3),
              0 6px 18px -8px rgba(130,112,255,0.15);
}
html.dark .feature-card::after {
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(130,112,255,0.18), transparent 40%);
}

/* ── Marquee items (high-volume list) ────────────────────────────── */
.marquee-item {
  opacity: 0.5;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.marquee-item:hover { opacity: 1; transform: translateY(-3px); }

/* ── Stat blocks ──────────────────────────────────────────────────── */
.stat-block { padding: 1rem; }
.stat-num {
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #402BCA 0%, #4DA1A9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: shift 8s ease infinite;
}
@keyframes shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.stat-desc {
  font-size: 0.82rem;
  color: #666;
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
html.dark .stat-desc { color: #d8d8d8; }

/* ── FAQ — smooth grid-rows animation, aligned padding ────────────── */
.faq-item {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.875rem;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: background 0.6s var(--ease),
              border-color 0.6s var(--ease);
}
.faq-item.open {
  background: rgba(255,255,255,0.95);
  border-color: rgba(64,43,202,0.2);
}

.faq-summary {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.25rem 3.5rem 1.25rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  color: inherit;
  position: relative;
  transition: padding 0.5s var(--ease);
}
.faq-summary::after {
  content: '';
  position: absolute;
  right: 1.75rem; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-position: center, center;
  background-size: 100% 2px, 2px 100%;
  background-repeat: no-repeat;
  color: #402BCA;
  transition: transform 0.5s var(--ease);
}
.faq-item.open .faq-summary::after { transform: translateY(-50%) rotate(135deg); }
html.dark .faq-summary::after { color: #8270ff; }

/* Smooth height: grid-rows trick. Padding goes on the COLLAPSIBLE wrapper
   so it aligns with the question text (1.75rem left). */
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.faq-body > div {
  overflow: hidden;
}
.faq-body-inner {
  padding: 0 1.75rem 1.5rem;
  color: #555;
  line-height: 1.7;
  font-size: 0.95rem;
}
.faq-item.open .faq-body { grid-template-rows: 1fr; }

html.dark .faq-item {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.06);
}
html.dark .faq-item.open {
  background: rgba(255,255,255,0.04);
  border-color: rgba(130,112,255,0.3);
}
html.dark .faq-body-inner { color: #e0e0e0; }

/* ── Mock dashboard ──────────────────────────────────────────────── */
.mock-nav {
  font-size: 11px;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  color: #666;
  transition: background 0.4s var(--ease);
}
.mock-nav.active {
  background: rgba(64,43,202,0.1);
  color: #402BCA;
  font-weight: 600;
}
html.dark .mock-nav { color: #777; }
html.dark .mock-nav.active { background: rgba(130,112,255,0.15); color: #a092ff; }

.stat-mock {
  position: relative;
  padding: 0.55rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(0,0,0,0.06);
  background: white;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
@media (min-width: 768px) {
  .stat-mock { padding: 0.75rem; }
}
.stat-mock:hover { transform: translateY(-2px); border-color: rgba(64,43,202,0.2); }
html.dark .stat-mock { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.06); }
html.dark .stat-mock:hover { border-color: rgba(130,112,255,0.3); }

.stat-label { font-size: 8px; text-transform: uppercase; letter-spacing: 0.05em; color: #999; font-weight: 500; }
.stat-value { font-size: 1rem; font-weight: 700; margin-top: 0.15rem; letter-spacing: -0.02em; line-height: 1.1; }
.stat-spark { position: absolute; bottom: 6px; right: 6px; width: 44px; height: 16px; opacity: 0.7; }

@media (min-width: 768px) {
  .stat-label { font-size: 9px; }
  .stat-value { font-size: 1.3rem; margin-top: 0.25rem; }
  .stat-spark { bottom: 8px; right: 8px; width: 60px; height: 20px; }
}

/* ── Floating glow orbs (more lively now) ─────────────────────────── */
@keyframes float-1 {
  0%, 100% { transform: translateY(0)    translateX(0)   scale(1); }
  33%      { transform: translateY(-30px) translateX(20px) scale(1.05); }
  66%      { transform: translateY(20px)  translateX(-15px) scale(0.95); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0)    translateX(0); }
  50%      { transform: translateY(-40px) translateX(-20px); }
}
@keyframes float-3 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(30px); }
}
/* Glow orbs combine continuous floating with scroll-driven offset.
   The CSS variable --scroll-y is updated from JS via passive scroll handler. */
.orb-1 { animation: float-1 22s ease-in-out infinite; transform: translateY(var(--scroll-y, 0)); will-change: transform; }
.orb-2 { animation: float-2 26s ease-in-out infinite; transform: translateY(var(--scroll-y, 0)); will-change: transform; }
.orb-3 { animation: float-3 20s ease-in-out infinite; transform: translateY(var(--scroll-y, 0)); will-change: transform; }

/* ── Nav blur + smooth show ───────────────────────────────────────── */
nav { transition: backdrop-filter 0.5s var(--ease), background-color 0.5s var(--ease); }

/* ── Dashboard mock — smooth scroll-driven tilt ──────────────────── */
#product .relative.max-w-6xl {
  transform-origin: center center;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}

/* ── Hero — smooth parallax & fade as user scrolls past ──────────── */
section.relative.pt-40 {
  transition: opacity 0.4s var(--ease);
  will-change: transform, opacity;
}

/* ── Buttons get magnetic-feel transition ─────────────────────────── */
a[href="#contact"], a[href^="mailto:"] {
  transition: transform 0.5s var(--ease), opacity 0.3s ease, box-shadow 0.5s var(--ease);
}

/* ── Prose (legal pages) ──────────────────────────────────────────── */
.prose p  { margin-bottom: 1rem; line-height: 1.75; }
.prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.prose h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: 1.125rem; font-weight: 600; }
.prose ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; line-height: 1.6; list-style-type: disc; }
.prose a  { color: #402BCA; text-decoration: underline; }
html.dark .prose a { color: #8270ff; }

/* ── Dark mode base ───────────────────────────────────────────────── */
html.dark body {
  background-color: #0a0a0a;
  color: #ffffff;
  background-image:
    radial-gradient(at 20% 10%, rgba(64,43,202,0.10) 0px, transparent 50%),
    radial-gradient(at 80% 30%, rgba(77,161,169,0.08) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(255,119,0,0.06) 0px, transparent 50%);
}
html.dark .bg-white { background-color: #161616 !important; color: #fff; }
html.dark .bg-gray-50 { background-color: #0a0a0a !important; }
/* Boosted contrast — most "gray" text in dark mode is now near-white */
html.dark .text-gray-900 { color: #ffffff !important; }
html.dark .text-gray-800 { color: #fafafa !important; }
html.dark .text-gray-700 { color: #f0f0f0 !important; }
html.dark .text-gray-600 { color: #e0e0e0 !important; }
html.dark .text-gray-500 { color: #c8c8c8 !important; }
html.dark .text-gray-400 { color: #b0b0b0 !important; }
html.dark .text-ink { color: #fff !important; }
html.dark .border-gray-100 { border-color: rgba(255,255,255,0.05) !important; }
html.dark .border-gray-200 { border-color: rgba(255,255,255,0.1) !important; }

.theme-toggle .moon { display: inline; }
.theme-toggle .sun  { display: none; }
html.dark .theme-toggle .moon { display: none; }
html.dark .theme-toggle .sun  { display: inline; }

html { scroll-behavior: smooth; }

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