:root {
  --bg: #0D0D0F;
  --surface: #18181B;
  --border: #29292E;
  --text: #F2F2F0;
  --text-muted: #A0A0A8;
  --accent: #7C3AED;
  --accent-soft: #B9A3F5;
  --accent-wash: rgba(124, 58, 237, 0.15);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; margin: 0; }

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

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

button, .btn, .btn-primary, .btn-secondary {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.btn-primary { background: var(--accent); color: var(--text); transition: background 0.15s ease; }
.btn-primary:hover { background: #6D2EE0; }

.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); transition: border-color 0.15s ease; }
.btn-secondary:hover { border-color: #45454C; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.logo { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; }
.logo-mark { width: 22px; height: 22px; display: block; }

nav.main-nav { display: flex; gap: 1.75rem; }
nav.main-nav a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.15s ease; }
nav.main-nav a:hover, nav.main-nav a[aria-current="page"] { color: var(--text); }

.nav-toggle { display: none; background: none; border: none; padding: 0.5rem; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--text); position: relative;
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* Hero (index only) */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.badge {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  color: var(--accent-soft);
}

.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.25; max-width: 640px; }
.hero p.lead { color: var(--text-muted); max-width: 480px; margin: 0; }
.hero .actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

/* Page header (used at top of secondary pages instead of the hero) */
.page-header { padding: 4rem 0 3rem; text-align: center; }
.page-header h1 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); }
.page-header p { color: var(--text-muted); max-width: 480px; margin: 0.75rem auto 0; }

/* Section shell */
section { padding: 4rem 0; }
section.bordered { border-top: 0.5px solid var(--border); }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); }

/* Services */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }

.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.icon-wrap {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--accent-wash);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}

.icon-wrap svg { width: 18px; height: 18px; stroke: var(--accent-soft); }

.card h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.card p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* Differentiators */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.diff-item { padding: 1.1rem 0.4rem; border-top: 2px solid var(--accent); }
.diff-item h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.diff-item p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* Process */
.process { position: relative; }
.process-line {
  position: absolute; top: 18px; left: 12.5%; right: 12.5%;
  height: 1px; background: var(--border);
}
.process-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.6rem; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; color: var(--accent-soft);
  z-index: 1;
}
.process-step h3 { font-size: 0.9rem; }
.process-step p { color: var(--text-muted); font-size: 0.78rem; margin: 0; max-width: 160px; }

/* Case studies */
.case-source { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.metric { font-size: 1.75rem; color: var(--accent-soft); margin: 0 0 0.5rem; font-family: 'Space Grotesk', sans-serif; }
.card h4 { font-size: 0.85rem; font-weight: 500; margin: 0 0 0.4rem; }
.card .metric-desc { color: var(--text-muted); font-size: 0.78rem; margin: 0; }

.testimonial {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 620px;
  margin: 2.5rem auto 0;
  text-align: center;
}
.testimonial .quote-mark { font-family: 'Space Grotesk', sans-serif; color: var(--accent); font-size: 2rem; line-height: 1; }
.testimonial p.quote { margin: 0.75rem 0 1rem; font-size: 0.95rem; line-height: 1.6; }
.testimonial .author { display: flex; align-items: center; justify-content: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--border); }
.author-info { text-align: left; }
.author-info .name { font-size: 0.85rem; font-weight: 500; }
.author-info .role { font-size: 0.78rem; color: var(--text-muted); }

/* CTA */
.cta-box {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-glow {
  position: absolute; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, rgba(124,58,237,0) 70%);
  top: -110px; right: -70px;
}
.cta-box h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); max-width: 480px; margin: 0 auto; position: relative; }
.cta-box p { color: var(--text-muted); max-width: 400px; margin: 0.75rem auto 1.5rem; position: relative; }
.cta-box .actions { display: flex; gap: 0.75rem; justify-content: center; position: relative; }

/* Contact form */
.form-wrap { max-width: 560px; margin: 0 auto; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); outline-offset: 1px; }
.field textarea { resize: vertical; min-height: 100px; }
#form-status { font-size: 0.85rem; margin-top: 0.75rem; min-height: 1.2em; }
#form-status.success { color: #A3E635; }

/* Footer */
footer { border-top: 0.5px solid var(--border); padding: 2.5rem 0 1.5rem; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.footer-cols { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col .col-title { font-size: 0.8rem; font-weight: 500; }
.footer-col a, .footer-col span { color: var(--text-muted); font-size: 0.8rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 0.5px solid var(--border);
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom span { color: #5A5A62; font-size: 0.7rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .process { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem 0.9rem; }
  .process-line { display: none; }
}

@media (max-width: 640px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: block; }
  header.open nav.main-nav {
    display: flex; flex-direction: column; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 0.5px solid var(--border);
    padding: 1.25rem 1.5rem;
  }
  .header-inner .btn-primary { display: none; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 1.5rem; }
}
