:root {
  --forest: #1F3B2D;
  --forest-deep: #15291F;
  --sage: #7FB08F;
  --sage-soft: #E6EFE8;
  --sun: #E8833A;
  --ink: #18241D;
  --muted: #5B6B61;
  --paper: #FAFAF7;
  --line: #E3E6E1;
  --radius: 14px;
  --max: 1120px;
  --font: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--forest); }
.brand img { width: 34px; height: 34px; }
.brand span b { color: var(--sun); font-weight: 700; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  text-decoration: none; font-size: 15px; color: var(--muted);
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--forest); background: var(--sage-soft); }
.nav a.active { color: var(--forest); font-weight: 600; }
.nav a.cta { background: var(--forest); color: #fff; margin-left: 6px; }
.nav a.cta:hover { background: var(--forest-deep); }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--forest); }

@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-radius: 8px; }
  .nav a.cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--forest);
  color: #fff;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 72px; padding-bottom: 140px; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sage); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(232,131,58,.2); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(232,131,58,.2); } 50% { box-shadow: 0 0 0 8px rgba(232,131,58,0); } }
.hero h1 {
  font-size: clamp(38px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.03em;
  margin: 18px 0 20px; max-width: 14ch; font-weight: 700;
}
.hero h1 .type { color: var(--sun); }
.hero h1 .caret { display: inline-block; width: 3px; height: .9em; background: var(--sun); margin-left: 4px; vertical-align: -0.08em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: rgba(255,255,255,.78); max-width: 52ch; margin: 0 0 32px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--sun); color: #fff; }
.btn.primary:hover { background: #d9732b; }
.btn.ghost { color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.dark { background: var(--forest); color: #fff; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Sections ---------- */
section { padding: 104px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head .eyebrow { color: var(--forest); }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 14px 0 14px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative; overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--sage), var(--sun)); transition: width .5s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(31,59,45,.35); border-color: transparent; }
.card:hover::after { width: 100%; }
.card .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--sage-soft); display: grid; place-items: center; margin-bottom: 20px; color: var(--forest); }
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 12.5px; color: var(--forest); }
.card li { padding: 3px 0; }
.card li::before { content: "› "; color: var(--sun); }

/* Terminal */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.terminal {
  background: var(--forest-deep); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(21,41,31,.6);
  font-family: var(--mono); font-size: 14px; color: #D8E6DC;
}
.terminal .bar { display: flex; gap: 7px; padding: 14px 16px; background: rgba(255,255,255,.04); align-items: center; }
.terminal .bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); }
.terminal .bar span { margin-left: 10px; font-size: 12px; color: rgba(255,255,255,.45); }
.terminal pre { margin: 0; padding: 20px 22px 26px; min-height: 380px; white-space: pre-wrap; line-height: 1.75; font-family: inherit; }
.terminal .p { color: var(--sage); }
.terminal .ok { color: #9FD3AE; }
.terminal .hl { color: var(--sun); }
.terminal .dim { color: rgba(255,255,255,.4); }
.terminal .cur { display: inline-block; width: 8px; height: 1.1em; background: var(--sun); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); font-family: var(--mono); color: var(--sun); font-weight: 600; padding-top: 2px; }
.steps h4 { margin: 0 0 4px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* Stats strip */
.strip { background: var(--forest); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.strip .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .strip .grid { grid-template-columns: 1fr; } }
.strip .k { font-family: var(--mono); font-size: 13px; color: var(--sage); text-transform: uppercase; letter-spacing: .06em; }
.strip .v { font-size: 22px; font-weight: 600; margin-top: 6px; letter-spacing: -0.01em; }

/* CTA */
.cta-block {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
}
.cta-block h2 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.02em; line-height: 1.15; }
.cta-block p { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .cta-block { padding: 32px 24px; } }

/* Page hero (subpages) */
.page-hero { background: var(--forest); color: #fff; padding: 96px 0 88px; position: relative; overflow: hidden; }
.page-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; line-height: 1.08; margin: 16px 0 12px; }
.page-hero p { color: rgba(255,255,255,.78); font-size: 19px; max-width: 56ch; margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 340px 1fr; gap: 72px; align-items: start; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 40px; } }
.profile {
  background: var(--forest); border-radius: 22px; aspect-ratio: 4/5; position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.profile .initials { font-size: 96px; font-weight: 700; color: #fff; letter-spacing: -0.04em; position: relative; z-index: 2; }
.profile .initials b { color: var(--sun); }
.profile canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.profile .tag { position: absolute; left: 16px; bottom: 16px; z-index: 2; font-family: var(--mono); font-size: 12px; color: var(--sage); background: rgba(0,0,0,.25); padding: 6px 10px; border-radius: 8px; }
.prose h2 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 18px; line-height: 1.2; }
.prose h3 { font-size: 20px; margin: 40px 0 10px; }
.prose p { font-size: 17px; color: #35443B; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-family: var(--mono); font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--sage-soft); color: var(--forest); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { text-decoration: none; display: block; }
.contact-card .k { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-card .v { font-size: 20px; font-weight: 600; margin-top: 6px; color: var(--forest); line-height: 1.35; }
.contact-card .s { font-size: 14px; color: var(--muted); margin-top: 10px; }
.map {
  margin-top: 20px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); height: 380px; background: var(--sage-soft);
}
.map iframe { width: 100%; height: 100%; border: 0; filter: saturate(.7); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--forest); }
.site-footer .brand { font-size: 16px; }
.site-footer .brand img { width: 28px; height: 28px; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

.card.ask { background: var(--forest); border-color: var(--forest); color: #fff; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; }
.card.ask p { color: rgba(255,255,255,.75); }
.card.ask .go { margin-top: 24px; font-weight: 600; color: var(--sun); }
