@font-face {
  font-family: 'Archivo';
  src: url(/fonts/archivo-latin.woff2) format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f6f7f6;
  --ink: #15211f;
  --muted: #56625f;
  --rule: #cdd5d2;
  --accent: #0b4f45;
  --accent-soft: #e4eeeb;
  --board: #e8eeeb;
  --ochre: #c4953a;
  --measure: 66ch;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}

h1, h2, h3 {
  font-stretch: 112%;
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.5rem;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  color: var(--ink); text-decoration: none;
  font-stretch: 125%; font-weight: 650; letter-spacing: 0.06em; font-size: 1.05rem;
}
.brand img { width: 1.75rem; height: 1.75rem; }
.brand-tag {
  margin-left: 0.4rem; padding-left: 1rem; border-left: 1px solid var(--rule);
  font-stretch: 100%; font-weight: 400; letter-spacing: 0; font-size: 0.9rem; color: var(--muted);
}
@media (max-width: 68rem) { .brand-tag { display: none; } }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2rem); font-size: 0.95rem; }
.site-nav a {
  color: var(--ink); text-decoration: none; padding: 0.25rem 0;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0 1.5px;
  transition: background-size 0.3s ease, color 0.2s;
}
.site-nav a:hover { color: var(--accent); background-size: 100% 1.5px; }
@media (max-width: 34rem) { .site-nav a:not(.nav-contact) { display: none; } }

/* Hero */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero .wrap {
  display: grid; gap: 3rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
  align-items: end;
}
@media (max-width: 52rem) { .hero .wrap { grid-template-columns: 1fr; } }

/* Hand sketch above the title block, drawn once on load */
.sheet { display: grid; gap: 0.25rem; max-width: 25rem; }
.sketch { width: 100%; height: auto; overflow: visible; }
.sketch path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sketch .i { stroke: var(--ink); stroke-width: 1.4; }
.sketch .c { stroke: var(--muted); stroke-width: 0.6; opacity: 0.55; }
.sketch .a { stroke: var(--accent); stroke-width: 1; }
.sketch .wash { stroke: none; opacity: 0; animation: wash 1.6s ease-out 1.4s forwards; }
.sketch .wash-green { fill: var(--accent); --o: 0.17; }
.sketch .wash-ochre { fill: #c4953a; --o: 0.28; }
.sketch [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s cubic-bezier(.4, 0, .2, 1) forwards; }
.sketch--small { max-width: 19rem; margin-bottom: 1.5rem; }
.sketch--bridge { max-width: 24rem; margin: 2rem 0 0; }
/* Service sketches are static */
.sketch--small [pathLength] { animation: none; stroke-dashoffset: 0; }
.sketch--small .wash { animation: none; opacity: var(--o); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wash { to { opacity: var(--o); } }
@media (prefers-reduced-motion: reduce) {
  .sketch [pathLength] { animation: none; stroke-dashoffset: 0; }
  .sketch .wash { animation: none; opacity: var(--o); }
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  font-weight: 520;
  max-width: 21ch;
  text-wrap: balance;
  margin-bottom: 1.75rem;
}
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; margin-bottom: 2.25rem; }

/* Two entry points: enterprise and SMB */
.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; max-width: 40rem; }
@media (max-width: 34rem) { .routes { grid-template-columns: 1fr; } }
.route {
  display: grid; align-content: start; gap: 0.4rem;
  border-top: 3px solid var(--accent); padding-top: 1rem;
  color: var(--ink); text-decoration: none;
}
.route strong { font-stretch: 112%; font-weight: 600; font-size: 1.1rem; }
.route span { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.route em {
  font-style: normal; font-weight: 550; color: var(--accent); margin-top: 0.4rem;
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}
.route { transition: border-color 0.25s; }
.route:hover { border-top-color: var(--ink); }
.route:hover em { text-decoration-thickness: 2px; }

.button {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 0.85rem 1.4rem;
  text-decoration: none; font-weight: 550; font-size: 1rem;
  border: 0; border-radius: 2px; cursor: pointer; font-family: inherit;
}
.button { transition: background-color 0.2s, transform 0.2s; }
.button:hover { background: var(--ink); }
.button:active { transform: translateY(1px); }

/* Title block: the one memorable element */
.title-block {
  border: 1.5px solid var(--ink);
  font-size: 0.9rem;
  background: var(--paper);
}
.title-block dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.title-block div { padding: 0.7rem 0.9rem; border-top: 1px solid var(--ink); }
.title-block div:nth-child(even) { border-right: 1px solid var(--ink); }
.title-block .span { grid-column: 1 / -1; border-right: 0 !important; }
.title-block dt { color: var(--muted); font-size: 0.78rem; }
.title-block dd { margin: 0.1rem 0 0; font-weight: 550; }
.title-block .head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem; gap: 1rem;
}
.title-block .head strong { font-stretch: 112%; font-weight: 600; font-size: 1.2rem; line-height: 1.2; }
.title-block .head img { width: 2.25rem; height: 2.25rem; flex: none; }

