:root {
  --purple: #9737A0;
  --pink: #D63962;
  --orange: #E24D3A;
  --navy: #0F1D32;
  --navy-light: #162844;
  --navy-mid: #1E3555;
  --white: #FFFFFF;
  --gray-50: #F7F7F8;
  --gray-100: #EDEDF0;
  --gray-200: #D4D4DA;
  --gray-400: #8E8E9A;
  --gray-500: #6B6B78;
  --gray-600: #4A4A56;
  --sans: 'Satoshi', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --gradient: linear-gradient(135deg, var(--purple), var(--pink), var(--orange));
  --gradient-h: linear-gradient(90deg, var(--purple), var(--pink), var(--orange));
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Gradient text utility ── */
.gradient-text {
  background: var(--gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 0 4rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nav-logo-wrap { display: flex; align-items: center; gap: 0.6rem; }
.nav-logo-link { display: flex; align-items: center; text-decoration: none; }
.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.nav-logo-img {
  display: block;
  height: 26px;
  width: auto;
}
.footer-logo-img {
  display: block;
  height: 22px;
  width: auto;
}

.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--navy); }

.nav-cta {
  background: var(--gradient) !important;
  -webkit-text-fill-color: var(--white) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.5rem !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  transition: opacity 0.2s !important;
  cursor: pointer;
}
.nav-cta:hover { opacity: 0.9 !important; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10rem 2rem 6rem;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
}
.hero-glow-1 { width: 600px; height: 600px; top: -10%; right: 10%; background: var(--purple); }
.hero-glow-2 { width: 500px; height: 500px; bottom: -5%; left: 15%; background: var(--orange); opacity: 0.08; }
.hero-glow-3 { width: 400px; height: 400px; top: 30%; left: 50%; transform: translateX(-50%); background: var(--pink); opacity: 0.06; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, black, transparent);
}

.hero-content { position: relative; z-index: 2; max-width: 800px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: 100px;
  padding: 0.4rem 1.3rem 0.4rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 10px rgba(214,57,98,0.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* Phase badge: for service pages indicating which methodology phase the service operates in */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  background-image:
    linear-gradient(rgba(15,29,50,0.7), rgba(15,29,50,0.7)),
    var(--gradient-h);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  margin-bottom: 1rem;
}
.phase-badge-label {
  color: rgba(255,255,255,0.5);
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.8rem;
  letter-spacing: -0.03em;
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  margin: 0 auto 3rem;
  line-height: 1.75;
  font-weight: 400;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gradient);
  color: var(--white);
  padding: 0.9rem 2rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(214,57,98,0.25); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.9rem 1.8rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  transition: all 0.2s;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.45); color: var(--white); }

/* ── Stats ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--navy-light);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.stat {
  padding: 2.5rem 2rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.stat:last-child { border-right: none; }
.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
}

/* ── Sections ── */
.section { padding: 7rem 4rem; }
.section-dark { background: var(--navy); color: var(--white); }
.section-light { background: var(--white); color: var(--navy); }
.section-alt { background: var(--gray-50); }

.section-header { margin-bottom: 4rem; }
.section-header.centered { text-align: center; max-width: 620px; margin-left: auto; margin-right: auto; margin-bottom: 4rem; }

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 400;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.05rem;
  line-height: 1.75;
  font-weight: 400;
}
.section-light .section-desc, .section-alt .section-desc { color: var(--gray-500); }
.section-dark .section-desc { color: rgba(255,255,255,0.7); }

/* ── Conductor split ── */
.conductor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--gray-100);
}
.conductor-content {
  padding: 6rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.conductor-visual {
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--gray-100);
  min-height: 520px;
  position: relative;
  overflow: hidden;
}

/* Orchestration diagram */
.orch {
  width: 300px;
  height: 300px;
  position: relative;
}
.orch-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--gray-200);
}
.orch-ring-1 { inset: 0; animation: spin 35s linear infinite; }
.orch-ring-2 { inset: 50px; animation: spin 25s linear infinite reverse; border-color: rgba(151,55,160,0.2); }
@keyframes spin { to { transform: rotate(360deg); } }

