/* Layout concept: a research-lab notebook turned studio site — wide editorial headings, mono "run log" details, two brand signals (leaf green = build, amber = insight). */
:root {
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-2: #eef2ea;
  --ink: #142019;
  --muted: #56645a;
  --line: #dbe3d5;
  --green: #2f8a1f;        /* text-safe brand green */
  --green-fill: #82e645;   /* logo green, for fills */
  --amber: #b86e00;        /* text-safe brand amber */
  --amber-fill: #ffa200;   /* logo amber, for fills */
  --on-fill: #102008;
  --shadow: 0 1px 2px rgba(20, 32, 25, .06), 0 8px 24px rgba(20, 32, 25, .06);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 14px;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1410; --surface: #141e18; --surface-2: #19251e; --ink: #e9f0e4; --muted: #9aaa9e;
    --line: #26332b; --green: #8bea52; --green-fill: #82e645; --amber: #ffb234; --amber-fill: #ffa200;
    --on-fill: #102008; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1410; --surface: #141e18; --surface-2: #19251e; --ink: #e9f0e4; --muted: #9aaa9e;
  --line: #26332b; --green: #8bea52; --green-fill: #82e645; --amber: #ffb234; --amber-fill: #ffa200;
  --on-fill: #102008; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 20px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); display: inline-flex; gap: 8px; align-items: center; }
.eyebrow::before { content: "</>"; color: var(--green); letter-spacing: 0; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 760px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 .98rem/1 var(--f-body); padding: 15px 22px; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-fill); color: var(--on-fill); }
.btn-primary:hover { background: #95ee60; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arr { font-family: var(--f-mono); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 36px; height: auto; }
.brand-word { font-family: var(--f-display); font-weight: 700; font-size: 1.22rem; letter-spacing: .02em; }
.brand-word .e { color: var(--amber-fill); }
.brand-word .t { color: var(--green); }
:root:not([data-theme="dark"]) .brand-word .e { color: #e08e00; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: .95rem; font-weight: 500; padding: 9px 13px; border-radius: 999px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 1rem; }
.nav-cta { padding: 11px 18px; font-size: .92rem; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 18px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1.05rem; }
  .menu-btn { display: grid; }
  .nav-cta { display: none; }
}

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 .hl { color: var(--green); }
.hero h1 .hl2 { color: var(--amber); }
.hero-copy { display: grid; gap: 24px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Run log card */
.runlog { background: #0f1813; color: #dfe9d9; border-radius: 18px; padding: 22px; font-family: var(--f-mono); font-size: .82rem; box-shadow: var(--shadow); border: 1px solid #22302a; }
.runlog-top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed #2d3d34; margin-bottom: 8px; flex-wrap: wrap; }
.runlog-top .proj { color: #9fb3a5; }
.live { color: #82e645; display: inline-flex; align-items: center; gap: 7px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #82e645; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.runlog ol { list-style: none; margin: 0; padding: 0; }
.runlog li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid #1d2a23; align-items: start; }
.runlog li:last-child { border-bottom: 0; }
.runlog .n { color: #ffa200; }
.runlog .stage { color: #fff; font-weight: 600; }
.runlog .out { color: #9fb3a5; display: block; margin-top: 2px; }
.runlog .ok { color: #82e645; white-space: nowrap; }
.runlog .run { color: #ffa200; white-space: nowrap; }
.runlog-foot { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #2d3d34; color: #9fb3a5; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat { padding: 24px 26px; display: grid; gap: 4px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { font-family: var(--f-display); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .93rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Pipeline */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: st; }
.pipe { padding: 26px 24px 28px; border-top: 3px solid var(--line); display: grid; gap: 10px; align-content: start; position: relative; }
.pipe:nth-child(1) { border-top-color: var(--amber-fill); }
.pipe:nth-child(2) { border-top-color: color-mix(in srgb, var(--amber-fill) 50%, var(--green-fill)); }
.pipe:nth-child(3), .pipe:nth-child(4) { border-top-color: var(--green-fill); }
.pipe .step { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); letter-spacing: .06em; }
.pipe .lead { font-size: .88rem; font-weight: 600; color: var(--green); }
.pipe p { color: var(--muted); font-size: .97rem; }
@media (max-width: 900px) { .pipeline { grid-template-columns: 1fr 1fr; row-gap: 12px; } }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr; } }

/* Grids & cards */
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .g3, .g2, .g4 { grid-template-columns: 1fr; } }
.grid > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 12px; align-content: start; }
.card p { color: var(--muted); font-size: .97rem; }
.card .tag { font-family: var(--f-mono); font-size: .74rem; color: var(--amber); letter-spacing: .06em; text-transform: uppercase; }
a.card { text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
a.card:hover { border-color: var(--green); transform: translateY(-2px); }
.card .more { font-weight: 600; color: var(--green); font-size: .93rem; margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-family: var(--f-mono); font-size: .74rem; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* Industries */
.inds { display: flex; flex-wrap: wrap; gap: 10px; }
.ind { padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 500; }
.ind small { font-family: var(--f-mono); color: var(--muted); margin-left: 8px; font-size: .74rem; }

/* Case study */
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; align-content: start; }
.case .meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--amber); }
.case dl { margin: 0; display: grid; gap: 10px; }
.case dt { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.case dd { margin: 0; font-size: .97rem; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.metric { padding: 14px; background: var(--surface-2); }
.metric + .metric { border-left: 1px solid var(--line); }
.metric b { display: block; font-family: var(--f-display); font-size: 1.5rem; color: var(--green); line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric span { font-size: .8rem; color: var(--muted); line-height: 1.3; display: block; margin-top: 4px; }
@media (max-width: 420px) { .metric b { font-size: 1.25rem; } .metric { padding: 12px 10px; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { font: 500 .92rem var(--f-body); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Band */
.band { background: var(--ink); color: var(--bg); border-radius: 22px; padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.band > * { min-width: 0; position: relative; }
.band h2 { color: var(--bg); }
.band p { color: color-mix(in srgb, var(--bg) 75%, var(--ink)); }
.band .eyebrow { color: var(--amber-fill); }
.band .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, var(--ink)); }
.band::after { content: "</>"; position: absolute; right: -10px; bottom: -40px; font-family: var(--f-mono); font-size: 12rem; font-weight: 700; color: var(--green-fill); opacity: .08; line-height: 1; pointer-events: none; }
@media (max-width: 800px) { .band { grid-template-columns: 1fr; } }

/* Page hero */
.page-hero { padding-block: clamp(48px, 7vw, 88px) clamp(36px, 5vw, 56px); display: grid; gap: 18px; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 18ch; }

/* Service detail */
.svc { display: grid; grid-template-columns: 300px 1fr; gap: 40px; padding-block: 40px; border-top: 1px solid var(--line); }
.svc > * { min-width: 0; }
.svc:first-of-type { border-top: 0; }
.svc .num { font-family: var(--f-mono); font-size: .8rem; color: var(--amber); }
.svc-body { display: grid; gap: 18px; }
.svc-body p { color: var(--muted); }
.svc ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.svc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.label { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block; }
@media (max-width: 820px) { .svc, .svc-cols { grid-template-columns: 1fr; gap: 16px; } }

/* Stage detail */
.stage { display: grid; grid-template-columns: 120px 1fr; gap: 32px; padding-block: 44px; border-top: 1px solid var(--line); }
.stage > * { min-width: 0; }
.stage .big { font-family: var(--f-display); font-size: 4.2rem; font-weight: 700; line-height: .9; color: var(--line); }
.stage:nth-of-type(1) .big { color: var(--amber-fill); }
.stage:nth-of-type(2) .big { color: color-mix(in srgb, var(--amber-fill) 55%, var(--green-fill)); }
.stage:nth-of-type(3) .big, .stage:nth-of-type(4) .big { color: var(--green-fill); }
.stage-body { display: grid; gap: 18px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fact { border-left: 2px solid var(--line); padding-left: 14px; }
.fact .label { margin-bottom: 4px; }
@media (max-width: 760px) { .stage { grid-template-columns: 1fr; gap: 10px; } .stage .big { font-size: 3rem; } .facts { grid-template-columns: 1fr; } }

/* Team */
.group { display: grid; grid-template-columns: 320px 1fr; gap: 40px; padding-block: 44px; border-top: 1px solid var(--line); }
.group > * { min-width: 0; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; }
.avatar { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 600; font-size: .85rem; background: var(--surface-2); color: var(--green); border: 1px solid var(--line); }
.person h4 { font-size: 1.02rem; }
.person p { font-size: .9rem; color: var(--muted); margin-top: 3px; }
.person .chips { margin-top: 10px; }
@media (max-width: 860px) { .group { grid-template-columns: 1fr; gap: 20px; } }

/* Pricing / engagement */
.eng { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; align-content: start; }
.eng.featured { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.eng .dur { font-family: var(--f-mono); font-size: .8rem; color: var(--amber); }
.eng ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: var(--muted); font-size: .95rem; }
.badge { justify-self: start; font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; background: var(--green-fill); color: var(--on-fill); padding: 4px 9px; border-radius: 999px; }

/* Quiz */
.quiz { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.quiz > * { min-width: 0; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 14px; }
.q legend { font-weight: 600; padding: 0; margin-bottom: 12px; font-size: 1.02rem; display: flex; gap: 10px; }
.q legend .qn { font-family: var(--f-mono); color: var(--amber); font-size: .85rem; padding-top: 2px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; }
.opt label { display: block; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .93rem; color: var(--muted); height: 100%; }
.opt input:checked + label { border-color: var(--green); color: var(--ink); background: color-mix(in srgb, var(--green-fill) 14%, var(--surface)); }
.opt input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 2px; }
.result { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: grid; gap: 16px; }
.gauge { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.gauge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber-fill), var(--green-fill)); transition: width .35s ease; }
.score { font-family: var(--f-display); font-size: 3.2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.score small { font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.level { font-family: var(--f-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--green); }
.result ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .quiz { grid-template-columns: 1fr; } .result { position: static; } }
@media (max-width: 520px) { .opts { grid-template-columns: 1fr; } }

/* Form */
.contact-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 40px; align-items: start; }
.contact-grid > * { min-width: 0; }
form.inq { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea { font: inherit; font-size: .97rem; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: transparent; }
.err { color: #c0392b; font-size: .85rem; }
:root[data-theme="dark"] .err { color: #ff8a7a; }
.notice { border: 1px solid var(--green); background: color-mix(in srgb, var(--green-fill) 10%, var(--surface)); border-radius: 12px; padding: 18px; display: grid; gap: 10px; }
.notice pre { margin: 0; white-space: pre-wrap; font-family: var(--f-mono); font-size: .82rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 220px; overflow: auto; }
.side { display: grid; gap: 16px; }
.copyline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copyline code { font-family: var(--f-mono); font-size: .95rem; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); user-select: all; }
.small-btn { font: 600 .82rem var(--f-body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
@media (max-width: 860px) { .contact-grid, .row2 { grid-template-columns: 1fr; } }

/* Principles list */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.principles > div { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.principles > div:nth-child(odd) { padding-right: 32px; }
.principles > div:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
.principles p { color: var(--muted); font-size: .97rem; }
@media (max-width: 720px) { .principles { grid-template-columns: 1fr; } .principles > div:nth-child(even) { padding-left: 0; border-left: 0; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 36px; margin-top: 40px; background: var(--surface); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot > * { min-width: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); font-family: var(--f-mono); }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

.fade-up { animation: fadeUp .6s ease both; }
.fade-up.d1 { animation-delay: .08s; } .fade-up.d2 { animation-delay: .16s; }
@keyframes fadeUp { from { transform: translateY(10px); opacity: .001; } to { transform: none; opacity: 1; } }
