/* ============================================================
   MuxPoint — muxpoint.com
   Static site styles. No frameworks, no webfonts.
   ============================================================ */

:root {
  --bg: #06080c;
  --bg-2: #080b11;
  --panel: rgba(255, 255, 255, 0.028);
  --panel-2: rgba(255, 255, 255, 0.012);
  --line: rgba(255, 255, 255, 0.085);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #e9eef6;
  --muted: #9aa7b9;
  --muted-2: #778499;
  --teal: #5af2d0;
  --indigo: #6e8cff;
  --ring: rgba(90, 242, 208, 0.55);

  --wrap: 1160px;
  --radius: 16px;
  --radius-lg: 24px;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: rgba(90, 242, 208, 0.28); color: #fff; }

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

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--teal);
  color: #04211c;
  font-weight: 600;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 16px; }

/* ---------- Typography ---------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(2.55rem, 6.6vw, 4.6rem); letter-spacing: -0.042em; }
h2 { font-size: clamp(1.9rem, 3.9vw, 3rem); }
h3 { font-size: 1.14rem; letter-spacing: -0.02em; line-height: 1.35; }

p { margin: 0; }

.grad {
  background: linear-gradient(100deg, var(--teal) 5%, var(--indigo) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}

.section-lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  max-width: 62ch;
  margin-top: 20px;
  text-wrap: pretty;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
}
.brand .mark { transition: transform 0.5s var(--ease); }
.brand:hover .mark { transform: rotate(180deg); }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.94rem;
  color: var(--muted);
}
.nav a { transition: color 0.2s var(--ease); }
.nav a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-cta:hover { border-color: rgba(90, 242, 208, 0.45); background: rgba(90, 242, 208, 0.08); }

@media (max-width: 760px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: linear-gradient(100deg, #6ff6d8, #7f9bff);
  color: #04191a;
  box-shadow: 0 8px 30px -12px rgba(90, 242, 208, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -14px rgba(110, 140, 255, 0.7); }

.btn-ghost {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(92svh, 900px);
  padding: clamp(80px, 12vh, 150px) 0 clamp(70px, 10vh, 120px);
  overflow: hidden;
  isolation: isolate;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  -webkit-mask-image: radial-gradient(120% 90% at 60% 40%, #000 25%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 60% 40%, #000 25%, transparent 78%);
}
.hero-canvas.is-ready { opacity: 0.85; }

.hero-glow {
  position: absolute;
  z-index: -1;
  top: -20%;
  left: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(90, 242, 208, 0.11), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(110, 140, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 860px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 12px;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(90, 242, 208, 0.14);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(90, 242, 208, 0.14); }
  50% { opacity: 0.55; box-shadow: 0 0 0 7px rgba(90, 242, 208, 0.04); }
}

.lede {
  margin-top: 26px;
  max-width: 58ch;
  font-size: clamp(1.06rem, 1.7vw, 1.3rem);
  color: var(--muted);
  text-wrap: pretty;
}
.lede em { color: var(--text); font-style: normal; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero-note {
  margin-top: 34px;
  max-width: 54ch;
  padding-left: 16px;
  border-left: 2px solid rgba(90, 242, 208, 0.35);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted-2);
}

/* 404 page reuses the hero shell, centred */
.page-404 { min-height: 100svh; }
.page-404 .hero-inner { margin-inline: auto; text-align: center; }
.page-404 .lede { margin-inline: auto; }
.page-404 .hero-actions { justify-content: center; }

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(84px, 11vw, 148px) 0;
}

.section-alt {
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- Cards ---------- */

.grid-3, .grid-2 {
  display: grid;
  gap: 20px;
  margin-top: 56px;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
/* four use cases read better as a balanced 2x2 than as 3 + 1 */
@media (min-width: 900px) { .usecases { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative;
  padding: 30px 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(90, 242, 208, 0.28);
  background: linear-gradient(180deg, rgba(90, 242, 208, 0.045), var(--panel-2));
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 0.97rem; }

.card .num {
  display: block;
  margin-bottom: 18px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--teal);
  opacity: 0.75;
}

.usecase .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--teal);
  background: rgba(90, 242, 208, 0.06);
}