.orch-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(214,57,98,0.2);
  z-index: 3;
}
.orch-center img { width: 50px; height: 50px; border-radius: 50%; }

.orch-node {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-family: var(--mono);
  color: var(--gray-500);
  text-align: center;
  line-height: 1.2;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.orch-node-accent { border-color: rgba(214,57,98,0.25); background: rgba(214,57,98,0.04); color: var(--pink); }
.orch-node:nth-child(3) { top: -10px; left: 50%; transform: translateX(-50%); }
.orch-node:nth-child(4) { top: 50%; right: -10px; transform: translateY(-50%); }
.orch-node:nth-child(5) { bottom: -10px; left: 50%; transform: translateX(-50%); }
.orch-node:nth-child(6) { top: 50%; left: -10px; transform: translateY(-50%); }

/* ── Services ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-100);
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  overflow: hidden;
}
.service-card {
  background: var(--white);
  padding: 2.5rem;
  transition: background 0.2s;
}
.service-card:hover { background: var(--gray-50); }
.service-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}
.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--white);
  font-size: 1.1rem;
}
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.service-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.65;
}

/* ── Process ── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}
.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.process-step h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--white);
}
.process-step p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
}

/* Methodology cycle: connecting arc behind the four steps suggesting the cycle repeats */
/* The cycle return arc: a curved arrow from step 4 back to step 1, only on wide screens.
   Expects an inline <svg> with <linearGradient id="cycleGradient"> on the host page (added in plan Task 3 to index.html). */
.process-cycle-arc {
  display: none;
}
@media (min-width: 1025px) {
  .process-steps::before {
    content: '';
    position: absolute;
    top: 26px; /* aligns with the centre of the .process-num circles */
    left: 6%;
    right: 6%;
    height: 1px;
    background: linear-gradient(90deg,
      rgba(151,55,160,0.0) 0%,
      rgba(151,55,160,0.4) 8%,
      rgba(214,57,98,0.4) 50%,
      rgba(226,77,58,0.4) 92%,
      rgba(226,77,58,0.0) 100%);
    z-index: 0;
  }
  .process-cycle-arc {
    display: block;
    position: absolute;
    bottom: -2.5rem;
    left: 6%;
    right: 6%;
    height: 2rem;
    pointer-events: none;
  }
  .process-cycle-arc svg {
    width: 100%;
    height: 100%;
    overflow: visible;
  }
  .process-cycle-arc path {
    fill: none;
    stroke: url(#cycleGradient);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    opacity: 0.4;
  }
  .process-cycle-arc text {
    font-family: var(--mono);
    font-size: 0.65rem;
    fill: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
}

/* ── Terminal ── */
.platform-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}
.platform-content {
  padding: 6rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.platform-demo {
  background: var(--gray-50);
  padding: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--gray-100);
}
.terminal {
  width: 100%;
  max-width: 460px;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.74rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.terminal-bar {
  padding: 0.75rem 1rem;
  background: var(--navy-light);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 6px;
}
.td { width: 10px; height: 10px; border-radius: 50%; }
.td-r { background: #FF5F57; }
.td-y { background: #FEBC2E; }
.td-g { background: #28C840; }
.terminal-body {
  padding: 1.4rem;
  line-height: 2;
  min-height: 240px;
}
.t-prompt { color: var(--pink); }
.t-cmd { color: var(--white); }
.t-dim { color: rgba(255,255,255,0.5); }
.t-ok { color: #28C840; }
.t-agent { color: var(--purple); }
.t-blink {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--pink);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Testimonials ── */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.test-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  padding: 2.5rem;
  position: relative;
}
.test-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-h);
  border-radius: 14px 14px 0 0;
}
.test-quote {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--navy);
  margin-bottom: 2rem;
  font-weight: 400;
}
.test-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.test-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--white);
}
.test-meta h5 { font-size: 0.85rem; font-weight: 700; }
.test-meta span { font-size: 0.75rem; color: var(--gray-400); }

/* ── CTA ── */
.cta {
  text-align: center;
  padding: 8rem 4rem;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214,57,98,0.08), transparent);
}
.cta-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1.2rem;
  position: relative;
  letter-spacing: -0.02em;
}
.cta-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ── Footer ── */
footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 4rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  color: var(--white);
}
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.55); max-width: 260px; line-height: 1.65; margin-top: 1rem; }
.footer-location { font-family: var(--mono); font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-top: 1.2rem; }
.footer-col h6 {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
}
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.4); }

