:root{
  --bg:#ffffff;
  --band:#f4f2ee;
  --surface:#faf8f5;
  --ink:#35322e;
  --ink-muted:#5c626b;   /* non-content only: labels, subtitles, captions, nav, footer */
  --line:#e5e1da;
  --field-line:#958d82;
  --label-line:#b3aca2;
  --accent:#bd4137;
  --accent-soft:#f6e7e5;
  --btn:var(--accent);
  --btn-ink:#f9f9f9;
  --radius:2px;          /* cards, form fields */
  --radius-md:5px;       /* buttons, inline code */
  --radius-pill:999px;   /* tags */
  --max:800px;
  --section-y:88px;
  --display: 'Rubik', sans-serif;
  --body: 'Rubik', sans-serif;
  --mono: 'Rubik', sans-serif;
  --code: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* Type scale: use only these */
  --fs-xs:0.85rem;       /* tags only */
  --fs-sm:1rem;          /* nav, buttons, labels, captions, footer */
  --fs-base:1.2rem;      /* body text */
  --fs-lg:1.45rem;       /* intro text, card and service titles */
  --fs-h2:clamp(2rem, 4vw, 2.8rem);
  --fs-h1:clamp(2.8rem, 6vw, 4.4rem);
}

/* Smaller type scale on phones: same steps, scaled down */
@media (max-width: 720px){
  :root{
    --fs-xs:0.8rem;
    --fs-sm:0.9rem;
    --fs-base:1.05rem;
    --fs-lg:1.25rem;
    --fs-h2:1.75rem;
    --fs-h1:2.3rem;
  }
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation:none !important; transition:none !important;}
}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--body);
  font-size:var(--fs-base);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;}
img{max-width:100%; display:block;}

/* Avoid single-word last lines in body text */
p, li{
  text-wrap:pretty;
}

/* ---------- Headings: one style per level, sections only set spacing ---------- */
h1, h2, h3{
  font-family:var(--display);
  font-weight:500;
  letter-spacing:-0.01em;
  margin:0 0 16px;
}
h1{
  font-size:var(--fs-h1);
  line-height:1.1;
  letter-spacing:-0.02em;
}
h2{
  font-size:var(--fs-h2);
  line-height:1.2;
}
h3{
  font-size:var(--fs-lg);
  line-height:1.3;
}
/* Page titles on inner pages: an h1 for structure, sized like a section heading */
h1.page-title{
  font-size:var(--fs-h2);
  line-height:1.2;
  letter-spacing:-0.01em;
}

.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:0 32px;
}
header.site .wrap, body > footer .wrap{
  max-width:900px;
}

code{
  font-family:var(--code);
  font-size:0.85em;
  padding:0.15em 0.4em;
  background:var(--band);
  border-radius:var(--radius-md);
}

/* ---------- Section bands (alternate sections get a flat tint) ---------- */
.band{
  background:var(--band);
}
/* ---------- Nav ---------- */
header.site{
  padding:28px 0;
  border-bottom:1px solid var(--line);
}
.site nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.logo{
  display:inline-flex;
  text-decoration:none;
  color:var(--ink);
}
.logo img{
  width:100px;
  height:auto;
}
.nav-links{
  display:flex;
  gap:32px;
  list-style:none;
  margin:0;
  padding:0;
  font-size:var(--fs-sm);
}
.nav-links a{
  text-decoration:none;
  color:var(--ink-muted);
  padding-bottom:6px;
  border-bottom:2px solid transparent;
}
.nav-links a:hover, .nav-links a:focus-visible{
  color:var(--ink);
}
.nav-links a.active{
  color:var(--ink);
  border-bottom-color:var(--accent);
}

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

