/* ============================================================
   nkanyezintuli.co.za, direction B ("light and warm")
   Phone first: base styles are for phones (320px up).
   Wider screens are added at the bottom with min-width rules.
   ============================================================ */

/* ---------- Fonts (all stored in /fonts, nothing loaded from outside) ---------- */
@font-face { font-family: "Plex Serif"; src: url("/fonts/plex-serif-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("/fonts/plex-serif-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Design tokens: change a colour here and it changes everywhere ---------- */
:root {
  --paper: #faf8f5;      /* page background */
  --white: #ffffff;
  --stone: #f2efea;      /* quiet panels */
  --ink: #121110;        /* headings, dark sections */
  --text: #1c1a18;       /* body */
  --muted: #5a554f;      /* secondary text on light */
  --rule: #e2ddd5;       /* card borders */
  --orange: #c2501a;     /* burnt orange */
  --orange-ink: #a8430f; /* orange for small text on light */
  --dark-1: #1f1d1b;     /* device on dark */
  --dark-2: #2a2725;     /* tiles on dark */
  --dark-line: #3a3632;
  --dark-text: #b7b1a8;  /* secondary text on dark */

  --serif: "Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --pad: 16px;           /* side gutter */
  --wrap: 1180px;        /* max content width on desktop */
  --r-lg: 28px;          /* big panels */
  --r-md: 18px;          /* cards */
  --r-sm: 14px;          /* buttons */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; color: var(--ink); }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--white); border-radius: 10px; }
.skip:focus { top: 12px; }

.h2 { font-size: clamp(2rem, 9vw, 3.5rem); line-height: 1.04; letter-spacing: -0.025em; }
.h3 { font-size: 1.35rem; line-height: 1.2; }
.sub { margin-top: 10px; color: var(--muted); max-width: 34rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border-radius: var(--r-sm); border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: var(--orange-ink); }
.btn-white { background: var(--white); color: var(--ink); border-color: var(--rule); }
.btn-white:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--dark-line); }
.btn-ghost:hover { border-color: var(--white); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Floating pill nav ---------- */
.nav {
  position: sticky; top: max(10px, env(safe-area-inset-top)); z-index: 20;
  margin: 10px 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 6px 6px 18px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--rule); border-radius: 999px;
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, .45);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--orange); }
.nav-links { display: none; }
.nav-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--ink); color: var(--white);
  font-weight: 600; font-size: .9rem; text-decoration: none;
}
.nav-cta:hover { background: var(--orange); }

/* ---------- Hero ---------- */
.hero { padding: 28px var(--pad) 36px; display: grid; gap: 0; }
.name { font-size: clamp(2.7rem, 14vw, 6.6rem); line-height: .94; letter-spacing: -0.035em; }
.role { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 500; color: var(--text); }
.role::before { content: ""; flex: none; width: 28px; height: 3px; border-radius: 2px; background: var(--orange); }

.panel {
  position: relative; overflow: hidden; margin: 24px 0 0;
  height: clamp(380px, 112vw, 470px);
  border-radius: var(--r-lg); background: var(--orange);
}
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); pointer-events: none; }
.ring-1 { width: 440px; height: 440px; right: -170px; top: -130px; }
.ring-2 { width: 300px; height: 300px; right: -100px; top: -60px; }
.panel picture, .panel img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 95%; width: auto; max-width: none; }
.float {
  position: absolute; z-index: 2; max-width: 46%;
  background: var(--white); border-radius: 16px; padding: 10px 14px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5);
  font-size: .78rem; line-height: 1.3; color: var(--muted);
}
.float b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--ink); }
.float-1 { right: 12px; top: 16px; }
.float-2 { left: 12px; bottom: 16px; }