/* ── Gradient divider ── */
.gradient-divider {
  height: 3px;
  background: var(--gradient-h);
  width: 100%;
}

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  nav { padding: 0 2rem; }
  .section { padding: 5rem 2rem; }
  .hero { padding: 7rem 2rem 4rem; }
  .conductor { grid-template-columns: 1fr; }
  .conductor-visual { border-left: none; border-top: 1px solid var(--gray-100); min-height: 380px; }
  .conductor-content { padding: 4rem 2rem; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .platform-split { grid-template-columns: 1fr; }
  .platform-content { padding: 4rem 2rem; }
  .platform-demo { border-left: none; border-top: 1px solid var(--gray-100); padding: 2.5rem; }
  .testimonials { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  nav { padding: 0 1.25rem; height: 60px; }
  .nav-logo-img { height: 20px; }
  .nav-logo-icon { width: 30px; height: 30px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-cta { padding: 0.45rem 1.1rem !important; font-size: 0.78rem !important; }

  .hero { padding: 5.5rem 1.25rem 3rem; min-height: auto; }
  .hero h1 { font-size: 2.2rem; line-height: 1.15; margin-bottom: 1.2rem; }
  .hero-sub { font-size: 1rem; margin-bottom: 2rem; }
  .hero-badge { font-size: 0.7rem; padding: 0.35rem 1rem 0.35rem 0.5rem; margin-bottom: 1.8rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .btn-gradient, .btn-outline { justify-content: center; padding: 0.85rem 1.5rem; font-size: 0.85rem; }

  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.5rem 1rem; }
  .stat-number { font-size: 1.6rem; }
  .stat-label { font-size: 0.68rem; }

  .section { padding: 3.5rem 1.25rem; }
  .section-header { margin-bottom: 2.5rem; }
  .section-header.centered { margin-bottom: 2.5rem; }
  .section-title { font-size: 1.7rem; }
  .section-desc { font-size: 0.95rem; }

  .conductor-visual { min-height: 320px; }
  .orch { width: 240px; height: 240px; }
  .orch-node { width: 44px; height: 44px; font-size: 0.5rem; }
  .orch-center { width: 64px; height: 64px; }
  .orch-center span { font-size: 1.3rem !important; }

  .services-grid { grid-template-columns: 1fr; border-radius: 12px; }
  .service-card { padding: 2rem 1.5rem; }
  .service-card h3 { font-size: 1rem; }
  .service-card p { font-size: 0.85rem; }

  .process-steps { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .process-step p { font-size: 0.82rem; }

  .platform-content { padding: 3rem 1.25rem; }
  .platform-demo { padding: 1.5rem; }
  .terminal { font-size: 0.65rem; }
  .terminal-body { padding: 1rem; min-height: 200px; line-height: 1.8; }

  .testimonials { grid-template-columns: 1fr; gap: 1rem; }
  .test-card { padding: 1.75rem; }
  .test-quote { font-size: 0.9rem; }

  .cta { padding: 5rem 1.25rem; }
  .cta-title { font-size: 1.8rem; }
  .cta-sub { font-size: 0.95rem; }

  footer { grid-template-columns: 1fr; padding: 3rem 1.25rem; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}