/* ---------- Topology ---------- */

.topo {
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 50% 20%, rgba(110, 140, 255, 0.05), transparent 70%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  overflow: hidden;
}

.topo-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.topo-svg { width: 100%; min-width: 720px; height: auto; padding: 18px 8px 4px; }

.topo-svg text {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  fill: var(--muted);
}
.topo-svg .hub-label {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  fill: var(--text);
}

.topo-svg .node circle { fill: #0d1219; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.4; }
.topo-svg .node.src circle { stroke: rgba(90, 242, 208, 0.75); }
.topo-svg .node.dst circle { stroke: rgba(110, 140, 255, 0.75); }

.topo-svg .ring { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-dasharray: 3 7; transform-origin: 500px 235px; }
.topo-svg .ring-a { animation: spin 44s linear infinite; }
.topo-svg .ring-b { animation: spin 30s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.topo-svg .hub-core { animation: core 3.4s var(--ease) infinite; }
@keyframes core { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.pk { fill: #fff; opacity: 0; offset-rotate: 0deg; }
.p1 { offset-path: path("M175 70 C 330 70 350 210 452 224"); animation: flow 3.2s linear infinite; }
.p2 { offset-path: path("M175 170 C 330 170 350 218 452 230"); animation: flow 3.2s linear 0.8s infinite; }
.p3 { offset-path: path("M175 300 C 330 300 350 252 452 240"); animation: flow 3.2s linear 1.6s infinite; }
.p4 { offset-path: path("M175 400 C 330 400 350 260 452 246"); animation: flow 3.2s linear 2.4s infinite; }
.p5 { offset-path: path("M548 224 C 650 210 670 70 825 70"); animation: flow 3.2s linear 0.4s infinite; }
.p6 { offset-path: path("M548 230 C 650 218 670 170 825 170"); animation: flow 3.2s linear 1.2s infinite; }
.p7 { offset-path: path("M548 240 C 650 252 670 300 825 300"); animation: flow 3.2s linear 2s infinite; }
.p8 { offset-path: path("M548 246 C 650 260 670 400 825 400"); animation: flow 3.2s linear 2.8s infinite; }

@keyframes flow {
  0% { offset-distance: 0%; opacity: 0; }
  12% { opacity: 0.95; }
  88% { opacity: 0.95; }
  100% { offset-distance: 100%; opacity: 0; }
}

.topo-hint {
  padding: 0 22px 16px;
  font-size: 0.8rem;
  color: var(--muted-2);
}
@media (min-width: 780px) { .topo-hint { display: none; } }

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}
.legend li {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.legend strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.legend span { color: var(--muted); font-size: 0.94rem; }

/* ---------- Next ---------- */

.next-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 6vw, 88px);
  align-items: start;
}
@media (min-width: 900px) { .next-wrap { grid-template-columns: 1fr 1fr; } }

.next-copy .btn { margin-top: 34px; }

.principles {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.principles li {
  padding: 22px 22px 22px 24px;
  border-left: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.principles li:hover {
  border-left-color: var(--teal);
  background: rgba(255, 255, 255, 0.022);
}
.principles h3 { margin-bottom: 8px; }
.principles p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Contact ---------- */

.contact-panel {
  position: relative;
  padding: clamp(44px, 6vw, 76px) clamp(26px, 5vw, 68px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(90, 242, 208, 0.07), transparent 65%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  text-align: center;
}
.contact-panel .section-lede { margin-inline: auto; }

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}
.contact-meta { font-size: 0.82rem; color: var(--muted-2); }

.disclosure {
  max-width: 66ch;
  margin: 40px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted-2);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 54px 0 44px;
  background: var(--bg-2);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.footer-tag { margin-top: 8px; color: var(--muted-2); font-size: 0.9rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.92rem;
  color: var(--muted);
}
.footer-nav a:hover { color: var(--text); }
.copyright { width: 100%; padding-top: 26px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: 0.85rem; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* ---------- Motion & contrast preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .pk { display: none; }
  .btn:hover, .card:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #c3ccda; --muted-2: #aab4c4; --line: rgba(255, 255, 255, 0.2); }
}
