:root {
  --ink: #0B0F17;
  --surface: #121826;
  --surface-2: #161E2E;
  --text: #EDEFF3;
  --muted: #8B93A7;
  --teal: #00D9B5;
  --teal-dim: #0B4A40;
  --amber: #FFB454;
  --line: #232C3D;

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

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

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

/* subtle grain overlay for texture, purely decorative */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.wordmark.small { font-size: 1.1rem; }

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--teal);
  color: #04211C;
}
.btn-primary:hover { background: #1FE8C4; }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  font-size: 0.85rem;
  padding: 9px 16px;
}
.btn-ghost:hover { border-color: var(--teal); }

.btn-text {
  color: var(--teal);
  padding: 11px 4px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 999px;
  padding: 1px 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--teal);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Diagram ---------- */
.hero-diagram { width: 100%; }
.diagram-svg { width: 100%; height: auto; overflow: visible; }

.link {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}

.node circle {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
}
.node text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.hub circle {
  fill: var(--teal-dim);
  stroke: var(--teal);
  stroke-width: 1.5;
}
.hub text {
  fill: var(--teal);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
}

.pulse {
  fill: var(--amber);
  offset-rotate: 0deg;
}

@keyframes travel1 { to { offset-distance: 100%; } }

.pulse-1 { offset-path: path("M 90 80 C 180 110, 200 180, 240 210"); animation: travel1 3.2s linear infinite; }
.pulse-2 { offset-path: path("M 90 340 C 180 310, 200 250, 240 210"); animation: travel1 3.6s linear infinite 0.6s; }
.pulse-3 { offset-path: path("M 400 100 C 320 130, 280 170, 240 210"); animation: travel1 2.8s linear infinite 1.1s; }
.pulse-4 { offset-path: path("M 400 320 C 320 290, 280 250, 240 210"); animation: travel1 3.4s linear infinite 1.8s; }

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; opacity: 0; }
}

/* ---------- Services ---------- */
.services { padding: 88px 0; border-bottom: 1px solid var(--line); }

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--teal);
  margin-bottom: 14px;
}

.services h2, .about h2, .contact h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-bottom: 48px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.service-card {
  background: var(--surface);
  padding: 32px;
  transition: background 0.15s ease;
}
.service-card:hover { background: var(--surface-2); }

.service-mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--amber);
  margin-bottom: 14px;
}

.service-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p:last-child { color: var(--muted); font-size: 0.95rem; }

/* ---------- About ---------- */
.about { padding: 88px 0; border-bottom: 1px solid var(--line); }

.about-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 56px;
}

.about h2 { margin-bottom: 20px; }

.about-copy { color: var(--muted); max-width: 52ch; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.about-stats dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.about-stats dd {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact { padding: 88px 0; }

.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-copy p { color: var(--muted); margin-bottom: 20px; max-width: 36ch; }

.contact-email {
  font-family: var(--mono);
  color: var(--teal);
  font-size: 1.05rem;
  border-bottom: 1px solid var(--teal-dim);
  padding-bottom: 2px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--body);
  font-size: 0.95rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

.contact-form button { align-self: flex-start; margin-top: 4px; }

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.8;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner a:hover { color: var(--teal); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .service-grid { grid-template-columns: 1fr; }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .about-stats { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; flex-direction: row; flex-wrap: wrap; gap: 32px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
}

/* keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
