:root {
  --primary: #967bf3;
  --primary-soft: #c8baff;
  --secondary: #575988;
  --bg: #0b0c12;
  --bg-2: #12131c;
  --bg-3: #171929;
  --text: #f4f5f8;
  --muted: rgba(244, 245, 248, 0.68);
  --line: rgba(255, 255, 255, 0.1);
  --max: 1320px;
  --gradient: linear-gradient(135deg, #967bf3 0%, #6f57d0 55%, #575988 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* Header — matches main site */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(11, 12, 18, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  min-height: 68px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.header-left { display: flex; align-items: center; gap: 28px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: #fff; }
.actions { display: flex; align-items: center; gap: 12px; }
.actions .text-link { color: var(--muted); font-size: 14px; font-weight: 500; }
.actions .text-link:hover { color: #fff; }
.menu-toggle {
  display: none; font-size: 20px; background: none; color: var(--text);
  border: none; padding: 8px; cursor: pointer;
}
.mobile-nav {
  display: none; border-top: 1px solid var(--line); background: var(--bg-2);
}
.mobile-nav.active { display: block; }
.mobile-nav a {
  display: block; padding: 14px 28px;
  border-bottom: 1px solid var(--line); color: var(--muted);
}
.mobile-nav a:hover { color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  padding: 12px 22px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  cursor: pointer; font-family: inherit;
}
.btn-primary { background: #fff; color: #16181f; }
.btn-primary:hover { background: #e8e8ec; transform: translateY(-1px); }
.btn-accent { background: var(--gradient); color: #fff; }
.btn-accent:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline {
  border-color: rgba(255,255,255,.16); color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.04); }

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 72px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 45% at 78% 20%, rgba(150,123,243,.2), transparent 60%),
    radial-gradient(ellipse 40% 40% at 12% 80%, rgba(87,89,136,.14), transparent 55%),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 40px 48px; align-items: center;
}
.hero.layout-b .hero-grid { grid-template-columns: 1fr; text-align: center; max-width: 820px; margin: 0 auto; }
.hero.layout-b .hero-copy { max-width: none; margin: 0 auto; }
.hero.layout-b .hero p { margin-left: auto; margin-right: auto; }
.hero.layout-b .hero-cta { justify-content: center; }
.hero.layout-b .hero-meta { justify-content: center; }
.hero.layout-b .hero-stage { max-width: 520px; margin: 28px auto 0; }
.hero.layout-c .hero-grid { grid-template-columns: 1fr 1fr; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--primary-soft); margin-bottom: 22px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: rgba(200,186,255,.55);
}
.hero h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 400; line-height: 1.1; letter-spacing: -.025em;
  margin-bottom: 18px; color: var(--text);
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(120deg, #e8e2ff 0%, #967bf3 55%, #c8baff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  color: var(--muted); font-size: 16px; line-height: 1.65;
  max-width: 520px; margin: 0 0 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  list-style: none; padding-top: 22px; border-top: 1px solid var(--line);
}
.hero-meta li {
  font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.hero-meta li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0;
}

.hero-stage { width: 100%; max-width: 560px; margin-left: auto; }
.hero-motion {
  width: 100%; aspect-ratio: 560 / 480;
  opacity: 0; transform: translateY(16px);
  animation: fadeUp .9s ease .25s forwards;
}
.hero-motion svg { width: 100%; height: 100%; display: block; }

.hm-edge { fill: none; stroke: rgba(244,245,248,.18); stroke-width: 1; }
.hm-path {
  fill: none; stroke: rgba(200,186,255,.4); stroke-width: 1;
  stroke-dasharray: 5 6; animation: hmDash 18s linear infinite;
}
.hm-node {
  fill: rgba(11,12,18,.4); stroke: rgba(244,245,248,.5); stroke-width: 1;
  opacity: 0; animation: hmFade .6s ease forwards;
}
.hm-node.accent { fill: rgba(150,123,243,.14); stroke: rgba(200,186,255,.65); }
.hm-node.n1 { animation-delay: .2s; }
.hm-node.n2 { animation-delay: .35s; }
.hm-node.n3 { animation-delay: .5s; }
.hm-node.n4 { animation-delay: .65s; }
.hm-node.n5 { animation-delay: .8s; }
.hm-node.n6 { animation-delay: .95s; }
.hm-draw {
  fill: none; stroke: rgba(244,245,248,.25); stroke-width: 1;
  stroke-dasharray: 280; stroke-dashoffset: 280;
  animation: hmDraw 1.6s ease forwards;
}
.hm-draw.d1 { animation-delay: .8s; }
.hm-draw.d2 { animation-delay: 1s; }
.hm-draw.d3 { animation-delay: 1.2s; }
.hm-cap {
  font-family: Inter, sans-serif; font-size: 11px; font-weight: 600;
  fill: rgba(244,245,248,.85); opacity: 0; animation: hmFade .6s ease forwards;
}
.hm-cap.c1 { animation-delay: 1.1s; }
.hm-cap.c2 { animation-delay: 1.25s; }
.hm-cap.c3 { animation-delay: 1.4s; }
.hm-cap.c4 { animation-delay: 1.55s; }
.hm-label {
  font-family: Inter, sans-serif; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; fill: rgba(244,245,248,.38);
  opacity: 0; animation: hmFade .6s ease 1.2s forwards;
}
.hm-pulse {
  fill: #967bf3; opacity: .9;
  animation: hmPulse 2.4s ease-in-out infinite;
}
.hm-ring {
  fill: none; stroke: rgba(200,186,255,.35); stroke-width: 1;
  opacity: 0; animation: hmFade .7s ease 1s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hmDash { to { stroke-dashoffset: -220; } }
@keyframes hmFade { to { opacity: 1; } }
@keyframes hmDraw { to { stroke-dashoffset: 0; } }
@keyframes hmPulse {
  0%, 100% { r: 3; opacity: .9; }
  50% { r: 5; opacity: .45; }
}

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 8px;
}
.hero-stat {
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px;
}
.hero-stat strong {
  display: block; font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px; font-weight: 400; color: var(--primary-soft); margin-bottom: 4px;
}
.hero-stat span { font-size: 12px; color: var(--muted); }

/* Sections */
section { padding: 80px 0; }
.section-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(28px, 3.2vw, 40px); font-weight: 400;
  letter-spacing: -.02em; margin-bottom: 12px;
}
.section-sub { color: var(--muted); max-width: 720px; margin-bottom: 36px; font-size: 16px; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.prose-block { max-width: 820px; }
.prose-block p {
  color: var(--muted); font-size: 16px; line-height: 1.75; margin-bottom: 18px;
}
.prose-block p strong { color: #fff; font-weight: 600; }
.prose-block h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px; font-weight: 400; color: var(--text);
  margin: 28px 0 12px;
}
.check-list { list-style: none; display: grid; gap: 12px; margin: 20px 0 8px; }
.check-list li {
  display: flex; gap: 12px; align-items: flex-start;
  color: var(--muted); font-size: 15px; line-height: 1.55;
}
.check-list li::before {
  content: ""; width: 8px; height: 8px; margin-top: 7px; flex-shrink: 0;
  border-radius: 50%; background: var(--primary);
}
.compare-table {
  width: 100%; border-collapse: collapse; margin: 20px 0 8px;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  text-align: left; padding: 14px 16px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.compare-table th { color: var(--primary-soft); font-weight: 600; }
.compare-table td { color: var(--muted); }
.compare-table tr:hover td { background: rgba(255,255,255,.02); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: rgba(150,123,243,.45); transform: translateY(-2px); }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card i { color: var(--primary); font-size: 22px; margin-bottom: 14px; display: block; }
.card .tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary-soft); margin-bottom: 10px;
}

.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }

