/* mashines.dev, prototype design system
   Dark "infrastructure" aesthetic. Teal = the "alive / migrating" accent. */

:root {
  --bg: #070a0f;
  --bg-soft: #0c1118;
  --panel: #11171f;
  --panel-2: #161d27;
  --border: #1e2733;
  --border-soft: #161d27;
  --fg: #e7edf4;
  --fg-soft: #9fb0c3;
  --fg-dim: #6b7c91;
  --accent: #2dd4bf;       /* teal, "alive" */
  --accent-2: #22d3ee;     /* cyan */
  --accent-3: #a78bfa;     /* violet, for agents */
  --warn: #f59e0b;
  --bad: #64748b;
  --good: #2dd4bf;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient glow */
body::before {
  content: "";
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 700px;
  background: radial-gradient(closest-side, rgba(45,212,191,.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .4em; font-weight: 650; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { color: var(--fg-soft); }

.eyebrow {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block; }

/* ---------- Nav ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7,10,15,.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--fg); font-size: 1.06rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.brand b { color: var(--accent); font-weight: 650; }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--fg-soft); font-size: .94rem; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-cta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.nav-toggle { display: none; background: none; border: 0; color: var(--fg); font-size: 1.5rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: .94rem;
  padding: 11px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04201c; }
.btn-primary:hover { background: #5fe6d4; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 40px; text-align: center; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { font-size: clamp(1.05rem, 2vw, 1.32rem); color: var(--fg-soft); max-width: 60ch; margin: 18px auto 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 22px; font-family: var(--mono); font-size: .82rem; color: var(--fg-dim); }
.hero-meta span { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .78rem; color: var(--fg-soft);
  padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); margin-bottom: 24px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(45,212,191,.5); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45,212,191,.45); }
  70% { box-shadow: 0 0 0 8px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}

/* ---------- Live-migration diagram ---------- */
.migration-demo {
  margin: 40px auto 0; max-width: 760px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 26px 20px; box-shadow: var(--shadow);
}
.mig-row { display: grid; grid-template-columns: 1fr 96px 1fr; align-items: center; gap: 0; }
.host {
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 16px 14px 14px; min-height: 132px; position: relative; background: var(--bg-soft);
}
.host .host-label { font-family: var(--mono); font-size: .72rem; color: var(--fg-dim); letter-spacing: .08em; }
.vm {
  margin-top: 12px; background: linear-gradient(135deg, rgba(45,212,191,.16), rgba(34,211,238,.10));
  border: 1px solid var(--accent); border-radius: 8px; padding: 10px 12px;
  font-family: var(--mono); font-size: .8rem; color: var(--fg);
  transition: opacity .5s ease, transform .5s ease;
}
.vm .vm-id { color: var(--accent); }
.vm .vm-up { color: var(--fg-soft); font-size: .72rem; }
.vm.ghost { opacity: .18; border-style: dashed; }
.mig-arrow { text-align: center; color: var(--accent); position: relative; }
.mig-arrow .track { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); border-radius: 2px; position: relative; overflow: hidden; }
.mig-arrow .track::after { content: ""; position: absolute; top: -3px; left: -20%; width: 20%; height: 8px; background: var(--accent); border-radius: 8px; filter: blur(2px); animation: slide 2.4s ease-in-out infinite; }
@keyframes slide { 0% { left: -20%; } 100% { left: 100%; } }
.mig-arrow small { display: block; font-family: var(--mono); font-size: .66rem; color: var(--fg-dim); margin-top: 8px; }
.mig-caption { text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--fg-dim); margin-top: 16px; }
.mig-caption b { color: var(--accent); }

/* ---------- Sections ---------- */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 56ch; margin: 0 auto 46px; }
.section-head p { font-size: 1.06rem; }

/* logos / trust strip */
.trust { padding: 30px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.trust p { text-align: center; font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); margin: 0 0 18px; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.chip { font-family: var(--mono); font-size: .82rem; color: var(--fg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px; background: var(--panel); }

/* feature grid */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card .ic {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.3); margin-bottom: 16px;
}
.card .ic svg { width: 22px; height: 22px; stroke: var(--accent); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .96rem; margin: 0; }
.card.violet .ic { background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.3); }
.card.violet .ic svg { stroke: var(--accent-3); }

/* use cases */
.usecase { display: flex; gap: 16px; align-items: flex-start; }
.usecase .tag { font-family: var(--mono); font-size: .72rem; color: var(--accent); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; white-space: nowrap; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(3,1fr); }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; position: relative; }
.step::before { counter-increment: step; content: counter(step); font-family: var(--mono); font-size: .8rem; color: #04201c; background: var(--accent); width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { font-size: 1.05rem; }
.step p { font-size: .92rem; margin: 0; }

/* code block */
.code {
  background: #05080c; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--mono); font-size: .86rem; overflow: hidden;
}
.code-head { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.code-head i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.code-head .r { background: #ff5f56; } .code-head .y { background: #ffbd2e; } .code-head .g { background: #27c93f; }
.code-head span { margin-left: 8px; color: var(--fg-dim); font-size: .76rem; }
.code pre { margin: 0; padding: 18px 16px; overflow-x: auto; line-height: 1.7; }
.code .c { color: var(--fg-dim); }     /* comment */
.code .k { color: var(--accent-2); }   /* keyword/command */
.code .s { color: #b5e8a0; }           /* string */
.code .o { color: var(--accent); }     /* output */
.code .p { color: var(--accent-3); }   /* prompt */

/* split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.split ul { list-style: none; padding: 0; margin: 18px 0 0; }
.split ul li { padding-left: 28px; position: relative; margin-bottom: 12px; color: var(--fg-soft); }
.split ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Comparison table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 820px; font-size: .92rem; }
table.cmp th, table.cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.cmp thead th { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-dim); background: var(--bg-soft); position: sticky; top: 0; }
table.cmp thead th.us { color: var(--accent); }
table.cmp tbody th { font-weight: 600; color: var(--fg); }
table.cmp td.us { background: rgba(45,212,191,.06); color: var(--fg); font-weight: 600; }
table.cmp tr:last-child td, table.cmp tr:last-child th { border-bottom: 0; }
.yes { color: var(--good); font-weight: 600; }
.no { color: var(--bad); }
.meh { color: var(--warn); }
.cell-note { display: block; font-size: .76rem; color: var(--fg-dim); font-weight: 400; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow); position: relative; }
.plan.featured::after { content: "Most popular"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #04201c; font-family: var(--mono); font-size: .68rem; padding: 3px 11px; border-radius: 999px; letter-spacing: .04em; }
.plan h3 { font-size: 1.15rem; margin-bottom: 4px; }
.plan .price { font-size: 2rem; font-weight: 680; letter-spacing: -.03em; margin: 12px 0 2px; }
.plan .price small { font-size: .9rem; color: var(--fg-dim); font-weight: 400; }
.plan .tagline { font-size: .9rem; color: var(--fg-soft); min-height: 40px; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan ul li { font-size: .9rem; color: var(--fg-soft); padding: 7px 0 7px 24px; position: relative; border-top: 1px solid var(--border-soft); }
.plan ul li:first-child { border-top: 0; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.plan .btn { width: 100%; justify-content: center; }

.rates { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 22px; }
.rate { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.rate .k { font-family: var(--mono); font-size: .76rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .06em; }
.rate .v { font-size: 1.5rem; font-weight: 650; margin: 8px 0 2px; }
.rate .v span { font-size: .85rem; color: var(--fg-dim); font-weight: 400; }
.rate p { font-size: .82rem; margin: 6px 0 0; }

/* calculator */
.calc { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-top: 26px; }
.calc-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.calc label { display: block; font-family: var(--mono); font-size: .76rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.calc input[type=range] { width: 100%; accent-color: var(--accent); }
.calc .val { font-size: 1.2rem; font-weight: 650; margin-top: 6px; }
.calc-out { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.calc-out .total { font-size: 2.4rem; font-weight: 700; letter-spacing: -.03em; }
.calc-out .total span { font-size: 1rem; color: var(--fg-dim); font-weight: 400; }
.calc-out .note { font-family: var(--mono); font-size: .78rem; color: var(--fg-dim); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 20px; margin-bottom: 12px; background: var(--panel); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; background: linear-gradient(135deg, rgba(45,212,191,.10), rgba(34,211,238,.05)); border: 1px solid var(--border); border-radius: var(--radius); padding: 56px 24px; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 50ch; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
footer.ft { border-top: 1px solid var(--border-soft); padding: 54px 0 40px; margin-top: 40px; }
.ft-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.ft-grid h4 { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-dim); margin: 0 0 14px; }
.ft-grid ul { list-style: none; padding: 0; margin: 0; }
.ft-grid ul li { margin-bottom: 9px; }
.ft-grid a { color: var(--fg-soft); font-size: .92rem; }
.ft-grid a:hover { color: var(--accent); }
.ft-about p { font-size: .9rem; max-width: 34ch; }
.ft-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-soft); font-size: .84rem; color: var(--fg-dim); }
.ft-bottom .mono { font-family: var(--mono); }

/* ---------- Waitlist form ---------- */
.wl-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.wl-field { margin-bottom: 18px; }
.wl-field label { display: block; font-family: var(--mono); font-size: .76rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.wl-field .req { color: var(--accent); }
.wl-form input, .wl-form select, .wl-form textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px;
  color: var(--fg); font-family: var(--sans); font-size: .96rem; padding: 11px 13px; transition: border-color .2s;
}
.wl-form textarea { resize: vertical; }
.wl-form input:focus, .wl-form select:focus, .wl-form textarea:focus { outline: none; border-color: var(--accent); }
.wl-form input::placeholder, .wl-form textarea::placeholder { color: var(--fg-dim); }
.wl-form input.invalid { border-color: #ff6b6b; }
.wl-hint { font-size: .8rem; color: var(--fg-dim); margin: 14px 0 0; text-align: center; }
.wl-error { color: #ff8585; font-size: .9rem; margin: 12px 0 0; text-align: center; }
.wl-success { background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); padding: 40px 28px; text-align: center; box-shadow: var(--shadow); }
.wl-success .wl-check { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: rgba(45,212,191,.14); border: 1px solid var(--accent); color: var(--accent); font-size: 1.6rem; }
.wl-success h2 { margin-bottom: 10px; }
.wl-success p { max-width: 46ch; margin: 0 auto; }

/* page header (sub-pages) */
.page-head { padding: 64px 0 30px; text-align: center; }
.page-head h1 { font-size: clamp(2rem,4vw,3rem); }
.page-head p { max-width: 56ch; margin: 14px auto 0; font-size: 1.08rem; }

/* responsive */
@media (max-width: 920px) {
  .grid-3, .grid-4, .steps, .price-grid, .rates, .calc-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .ft-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 16px 22px; gap: 14px; }
  .grid-3, .grid-4, .steps, .price-grid, .rates, .calc-grid, .grid-2 { grid-template-columns: 1fr; }
  .ft-grid { grid-template-columns: 1fr; }
  .mig-row { grid-template-columns: 1fr; gap: 12px; }
  .mig-arrow { transform: rotate(90deg); margin: 6px 0; }
  .hero { padding: 54px 0 30px; }
}