.lede { margin-top: 22px; font-size: 1.12rem; line-height: 1.55; color: #3a3734; max-width: 34rem; }
.hero-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.hero-btns .btn { padding: 0 12px; }

/* ---------- Stats ---------- */
.stats { margin: 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 18px 16px; }
.stat-n { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 8.5vw, 2.9rem); line-height: 1; color: var(--orange-ink); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.stat p + p { margin-top: 6px; font-size: .86rem; color: var(--muted); line-height: 1.35; }

/* ---------- What I fix ---------- */
.fix { padding: 56px var(--pad) 56px; }
.fix-list {
  list-style: none; margin: 22px 0 0; padding: 0;
  background: var(--white); border: 1px solid var(--rule); border-radius: 22px; overflow: hidden;
}
.fix-list li { position: relative; padding: 18px 18px 18px 40px; border-bottom: 1px solid #ece7df; }
.fix-list li:last-child { border-bottom: 0; }
.fix-list li::before { content: ""; position: absolute; left: 18px; top: 27px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.fix-list h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; }
.fix-list p { margin-top: 4px; font-size: .95rem; color: var(--muted); }

/* ---------- Dark half of the page ---------- */
.dark { background: var(--ink); color: var(--white); border-radius: 32px 32px 0 0; }
.dark .h2 { color: var(--white); }
.dark .sub { color: var(--dark-text); }

.systems { padding: 48px var(--pad) 40px; }
.badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: #3a2116; color: #f3c9b3; font-size: .82rem; font-weight: 600;
}
.systems .h2 { margin-top: 14px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tab {
  flex: none; min-height: 44px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--dark-line); background: transparent; color: #d9d4cc;
  font: 500 .9rem/1 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tab[aria-selected="true"] { background: var(--white); color: var(--ink); border-color: var(--white); font-weight: 600; }

.panels { margin-top: 16px; }
.tabpanel + .tabpanel { margin-top: 28px; }        /* no JS: all three show stacked */
.js .tabpanel[hidden] { display: none; }
.js .tabpanel + .tabpanel { margin-top: 0; }
.panel-note { margin-top: 14px; font-size: .92rem; color: var(--dark-text); max-width: 36rem; }

/* tracker preview, drawn by tracker.js, styled for the dark device */
.device { background: var(--dark-1); border: 1px solid #2f2b28; border-radius: 22px; padding: 14px; }
.device-preview { display: grid; gap: 8px; margin-bottom: 14px; }
.device .pv-pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.device .pv-stage { background: var(--dark-2); border-radius: 12px; padding: 10px; display: grid; gap: 2px; min-width: 0; }
.device .pv-n { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--white); line-height: 1; }
.device .pv-name { font-size: .72rem; color: #a8a29a; }
.device .pv-rows { display: grid; gap: 8px; }
.device .pv-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--dark-2); border-radius: 12px; padding: 12px; border: 0; }
.device .pv-item { font-size: .9rem; color: var(--white); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device .pv-row .tk-flag { flex: none; border-radius: 999px; font-size: .7rem; padding: 4px 9px; }
.device .pv-row .tk-flag-exception { background: var(--white); color: var(--ink); }
.device .pv-row .tk-flag-risk { color: #f3c9b3; border-color: #e2692e; padding: 3px 8px; }
.device .pv-foot { font-size: .8rem; color: #a8a29a; }

/* design screens (scorecard, B-BBEE) sit as white cards on the dark */
.screen { border-radius: 22px; color: var(--text); }

/* ---------- Light inset: experience and toolkit ---------- */
.inset .h2, .inset .h3 { color: var(--ink); }
.inset { margin: 8px 12px 0; padding: 30px 18px; background: var(--paper); color: var(--text); border-radius: 26px; }
.jobs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.job { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 16px; }
.job-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.job h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 600; }
.job-dates { font-size: .8rem; font-weight: 600; color: var(--orange-ink); white-space: nowrap; }
.job-role { margin: 2px 0 8px; color: var(--muted); font-size: .95rem; }
.job p:last-child { font-size: .95rem; }

.tools { margin-top: 32px; }
.toolkit { margin: 14px 0 0; display: grid; gap: 16px; }
.toolkit dt { font-weight: 600; color: var(--ink); font-size: .95rem; }
.toolkit dd { margin: 6px 0 0; color: var(--text); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--rule); font-size: .86rem; }

/* ---------- Contact ---------- */
.contact { padding: 44px var(--pad) max(28px, env(safe-area-inset-bottom)); }
.contact .h2 { font-size: clamp(2.4rem, 11vw, 4rem); }
.contact-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.contact-btns .btn { padding: 0 10px; }
.btn-wide { grid-column: 1 / -1; }
.btn[data-phone-shown] { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.foot { margin-top: 36px; font-size: .82rem; color: #8a847c; }

/* ============================================================
   Very narrow phones (under 360px)
   ============================================================ */
@media (max-width: 359px) {
  :root { --pad: 14px; }
  .hero-btns, .contact-btns { grid-template-columns: 1fr; }
  .float { font-size: .72rem; padding: 8px 11px; }
  .float b { font-size: 1.15rem; }
}

/* ============================================================
   Tablet and up
   ============================================================ */
@media (min-width: 720px) {
  :root { --pad: 32px; }
  .nav { margin: 14px 24px 0; }
  .nav-links { display: flex; gap: 26px; font-size: .92rem; }
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
  .nav-links a:hover { color: var(--ink); }
  .hero { grid-template-columns: 1.1fr .9fr; column-gap: 40px; padding-top: 56px; align-items: center; }
  .hero-text { grid-column: 1; grid-row: 1; align-self: end; }
  .hero-more { grid-column: 1; grid-row: 2; align-self: start; }
  .panel { grid-column: 2; grid-row: 1 / span 2; margin: 0; height: 520px; }
  .hero-btns { display: flex; }
  .hero-btns .btn { padding: 0 26px; }
  .stats { margin: 0 var(--pad); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .fix { padding: 80px var(--pad); }
  .fix-list li { padding: 22px 24px 22px 48px; }
  .fix-list li::before { left: 24px; top: 31px; }
  .systems { padding: 80px var(--pad) 56px; }
  .inset { margin: 8px 24px 0; padding: 44px 36px; }
  .jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .toolkit { grid-template-columns: 9rem 1fr; gap: 16px 24px; }
  .toolkit > div { display: contents; }
  .toolkit dd { margin: 0; }
  .contact { padding: 72px var(--pad) 40px; }
  .contact-btns { max-width: 560px; }
}

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 1100px) {
  .nav { max-width: var(--wrap); margin: 18px auto 0; padding-left: 24px; }
  .hero, .stats, .fix, .systems, .contact { max-width: calc(var(--wrap) + 2 * var(--pad)); margin-left: auto; margin-right: auto; }
  .stats { padding: 0; max-width: var(--wrap); }
  .hero { padding-top: 72px; padding-bottom: 64px; column-gap: 64px; }
  .panel { height: 600px; border-radius: 36px; }
  .ring-1 { width: 640px; height: 640px; right: -240px; top: -200px; }
  .ring-2 { width: 440px; height: 440px; right: -150px; top: -100px; }
  .float b { font-size: 1.7rem; }
  .float { font-size: .85rem; padding: 14px 18px; }
  .float-1 { right: 20px; top: 26px; }
  .float-2 { left: 20px; bottom: 26px; }
  .lede { font-size: 1.3rem; }
  .fix { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 56px; padding-top: 110px; padding-bottom: 110px; }
  .fix-list { margin-top: 0; }
  .dark { border-radius: 48px 48px 0 0; }
  .systems { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; padding-top: 104px; }
  .systems-text { position: sticky; top: 110px; }
  .systems .h2 { font-size: 2.9rem; }
  .panels { margin-top: 0; }
  .device .pv-pipe { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .inset { max-width: var(--wrap); margin: 24px auto 0; padding: 56px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; border-radius: 36px; }
  .tools { margin-top: 0; }
  .toolkit { grid-template-columns: 1fr; gap: 6px; }
  .toolkit dd { margin: 0 0 14px; }
  .contact { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; align-items: end; padding-top: 96px; }
  .contact .h2, .contact .sub { grid-column: 1; }
  .contact-btns { grid-column: 2; grid-row: 1 / span 2; max-width: none; margin-top: 0; }
  .foot { grid-column: 1 / -1; }
}

/* Respect people who've switched off motion on their phone */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
