/* Mhlopheni Group
   Palette: jacaranda violet = structured data, tailings ochre = raw source.
   Type: Archivo, using its width axis — condensed for raw, expanded for voice. */

:root {
  --paper: #F8F7FB;
  --surface: #FFFFFF;
  --ink: #221A33;
  --ink-soft: #544B6B;
  --rule: #DDD8E8;
  --jacaranda: #6D4FC2;
  --jacaranda-deep: #4B3391;
  --bloom: #EDE7FA;
  --bloom-rule: #D3C7F1;
  --ochre-line: #D9A21B;
  --ochre-wash: #FCEFC7;
  --ochre-text: #6B4E00;
  --error: #A0182B;
  --ok: #1E6B3A;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }

img, svg { max-width: 100%; height: auto; }
a { color: var(--jacaranda-deep); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--jacaranda); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--ink); color: #fff; padding: .6rem 1rem; }

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

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.1; font-weight: 750; }
h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-stretch: 125%;
  font-weight: 820;
  letter-spacing: -.015em;
  line-height: .98;
  max-width: 17ch;
}
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-stretch: 115%; letter-spacing: -.01em; }
h3 { font-size: 1.3125rem; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); color: var(--ink-soft); max-width: 54ch; }
.small { font-size: .9375rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.3rem; border: 2px solid transparent; border-radius: 6px;
  font: inherit; font-size: 1rem; font-weight: 650; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--jacaranda); color: #fff; }
