:root {
  /* ── colour ── */
  --bg:          #f6f6f4;
  --dark:        #1a1a18;
  --mid:         #4a4a46;
  --muted:       #6c6c66;   /* darkened from #8a8a84 → passes WCAG AA on --bg */
  --border:      rgba(26,26,24,0.09);
  --green:       #5a7a2b;   /* brand accent — fills, hero, focus */
  --green-ink:   #46611f;   /* accessible green for text on light/pale */
  --green-pale:  #edf2e4;
  --green-pale2: #deeacc;

  /* ── type ── */
  --sans:        'Space Grotesk', sans-serif;
  --body:        'Commit Mono', ui-monospace, monospace;
  --mono:        'Commit Mono', ui-monospace, monospace;

  /* ── spacing scale ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* ── radius ── */
  --radius:    4px;
  --radius-lg: 6px;

  /* ── layout ── */
  --max:        720px;
  --pad:        var(--space-6);
  --section-v:  56px;
  --hero-pad:   56px 0 64px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* screen-reader-only utility */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── NAV ── */
.nav-outer {
  position: sticky; top: 0; z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.35s, border-color 0.35s;
}
.nav-outer.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  height: 54px;
}
.nav-logo { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: #fff; text-decoration: none; transition: color 0.35s; display: inline-flex; align-items: center; gap: var(--space-2); }
.nav-logo svg { display: block; }
.nav-outer.scrolled .nav-logo { color: var(--dark); }
.nav-cta  { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.62); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.35s, border-color 0.2s; }
.nav-cta:hover { color: #fff; }
.nav-outer.scrolled .nav-cta { color: var(--green-ink); }
.nav-outer.scrolled .nav-cta:hover { border-color: var(--green-ink); }

/* ── HERO ── */
.hero-outer { background: var(--dark); }
.hero { padding: var(--hero-pad); }
.hero-head {
  font-size: clamp(52px, 9vw, 72px);
  font-weight: 700; line-height: 1.0; letter-spacing: -0.03em;
}
.hero-head .l1 { display: block; color: #fff; }
.hero-head .l2 { display: block; color: var(--green); }
.hero-sub { font-family: var(--body); font-size: 15px; font-weight: 400; color: rgba(255,255,255,0.62); line-height: 1.8; max-width: 360px; margin-top: 28px; }

/* ── SECTION HEADINGS ── */
.section-h, .contact-h {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.0; color: var(--dark);
}

/* ── SERVICES ── */
.services { padding: var(--section-v) 0; }
.services .section-h { margin-bottom: var(--space-4); }
.services-summary {
  font-family: var(--body); font-size: 14.5px; font-weight: 400;
  color: var(--mid); line-height: 1.75; max-width: 560px;
  margin-bottom: var(--space-7); text-wrap: pretty;
}
.svc-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: var(--space-7);
}
.svc-item {
  border-top: 1px solid var(--border);
  padding: 18px 0 20px;
  display: flex; flex-direction: column; gap: 7px;
}
.svc-num  { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; color: var(--green-ink); }
.svc-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--dark); line-height: 1.2; }
.svc-desc { font-family: var(--body); font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.6; text-wrap: pretty; }

