:root {
  --bg: #0F0F16;
  --bg-raised: #17161F;
  --panel: #22202E;
  --line: #2E2B3D;
  --purple: #7B4BE8;
  --purple-deep: #6340B5;
  --cyan: #36DEDE;
  --cyan-soft: #6FD8DE;
  --ink: #FFFFFF;
  --ink-soft: #CCCCDB;
  --muted: #8E8CA3;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { color: var(--ink); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* Wordmark: heavy italic, second half in cyan, like the logos */
.brand-name, .wordmark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
}
.brand-name em, .wordmark em { font-style: italic; color: var(--cyan); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 15, 22, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-size: 1.35rem; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 24px; font-size: .95rem; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { background: var(--purple); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.nav .nav-cta:hover { background: var(--purple-deep); }

/* Hero */
.hero {
  position: relative;
  padding: 104px 0 120px;
  overflow: hidden;
  background:
    radial-gradient(700px 420px at 90% 10%, rgba(123, 75, 232, .22), transparent 70%),
    radial-gradient(600px 400px at 70% 90%, rgba(54, 222, 222, .10), transparent 70%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-mark {
  position: absolute; right: -40px; top: 50%;
  width: min(520px, 55vw); transform: translateY(-50%);
  opacity: .9; pointer-events: none;
}
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: var(--cyan); margin: 0 0 14px; }
.hero h1 {
  font-family: var(--display); font-style: italic; font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem); line-height: 1.02;
  margin: 0 0 22px; max-width: 13ch; letter-spacing: -.02em;
}
.hero h1 em { font-style: italic; color: var(--cyan); }
.lede { font-size: 1.15rem; max-width: 54ch; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 600; padding: 13px 24px; border-radius: 999px; border: 2px solid transparent; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--cyan); }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-raised); border-block: 1px solid var(--line); }
.section-title {
  font-family: var(--display); font-style: italic; font-weight: 800;
  font-size: clamp(1.7rem, 3.8vw, 2.4rem); margin: 0 0 30px; letter-spacing: -.01em;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
.card h3 { font-size: 1.9rem; margin: 12px 0 0; }
.card-sub { color: var(--muted); margin: 0 0 18px; }
.card-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 4px 10px; border-radius: 999px; }
.tag-live { background: rgba(54, 222, 222, .12); color: var(--cyan); }
.tag-dev { background: rgba(123, 75, 232, .18); color: #B59BF5; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 26px; position: relative; margin: 10px 0; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 7px;
  border-left: 3px solid var(--cyan); border-bottom: 3px solid var(--cyan); transform: rotate(-45deg);
}

.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.split p { margin: 0; font-size: 1.08rem; }
.facts { margin: 0; display: grid; gap: 14px; }
.facts div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }

.contact { text-align: center; }
.contact p { max-width: 50ch; margin: 0 auto 26px; }
.contact .btn { overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
  .nav .nav-cta { white-space: nowrap; padding: 7px 14px; font-size: .88rem; }
  .brand-name { font-size: 1.15rem; }
  .brand-mark { width: 26px; height: 26px; }
  .hero { padding: 64px 0 88px; }
  .hero-mark { width: 260px; right: -70px; top: auto; bottom: -40px; transform: none; opacity: .35; }
  .section { padding: 60px 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
}

/* 404 page */
.not-found { min-height: calc(100vh - 68px); display: flex; align-items: center; }
.not-found .wrap { width: 100%; }

/* GridSync showcase */
.showcase { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.showcase-copy p { margin: 0 0 18px; font-size: 1.08rem; }
.showcase-copy .ticks { margin-bottom: 28px; }
.section-title em { font-style: italic; color: var(--cyan); }
.phones { display: flex; gap: 20px; justify-content: center; align-items: flex-start; }
.phone {
  margin: 0; flex: 1 1 0; max-width: 250px;
  border: 8px solid #2A2838; border-radius: 34px; overflow: hidden;
  background: #000; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
}
.phone img { display: block; width: 100%; height: auto; }
.phone-offset { margin-top: 56px; }
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .phones { gap: 12px; }
  .phone { border-width: 5px; border-radius: 24px; }
  .phone-offset { margin-top: 32px; }
}
.section-title { line-height: 1.15; }
section[id] { scroll-margin-top: 68px; }

/* Pipeline card and "built for you" cards */
.card-next { border-style: dashed; }
.card-next::before { background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.card-next h3 { font-size: 1.5rem; }
.card-next p { margin: 0 0 16px; }
.tag-next { background: rgba(255, 255, 255, .08); color: var(--ink-soft); }
.card-link { color: var(--cyan); font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.section-lede { max-width: 62ch; font-size: 1.1rem; margin: -8px 0 32px; }
.fit-cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card.plain::before { background: var(--purple); }
.card.plain h3 { font-size: 1.2rem; margin: 4px 0 8px; }
.card.plain p { margin: 0; }

/* Delay-day video: autoplays muted on loop */
.showcase-video { grid-template-columns: minmax(0, 360px) 1fr; justify-content: center; }
.video-frame { margin: 0; justify-self: center; width: 100%; max-width: 360px; }
.demo-video {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16;
  border-radius: 22px; background: #0E1016;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
}
@media (max-width: 860px) {
  .showcase-video { grid-template-columns: 1fr; }
  .video-frame { max-width: 320px; }
}