.btn-primary:hover { background: var(--jacaranda-deep); }
.btn-secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-header .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-stretch: 118%; font-size: 1.125rem; letter-spacing: -.01em;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.75rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 560; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--jacaranda-deep); text-decoration: underline; }
.nav a.btn-primary { color: #fff; padding: .55rem 1rem; text-decoration: none; }
.nav a.btn-primary:hover { color: #fff; }
.nav-toggle {
  display: none; font: inherit; font-weight: 650; font-size: .9375rem;
  background: none; border: 2px solid var(--ink); border-radius: 6px;
  padding: .4rem .9rem; color: var(--ink); cursor: pointer;
}

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .js .nav.is-open { display: block; }
  .nav ul { flex-wrap: wrap; gap: .25rem 1.25rem; }
  .js .nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .js .nav li { width: 100%; }
  .js .nav a { display: block; padding: .75rem 0; font-size: 1.0625rem; }
  .js .nav a.btn-primary { display: inline-flex; margin-top: .5rem; padding: .75rem 1.2rem; }
  .site-header .wrap { flex-wrap: wrap; padding-block: .6rem; }
  .js .site-header .wrap { flex-wrap: nowrap; padding-block: 0; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--rule); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-where { margin-top: 1.5rem; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The extraction demo */
.demo { display: grid; gap: .75rem; margin: 0; min-width: 0; }
.flyer {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.1rem 1.3rem 1.2rem;
  transform: rotate(-1.4deg);
  margin-inline: .5rem 1.5rem;
}
.flyer-title { font-size: 1.5rem; font-stretch: 72%; font-weight: 880; line-height: 1; margin: 0 0 .15rem; }
.flyer-sub { font-size: .8125rem; font-stretch: 80%; color: var(--ink-soft); margin: 0 0 .6rem; }
.flyer ul { list-style: none; margin: 0; padding: 0; font-stretch: 76%; font-size: 1.0625rem; line-height: 1.75; }
.raw { padding: .05em .2em; border-radius: 2px; transition: background-color .3s ease, box-shadow .3s ease; }
.raw.is-picked { background: var(--ochre-wash); box-shadow: inset 0 -2px 0 var(--ochre-line); }

.demo-flow { display: flex; align-items: center; gap: .6rem; padding-left: 1.25rem; font-size: .875rem; color: var(--ink-soft); }
.demo-flow svg { width: 18px; height: 28px; flex: none; }

.table-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--jacaranda);
  border-radius: 3px 8px 8px 3px;
  overflow-x: auto;
}
table.data { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.data caption { text-align: left; padding: .6rem .9rem 0; font-size: .8125rem; color: var(--ink-soft); }
.data th { text-align: left; font-size: .8125rem; font-weight: 650; color: var(--ink-soft); background: var(--bloom); padding: .55rem .9rem; border-bottom: 1px solid var(--rule); }
.data td { padding: .45rem .9rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.data tbody tr:last-child td { border-bottom: 0; }
.data .num { text-align: right; }
.data tbody tr { transition: opacity .35s ease, transform .35s ease; }
.demo.is-armed .data tbody tr { opacity: 0; transform: translateX(-8px); }
.demo.is-armed .data tbody tr.is-in { opacity: 1; transform: none; }

.demo-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .875rem; color: var(--ink-soft); }
.demo-foot p { margin: 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--jacaranda-deep); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; white-space: nowrap; }

@media (max-width: 480px) {
  .flyer { margin-inline: .25rem .75rem; padding: 1rem; }
  .flyer ul { font-size: .9375rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-rule { border-top: 1px solid var(--rule); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* Pipeline: border colour moves from raw (ochre) to structured (violet) */
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1.5rem; }
.pipeline li { padding-top: 1.1rem; border-top: 4px solid var(--ink); }
.pipeline li:nth-child(1) { border-top-color: var(--ochre-line); }
.pipeline li:nth-child(2) { border-top-color: #B39AE3; }
.pipeline li:nth-child(3) { border-top-color: var(--jacaranda); }
.pipeline li:nth-child(4) { border-top-color: var(--jacaranda-deep); }
.pipeline h3 { font-size: 1.1875rem; font-stretch: 110%; margin-bottom: .35rem; }
.pipeline p { font-size: .98rem; color: var(--ink-soft); }
@media (max-width: 800px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; } }
@media (max-width: 480px) { .pipeline { grid-template-columns: 1fr; } }

/* Services */
.service {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, .8fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
}
.service:last-of-type { border-bottom: 1px solid var(--rule); }
.service h3 { font-size: 1.5rem; font-stretch: 112%; margin-bottom: .4rem; }
.service-intro p { color: var(--ink-soft); }
.service ul { margin: 0; padding-left: 1.1rem; }
.service li { margin-bottom: .45rem; }
.service li::marker { color: var(--jacaranda); }
.fit h4 { font-size: .9375rem; font-weight: 650; color: var(--ink-soft); margin-bottom: .3rem; }
.fit p { font-size: .9375rem; }
@media (max-width: 900px) { .service { grid-template-columns: 1fr; gap: .75rem; } }

.services-note { margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--bloom); border-radius: 8px; }
.services-note p { margin: 0; max-width: 72ch; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; }
.work {
  grid-column: span 2;
  display: flex; flex-direction: column; gap: .4rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1.5rem;
}
.work h3 { margin: .35rem 0 .15rem; }
.work p { font-size: 1rem; margin-bottom: .5rem; }
.work .stack { margin-top: auto; padding-top: .75rem; font-size: .875rem; color: var(--ink-soft); }
.work--feature {
  grid-column: span 4; grid-row: span 2;
  background: var(--bloom); border-color: transparent;
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.work--feature h3 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-stretch: 120%; font-weight: 800; }
.work--feature p { font-size: 1.125rem; max-width: 52ch; }
.work--half { grid-column: span 3; }

.status { align-self: flex-start; font-size: .8125rem; font-weight: 650; padding: .2rem .55rem; border-radius: 3px; }
.status--dev { background: var(--ochre-wash); color: var(--ochre-text); box-shadow: inset 0 0 0 1px var(--ochre-line); }
.status--built { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.status--license { background: var(--jacaranda); color: #fff; }
.status--internal { color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); }

@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work, .work--half { grid-column: span 1; }
  .work--feature { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
  .work, .work--half, .work--feature { grid-column: 1 / -1; }
}

/* Engagement steps — a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 52rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1rem; padding-block: 1.3rem; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(step); font-size: 2rem; font-weight: 820; font-stretch: 125%; line-height: 1; color: var(--jacaranda); }
.steps h3 { margin-bottom: .25rem; }
.steps p { margin: 0; color: var(--ink-soft); }
.promise { margin-top: 1.75rem; font-weight: 650; }

/* Two columns: data + research */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 6vw, 5rem); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.checklist li { position: relative; padding-left: 1.6rem; margin-bottom: .7rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem; background: var(--jacaranda); border-radius: 2px; }
.notice { margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--ochre-wash); border-left: 4px solid var(--ochre-line); border-radius: 0 6px 6px 0; font-size: .9375rem; }
.notice p { margin: 0; }

/* Careers band */
.band { background: var(--bloom); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; } }
.role-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.role-list li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .8rem; border-bottom: 1px solid var(--bloom-rule); }
.role-list li:first-child { border-top: 1px solid var(--bloom-rule); }
.role-list .meta { color: var(--ink-soft); font-size: .9375rem; white-space: nowrap; }

