:root {
  --bg: #070708;
  --bg-2: #0c0c0e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f3f4;
  --muted: #8b8b94;
  --orange: #f06000;
  --orange-deep: #e83800;
  --orange-soft: #feab66;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Inter Tight", Inter, system-ui, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(240, 96, 0, 0.35);
  color: #fff;
}

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

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

h1,
h2,
h3,
p,
ol,
ul,
pre {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

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

.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip: auto;
  z-index: 80;
  padding: 10px 14px;
  background: #111;
  border: 1px solid var(--line-strong);
}

/* atmosphere */
.fx {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.fx-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 72%);
}

.fx-glow {
  position: absolute;
  top: -12vh;
  right: -8vw;
  width: 62vw;
  height: 70vh;
  background: radial-gradient(closest-side, rgba(240, 96, 0, 0.22), transparent 72%);
  filter: blur(8px);
}

.fx-grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-brand strong {
  font-size: 13px;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.nav-brand em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--muted);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a,
.mobile-nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--muted);
}

.nav-links a:hover,
.mobile-nav a:hover {
  color: var(--text);
}

.nav-cta {
  justify-self: end;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  justify-self: end;
  position: relative;
}

.nav-toggle i {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1px;
  background: var(--text);
}

.nav-toggle i:first-of-type {
  top: 16px;
}

.nav-toggle i:last-of-type {
  bottom: 16px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 18px 28px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 8, 0.94);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: transparent;
  transition: 0.15s ease;
}

.btn-fill {
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-deep) 100%);
  border-color: transparent;
  color: #140800;
  font-weight: 500;
}

.btn-fill:hover {
  filter: brightness(1.08);
}

.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--orange-soft);
}

/* type */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--orange-soft);
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
}

h2 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.035em;
  font-weight: 600;
}

.hook {
  margin-top: 18px;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 500;
  max-width: 22ch;
}

.lede {
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  max-width: 36ch;
}

.hero-copy .lede {
  max-width: 38ch;
}

.section-head {
  margin-bottom: 40px;
}

.follow {
  margin-top: 28px;
  max-width: 42ch;
}

