/* Local fallbacks sized to match the web fonts, so text doesn't jump when they load */
@font-face { font-family: 'Inter Fallback'; src: local('Arial'), local('Helvetica Neue'); size-adjust: 107%; ascent-override: 90%; descent-override: 22.5%; line-gap-override: 0%; }
@font-face { font-family: 'Newsreader Fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 92%; ascent-override: 95%; descent-override: 28%; line-gap-override: 0%; }

:root {
  --bg: #FBF8F3;
  --ink: #1F1B16;
  --body: #3D362F;
  --soft: #4A423A;
  --muted: #6B6259;
  --line: #E6DFD4;
  --pill: #EFE8DD;
  --panel: #F3EDE3;
  --accent: #8A3F26;
  --serif: Newsreader, 'Newsreader Fallback', Georgia, serif;
  --sans: Inter, 'Inter Fallback', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration-color: #C9BFB2; text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 6px; text-decoration: none; font-size: 14px; }
.skip-link:focus { top: 16px; color: var(--bg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-size: 22px; font-weight: 500; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; }
.site-header nav a { text-decoration: none; }
.accent-link { color: var(--accent); font-weight: 500; }

/* Hero */
.hero { padding: 96px 0 80px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-text { flex: 999 1 520px; min-width: 0; }
.hero h1 { margin: 0; font-weight: 400; font-size: 72px; line-height: 1.05; letter-spacing: -0.01em; }
.lede { margin-top: 20px; font-family: var(--serif); font-size: 30px; line-height: 1.3; color: var(--body); }
.hero-body { margin-top: 32px; font-size: 18px; line-height: 1.7; color: var(--body); max-width: 620px; display: flex; flex-direction: column; gap: 16px; }
.portrait { display: block; flex: 1 1 260px; max-width: 320px; width: 100%; aspect-ratio: 4 / 5; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

/* Companies */
.logos {
  padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px;
}
.logos .logos-label { flex-basis: 100%; margin: 0; font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.logo-list { flex: 1 1 100%; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 28px; }
.logo-list li { display: flex; align-items: center; }
.logo { display: block; height: 24px; width: auto; }
.logo-reflexai { height: 20px; }
.logo-optro { height: 24px; }
.logo-xero { height: 21px; }
.logo-intuit { height: 24px; }
.logo-telus { height: 23px; }
.logo-rogers { height: 20px; }
.logo-raptors { height: 32px; }
.logo-with-name { gap: 10px; }
.logo-with-name span { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; white-space: nowrap; }

/* Sections */
.section { padding: 96px 0 24px; }
.section h2 { margin: 0 0 12px; font-weight: 400; font-size: 40px; }
.section .h2-tight { margin-bottom: 32px; }
.section-intro { margin-bottom: 40px; font-size: 18px; color: var(--body); max-width: 680px; }

/* Work */
.work-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.work-item { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.work-meta { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.work-meta h3 { margin: 0; font-weight: 500; font-size: 26px; line-height: 1.2; }
.company { font-size: 14px; color: var(--soft); }
.work-story { flex: 2 1 360px; min-width: 0; font-size: 16px; line-height: 1.7; color: var(--body); }
.work-stat { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.stat { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--accent); }
.stat-label { font-size: 14px; line-height: 1.5; color: var(--soft); }

/* Independent work */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 28px;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px;
}
.card h3 { margin: 4px 0 0; font-weight: 500; font-size: 26px; line-height: 1.2; }
.card p { line-height: 1.65; color: var(--body); }
.pill { align-self: flex-start; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--pill); color: var(--soft); }
.card .card-result a { color: inherit; text-decoration-color: currentColor; }
.card .card-result { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--accent); }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; gap: 4px 32px; padding: 16px 0; border-top: 1px solid var(--line); }
.years { flex: 0 0 120px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.co { flex: 1 1 220px; font-weight: 500; }
.focus { flex: 2 1 280px; color: var(--body); }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 32px 72px; }
.about h2 { flex: 1 1 220px; margin: 0; }
.about-body { flex: 3 1 460px; min-width: 0; font-size: 18px; line-height: 1.7; color: var(--body); display: flex; flex-direction: column; gap: 16px; }

/* Contact */
.contact {
  margin-top: 96px; padding: 72px 56px; background: var(--panel); border-radius: 8px;
  display: flex; flex-wrap: wrap; gap: 40px 56px; justify-content: space-between; align-items: flex-start;
}
.contact-text { flex: 1 1 360px; min-width: 0; }
.contact h2 { margin: 0 0 16px; font-weight: 400; font-size: 48px; line-height: 1.1; }
.contact-text p { font-size: 18px; line-height: 1.7; color: var(--body); max-width: 560px; }
.contact-form { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field-row .field { flex: 1 1 160px; min-width: 0; }
.field { display: block; }
.field span { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--body); }
.field input, .field textarea {
  display: block; width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #D9CFC1; border-radius: 6px;
  background: #FFFFFF; font: inherit; font-size: 16px; color: var(--ink);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field textarea::placeholder { color: #8C8278; }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; font: inherit; font-weight: 500; cursor: pointer;
}
.button:hover { background: var(--accent); color: var(--bg); }
.button[disabled] { opacity: 0.6; cursor: wait; }
.form-status { font-size: 15px; color: var(--body); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--accent); }
.form-alt { font-size: 14px; color: var(--muted); }
.form-alt a { color: var(--muted); }
.form-alt a:hover { color: var(--accent); }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 40px 0 56px; font-size: 13px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: inherit; }

/* Small screens */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .site-header nav { gap: 18px; }
  .hero { padding: 56px 0 48px; gap: 40px; }
  .hero h1 { font-size: 52px; }
  .lede { font-size: 24px; }
  .hero-body, .section-intro, .about-body, .contact-text p { font-size: 17px; }
  .portrait { max-width: 100%; }
  .logos { gap: 16px; }
  .logos .logos-label { flex-basis: 100%; }
  .logo-list { justify-content: flex-start; gap: 18px 28px; }
  .section { padding-top: 64px; }
  .section h2 { font-size: 34px; }
  .contact { margin-top: 64px; padding: 44px 24px; }
  .contact h2 { font-size: 38px; }
}

/* 404 */
.not-found { padding: 120px 0 160px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.not-found h1 { margin: 0; font-weight: 400; font-size: 56px; line-height: 1.1; }
.not-found p { font-size: 18px; color: var(--body); }