/* ── WORK ── */
.work { padding: var(--section-v) 0; }
.work .section-h { margin-bottom: var(--space-5); }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.work-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; display: flex; flex-direction: column; gap: 9px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.work-card:hover { border-color: rgba(26,26,24,0.2); box-shadow: 0 2px 14px rgba(26,26,24,0.06); transform: translateY(-2px); }
.wc-tag   { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-ink); }
.wc-name  { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.wc-desc  { font-family: var(--body); font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.65; }

/* ── FOUNDER ── */
.founder {
  padding: var(--section-v) 0; border-bottom: 1px solid var(--border);
}
.founder-grid {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 44px; align-items: stretch;
}
.founder-img {
  width: 240px; height: 100%; min-height: 300px; border-radius: var(--radius-lg);
  object-fit: cover; object-position: center 18%; display: block;
}
.founder-text {
  display: flex; flex-direction: column; gap: var(--space-4);
}
.founder-name   { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.founder-role   { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.founder-bio    { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--mid); line-height: 1.8; text-wrap: pretty; }

/* credential + link footer, pinned to the bottom of the text column */
.founder-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-4); margin-top: auto; padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.founder-cred { display: flex; flex-direction: column; gap: var(--space-2); }
.cred-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.co-list { list-style: none; display: flex; align-items: center; gap: 14px; }
.co-item { position: relative; display: block; }
.co-item img { width: 20px; height: 20px; border-radius: var(--radius); display: block; }
.co-item::after {
  content: attr(aria-label);
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: var(--dark); color: rgba(255,255,255,0.9);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em;
  white-space: nowrap; padding: 5px 9px; border-radius: var(--radius);
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.co-item:hover::after { opacity: 1; }
.founder-link   { font-size: 12px; font-weight: 500; color: var(--green-ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; white-space: nowrap; }
.founder-link:hover { border-color: var(--green-ink); }

/* ── CONTACT ── */
.contact { padding: 56px 0 72px; }
.contact-h { margin-bottom: var(--space-6); }
.contact-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.c-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; }
.c-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-4); }
.c-desc  { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--mid); line-height: 1.75; margin-bottom: 20px; flex: 1; }

.email-row { display: flex; gap: var(--space-2); align-items: stretch; }
.email-row .btn-action { flex: 1; }

/* buttons — primary (dark) vs secondary (pale green) */
.btn-action {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--radius); padding: 11px 14px; text-decoration: none;
  border: 1px solid transparent; transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-action:hover { transform: translateY(-1px); }
.btn-action-label { font-size: 13px; font-weight: 500; }

.btn-primary { background: var(--dark); border-color: var(--dark); }
.btn-primary .btn-action-label { color: #fff; }
.btn-primary:hover { background: var(--green); border-color: var(--green); }

.btn-secondary { background: var(--green-pale); border-color: rgba(90,122,43,0.2); }
.btn-secondary .btn-action-label { color: var(--green-ink); }
.btn-secondary:hover { background: var(--green-pale2); }

.btn-copy {
  display: flex; align-items: center; justify-content: center;
  width: 38px; flex-shrink: 0;
  background: var(--green-pale); border: 1px solid rgba(90,122,43,0.2);
  border-radius: var(--radius); color: var(--green-ink); cursor: pointer;
  transition: background 0.2s, color 0.15s;
}
.btn-copy:hover { background: var(--green-pale2); }
.btn-copy.copied { background: var(--green); color: #fff; border-color: var(--green); }

/* ── FOOTER ── */
.footer-wrap { border-top: 1px solid var(--border); }
.footer {
  max-width: var(--max); margin: 0 auto; padding: 26px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-name { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--muted); }
.footer-note { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-head  { animation: fadeUp 0.5s ease both 0.07s; }
  .hero-sub   { animation: fadeUp 0.5s ease both 0.15s; }
}

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
  :root { --pad: 20px; --section-v: 48px; }

  /* type scales down so nothing overflows the viewport */
  .hero { padding: 44px 0 52px; }
  .hero-head { font-size: clamp(34px, 9.5vw, 48px); }
  .hero-sub  { font-size: 14px; max-width: none; margin-top: 22px; }
  .section-h, .contact-h { font-size: clamp(28px, 8vw, 40px); }

  /* single-column stacks */
  .work-grid, .contact-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; column-gap: 0; }
  .svc-item:first-child { border-top: none; }
  .founder-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .founder-img  { width: 100%; height: 280px; flex: none; }

  /* comfortable tap targets */
  .btn-action { padding: 14px 14px; }
  .btn-copy { width: 44px; }
  .nav-cta { padding: 6px 0; }

  /* contact panel: keep the email address from overflowing narrow phones */
  .c-panel { padding: 18px; }
  .email-row .btn-action { min-width: 0; }
  .email-row .btn-action-label:first-child { font-size: 12px; overflow-wrap: anywhere; }
}