/* hero */
.hero {
  position: relative;
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  width: min(var(--max), calc(100% - 56px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.hero-mesh {
  position: absolute;
  inset: -6% -18% 4%;
  width: auto;
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 100%);
}

.hero-copy,
.hero-mark {
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-mark {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-mark img {
  width: min(460px, 100%);
  height: auto;
  filter: drop-shadow(0 0 48px rgba(240, 96, 0, 0.28));
  animation: float 8s ease-in-out infinite;
}

.orbit {
  position: absolute;
  width: min(520px, 92%);
  aspect-ratio: 1;
  border: 1px solid rgba(240, 96, 0, 0.18);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 16px var(--orange);
}

.orbit::before {
  top: 18%;
  right: 12%;
}

.orbit::after {
  bottom: 14%;
  left: 18%;
  background: var(--orange-soft);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* terminal */
.term {
  margin-top: 32px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 14, 0.86);
  max-width: 460px;
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.term-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a2a2e;
}

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

.term-bar code {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.term pre {
  padding: 16px 16px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: #d8d8de;
}

.term .k {
  color: var(--orange);
}

.term .cursor {
  color: var(--orange);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* work */
.work,
.coverage,
.faq,
.contact {
  width: min(var(--max), calc(100% - 56px));
  margin: 0 auto;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cards li {
  background: var(--bg);
  padding: 32px 28px 36px;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}

.cards li:hover {
  background: #0b0b0d;
}

.cards li::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(var(--orange), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cards li:hover::after {
  opacity: 1;
}

.cards b {
  position: absolute;
  right: -8px;
  top: -18px;
  font-size: 120px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.cards span,
.places span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--orange);
}

.cards h3 {
  margin-top: 56px;
  font-size: 24px;
  letter-spacing: -0.03em;
  position: relative;
}

.cards p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 34ch;
  position: relative;
}

/* agent mesh — background only */
.mesh-wire {
  fill: none;
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 0.8;
}

.mesh-arc {
  stroke: rgba(240, 96, 0, 0.16);
}

.mesh-ring {
  fill: rgba(7, 7, 8, 0.55);
  stroke: rgba(240, 96, 0, 0.28);
  stroke-width: 0.8;
}

.mesh-core {
  fill: var(--orange);
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 5px rgba(240, 96, 0, 0.45));
  animation: pulse 3.4s ease-in-out infinite;
}

.mesh-node:nth-of-type(2) .mesh-core { animation-delay: 0.4s; }
.mesh-node:nth-of-type(3) .mesh-core { animation-delay: 0.9s; }
.mesh-node:nth-of-type(4) .mesh-core { animation-delay: 1.3s; }
.mesh-node:nth-of-type(5) .mesh-core { animation-delay: 0.2s; }

.mesh-pkt {
  fill: var(--orange-soft);
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(254, 171, 102, 0.55));
}

@supports (offset-path: path("M0 0")) {
  .mesh-pkt {
    opacity: 0.85;
  }
}

.mesh-pkt.p1 {
  offset-path: path("M168 128 L312 392 L498 96 L718 188 L786 318");
  animation: send 9s linear infinite;
}

.mesh-pkt.p2 {
  offset-path: path("M986 424 L618 492 L312 392");
  animation: send 7.5s linear infinite;
  animation-delay: 1.6s;
}

.mesh-pkt.p3 {
  offset-path: path("M168 128 C 360 40, 620 40, 928 148");
  animation: send 11s linear infinite;
  animation-delay: 0.8s;
}

.mesh-pkt.p4 {
  offset-path: path("M786 318 L928 148 L986 424 L718 188");
  animation: send 10s linear infinite;
  animation-delay: 2.4s;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* coverage */
.places {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.places li {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.places strong {
  display: block;
  margin-top: 28px;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.04em;
  font-weight: 600;
}

.places em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

/* faq */
.qa {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

.qa li {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.qa h3 {
  font-size: 20px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.qa p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 42ch;
}

/* contact */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
  max-width: 720px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form label.full,
.form-foot,
.form-status {
  grid-column: 1 / -1;
}

.form span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form span.plain {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
  line-height: 1.4;
}

.form input::placeholder,
.form textarea::placeholder {
  color: #5c5c64;
}

.form input,
.form textarea {
  background: #0b0b0d;
  border: 1px solid var(--line);
  padding: 12px;
  outline: none;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--orange);
}

.form textarea {
  resize: vertical;
  min-height: 140px;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.form-status.is-ok {
  color: #9be29b;
}

.form-status.is-err {
  color: #ff9b8a;
}

.form.is-sent {
  display: block;
  border: 1px solid var(--line);
  padding: 28px;
  max-width: 520px;
}

.form.is-sent p {
  color: var(--muted);
  margin-top: 8px;
}

/* footer */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.foot .nav-brand em,
.foot .nav-brand strong {
  color: var(--muted);
}

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

/* responsive */
@media (max-width: 860px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
    width: min(var(--max), calc(100% - 40px));
  }

  .hero-mark {
    order: -1;
  }

  .hero-mark img {
    width: min(280px, 70vw);
  }

  .orbit {
    width: min(320px, 78vw);
  }

  .hero-mesh {
    inset: -4% -8% 8%;
    opacity: 0.32;
    mask-image: linear-gradient(#000 0%, #000 70%, transparent 100%);
  }

  .cards,
  .places,
  .qa {
    grid-template-columns: 1fr;
  }

  .form {
    grid-template-columns: 1fr;
  }

  .work,
  .coverage,
  .faq,
  .contact {
    width: min(var(--max), calc(100% - 40px));
    padding: 64px 0;
  }

  .cards li {
    min-height: 0;
  }

  .cards h3 {
    margin-top: 24px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .hero-mark img,
  .orbit,
  .term .cursor,
  .mesh-core,
  .mesh-pkt {
    animation: none;
  }

  .mesh-pkt {
    display: none;
  }
}
