/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; margin: 0 0 .6em; line-height: 1.15; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, dl { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ===== Theme tokens ===== */
:root {
  --bg: #070a12;
  --bg-alt: #0b0f1a;
  --surface: #111726;
  --surface-border: rgba(255,255,255,0.08);
  --text: #e7ebf3;
  --text-muted: #93a0b8;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-3: #a855f7;
  --accent-text: #22d3ee;
  --ok: #34d399;
  --radius: 16px;
  --container: 1120px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8fc;
    --bg-alt: #ffffff;
    --surface: #ffffff;
    --surface-border: rgba(15,23,42,0.08);
    --text: #0f172a;
    --text-muted: #51607a;
    --accent: #2563eb;
    --accent-2: #0891b2;
    --accent-text: #0369a1;
  }
  :root:not([data-theme="dark"]) .bg-grid { opacity: .35; }
  :root:not([data-theme="dark"]) .terminal { box-shadow: 0 20px 60px rgba(15,23,42,0.12); }
}
:root[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-border: rgba(15,23,42,0.08);
  --text: #0f172a;
  --text-muted: #51607a;
  --accent: #2563eb;
  --accent-2: #0891b2;
  --accent-text: #0369a1;
}

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

.text-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Background grid ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--surface-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--surface-border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  opacity: .5;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #04101f;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(59,130,246,.35); }
.btn-ghost {
  background: transparent;
  border-color: var(--surface-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }
.btn-small { padding: .6em 1.3em; font-size: .875rem; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--surface-border); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { display: flex; align-items: center; gap: .5em; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; }
.logo-mark {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-text);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: .85em;
}
.dot { color: var(--accent-text); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--text-muted); font-weight: 500; font-size: .95rem; transition: color .15s ease; }
.nav a:hover { color: var(--accent-text); }
.header-cta { margin-left: 8px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 110px 0 90px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.hero-inner { max-width: 560px; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-text);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); }
.hero-sub { color: var(--text-muted); font-size: 1.08rem; max-width: 50ch; }
.hero-actions { display: flex; gap: 14px; margin: 1.6em 0 2.4em; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; border-top: 1px solid var(--surface-border); padding-top: 24px; }
.hero-stats dt { font-size: .8rem; color: var(--text-muted); margin-bottom: .3em; }
.hero-stats dd { margin: 0; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }

.hero-visual { display: flex; justify-content: center; }
.terminal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  transform: rotate(1.5deg);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--surface-border);
}
.terminal-bar span:not(.terminal-title) { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red { background: #f87171; }
.dot-yellow { background: #fbbf24; }
.dot-green { background: #34d399; }
.terminal-title { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--text-muted); }
.terminal-body {
  margin: 0;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  line-height: 1.7;
  color: var(--text-muted);
  overflow-x: auto;
}
.tk-kw { color: var(--accent-text); }
.tk-str { color: #fbbf24; }
.tk-com { color: #64748b; }
.tk-ok { color: var(--ok); }

/* ===== Trust strip ===== */
.trust-strip { border-top: 1px solid var(--surface-border); border-bottom: 1px solid var(--surface-border); padding: 22px 0; }
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  letter-spacing: .03em;
}

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 20ch; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; }

/* ===== Services grid ===== */
.grid { display: grid; gap: 24px; margin-top: 48px; }
.services-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-text); }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 25%, transparent), color-mix(in srgb, var(--accent-2) 25%, transparent));
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.1rem; margin-bottom: .5em; }
.card p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.step {
  padding: 28px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background: var(--surface);
}
.step-num {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-text);
  font-size: .85rem;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; }
.step p { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.value-list { display: grid; gap: 20px; }
.value-list li {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface);
}
.value-list strong { font-family: 'Space Grotesk', sans-serif; }
.value-list span { color: var(--text-muted); font-size: .92rem; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info a { color: var(--accent-text); font-weight: 600; font-size: 1.05rem; }
.contact-form {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 18px;
}
.form-row { display: grid; gap: 8px; }
.form-row label { font-size: .88rem; color: var(--text-muted); }
.form-row input, .form-row textarea {
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent-text); }
.form-note { font-size: .85rem; color: var(--ok); min-height: 1.2em; margin: 0; text-align: center; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--surface-border); padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-inner p { margin: 0; color: var(--text-muted); font-size: .88rem; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-visual { order: -1; }
  .terminal { max-width: 360px; margin: 0 auto; transform: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-border);
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .site-header.nav-open .header-cta { display: inline-flex; margin: 8px 24px 20px; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
}
