:root {
  --ink: #0b1215;
  --ink-2: #1f2a2e;
  --muted: #55626a;
  --paper: #f6f7f9;
  --card: #ffffff;
  --line: #0b1215;
  --soft-line: #d8dee2;
  --green: #0f7f4a;
  --green-dark: #0a5f37;
  --mint: #d9f2e4;
  --night: #071014;
  --radius: 10px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --max: 1160px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--white { background: var(--card); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.section--dark { background: var(--night); color: #e8eef0; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .muted { color: #9fb0b7; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.section--dark .eyebrow { color: #4fd18f; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 680px; }
.section--dark .lead { color: #c9d5da; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 249, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo span { color: var(--green); }
.logo-tag { display: block; font-family: var(--font-body); font-size: 0.72rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 2px; }
.site-footer .logo-tag { color: #9fb0b7; }
@media (max-width: 420px) { .logo-tag { font-size: 0.64rem; } }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--green); }
.nav-dropdown { position: relative; }
.nav-dropdown > button {
  background: none; border: 0; font: inherit; font-weight: 500; font-size: 0.97rem;
  color: var(--ink); cursor: pointer; padding: 0;
}
.nav-dropdown > button::after { content: " ▾"; font-size: 0.8em; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: -16px;
  min-width: 270px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  list-style: none;
  margin: 0;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu { display: block; }
.nav-dropdown::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 16px; }
.dropdown-menu a { display: block; padding: 10px 12px; border-radius: 6px; }
.dropdown-menu a:hover { background: var(--mint); color: var(--ink); }
.dropdown-menu small { display: block; color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.nav-toggle { display: none; background: none; border: 2px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-weight: 600; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 14px 24px;
  border: 2px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--green); color: #fff; }
.btn-secondary { background: var(--card); color: var(--ink); }
.btn-small { padding: 10px 16px; font-size: 0.92rem; }
.section--dark .btn { border-color: #fff; box-shadow: 3px 3px 0 #fff; }
.section--dark .btn:hover { box-shadow: 5px 5px 0 #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Hero */
.hero { padding: 96px 0 80px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--soft-line) 1px, transparent 1px), linear-gradient(90deg, var(--soft-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 65%);
  opacity: 0.7;
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero-note { margin-top: 20px; font-size: 0.95rem; color: var(--muted); }

.terminal {
  background: var(--night);
  color: #d6e3e8;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--green);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 0.86rem;
  overflow: hidden;
}
.terminal-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #1d2c32; }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c3c43; display: block; }
.terminal-body { padding: 18px 20px 22px; line-height: 1.85; }
.terminal-body .k { color: #4fd18f; }
.terminal-body .c { color: #6c828b; }
.terminal-body .v { color: #ffd479; }

/* Proof bar */
.proof { border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); background: var(--card); padding: 26px 0; }
.proof-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 40px; }
.proof-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.proof-item { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.proof-item small { font-weight: 500; color: var(--green); margin-left: 4px; }

/* Cards & grids */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card--dark { background: #0e1a1f; border-color: #2a3b42; box-shadow: 5px 5px 0 var(--green); }
.card--dark h3 { color: #fff; }
.card--dark .muted { color: #9fb0b7; }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card-link:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--green); }
.card-link .more { margin-top: auto; padding-top: 18px; font-family: var(--font-head); font-weight: 700; color: var(--green); }
.icon {
  width: 52px; height: 52px; border-radius: 10px; border: 2px solid var(--line);
  background: var(--mint); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 20px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tag-list li { font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.section--dark .tag-list li { background: transparent; border-color: #3a4b52; color: #c9d5da; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: calc(0.8em - 10px); width: 20px; height: 20px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 0.72rem; font-weight: 700; display: grid; place-items: center;
}

.check-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
@media (max-width: 640px) { .check-grid { grid-template-columns: 1fr; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { border-left: 3px solid #4fd18f; padding-left: 18px; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.5rem); color: #fff; line-height: 1.1; margin-bottom: 6px; }
.stat span { color: #9fb0b7; font-size: 0.95rem; }

/* Case studies */
.case { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.case + .case { margin-top: 32px; }
.case-meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.case .badge { display: inline-block; background: var(--mint); border: 1.5px solid var(--line); border-radius: 6px; font-size: 0.78rem; font-weight: 700; padding: 3px 9px; margin-bottom: 14px; }

/* Process */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-top: 58px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  width: 42px; height: 42px; border: 2px solid var(--line); border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; box-shadow: var(--shadow-sm);
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* Engagement models */
.plan { display: flex; flex-direction: column; }
.plan .plan-label { font-family: var(--font-head); font-weight: 700; color: var(--green); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.plan h3 { font-size: 1.6rem; margin: 6px 0 4px; }
.plan .plan-time { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.plan .check-list { margin-bottom: 24px; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan--featured { background: var(--night); color: #e8eef0; box-shadow: 8px 8px 0 var(--green); }
.plan--featured h3 { color: #fff; }
.plan--featured .plan-time { color: #9fb0b7; }
.plan--featured .plan-label { color: #4fd18f; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 20px 24px; font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--ink-2); }

/* CTA band */
.cta-band { background: var(--green); color: #fff; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); padding: 80px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e3f5ea; font-size: 1.15rem; max-width: 620px; }
.cta-band .btn-primary { background: var(--ink); }
.cta-band-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split--wide-left { grid-template-columns: 1.3fr 1fr; }

/* Quote */
.quote { font-family: var(--font-head); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.35; font-weight: 500; border-left: 4px solid var(--green); padding-left: 24px; margin: 0; }

/* Forms */
.form-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--green); padding: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 8px; background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--mint); border-color: var(--green); }
.field textarea { min-height: 140px; resize: vertical; }
.form-error { margin: 14px 0 0; padding: 12px 14px; border: 2px solid #b42318; border-radius: 8px; background: #fef3f2; color: #7a271a; font-size: 0.92rem; }
.form-error[hidden] { display: none; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form-fine { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

/* Page hero (sub pages) */
.page-hero { padding: 80px 0 64px; border-bottom: 2px solid var(--line); position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--soft-line) 1px, transparent 1px), linear-gradient(90deg, var(--soft-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 85% 20%, #000 0%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at 85% 20%, #000 0%, transparent 60%);
  pointer-events: none;
}
.page-hero > .container { position: relative; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 880px; }
.breadcrumb { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }

/* Footer */
.site-footer { background: var(--night); color: #9fb0b7; padding: 64px 0 32px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.site-footer .logo { color: #fff; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #c9d5da; text-decoration: none; }
.site-footer a:hover { color: #4fd18f; }
.footer-bottom { border-top: 1px solid #1d2c32; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.88rem; }

/* Chat */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 100; font-family: var(--font-body); }
.chat-launcher {
  display: flex; align-items: center; gap: 10px; position: relative;
  background: var(--green); color: #fff; border: 2px solid var(--ink); border-radius: 999px;
  padding: 12px 20px 12px 16px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.chat-launcher:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.chat-launcher-icon { font-size: 1.2rem; line-height: 1; }
.chat--open .chat-launcher-text { display: none; }
.chat--open .chat-launcher { padding: 12px 14px; }
.chat-badge {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #d92d20; color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff;
}
.chat-badge[hidden] { display: none; }
.chat-panel {
  position: absolute; right: 0; bottom: 64px; width: 360px; max-width: calc(100vw - 40px); height: 480px; max-height: calc(100vh - 120px);
  background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--night); color: #fff; }
.chat-head strong { display: block; font-family: var(--font-head); font-size: 1rem; }
.chat-head small { display: block; color: #9fb0b7; font-size: 0.78rem; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid #4fd18f; }
.chat-close { margin-left: auto; background: none; border: 0; color: #c9d5da; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.chat-msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 0.94rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg--them { align-self: flex-start; background: var(--card); border: 1.5px solid var(--soft-line); border-bottom-left-radius: 4px; }
.chat-msg--me { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-status { align-self: center; color: var(--muted); font-size: 0.85rem; }
.chat-form { border-top: 2px solid var(--ink); padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--card); }
.chat-email, .chat-input {
  width: 100%; font: inherit; font-size: 0.92rem; padding: 9px 11px; border: 1.5px solid var(--soft-line); border-radius: 8px; background: var(--paper); color: var(--ink);
}
.chat-email:focus, .chat-input:focus { outline: 2px solid var(--mint); border-color: var(--green); }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { resize: none; max-height: 120px; }
.chat-send { flex: none; width: 42px; height: 40px; border-radius: 8px; border: 2px solid var(--ink); background: var(--green); color: #fff; font-size: 1rem; cursor: pointer; }
@media (max-width: 640px) {
  .chat { right: 12px; bottom: 12px; }
  .chat-launcher-text { display: none; }
  .chat-launcher { padding: 13px 15px; }
  .chat-panel { width: calc(100vw - 24px); height: calc(100vh - 100px); }
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .split, .split--wide-left, .case { grid-template-columns: 1fr; gap: 40px; }
  .grid-3, .grid-4, .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 2px solid var(--line); padding: 12px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { padding: 10px 0; border-bottom: 1px solid var(--soft-line); }
  .nav-links > li:last-child { border-bottom: 0; padding-top: 16px; }
  .dropdown-menu { position: static; display: block; box-shadow: none; border: 0; padding: 6px 0 0 8px; min-width: 0; background: transparent; }
  .nav-dropdown > button::after { content: ""; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 64px 0 56px; }
  .grid-2, .grid-3, .grid-4, .steps, .stats, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .card, .form-card { padding: 24px; }
}
