@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #FCFCFA;
  --panel: #F3F4EF;
  --line: #E1E4DC;
  --ink: #2E2E2E;
  --muted: #6E7268;
  --brand: #82C234;
  --brand-dark: #5F9427;
  --brand-tint: #A3D65E;
  --charcoal: #313131;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--charcoal);
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
}

a { color: inherit; }

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

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 252, 250, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.wordmark .logo-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.wordmark .logo-bars span {
  width: 5px;
  display: block;
  transform: skewX(-12deg);
  border-radius: 1px;
}

.wordmark .logo-bars span:nth-child(1) { height: 60%; background: var(--brand-tint); }
.wordmark .logo-bars span:nth-child(2) { height: 80%; background: var(--brand); }
.wordmark .logo-bars span:nth-child(3) { height: 100%; background: var(--brand-dark); }

.wordmark .word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a:focus-visible { color: var(--charcoal); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--brand);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover, .btn:focus-visible {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px rgba(130, 194, 52, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--line);
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--brand);
  color: var(--brand-dark);
  box-shadow: none;
  background: transparent;
}

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

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  color: var(--brand-dark);
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-block;
}

.hero h1 {
  font-size: 48px;
  letter-spacing: -0.01em;
}

.hero .sub {
  color: var(--muted);
  font-size: 18px;
  margin: 24px 0 32px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.schematic-wrap {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
}

.schematic-caption {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-top: 14px;
}

/* Schematic SVG line-draw animation */
.schematic-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 2.4s ease-out forwards;
}
.schematic-node {
  opacity: 0;
  animation: fadein 0.4s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

/* ---------- Sections ---------- */
section { padding: 88px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-size: 32px;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-card {
  background: #fff;
  padding: 32px;
}

.service-tag {
  color: var(--brand-dark);
  font-size: 12px;
  display: inline-block;
  margin-bottom: 18px;
  border: 1px solid rgba(130, 194, 52, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius);
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* ---------- Process ---------- */
.process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.process-step {
  padding: 0 20px 0 0;
  position: relative;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 0;
  width: 20px;
  height: 1px;
  background: var(--brand);
}

.process-step .mono {
  color: var(--brand-dark);
  font-size: 12px;
  display: block;
  margin-bottom: 12px;
}

.process-step h4 {
  font-size: 17px;
  margin-bottom: 8px;
}

.process-step p {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Case studies ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-meta {
  color: var(--brand-dark);
  font-size: 11px;
  text-transform: uppercase;
}

.case-card h3 {
  font-size: 18px;
}

.case-field {
  font-size: 13px;
}

.case-field .mono {
  color: var(--brand-dark);
  font-size: 11px;
  display: block;
  margin-bottom: 4px;
}

.case-field p {
  color: var(--muted);
  margin: 0;
}

.case-link {
  font-size: 13px;
  color: var(--charcoal);
  text-decoration: none;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: auto;
}

.case-link:hover, .case-link:focus-visible { color: var(--brand-dark); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 72px 0;
}

.cta-band h2 { font-size: 30px; margin-bottom: 16px; }
.cta-band p { color: var(--muted); margin-bottom: 32px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-info dt {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--brand-dark);
  font-size: 12px;
  margin-top: 24px;
}

.contact-info dt:first-child { margin-top: 0; }

.contact-info dd {
  margin: 6px 0 0;
  color: var(--charcoal);
  font-size: 16px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

input, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
}

textarea { resize: vertical; min-height: 120px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-row .mono {
  color: var(--muted);
  font-size: 12px;
}

.social-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.social-links a:hover, .social-links a:focus-visible { color: var(--brand-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .services-grid { grid-template-columns: 1fr; }
  .process-row { grid-template-columns: 1fr; gap: 24px; }
  .process-step:not(:last-child)::after { display: none; }
  .case-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Founder band (dark contrast section) ---------- */
.founder-band {
  background: var(--charcoal);
  border-top: 3px solid var(--brand);
}

.founder-band h2 { color: #fff; }
.founder-band p { color: #C9CCC3; font-size: 16px; max-width: 54ch; }
.founder-band strong { color: #fff; }
.founder-band .eyebrow { color: var(--brand-tint); }

.founder-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.stat-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 32px;
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--brand);
  display: block;
  line-height: 1;
}

.stat-label {
  color: #9A9E93;
  font-size: 11px;
  display: block;
  margin-top: 6px;
}

/* ---------- Mobile nav ---------- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--charcoal);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 14px 32px;
    font-size: 16px;
  }

  .founder-grid { grid-template-columns: 1fr; }
  .stat-stack { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; }
}
