:root {
  --bg: #0a0e0d;
  --bg-2: #0d1211;
  --panel-edge: rgba(255, 255, 255, 0.08);
  --panel-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  --text: #eef2f0;
  --dim: #9db0a9;
  --accent: #2fe0af;
  --accent-soft: rgba(47, 224, 175, 0.13);
  --accent-ink: #04281e;
  --info: #8fb0ff;
  --warn: #fbbf24;
  --down: #f87171;
  --radius: 18px;
  --display: "Space Grotesk", -apple-system, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16.5px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(47, 224, 175, 0.25); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 26px; }

h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; }

/* ---------- nav ---------- */
nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 14, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-edge);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-link { color: var(--dim); text-decoration: none; font-size: 14.5px; }
.nav-link:hover { color: var(--text); }

.btn {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: 15px;
  padding: 13px 24px; border-radius: 999px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(47, 224, 175, 0.28); }
.btn.small { padding: 9px 18px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.18); }
.btn.ghost:hover { box-shadow: none; border-color: rgba(255, 255, 255, 0.4); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 380px at 78% 8%, rgba(47, 224, 175, 0.11), transparent 70%),
    radial-gradient(520px 320px at 8% 95%, rgba(143, 176, 255, 0.06), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(560px 420px at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(560px 420px at 70% 30%, #000 30%, transparent 75%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.05; font-weight: 700; }
h1 .hl {
  background: linear-gradient(92deg, var(--accent), #7ce8c9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { margin: 22px 0 32px; max-width: 560px; font-size: 18px; color: var(--dim); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.quiet-note { margin-top: 16px; font-size: 13.5px; color: var(--dim); }

/* ---------- hero sync demo ---------- */
.sync {
  background: var(--panel-grad);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.sync-toast {
  display: flex; align-items: center; gap: 10px;
  background: #101815;
  border: 1px solid rgba(47, 224, 175, 0.25);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px; font-weight: 550;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  min-height: 44px;
}
.sync-toast.show { opacity: 1; transform: none; }
.sync-toast::before { content: "⚡"; font-size: 13px; }
.sync-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.sync-card {
  background: #0e1413;
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}
.sync-card.pulse {
  border-color: rgba(47, 224, 175, 0.55);
  box-shadow: 0 0 0 3px rgba(47, 224, 175, 0.12);
}
.sync-card.dim { opacity: 0.45; }
.sync-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 5px;
}
.sync-app { font-size: 11px; letter-spacing: 0.04em; color: rgba(157, 176, 169, 0.6); text-transform: none; }
.sync-value { font-family: var(--display); font-size: 16.5px; font-weight: 600; }
.sync-card.pulse .sync-value { color: var(--accent); }
.sync-note { margin-top: 12px; text-align: center; font-size: 12px; color: rgba(157, 176, 169, 0.75); }

/* ---------- sections ---------- */
section { padding: 92px 0; }
section.alt { background: var(--bg-2); border-top: 1px solid var(--panel-edge); border-bottom: 1px solid var(--panel-edge); }
.sec-eyebrow {
  font-size: 12px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
h2 { font-size: clamp(27px, 3.5vw, 38px); line-height: 1.12; max-width: 680px; }
.sec-lede { margin-top: 14px; max-width: 640px; color: var(--dim); font-size: 17px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.card {
  background: var(--panel-grad);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.card h3 { font-size: 18.5px; margin-bottom: 10px; }
.card p { color: var(--dim); font-size: 15px; }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent-soft); margin-bottom: 16px;
}
.card-icon svg { width: 19px; height: 19px; stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--display); font-weight: 700; font-size: 15px; margin-bottom: 16px;
}
.fits { margin-top: 28px; font-size: 14.5px; color: var(--dim); max-width: 760px; }
.fits strong { color: var(--text); font-weight: 600; }

/* ---------- dashboard demo ---------- */
.browser {
  margin-top: 46px;
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  overflow: hidden;
  background: #0b100f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--panel-edge);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #f26d63; } .dot.y { background: #f5bd4f; } .dot.g { background: #58c344; }
.addr {
  margin-left: 12px; flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px; padding: 5px 12px;
  font-size: 12.5px; color: var(--dim);
  max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge-demo {
  margin-left: auto;
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.05em;
  color: var(--warn);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.dash { position: relative; padding: 22px; overflow: hidden; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat {
  background: var(--panel-grad);
  border: 1px solid var(--panel-edge);
  border-radius: 14px; padding: 14px 16px;
}
.stat-label { font-size: 11.5px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.stat-value { font-family: var(--display); font-size: 24px; font-weight: 700; margin-top: 4px; transition: color 0.25s ease; }
.stat-value.flash { color: var(--accent); }

.dash-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.dash-main { display: flex; flex-direction: column; gap: 14px; }
.panel {
  background: var(--panel-grad);
  border: 1px solid var(--panel-edge);
  border-radius: 14px; padding: 16px;
}
.panel h4 {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 12px;
}
.panel-hint { font-size: 11px; letter-spacing: 0.02em; text-transform: none; font-weight: 500; color: rgba(157, 176, 169, 0.65); }

.equip-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14.5px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.equip-row:hover { background: rgba(255, 255, 255, 0.035); border-color: var(--panel-edge); }
.equip-name { display: flex; align-items: center; gap: 10px; font-weight: 550; }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sdot.ok { background: var(--accent); }
.sdot.warn { background: var(--warn); }
.sdot.down { background: var(--down); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15); }
.equip-status { font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.equip-status.down-t { color: var(--down); }
.equip-status.warn-t { color: var(--warn); }

.stock-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; font-size: 14px; }
.stock-name { width: 110px; flex: none; font-weight: 550; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.bar-fill.low { background: var(--warn); }
.stock-pct { width: 42px; text-align: right; font-size: 12.5px; color: var(--dim); }
.stock-action {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 6px; padding: 10px 12px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 10px; font-size: 13px;
}
.stock-action.done {
  background: var(--accent-soft);
  border-color: rgba(47, 224, 175, 0.35);
}
.approve-btn {
  flex: none;
  background: var(--warn); color: #221a03;
  font-weight: 650; font-size: 12.5px;
  padding: 6px 14px; border-radius: 999px;
  transition: transform 0.12s ease;
}
.approve-btn:hover { transform: translateY(-1px); }

.feed-panel { display: flex; flex-direction: column; }
.feed-live { color: var(--accent); font-size: 11px; letter-spacing: 0.04em; }
#feed { list-style: none; display: flex; flex-direction: column; gap: 4px; }
#feed li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 8px; border-radius: 8px; font-size: 13px;
}
#feed li.fresh { animation: feedIn 0.4s ease; background: rgba(47, 224, 175, 0.05); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
#feed .t { flex: none; width: 52px; font-size: 11.5px; color: rgba(157, 176, 169, 0.7); }
#feed .tx { flex: 1; color: var(--text); }
.chip {
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; color: var(--accent);
  border: 1px solid rgba(47, 224, 175, 0.3);
  border-radius: 6px; padding: 1px 6px;
  cursor: help;
}

.machine-detail {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(380px, 92%);
  background: #0e1514;
  border-left: 1px solid var(--panel-edge);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.45);
  padding: 22px;
  transform: translateX(105%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.machine-detail.open { transform: none; }
.detail-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 16px; line-height: 1;
}
.detail-close:hover { background: rgba(255, 255, 255, 0.12); }
.machine-detail h4 { font-size: 17px; letter-spacing: -0.01em; text-transform: none; margin-bottom: 4px; }
#detail-status { font-size: 13.5px; color: var(--dim); margin-bottom: 18px; }
#detail-history { list-style: none; display: flex; flex-direction: column; }
#detail-history li {
  position: relative; padding: 0 0 16px 22px; font-size: 13.5px; color: var(--dim);
}
#detail-history li::before {
  content: ""; position: absolute; left: 5px; top: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
#detail-history li::after {
  content: ""; position: absolute; left: 8px; top: 16px; bottom: 2px;
  width: 1px; background: rgba(255, 255, 255, 0.1);
}
#detail-history li:last-child::after { display: none; }
#detail-history li strong { color: var(--text); font-weight: 600; }

/* ---------- flow walkthrough ---------- */
.flow { margin-top: 48px; }
.flow-track {
  position: relative; height: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 40px 26px;
}
.flow-progress {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #7ce8c9);
  transition: width 0.5s ease;
}
.flow-stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.flow-stage {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 16px 10px;
  border: 1px solid transparent; border-radius: 14px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.flow-stage:hover { background: rgba(255, 255, 255, 0.03); }
.flow-stage.active { background: var(--panel-grad); border-color: rgba(47, 224, 175, 0.35); }
.flow-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.flow-stage.active .flow-dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(47, 224, 175, 0.15); }
.flow-name { font-family: var(--display); font-weight: 650; font-size: 15px; }
.flow-stage.active .flow-name { color: var(--accent); }
.flow-desc { font-size: 12.5px; color: var(--dim); max-width: 170px; }

/* ---------- team ---------- */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 44px; max-width: 800px; }
.person {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--panel-grad);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 24px;
}
.avatar {
  flex: none; width: 58px; height: 58px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 21px;
}
.avatar.a { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(47, 224, 175, 0.3); }
.avatar.b { background: rgba(143, 176, 255, 0.12); color: var(--info); border: 1px solid rgba(143, 176, 255, 0.3); }
.person h3 { font-size: 17.5px; }
.person .role {
  color: var(--accent); font-size: 12px; font-weight: 650;
  letter-spacing: 0.07em; text-transform: uppercase; margin: 3px 0 8px;
}
.person p { color: var(--dim); font-size: 14.5px; }

/* ---------- final cta / footer ---------- */
.final { text-align: center; padding: 110px 0; position: relative; overflow: hidden; }
.final::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 50% 100%, rgba(47, 224, 175, 0.08), transparent 70%);
}
.final h2 { margin: 0 auto 16px; position: relative; }
.final p { color: var(--dim); max-width: 540px; margin: 0 auto 32px; position: relative; }
.final .btn { position: relative; }

footer { border-top: 1px solid var(--panel-edge); padding: 30px 0 42px; }
.foot {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--dim); font-size: 13.5px; flex-wrap: wrap; gap: 10px;
}
.foot a { color: var(--dim); }
.foot a:hover { color: var(--text); }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .sub { max-width: 640px; }
  .dash-cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-link { display: none; }
  .grid3 { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 60px; }
  section { padding: 66px 0; }
  .flow-track { margin: 0 0 22px; }
  .flow-stages { grid-template-columns: 1fr; gap: 6px; }
  .flow-stage { flex-direction: row; text-align: left; }
  .flow-desc { max-width: none; }
  .addr { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .sync-toast, .sync-card, .machine-detail, .flow-progress, .btn { transition: none; }
  #feed li.fresh { animation: none; }
}