/* ---------- Hero ---------- */
.hero{
  padding:calc(var(--section-y) + 8px) 0 var(--section-y);
  border-bottom:1px solid var(--line);
}
.hero .section-label{
  margin-bottom:30px;
}
.hero h1{
  margin:0 0 24px;
  max-width:16ch;
}
.hero p.lede{
  font-size:var(--fs-lg);
  max-width:42ch;
  margin:0 0 36px;
}
.hero p.lede strong{
  font-weight:500;
}
.btn{
  display:inline-block;
  font-family:var(--body);
  font-size:var(--fs-sm);
  font-weight:500;
  line-height:1;
  background:var(--btn);
  color:var(--btn-ink);
  text-decoration:none;
  padding:15px 18px;
  border-radius:var(--radius-md);
  border:2px solid var(--btn);
  cursor:pointer;
  transition:0.2s ease;
}
.btn:hover, .btn:focus-visible{
  background:transparent;
  color:var(--btn);
}
/* Smaller button, used in the header */
.btn-small{
  padding:11px 16px;
  white-space:nowrap;
}

/* ---------- Logo strip ---------- */
.trustbar{
  padding:40px 0;
  border-bottom:1px solid var(--line);
}
.trustbar .section-label{
  margin:0 0 20px;
}
.trust-logos{
  display:flex;
  flex-wrap:wrap;
  gap:36px 48px;
  align-items:baseline;
}
.trust-logo-img{
  height:64px;
  width:auto;
}
.logo-pypi{
  height:80px;
}
.logo-psf{
  height:56px;
}

/* ---------- Problems ---------- */
.problems{
  padding:var(--section-y) 0;
  border-bottom:1px solid var(--line);
}
.section-label{
  font-family:var(--mono);
  font-size:var(--fs-sm);
  letter-spacing:0.08em;
  color:var(--ink-muted);
  margin:0 0 12px;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px dotted var(--label-line);
  text-wrap:balance;
}
.problems h2{
  margin:0 0 40px;
}
.problem-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:0;
  max-width:760px;
}
.problem-list li{
  padding:20px 0;
  border-top:1px solid var(--line);
}
.problem-list li:last-child{
  border-bottom:1px solid var(--line);
}

/* ---------- Services ---------- */
.services{
  padding:var(--section-y) 0;
  border-bottom:1px solid var(--line);
}
.services-intro{
  max-width:640px;
  margin-bottom:56px;
}
.services-intro h2{
  margin:0 0 12px;
}
.services-intro p.lede{
  margin:0;
}

/* Quick overview list (homepage only) */
.services-overview{
  list-style:none;
  margin:0;
  padding:0;
  max-width:760px;
  border-top:1px solid var(--line);
}
.services-overview li{
  border-bottom:1px solid var(--line);
}
.services-overview li > div{
  padding:20px 0;
}
.services-overview strong{
  display:block;
  font-family:var(--display);
  font-weight:500;
  letter-spacing:-0.01em;
  margin-bottom:4px;
}
.services-overview span{
  display:block;
}

.services-cta{
  padding-top:56px;
}
.services-cta h3{
  margin:0 0 8px;
}
.services-cta p{
  max-width:52ch;
  margin:0 0 24px;
}

/* ---------- Case studies ---------- */
.work{
  padding:var(--section-y) 0;
  border-bottom:1px solid var(--line);
}
.work-intro{
  max-width:640px;
  margin-bottom:56px;
}
.work-intro h2{
  margin:0 0 12px;
}
.case{
  padding:52px 0;
  border-top:1px solid var(--line);
}
.case:last-child{
  padding-bottom:0;
}
.case h3{
  margin:0 0 4px;
}
.case-subtitle{
  color:var(--ink-muted);
  font-size:var(--fs-sm);
  margin:0 0 16px;
}
.case .case-tags{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 28px;
  padding:0;
}
.case .case-tags li{
  margin:0;
  padding:4px 14px;
  line-height:1.3;
  background:var(--ink);
  border-radius:var(--radius-pill);
  color:var(--bg);
  font-size:var(--fs-xs);
}
.case p.case-text{
  margin:0 0 16px;
}
.case p.case-text strong{
  font-weight:500;
}
.case ul{
  margin:0 0 16px;
  padding-left:18px;
}
.case ul li{margin-bottom:6px;}
.case-image{
  display:block;
  width:100%;
  height:auto;
  margin:20px 0 32px;
  padding:0 20px;
  box-sizing:border-box;
  border-bottom:2px solid var(--line);
}
blockquote{
  margin:32px 0 0;
  padding:28px 32px;
  background:var(--band);
  border-radius:var(--radius);
  font-style:normal;
}
blockquote p{
  margin:0 0 16px;
}
blockquote footer{
  padding:28px 0 0;
}
blockquote footer span{
  display:block;
  color:var(--ink-muted);
  font-size:var(--fs-sm);
}
blockquote footer span:first-child{
  font-weight:500;
  color:var(--ink);
}

