:root {
  --ink: #0b0d10;
  --ink-2: #12161b;
  --ink-3: #1a2027;
  --line: #262e37;
  --paper: #f1ede4;
  --mute: #8f9aa6;
  --signal: #ff6b3d;
  --mint: #5cf2b0;
  --violet: #a58bff;
  --sky: #6cc6ff;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 1px 1px, #1c232b 1px, transparent 0);
  background-size: 28px 28px;
}
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--signal); }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; }
.sr-only, .hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(20px, 5vw, 64px);
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 400; letter-spacing: -0.01em; }
.brand b { font-weight: 800; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--signal);
  box-shadow: inset -6px 0 0 #ff9a73;
}
.nav nav { display: flex; gap: 28px; align-items: center; font-size: 0.95rem; }
.nav nav a:not(.btn) { color: var(--mute); transition: color .2s; }
.nav nav a:not(.btn):hover { color: var(--paper); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--signal); color: var(--ink);
  font: 600 1rem var(--display);
  padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--signal); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--paper); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--paper); box-shadow: none; }
.btn-small { padding: 9px 18px; font-size: 0.9rem; }

/* HERO */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(48px, 8vw, 110px) clamp(20px, 5vw, 64px) 60px;
  max-width: 1320px; margin: 0 auto;
}
.eyebrow { color: var(--mint); margin-bottom: 18px; }
h1 {
  font-size: clamp(2.8rem, 6.6vw, 5.6rem); line-height: .95; letter-spacing: -0.045em; font-weight: 800;
}
h1 em { display: block; font-weight: 400; font-style: italic; }
.lede { color: #c6c2b8; font-size: 1.15rem; max-width: 34rem; margin: 26px 0 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { list-style: none; display: flex; gap: 36px; margin-top: 48px; padding-top: 24px; border-top: 1px dashed var(--line); }
.hero-stats strong { display: block; font-size: 1.8rem; letter-spacing: -0.03em; }
.hero-stats span { color: var(--mute); font-size: .85rem; }

/* WORKFLOW CANVAS */
.canvas {
  position: relative; aspect-ratio: 520 / 440; width: 100%;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px;
  background-image: radial-gradient(circle at 1px 1px, #252d36 1px, transparent 0);
  background-size: 18px 18px;
  box-shadow: 0 40px 80px -40px #000, inset 0 1px 0 #ffffff0d;
  overflow: hidden;
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.wires path { fill: none; stroke: #39434e; stroke-width: 2; }
.wires .pulse {
  stroke: var(--signal); stroke-width: 2.5; stroke-dasharray: 40 600; stroke-linecap: round;
  animation: flow 3.2s linear infinite; filter: drop-shadow(0 0 6px var(--signal));
}
.wires .p2 { stroke: var(--mint); animation-delay: 1.6s; filter: drop-shadow(0 0 6px var(--mint)); }
@keyframes flow { from { stroke-dashoffset: 640; } to { stroke-dashoffset: 0; } }
.node {
  position: absolute; left: var(--x); top: var(--y);
  display: flex; gap: 10px; align-items: center;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px 10px 10px; min-width: 28%;
  animation: float 6s ease-in-out infinite;
}
.node:nth-child(odd) { animation-delay: -3s; }
.node i {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-style: normal; font-size: 1rem; color: var(--ink);
}
.node b { display: block; font-size: .92rem; }
.node small { color: var(--mute); font-size: .72rem; font-family: var(--mono); }
.n-trigger i { background: var(--signal); }
.n-ai i { background: var(--violet); }
.n-action i { background: var(--sky); }
.n-human i { background: var(--mint); }
.node.big { padding: 16px 18px 16px 14px; border-color: var(--violet); box-shadow: 0 0 0 6px #a58bff14, 0 0 40px -10px var(--violet); }
.node.big i { width: 42px; height: 42px; font-size: 1.3rem; }
@keyframes float { 50% { transform: translateY(-5px); } }
.canvas-log {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: grid; gap: 2px; color: var(--mute); font-size: .68rem;
  padding: 10px 12px; background: #0b0d10cc; border: 1px solid var(--line); border-radius: 10px;
}
.canvas-log span { opacity: 0; animation: log 9s infinite; }
.canvas-log span:nth-child(2) { animation-delay: 1.2s; }
.canvas-log span:nth-child(3) { animation-delay: 2.4s; color: var(--mint); }
.canvas-log em { color: var(--paper); }
@keyframes log { 5%, 85% { opacity: 1; } 95% { opacity: 0; } }

/* STRIP */
.strip { border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--ink); }
.strip > p { text-align: center; color: var(--mute); margin-bottom: 14px; }
.marquee { mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee > div { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-weight: 600; font-size: 1.15rem; color: #5f6a76; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* SECTIONS */
.section { max-width: 1320px; margin: 0 auto; padding: clamp(70px, 10vw, 130px) clamp(20px, 5vw, 64px) 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 800; }
h2 em { font-weight: 400; font-style: italic; }
.section-head > p:not(.eyebrow) { color: var(--mute); margin-top: 16px; font-size: 1.08rem; }
h3 { font-size: 1.3rem; letter-spacing: -0.02em; font-weight: 600; }

/* BLUEPRINT */
.bp-form {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  transition: border-color .2s;
}
.bp-form:focus-within { border-color: var(--signal); }
.bp-form textarea {
  width: 100%; background: transparent; border: 0; outline: 0; resize: vertical;
  color: var(--paper); font: 1.15rem/1.5 var(--display); padding: 6px 6px 14px;
}
.bp-form textarea::placeholder { color: #5f6a76; }
.bp-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--ink-3); color: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font: 500 .85rem var(--display); cursor: pointer; transition: border-color .2s;
}
.chip:hover { border-color: var(--mint); color: var(--mint); }
.bp-output {
  margin-top: 22px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(20px, 3vw, 36px);
}
.bp-meta { color: var(--mint); margin-bottom: 8px; }
.bp-head h3 { font-size: 1.8rem; }
.bp-head p:not(.bp-meta) { color: #c6c2b8; margin-top: 6px; max-width: 60ch; }
.bp-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 28px 0; counter-reset: s; }
.bp-step {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  opacity: 0; transform: translateY(8px); animation: in .45s var(--d) forwards;
}
.bp-step i { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-style: normal; color: var(--ink); background: var(--sky); }
.bp-step.k-trigger i { background: var(--signal); }
.bp-step.k-ai i { background: var(--violet); }
.bp-step.k-logic i { background: #f5d76e; }
.bp-step.k-human i { background: var(--mint); }
.bp-step b { display: block; font-size: .95rem; }
.bp-step span { color: var(--mute); font-size: .85rem; line-height: 1.45; }
@keyframes in { to { opacity: 1; transform: none; } }
.bp-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 26px; }
.bp-foot .mono { color: var(--mute); margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: .85rem; }
.bp-foot ul { list-style: none; display: grid; gap: 6px; font-size: .92rem; }
.bp-foot li::before { content: "◆ "; color: var(--mint); font-size: .7rem; }
.bp-loading { display: flex; align-items: center; gap: 12px; color: var(--mute); }
.bp-loading span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--signal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bp-error { color: var(--signal); }

/* CARDS */
.grid { display: grid; gap: 16px; }
.services { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 28px;
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--signal); }
.tag { display: inline-block; color: var(--signal); margin-bottom: 40px; }
.card p { color: var(--mute); margin-top: 10px; font-size: .98rem; }

/* STACK */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stack-item { padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0b0d10b3; }
.stack-item b { font-size: 1.15rem; display: block; margin-bottom: 8px; }
.stack-item b::before { content: "▸ "; color: var(--mint); }
.stack-item p { color: var(--mute); font-size: .95rem; }

/* PROCESS */
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process li { border-top: 2px solid var(--line); padding-top: 20px; position: relative; }
.process li::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); }
.process .mono { color: var(--mint); }
.process h3 { margin: 8px 0; }
.process p { color: var(--mute); font-size: .95rem; }

/* PLANS */
.plan-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.plan { position: relative; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 32px; }
.plan .price { color: var(--mute); font-family: var(--mono); font-size: .85rem; margin: 6px 0 22px; }
.plan ul { list-style: none; display: grid; gap: 10px; }
.plan li::before { content: "✓  "; color: var(--mint); }
.plan.featured { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.plan.featured .price { color: #555; }
.plan.featured li::before { color: var(--signal); }
.badge { position: absolute; top: 18px; right: 18px; background: var(--signal); color: var(--ink); padding: 4px 10px; border-radius: 999px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; max-width: 900px; }
.faq summary { cursor: pointer; font-size: 1.2rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--signal); font-size: 1.4rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--mute); margin-top: 12px; max-width: 70ch; }

/* CONTACT */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 80px); padding-bottom: 120px; }
.contact-copy p:not(.eyebrow) { color: var(--mute); margin-top: 18px; font-size: 1.08rem; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 34px);
}
.contact-form label { display: grid; gap: 6px; font-size: .85rem; color: var(--mute); font-family: var(--mono); }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form select, .contact-form textarea {
  background: var(--ink); border: 1px solid var(--line); border-radius: 10px; color: var(--paper);
  font: 1rem var(--display); padding: 12px 14px; outline: 0; transition: border-color .2s;
}
.contact-form :is(input, select, textarea):focus { border-color: var(--signal); }

/* FOOTER */
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 28px clamp(20px, 5vw, 64px); border-top: 1px solid var(--line); color: var(--mute); }

/* THANKS */
.thanks { min-height: 100vh; display: grid; place-content: center; text-align: center; justify-items: center; padding: 24px; }
.thanks .lede { margin-inline: auto; }

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero, .contact { grid-template-columns: 1fr; }
  .services, .stack-grid, .plan-grid { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .nav nav a:not(.btn) { display: none; }
}
@media (max-width: 620px) {
  .services, .stack-grid, .plan-grid, .process, .bp-foot, .contact-form { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .node { min-width: 0; padding: 6px 10px 6px 6px; }
  .node i { width: 26px; height: 26px; }
  .node small { display: none; }
  .canvas-log { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bp-step, .canvas-log span { opacity: 1; transform: none; }
}
