:root {
  --bg: #050506;
  --bg-elev: #0c0c0e;
  --bg-soft: #121215;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #ececec;
  --muted: #9a9aa3;
  --faint: #6b6b76;
  --coral: #e88c7a;
  --live: #3dffa8;
  --font: "Space Grotesk", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 6px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(900px 480px at 70% 10%, rgba(232, 140, 122, 0.1), transparent 55%);
  background-size: 48px 48px, 48px 48px, auto;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
}

.nav,
main,
.footer {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 5vw;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(5, 5, 6, 0.72);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  color: var(--coral);
  margin-right: 0.35rem;
}

.logo-ext {
  color: var(--faint);
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
}

nav a:hover {
  color: var(--ink);
}

.nav-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--r);
  border: 1px solid rgba(232, 140, 122, 0.45);
  background: rgba(232, 140, 122, 0.1);
  color: var(--coral) !important;
  font-weight: 600;
}

.nav-btn:hover {
  background: rgba(232, 140, 122, 0.18);
  color: #ffb4a6 !important;
}

.hero-stage {
  position: relative;
  min-height: min(88vh, 52rem);
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.97) 0%, rgba(5, 5, 6, 0.82) 34%, rgba(5, 5, 6, 0.1) 62%, rgba(5, 5, 6, 0.4) 100%),
    linear-gradient(180deg, rgba(5, 5, 6, 0.2) 0%, transparent 42%, rgba(5, 5, 6, 0.85) 100%);
}

.hero {
  position: relative;
  z-index: 2;
  padding: 5rem 5vw 3.5rem;
  max-width: 46rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.08s + 0.04s);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tok {
  color: var(--coral);
}

.brand {
  margin: 0 0 0.85rem;
  font-family: var(--font);
  font-size: clamp(3.6rem, 10vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.92;
  color: var(--ink);
}

.headline {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 22ch;
  color: var(--ink);
}

.lede {
  margin: 0 0 1.6rem;
  color: var(--muted);
  max-width: 38rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: var(--r);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn.primary {
  background: var(--coral);
  color: #140c0a;
  border-color: var(--coral);
}

.btn.primary:hover {
  background: #f0a090;
  border-color: #f0a090;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.03);
}

.install {
  padding: 0 5vw;
  margin-top: -1.75rem;
  margin-bottom: 3.25rem;
  position: relative;
  z-index: 3;
}

.term {
  max-width: 46rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: rgba(12, 12, 14, 0.92);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.term-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: #0a0a0c;
}

.term-chrome .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #2a2a30;
}

.term-chrome .dot:nth-child(1) {
  background: #ff5f57;
}
.term-chrome .dot:nth-child(2) {
  background: #febc2e;
}
.term-chrome .dot:nth-child(3) {
  background: #28c840;
}

.term-title {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--faint);
}

.term-body {
  padding: 1rem 1rem 1.1rem;
  position: relative;
}

.term-line {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.term-line.muted {
  color: var(--faint);
}

.term-line code {
  font-family: var(--mono);
  color: #e8e8ec;
}

.prompt {
  color: var(--live);
  flex: 0 0 auto;
}

.term-cta {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--coral);
  text-decoration: none;
  border: 1px solid rgba(232, 140, 122, 0.4);
  border-radius: var(--r);
  padding: 0.35rem 0.65rem;
  background: rgba(232, 140, 122, 0.08);
}

.term-cta:hover {
  background: rgba(232, 140, 122, 0.16);
}

.mcps,
.works,
.finale {
  padding: 3.25rem 5vw;
}

.section-head {
  margin-bottom: 1.35rem;
  max-width: 40rem;
}

.sec-label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--faint);
}

.section-head h2,
.finale h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
  font-weight: 650;
}

.section-head p,
.finale p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.dir {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-elev);
  max-width: 56rem;
}

.dir-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.dir-row:last-child {
  border-bottom: 0;
}

a.dir-row:hover {
  background: rgba(232, 140, 122, 0.05);
}

.dir-row.soon {
  opacity: 0.7;
}

.dir-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
}

.dir-status.live {
  color: var(--live);
}

.dir-status.soon {
  color: var(--faint);
}

.dir-main h3 {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dir-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  max-width: 38rem;
}

.dir-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1.15rem;
  color: var(--faint);
  font-size: 0.72rem;
}

.meta-brand {
  display: block;
  height: 1.35rem;
  width: auto;
  object-fit: contain;
  opacity: 1;
}

.meta-brand-fieldwork,
.meta-brand-fieldroutes,
.meta-brand-gorilladesk {
  height: 1.35rem;
}

.meta-agents {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.meta-agents img {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  opacity: 0.92;
}

/* Monochrome agent marks that need a light treatment on dark Relay bg */
.meta-agents img[src*="cursor.svg"],
.meta-agents img[src*="codex.svg"] {
  filter: brightness(0) invert(1);
  opacity: 0.82;
}

.dir-arrow {
  color: var(--coral);
  font-size: 1rem;
}

.meta-link {
  color: var(--coral);
  text-decoration: none;
}

.meta-link:hover {
  text-decoration: underline;
}

.works-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.works-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.works-row img {
  display: block;
  width: 1rem;
  height: 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.finale {
  text-align: left;
  padding-bottom: 5rem;
  border-top: 1px solid var(--line);
}

.finale .cta-row {
  margin-top: 1.2rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 5vw 2rem;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--faint);
  text-decoration: none;
  font-size: 0.78rem;
}

.footer-links a:hover {
  color: var(--ink);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.await-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.await-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .dir-row {
    grid-template-columns: 1fr;
  }

  .dir-meta {
    justify-content: flex-start;
  }

  .hero-stage {
    min-height: 76vh;
  }

  .hero {
    padding-top: 3.25rem;
    max-width: 100%;
  }

  .hero-veil {
    background:
      linear-gradient(180deg, rgba(5, 5, 6, 0.55) 0%, rgba(5, 5, 6, 0.82) 48%, rgba(5, 5, 6, 0.96) 100%);
  }

  .term-cta {
    position: static;
    display: inline-flex;
    margin-top: 0.75rem;
  }

  nav a:not(.nav-btn) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