/* Closing CTA */
.cta { background: var(--ink); color: #fff; }
.cta h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-stretch: 125%; font-weight: 820; max-width: 18ch; line-height: 1.02; }
.cta p { color: #D9D3EA; }
.cta a:not(.btn) { color: #fff; }
.cta .btn-primary { background: #fff; color: var(--ink); }
.cta .btn-primary:hover { background: var(--bloom); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }

/* Footer */
.site-footer { padding-block: 3rem 2rem; font-size: .9375rem; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.site-footer h2 { font-size: 1rem; font-stretch: 100%; letter-spacing: 0; color: var(--ink); margin-bottom: .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .brand { margin-bottom: .75rem; }
.legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .875rem; }
.legal p { max-width: none; margin-bottom: .35rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Inner pages ---------- */
.page-head { padding-block: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); max-width: 20ch; }

.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.terms > div { border-top: 4px solid var(--jacaranda); padding-top: 1rem; }
.terms h3 { font-size: 1.125rem; }
.terms p { font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 800px) { .terms { grid-template-columns: 1fr; } }

.role { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1rem, 4vw, 3rem); padding-block: 2rem; border-top: 1px solid var(--rule); }
.role:last-child { border-bottom: 1px solid var(--rule); }
.role h3 { font-size: 1.5rem; font-stretch: 112%; margin-bottom: .35rem; }
.role-meta { color: var(--ink-soft); font-size: .9375rem; margin-bottom: 1rem; }
.role h4 { font-size: 1rem; margin: 0 0 .35rem; }
.role ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.role li { margin-bottom: .35rem; }
.role li::marker { color: var(--jacaranda); }
@media (max-width: 800px) { .role { grid-template-columns: 1fr; gap: .5rem; } }

/* Forms */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }
.form { display: grid; gap: 1.15rem; max-width: 40rem; }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
label, .label { font-weight: 620; font-size: .9375rem; }
.optional, .hint { font-weight: 400; color: var(--ink-soft); font-size: .875rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .7rem .8rem; background: var(--surface);
  border: 1.5px solid #BDB5D1; border-radius: 6px;
}
input:focus, select:focus, textarea:focus { border-color: var(--jacaranda); }
textarea { min-height: 9rem; resize: vertical; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: start; font-weight: 400; font-size: .9375rem; }
.check input { width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--jacaranda); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 620; }
.form-status:focus { outline: none; }
.form-status.is-error { color: var(--error); }
.form-status.is-ok { color: var(--ok); }

.side-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.5rem; }
.side-card h2 { font-size: 1.25rem; font-stretch: 105%; }
.side-card + .side-card { margin-top: 1.25rem; }
.contacts { margin: 0; }
.contacts dt { font-weight: 650; font-size: .9375rem; }
.contacts dd { margin: 0 0 .9rem; }

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.5rem; font-stretch: 108%; margin-top: 2.25rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* WhatsApp: outlined in WhatsApp's dark green for legible contrast */
.btn-whatsapp { background: var(--surface); color: #075E54; border-color: #128C7E; }
.btn-whatsapp:hover { background: #E7F7EF; color: #054C44; }
.cta .btn-whatsapp { background: transparent; color: #fff; border-color: #6FD6A6; }
.cta .btn-whatsapp:hover { background: rgba(111, 214, 166, .15); color: #fff; }
.side-card--whatsapp { border-color: #BFE8D3; }
.side-card--whatsapp .btn { margin-top: .25rem; }