/* Clients */
.clients { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.5rem 0; }
.clients .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2.25rem; }
.clients h2 { font-size: 0.9rem; font-stretch: 100%; font-weight: 450; color: var(--muted); letter-spacing: 0; }
.clients ul { list-style: none; margin: 0; padding: 0; display: contents; }
.clients li { font-stretch: 88%; font-weight: 560; font-size: 1.1rem; color: var(--ink); }

/* Sections */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section--board { background: var(--board); }
.section--deep { background: var(--accent); color: var(--paper); }
.section--washed { position: relative; overflow: hidden; }
.section--washed .wrap { position: relative; }
.section-wash { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: var(--measure); }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 0.75rem; }
.section-head h2::after {
  content: ""; display: block;
  width: 8rem; height: 0.75rem; margin-top: 0.6rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 12'%3E%3Cpath d='M1 6.5Q40 3.5 82 6T127 4.5M7 11L14 1' fill='none' stroke='%230b4f45' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center / contain;
}
.section--deep .section-head h2::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 12'%3E%3Cpath d='M1 6.5Q40 3.5 82 6T127 4.5M7 11L14 1' fill='none' stroke='%23c4953a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 48rem) { .services { grid-template-columns: 1fr; } }
.service h3 { font-size: 1.5rem; margin-bottom: 1rem; border-top: 3px solid var(--accent); padding-top: 1.25rem; }
.service ul { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.service li { padding: 0.55rem 0; border-top: 1px solid var(--rule); }

/* Project register */
.register { width: 100%; border-collapse: collapse; }
.register caption { text-align: left; }
.register th, .register td { text-align: left; vertical-align: top; padding: 1.5rem 1.5rem 1.5rem 0; }
.register thead th {
  font-size: 0.82rem; font-weight: 450; color: var(--muted);
  padding-top: 0; padding-bottom: 0.6rem;
  border-bottom: 1.5px solid var(--ink);
}
.register tbody tr { border-bottom: 1px solid var(--rule); transition: background-color 0.3s; }
.register tbody tr:hover { background: rgba(255, 255, 255, 0.5); }
.register tbody th { transition: color 0.3s; }
.register tbody tr:hover th { color: var(--accent); }
.register tbody th { width: 22%; font-stretch: 112%; font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
.register tbody th .role { color: var(--accent); font-weight: 550; margin-top: 0.15rem; }
.register tbody th span { display: block; font-stretch: 100%; font-weight: 400; font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }
.register td:first-of-type { width: 46%; }
.register td:first-of-type p { margin: 0; max-width: 52ch; }
.register td:last-child { padding-right: 0; }
.register .result { font-weight: 550; margin: 0 0 0.6rem; }
.tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tags li { font-size: 0.78rem; background: var(--paper); color: var(--accent); padding: 0.15rem 0.5rem; border-radius: 2px; }

@media (max-width: 48rem) {
  .register thead { position: absolute; left: -999px; }
  .register, .register tbody, .register tr, .register th, .register td { display: block; width: auto !important; }
  .register tbody tr { padding: 1.5rem 0; }
  .register th, .register td { padding: 0 0 0.75rem; }
  .register td:last-child { padding-bottom: 0; }
}

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 48rem) { .quotes { grid-template-columns: 1fr; } }
.quotes figure { margin: 0; }
.quotes blockquote {
  margin: 0 0 1.25rem;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-stretch: 94%;
  line-height: 1.45;
  font-weight: 420;
}
.quotes figure::before {
  content: "\201C"; display: block;
  font-stretch: 125%; font-weight: 700; font-size: 4.5rem; line-height: 0.8;
  color: var(--ochre); margin-bottom: 0.5rem;
}
.quotes figcaption { color: #a9c7bf; font-size: 0.95rem; padding-left: 1rem; border-left: 3px solid var(--ochre); }
.quotes figcaption strong { color: var(--paper); font-weight: 550; display: block; }

/* Approach */
.approach { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 52rem) { .approach { grid-template-columns: 1fr; } }
.approach .statement { font-size: 1.2rem; line-height: 1.55; max-width: 44ch; }
.approach .statement p:first-child { font-stretch: 112%; font-weight: 520; font-size: 1.45rem; line-height: 1.35; }
.forms { margin: 0; }
.forms div { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.forms div:last-child { border-bottom: 1px solid var(--rule); }
.forms dt { font-weight: 600; margin-bottom: 0.25rem; }
.forms dd { margin: 0; color: var(--muted); }

/* FAQ */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 1.1rem 0; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-stretch: 100%; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--accent);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: -0.25rem 0 1.25rem; color: var(--muted); max-width: 60ch; }

/* Contact */
.contact { background: var(--ink); color: var(--paper); }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 6vw, 5rem); }
@media (max-width: 52rem) { .contact .wrap { grid-template-columns: 1fr; } }
.contact h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 1rem; }
.contact p { color: #b9c4c1; max-width: 42ch; }
.contact a { color: var(--paper); }
.contact .direct { margin-top: 2rem; display: grid; gap: 0.25rem; font-size: 1.05rem; }
.contact .direct a { font-weight: 550; font-size: 1.25rem; }
.contact .button { background: var(--paper); color: var(--ink); }
.contact .button:hover { background: var(--accent-soft); }
.contact :focus-visible { outline-color: var(--paper); }

form { display: grid; gap: 1.1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 34rem) { .row { grid-template-columns: 1fr; } }
label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: #b9c4c1; }
label span.opt { color: #7f8c89; }
input, textarea {
  font: inherit; font-size: 1rem; color: var(--paper);
  background: transparent;
  border: 0; border-bottom: 1px solid #5d6a67;
  padding: 0.5rem 0; border-radius: 0;
}
input:focus, textarea:focus { outline: none; border-bottom-color: var(--paper); }
textarea { resize: vertical; min-height: 7rem; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 0.5rem; }
.form-status { margin: 0; font-size: 0.95rem; }
.form-status[data-state="error"] { color: #f2b8a8; }
.form-status[data-state="success"] { color: #a9dccf; }


/* Motion: only opacity/transform, only with JS and when motion is welcome */
.logo-draw { flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .home .logo-draw [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.8s cubic-bezier(.4, 0, .2, 1) forwards; }
  .home .logo-draw [pathLength]:nth-of-type(2) { animation-delay: 0.5s; }
  .home .logo-draw g[clip-path] [pathLength] { animation-delay: 0.8s; }
  .home .logo-cell { opacity: 0; animation: fade-in 0.5s ease 1.3s forwards; }

  .hero h1, .hero .lead, .hero .routes { animation: rise 0.8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .lead { animation-delay: 0.15s; }
  .hero .routes { animation-delay: 0.3s; }

  .js :is(.section-head, .service, .register tbody tr, .quotes figure, .statement, .forms > div, .faq details, .contact .wrap > *) {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--delay, 0ms);
  }
  .js :is(.section-head, .service, .register tbody tr, .quotes figure, .statement, .forms > div, .faq details, .contact .wrap > *).in {
    opacity: 1; transform: none;
  }
  .js .section-head h2::after { transform: scaleX(0); transform-origin: left; transition: transform 0.9s cubic-bezier(.6, 0, .2, 1) 0.3s; }
  .js .section-head.in h2::after { transform: scaleX(1); }

  /* The bridge draws itself once it is half in view */
  .js .sketch--bridge path:not(.wash) { stroke-dashoffset: 1; animation: draw 1s cubic-bezier(.4, 0, .2, 1) forwards paused; }
  .js .sketch--bridge .wash { opacity: 0; animation: wash 1.4s ease-out 1.6s forwards paused; }
  .js .sketch--bridge.in path { animation-play-state: running; }
}
@keyframes fade-in { to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Footer */
.site-footer a { color: inherit; text-decoration-color: #3d4a47; }
.site-footer a:hover { color: var(--paper); }
.site-footer { background: var(--ink); color: #7f8c89; font-size: 0.85rem; }
.site-footer .wrap { border-top: 1px solid #2c3a37; padding-top: 1.5rem; padding-bottom: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }

/* Blog list (homepage and /blog/) */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.post-list li { border-bottom: 1px solid var(--rule); }
.post-list a {
  display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0.25rem 2rem;
  padding: 1.5rem 0; color: var(--ink); text-decoration: none;
  transition: background-color 0.3s;
}
.post-list a:hover { background: rgba(255, 255, 255, 0.5); }
.post-list time { color: var(--muted); font-size: 0.9rem; padding-top: 0.2rem; }
.post-list strong { font-stretch: 112%; font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
.post-list a:hover strong { color: var(--accent); }
.post-list span { grid-column: 2; color: var(--muted); max-width: 64ch; }
@media (max-width: 40rem) {
  .post-list a { grid-template-columns: 1fr; }
  .post-list span { grid-column: 1; }
}
.blog-all { margin: 1.5rem 0 0; font-weight: 550; }

/* Article */
.article { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(4rem, 9vw, 6.5rem); }
.article .wrap { max-width: 46rem; }
.article-back { display: inline-block; margin-bottom: 2rem; font-size: 0.95rem; }
.article h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 540; margin-bottom: 1rem; text-wrap: balance; }
.article-meta { color: var(--muted); margin-bottom: 2.5rem; }
.article-meta::after {
  content: ""; display: block; width: 8rem; height: 0.75rem; margin-top: 1.25rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 12'%3E%3Cpath d='M1 6.5Q40 3.5 82 6T127 4.5M7 11L14 1' fill='none' stroke='%230b4f45' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center / contain;
}
.prose { font-size: 1.1rem; line-height: 1.7; }
.prose > p:first-child { font-size: 1.25rem; line-height: 1.55; }
.prose h2 { font-size: 1.6rem; margin: 2.75rem 0 1rem; }
.prose h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.25em; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 620; }
.prose code { font-size: 0.92em; background: var(--board); padding: 0.1em 0.35em; border-radius: 2px; }
.prose pre { background: var(--ink); color: var(--paper); padding: 1.25rem; overflow-x: auto; border-radius: 2px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid var(--ochre); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0 2rem; font-size: 0.98rem; }
.prose th { text-align: left; font-weight: 450; color: var(--muted); font-size: 0.85rem; border-bottom: 1.5px solid var(--ink); padding: 0 1rem 0.5rem 0; }
.prose td { border-bottom: 1px solid var(--rule); padding: 0.7rem 1rem 0.7rem 0; vertical-align: top; }
.prose td:first-child { font-weight: 600; white-space: nowrap; font-size: 0.9rem; }
.prose figure { margin: 2rem 0; }
.prose figure svg { width: 100%; height: auto; display: block; }
.prose figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.75rem; padding-left: 1rem; border-left: 3px solid var(--accent); }
.article-cta { margin-top: 3.5rem; padding-top: 2rem; border-top: 3px solid var(--accent); }
.article-cta p { margin-bottom: 1.25rem; }

/* Diagrams in posts, same pen as the sketches */
.diagram text { font-family: 'Archivo', system-ui, sans-serif; font-size: 15px; fill: var(--ink); }
.diagram .sub { font-size: 12.5px; fill: var(--muted); }
.diagram .step { font-size: 12.5px; fill: var(--accent); font-weight: 600; }
.diagram .box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.diagram .box-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.diagram .flow { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.diagram .flow-accent { fill: none; stroke: var(--accent); stroke-width: 1.3; }
.diagram .dashed { stroke-dasharray: 4 4; }
