/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #07070d;
  --bg-2: #0d0d1a;
  --bg-alt: #0a0a14;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-bright: rgba(255,255,255,0.14);

  --text-primary: #f0f0f8;
  --text-secondary: #8888a8;
  --text-muted: #55556a;

  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --cyan: #06b6d4;
  --teal: #14b8a6;

  --grad: linear-gradient(135deg, #7c3aed, #2563eb);
  --grad-text: linear-gradient(135deg, #a78bfa 0%, #60a5fa 50%, #34d399 100%);
  --grad-glow: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124,58,237,0.25) 0%, transparent 70%);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 20px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--purple-light);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
  margin-top: 16px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header .section-tag {
  justify-content: center;
}
.section-header .section-tag::before { display: none; }
.section-header .section-sub { margin: 16px auto 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(124,58,237,0);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.4);
}

.btn-ghost {
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  background: var(--surface);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

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

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: var(--transition);
}
.nav.scrolled {
  background: rgba(7,7,13,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}
.logo-text { color: var(--text-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links li a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-links li a:hover { color: var(--text-primary); background: var(--surface); }

.nav-cta {
  background: var(--grad) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  font-size: 14px;
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 13, 0.8);
  z-index: 1;
  pointer-events: none;
}
.hero-grid-bg, .hero-glow, .hero-inner, .scroll-indicator {
  z-index: 2;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%);
  top: -200px; left: -100px;
}
.hero-glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  top: 100px; right: -150px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 140px 24px 80px;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #22c55e; }
  50% { opacity: 0.6; box-shadow: 0 0 16px #22c55e; }
}

.hero-headline {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

.scroll-indicator {
  position: absolute;
  bottom: 48px;
  right: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
.scroll-indicator span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  overflow: hidden;
  background: var(--bg-2);
}

.marquee-track { overflow: hidden; }
.marquee-inner {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.marquee-inner span { padding: 0 24px; }
.marquee-inner .sep { color: var(--purple); padding: 0; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 120px 0; }
.section-dark { background: var(--bg-2); position: relative; overflow: hidden; }
.section-alt { background: var(--bg-alt); }

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg);
  padding: 40px 36px;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}
.service-card:hover {
  background: var(--bg-2);
  z-index: 1;
}
.service-card:hover .service-card-glow { opacity: 1; }

.service-card-featured {
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(37,99,235,0.05));
}

.service-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(124,58,237,0.12) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

.service-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--purple-light);
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.service-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-list li {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-list li::before {
  content: '';
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--purple-light);
  flex-shrink: 0;
}

/* ============================================================
   WHY AI
   ============================================================ */
.why-glow {
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
  pointer-events: none;
}

.why-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.why-left {
  position: sticky;
  top: 120px;
}
.why-left .section-title { margin-bottom: 20px; }
.why-left .btn { margin-top: 32px; }

.why-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.why-card {
  background: var(--bg-2);
  padding: 32px 36px;
  position: relative;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.why-card:hover {
  background: rgba(124,58,237,0.06);
  border-left-color: var(--purple);
}
.why-card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--purple-light);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.why-card h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.why-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ============================================================
   PROCESS
   ============================================================ */
.process-steps {
  display: flex;
  flex-direction: column;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(to bottom, var(--purple), var(--blue), transparent);
}

.process-step {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 32px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.process-step:last-child { border-bottom: none; }
.process-step:hover .step-number {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  z-index: 1;
  transition: var(--transition);
}

.step-content { padding: 12px 0; }
.step-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.step-content p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; max-width: 560px; }

/* ============================================================
   RESULTS
   ============================================================ */
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.result-card {
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
}
.result-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-2);
  transform: translateY(-4px);
}

.result-num {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}
.result-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: block;
}
.result-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.capability-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.cap-icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(124,58,237,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}

/* ============================================================
   CTA / CONTACT
   ============================================================ */
.cta-section { position: relative; overflow: hidden; }
.cta-glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(80px);
  pointer-events: none;
}

.cta-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.cta-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.cta-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 48px;
}

/* ── HTMX form states ───────────────────────────────────────── */

/* Loading: hide label, show spinner text */
.btn-loading { display: none; }
.htmx-request .btn-label { display: none; }
.htmx-request .btn-loading { display: inline; }
.htmx-request#sendBtn { opacity: 0.7; pointer-events: none; cursor: not-allowed; }

/* Error banner */
.form-error-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.form-error-msg svg { flex-shrink: 0; margin-top: 1px; }
.form-error-detail {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.65;
  font-family: var(--mono);
}

/* Success state */
.form-success {
  text-align: center;
  padding: 60px 32px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
}
.form-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(16,185,129,0.15));
  border: 1px solid rgba(16,185,129,0.3);
  color: #34d399;
  margin-bottom: 24px;
}
.form-success h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}
.form-success p {
  color: var(--text-secondary);
  font-size: 16px;
}
.form-success strong { color: var(--text-primary); }

.contact-form { text-align: left; }
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.form-group select option { background: var(--bg-2); color: var(--text-primary); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: start;
  padding: 64px 24px;
  max-width: 1160px;
  margin: 0 auto;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--text-muted); max-width: 280px; line-height: 1.6; }

.footer-links { display: flex; gap: 80px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
}
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom span { font-size: 13px; color: var(--text-muted); }
.footer-mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   ANIMATIONS (intersection observer)
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .why-layout { grid-template-columns: 1fr; gap: 48px; }
  .why-left { position: static; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(7,7,13,0.96);
    backdrop-filter: blur(20px);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .hero-headline { font-size: 3rem; }
  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }
  .scroll-indicator { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .process-step { grid-template-columns: 48px 1fr; }
  .process-steps::before { left: 24px; }
  .step-number { width: 48px; height: 48px; }

  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-inner { padding: 120px 24px 60px; }
  .results-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .capability-strip { padding: 24px; }
}