.flow {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.flow-step {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; text-align: center;
}
.flow-step .num {
  width: 36px; height: 36px; border-radius: 50%; margin: 0 auto 10px;
  display: grid; place-items: center; background: var(--gradient);
  font-weight: 800; font-size: 13px;
}
.flow-step h4 { font-size: 15px; margin-bottom: 6px; }
.flow-step p { font-size: 13px; color: var(--muted); }

.build-list { list-style: none; }
.build-list li {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--line); color: var(--muted);
}
.build-list li strong { color: #fff; display: block; margin-bottom: 2px; }
.build-list .step-badge {
  min-width: 36px; height: 36px; border-radius: 10px;
  background: rgba(150,123,243,.2); color: #c8baff;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}

.tech-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-pill {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; color: var(--muted);
  background: rgba(255,255,255,.03);
}

.usecase {
  display: grid; grid-template-columns: 120px 1fr; gap: 18px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; margin-bottom: 14px;
}
.usecase .n {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 42px; color: rgba(200,186,255,.35); line-height: 1;
}
.usecase h3 { font-size: 18px; margin-bottom: 6px; }
.usecase p { color: var(--muted); font-size: 14px; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: none; color: #fff; text-align: left;
  padding: 18px 0; font-size: 16px; font-weight: 600; font-family: inherit;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { color: var(--muted); padding: 0 0 18px; font-size: 15px; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-item.open .faq-q i { transform: rotate(45deg); transition: transform .2s ease; }

.cta-band {
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(150,123,243,.22), transparent 55%),
    var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-band p { color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-grid a {
  display: block; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-3);
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: border-color .2s ease, color .2s ease;
}
.related-grid a:hover { border-color: var(--primary); color: #fff; }
.related-grid a span { display: block; font-size: 12px; color: rgba(200,186,255,.7); margin-top: 4px; }

.footer {
  padding: 40px 0 28px; border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px;
}
.footer a:hover { color: #fff; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  width: min(580px, 100%);
  background: #12131c; border: 1px solid var(--line);
  border-radius: 18px; padding: 28px; max-height: 90vh; overflow-y: auto;
  animation: modalIn .35s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px; font-weight: 400; margin-bottom: 6px;
}
.modal .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-close {
  float: right; background: none; border: none; color: var(--muted);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; color: var(--muted); font-weight: 600; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #0a0a0f; color: #fff;
  font-family: inherit; font-size: 14px;
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.form-success { display: none; text-align: center; padding: 24px 8px; }
.form-success.active { display: block; }
.form-success i { font-size: 42px; color: #3ba755; margin-bottom: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-toggle { display: inline-block; }
  .hero-grid, .hero.layout-c .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stage { max-width: 480px; margin: 0 auto; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .container, .header-inner { padding-left: 18px; padding-right: 18px; }
  .header-inner { min-height: 60px; }
  .actions .text-link { display: none; }
  .hero { padding: 36px 0 48px; }
  section { padding: 56px 0; }
  .grid-3, .grid-2, .flow, .grid-4, .related-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .usecase { grid-template-columns: 1fr; gap: 8px; }
  .hero-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-motion, .reveal, .hm-path, .hm-pulse, .hm-draw, .hm-node, .hm-cap, .hm-label {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .hm-draw { stroke-dashoffset: 0; }
}
