/* ===== AgenticX — design tokens ===== */
:root {
  --void: #0a0c16;
  --panel: #12142a;
  --panel-2: #171a35;
  --line: #262a4a;
  --ink: #e9eaf2;
  --ink-dim: #9096b0;
  --ink-faint: #5c6182;
  --violet: #8b5cf6;
  --violet-bright: #b58cff;
  --violet-dim: #5b3fb0;
  --signal: #34e5b0;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }

p { color: var(--ink-dim); }

.lede {
  font-size: 1.15rem;
  color: var(--ink-dim);
  max-width: 560px;
  margin: 20px 0 32px;
}

/* ===== buttons ===== */
.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  cursor: pointer;
  background: none;
}
.btn-primary {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.btn-primary:hover { background: var(--violet-bright); border-color: var(--violet-bright); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-faint); background: var(--panel); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== nav ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 22, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s ease;
  --underline-scale: 0;
  --underline-origin: left;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--violet-bright);
  transform: scaleX(var(--underline-scale));
  transform-origin: var(--underline-origin);
  transition: transform .2s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  color: var(--ink-dim);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b58cff;
}
.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 24px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 76px 0 auto 0; flex-direction: column; background: var(--void); border-bottom: 1px solid var(--line); padding: 24px 32px; gap: 20px; transform: translateY(-120%); transition: transform .25s ease; }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
  .nav-right .btn-primary { display: none; }
}

/* ===== hero ===== */
.hero {
  position: relative;
  padding: 96px 0 110px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#hero-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-content { max-width: 640px; }

/* ===== sections ===== */
section { padding: 96px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--violet-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: block;
}

/* ===== pillars ===== */
.pillars-diagram { position: relative; margin-bottom: 20px; }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.pillar-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.pillar-connector {
  fill: none;
  stroke: rgba(144, 150, 176, 0.24);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 2 8;
  transition: stroke .2s ease, opacity .2s ease, filter .2s ease;
  opacity: 0.8;
}
.pillar-card {
  background: var(--panel);
  padding: 32px 24px;
  position: relative;
  z-index: 1;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  border: 1px solid transparent;
}
.pillar-card:hover,
.value-card:hover,
.service-block:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2), 0 16px 40px rgba(10, 12, 22, 0.25);
}
.pillar-card:nth-child(1):hover ~ .pillar-connectors .connector-1,
.pillar-card:nth-child(2):hover ~ .pillar-connectors .connector-1,
.pillar-card:nth-child(2):hover ~ .pillar-connectors .connector-2,
.pillar-card:nth-child(3):hover ~ .pillar-connectors .connector-2,
.pillar-card:nth-child(3):hover ~ .pillar-connectors .connector-3,
.pillar-card:nth-child(4):hover ~ .pillar-connectors .connector-3 {
  stroke: var(--violet-bright);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(181, 140, 255, 0.35));
  stroke-dasharray: none;
}
.pillar-card .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 18px;
}
.pillar-card h3 { margin-bottom: 12px; font-size: 1.1rem; }
.pillar-card p { font-size: 14px; }
.pillar-card .icon {
  width: 36px; height: 36px;
  margin-bottom: 18px;
  color: var(--violet-bright);
}
@media (max-width: 860px) {
  .pillar-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

/* ===== process ===== */
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.process-item:last-child { border-bottom: 1px solid var(--line); }
.process-item .step {
  font-family: var(--font-mono);
  color: var(--violet-bright);
  font-size: 14px;
}
.process-item h3 { margin-bottom: 8px; }
.process-item p { max-width: 520px; }

/* ===== cta banner ===== */
.cta-banner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-banner h2 { font-size: 1.8rem; max-width: 480px; }

/* ===== cards (generic) ===== */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 4px;
}

/* ===== values grid (about) ===== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.value-card { background: var(--panel); padding: 30px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; border: 1px solid transparent; }
.value-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.value-card p { font-size: 14px; }
@media (max-width: 700px) { .values-grid { grid-template-columns: 1fr; } }

/* ===== services detail ===== */
.service-block {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.service-block:last-child { border-bottom: 1px solid var(--line); }
.service-block .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.service-block h2 {
  margin: 10px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b58cff;
  flex-shrink: 0;
}
.service-title-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-top: 22px; }
.service-list li {
  font-size: 14px;
  color: var(--ink-dim);
  padding-left: 18px;
  position: relative;
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 1px;
  background: var(--violet-bright);
}
@media (max-width: 780px) {
  .service-block { grid-template-columns: 1fr; gap: 18px; }
  .service-list { grid-template-columns: 1fr; }
}

/* ===== contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
}
.field { margin-bottom: 20px; }
.field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b58cff;
}
.field-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  border-radius: 3px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--violet);
}
.field textarea { resize: vertical; min-height: 120px; }
.contact-info dt { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-top: 22px; text-transform: uppercase; letter-spacing: .04em; }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { font-size: 15px; margin-top: 6px; }
.contact-info .contact-label,
.contact-info .social-links a,
.contact-info .contact-link { display: inline-flex; align-items: center; gap: 10px; }
.contact-info .contact-icon { display: inline-flex; align-items: center; justify-content: center; color: #b58cff; flex-shrink: 0; }
.contact-info .contact-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.contact-info .social-links { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 8px; }
.contact-info .social-links a { color: var(--ink); }
.contact-info .social-links a:hover,
.contact-info dd a:hover { color: var(--violet-bright); }
[dir="rtl"] .contact-info .contact-label,
[dir="rtl"] .contact-info .social-links a { flex-direction: row-reverse; }
.form-note { font-size: 13px; color: var(--ink-faint); margin-top: 14px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* ===== footer ===== */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-links { display: flex; gap: 28px; font-size: 14px; color: var(--ink-dim); flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink); }
.footer-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
}

/* ===== page hero (inner pages) ===== */
.page-hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.page-hero .lede { margin-bottom: 0; }

/* ===== reveal ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.count-up { display: inline-block; transition: color .2s ease; }
.count-up.is-visible { color: var(--violet-bright); }
