/* ============================================================
   MakeItFlow Studio — Design tokens
   Faithful to the original demo: Syne (display) / DM Mono (labels)
   / Inter (body), dark ink bg with noise + grid texture, acid green accent
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg2: #111114;
  --bg3: #18181d;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.13);
  --accent: #00ff88;
  --accent2: #00cc6a;
  --accent-dim: rgba(0, 255, 136, 0.08);
  --text: #f0f0ef;
  --text2: #888884;
  --text3: #555551;
  --red: #ff4d4d;
  --amber: #ffb347;

  --paper: #f5f5f0;
  --paper2: #efefe8;
  --ink-on-paper: #0a0a0b;
  --ink-on-paper-dim: rgba(10, 10, 11, 0.62);
  --line-light: rgba(10, 10, 11, 0.1);

  --mono: 'DM Mono', monospace;
  --display: 'Syne', sans-serif;
  --body: 'Inter', sans-serif;

  --container: 1120px;
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink-on-paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* texture, only visible on dark sections via .noise-zone */
.noise-zone { position: relative; }
.noise-zone::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none; opacity: 0.4; z-index: 0;
}
.noise-zone::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,255,136,0.02) 1px,transparent 1px),linear-gradient(90deg,rgba(0,255,136,0.02) 1px,transparent 1px);
  background-size: 60px 60px; pointer-events: none; z-index: 0;
}
.noise-zone > * { position: relative; z-index: 1; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

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

/* ---------- LANG TOGGLE ---------- */
.lang-bar { position: fixed; top: 16px; right: 24px; z-index: 100; display: flex; background: var(--bg2); border: 1px solid var(--border2); border-radius: 3px; overflow: hidden; }
.lang-btn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; padding: 6px 13px; background: none; border: none; color: var(--text2); cursor: pointer; transition: background 0.15s, color 0.15s; }
.lang-btn.active { background: var(--accent); color: #050f08; font-weight: 500; }
.lang-btn:not(.active):hover { background: var(--bg3); color: var(--text); }

/* ---------- EYEBROW / BADGE ---------- */
.badge, .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-dim); border: 1px solid rgba(0,255,136,0.2); color: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; padding: 5px 12px; border-radius: 2px; margin-bottom: 24px; text-transform: uppercase; }
.badge::before, .eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
.section--light .eyebrow, .section--paper2 .eyebrow { background: rgba(0,170,85,0.08); border-color: rgba(0,170,85,0.25); color: #0f8a5a; }

/* ---------- NAV ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(10,10,11,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-links { display: flex; gap: 32px; font-size: 14px; color: var(--text2); font-family: var(--body); }
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { font-family: var(--mono); font-size: 13px; color: #050f08; background: var(--accent); padding: 9px 18px; border-radius: 4px; font-weight: 500; }
.nav-cta:hover { background: var(--accent2); }

/* ---------- LOGO ---------- */
.logo-mark { display: flex; align-items: center; gap: 10px; }
.logo-mark svg { height: 26px; width: auto; }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 15px; padding: 13px 26px; border-radius: 4px; border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #050f08; }
.btn-primary:hover { background: var(--accent2); }
.btn-ghost-dark { border-color: var(--border2); color: var(--text); background: transparent; }
.btn-ghost-dark:hover { border-color: var(--accent); }
.btn-ghost-light { border-color: var(--line-light); color: var(--ink-on-paper); background: transparent; }
.btn-ghost-light:hover { border-color: #0f8a5a; }

/* ---------- SECTIONS ---------- */
.section { padding: 96px 0; }
.section--dark { background: var(--bg); color: var(--text); }
.section--light { background: var(--paper); color: var(--ink-on-paper); }
.section--paper2 { background: var(--paper2); color: var(--ink-on-paper); }

/* ---------- PIPELINE (signature element) ---------- */
.pipeline { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 8px 2px 18px; }
.pipeline-node { flex: 1 1 0; min-width: 168px; position: relative; padding: 20px 18px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--bg2); }
.section--light .pipeline-node, .section--paper2 .pipeline-node { border-color: var(--line-light); background: #fff; }
.pipeline-node + .pipeline-node { margin-left: 22px; }
.pipeline-node::before { content: ''; position: absolute; left: -22px; top: 50%; width: 22px; height: 1px; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); }
.pipeline-node .n { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-bottom: 10px; display: block; letter-spacing: 0.06em; }
.section--light .pipeline-node .n, .section--paper2 .pipeline-node .n { color: #0f8a5a; }
.pipeline-node h4 { font-size: 15px; margin-bottom: 6px; font-family: var(--display); }
.pipeline-node p { font-size: 13px; color: var(--text2); margin: 0; font-family: var(--body); line-height: 1.6; }
.section--light .pipeline-node p, .section--paper2 .pipeline-node p { color: var(--ink-on-paper-dim); }
.pipeline-node.is-live { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 26px -4px var(--accent); }

/* ---------- CARDS / GRIDS ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border: 1px solid var(--line-light); border-radius: var(--radius); padding: 26px; background: #fff; }
.section--dark .card { border-color: var(--border2); background: var(--bg2); position: relative; overflow: hidden; }
.section--dark .card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.4; }
.card h3, .card h4 { font-family: var(--display); }

/* ---------- STAT STRIP ---------- */
.stat-strip { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.stat-item { flex: 1; padding: 16px 20px; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 11px; color: var(--text3); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- PILLS ---------- */
.pill { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border2); color: var(--text2); margin: 0 8px 8px 0; }
.section--light .pill, .section--paper2 .pill { border-color: var(--line-light); color: var(--ink-on-paper-dim); }

/* ---------- FOOTER ---------- */
.footer { background: var(--bg); color: var(--text2); padding: 56px 0 32px; border-top: 1px solid var(--border); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; margin-bottom: 40px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text2); margin-bottom: 12px; font-weight: 400; }
.footer-col a { display: block; font-size: 14px; color: var(--text); margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; font-size: 12px; color: var(--text3); padding-top: 24px; border-top: 1px solid var(--border); font-family: var(--mono); }

/* ---------- UTILITIES ---------- */
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-48{margin-top:48px}.mt-64{margin-top:64px}
.dim-dark{color:var(--text2)}.dim-light{color:var(--ink-on-paper-dim)}
.center{text-align:center}
.max-w-620{max-width:620px}.max-w-760{max-width:760px}
.hairline{border:none;border-top:1px solid var(--line-light)}
.section--dark .hairline{border-top-color:var(--border)}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-strip { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .section { padding: 64px 0; }
  .footer-top { flex-direction: column; }
  h1 { font-size: 34px !important; }
  .lang-bar { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
