:root {
  --bg: #fafaf8;
  --bg-alt: #f1f0ec;
  --fg: #111111;
  --muted: #6b6b66;
  --line: #dddcd6;
  --accent: #ff4d1a;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --bg-alt: #161614;
    --fg: #f2f1ed;
    --muted: #8f8e88;
    --line: #2a2a27;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.5vw, 5.25rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.08; }
h3 { font-size: 1.2rem; line-height: 1.3; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.mono, .eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.eyebrow { text-transform: uppercase; margin-bottom: 1.25rem; }
.eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 10px; vertical-align: 1px; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40em; margin-top: 1.75rem; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn-small { padding: 0.6em 1.15em; font-size: 0.875rem; }

.link-arrow { text-decoration: none; font-weight: 500; }
.link-arrow span { display: inline-block; transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--mono); font-weight: 500; font-size: 1rem; text-decoration: none; }
.logo img, img.logo { display: block; height: auto; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-icon { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) { text-decoration: none; font-size: 0.925rem; color: var(--muted); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--fg); }

.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--fg); transition: transform .25s; }
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 23px; }
.nav-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Hero */
.hero { padding-block: clamp(80px, 14vw, 180px) clamp(64px, 10vw, 120px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.75rem; margin-top: 2.5rem; }

/* Facts */
.facts { border-block: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.facts-grid > div { padding: 2.25rem 2rem 2.25rem 0; }
.facts-grid > div + div { padding-left: 2rem; border-left: 1px solid var(--line); }
.facts-grid p { margin-top: 0.75rem; color: var(--muted); font-size: 0.975rem; }
.facts-grid strong { color: var(--fg); font-weight: 500; }

/* Sections */
.section { padding-block: clamp(80px, 11vw, 140px); }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* Services */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.services li {
  padding: 2rem 2rem 2.5rem 0;
  border-bottom: 1px solid var(--line);
}
.services li:not(:nth-child(3n+1)) { padding-left: 2rem; border-left: 1px solid var(--line); }
.services h3 { margin: 1.5rem 0 0.75rem; }
.services p { color: var(--muted); font-size: 0.975rem; }
.services li:hover .mono { color: var(--accent); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--fg);
  font-family: var(--mono); font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.step h3 { margin-bottom: 0.6rem; }
.step p { color: var(--muted); font-size: 0.975rem; }

/* Stack */
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stack li {
  font-family: var(--mono); font-size: 0.85rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.55em 1.1em;
  transition: border-color .2s, color .2s;
}
.stack li:hover { border-color: var(--accent); color: var(--accent); }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact-email {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: clamp(1.6rem, 4.5vw, 3.25rem);
  font-weight: 500; letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  transition: color .2s;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; font-size: 0.85rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }

/* Responsive */
@media (max-width: 900px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .services li:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .services li:nth-child(2n) { padding-left: 2rem; border-left: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1.25rem;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-open .nav { display: flex; }
  .nav a:not(.btn) { font-size: 1.1rem; color: var(--fg); }

  .facts-grid, .services, .steps { grid-template-columns: 1fr; }
  .facts-grid > div, .facts-grid > div + div { padding: 1.75rem 0; border-left: 0; }
  .facts-grid > div + div { border-top: 1px solid var(--line); }
  .services li, .services li:nth-child(2n) { padding: 1.75rem 0 2rem; border-left: 0; }
}

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