/* ---------- About ---------- */
.about, .about-origin, .about-values{
  padding:var(--section-y) 0;
  border-bottom:1px solid var(--line);
}
.about-values{
  border-bottom:none;
}
.contact-team{
  margin-top:56px;
}
.about h1{
  max-width:21ch;
}
.about p{
  max-width:56ch;
}
.about-text{
  max-width:68ch;
  margin:0 0 24px;
}
.about-text:last-child{
  margin-bottom:0;
}
.values-list{
  list-style:none;
  margin:0 0 40px;
  padding:0;
  max-width:680px;
  border-top:1px solid var(--line);
}
.values-list li{
  padding:18px 0;
  border-bottom:1px solid var(--line);
}
.team-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}
.team-member{
  display:flex;
  flex-direction:column;
  padding:28px 32px;
  background:var(--band);
  border-radius:var(--radius);
}
.team-member .name{
  font-family:var(--display);
  font-weight:500;
  font-size:var(--fs-base);
  margin:0 0 6px;
}
.team-member .role{
  color:var(--ink-muted);
  font-size:var(--fs-sm);
  margin:0 0 20px;
}
.team-member a{
  margin-top:auto;
  color:var(--accent);
  font-size:var(--fs-sm);
  overflow-wrap:anywhere;
}

/* ---------- Contact ---------- */
.contact{
  padding:calc(var(--section-y) + 8px) 0 var(--section-y);
}
.contact h1, .contact h2{
  margin:0 0 18px;
  max-width:16ch;
}
.contact.band h2{
  max-width:19ch;
}
.contact p.lede{
  max-width:52ch;
  margin:0 0 40px;
}

/* ---------- Contact form ---------- */
.contact-form{
  margin-top:56px;
  max-width:720px;
}
.contact-form .honeypot{
  display:none;
}
.contact-form .field{
  margin-bottom:24px;
}
.contact-form .field-label{
  display:block;
  font-size:var(--fs-sm);
  font-weight:500;
  margin-bottom:8px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea{
  width:100%;
  font-family:var(--body);
  font-size:var(--fs-base);
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--field-line);
  border-radius:var(--radius);
  padding:12px 14px;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder{
  color:var(--ink-muted);
}
.contact-form input:focus,
.contact-form textarea:focus{
  outline:2px solid var(--accent);
  outline-offset:0;
  border-color:var(--accent);
  background:var(--bg);
}
.contact-form textarea{
  min-height:110px;
  resize:vertical;
}

body > footer{
  border-top:1px solid var(--line);
  padding:28px 0;
}
body > footer .wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
}
body > footer p{
  margin:0;
  font-family:var(--mono);
  font-size:var(--fs-sm);
  color:var(--ink-muted);
}

@media (max-width: 1024px){
  :root{--section-y:72px;}
}

@media (max-width: 720px){
  :root{--section-y:56px;}
  .wrap{padding:0 20px;}
  header.site{padding-top:16px;}
  .logo img{width:80px;}
  header.site nav{flex-wrap:wrap; gap:12px;}
  main > section:first-child{padding-top:48px;}
  .nav-links{gap:20px; order:3; width:100%; margin-top:12px;}
  .nav-cta{order:2;}
  .nav-long{display:none;}
  .hero{text-align:center;}
  .hero h1, .hero p.lede{margin-left:auto; margin-right:auto;}
  .trustbar .wrap{text-align:center;}
  .trustbar .section-label{padding-bottom:15px;}
  .trust-logos{justify-content:center;}
  .team-grid{grid-template-columns:1fr;}
}
