:root {
  --black: #0a0a0a;
  --charcoal: #161616;
  --panel: #1e1e1e;
  --gold: #c9a24b;
  --gold-bright: #e3c374;
  --ink: #17181c;
  --muted: #5c6270;
  --bg: #ffffff;
  --bg-alt: #f4f4f2;
  --border: #e4e3df;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Diagonal texture background, used on light sections */
.diagonal-bg {
  position: relative;
  background: var(--bg-alt);
  overflow: hidden;
}
.diagonal-bg::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background:
    linear-gradient(115deg, transparent 0%, transparent 46%, #e9e8e3 46%, #e9e8e3 50%, transparent 50%, transparent 100%),
    linear-gradient(115deg, transparent 0%, transparent 60%, #ebe9e4 60%, #ebe9e4 63%, transparent 63%, transparent 100%);
  pointer-events: none;
}
.diagonal-bg > * { position: relative; z-index: 1; }

/* Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid #2a2a2a;
  backdrop-filter: blur(6px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: 1160px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

nav.primary-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav.primary-nav a {
  color: #a8a8a8;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

nav.primary-nav a:hover,
nav.primary-nav a.active {
  color: var(--gold-bright);
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #333;
  color: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 1rem;
}

/* Hero */
.hero {
  background: radial-gradient(circle at 30% 20%, #1c1c1c 0%, var(--black) 62%);
  color: #fff;
  padding: 100px 28px 110px;
  text-align: center;
  position: relative;
}

.hero-inner { max-width: 780px; margin: 0 auto; }

.badge-seal {
  width: 340px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 34px;
  border-radius: 6px;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.25;
  margin: 0 0 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero p {
  color: #b7b7b7;
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 36px;
}

.btn {
  display: inline-block;
  background: var(--gold);
  color: #14140f;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { background: var(--gold-bright); box-shadow: 0 10px 24px rgba(201,162,75,0.28); }

.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  margin-left: 14px;
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-bright); box-shadow: none; background: transparent; }

/* Page header (image-backed) */
.page-header {
  background: linear-gradient(180deg, rgba(10,10,10,0.55), rgba(10,10,10,0.8)), var(--black);
  color: #fff;
  padding: 70px 28px;
  text-align: center;
}
.page-header .eyebrow { justify-content: center; display: flex; }
.page-header h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 600; }
.page-header p { color: #b7b7b7; margin: 0 auto; max-width: 600px; }

/* full-bleed photographic-style header for division pages */
.page-header.imaged {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0.9) 100%),
    repeating-linear-gradient(135deg, #232323 0 2px, #1a1a1a 2px 42px);
  padding: 120px 28px 90px;
}

/* Sections */
section { padding: 84px 0; }
section.alt { background: var(--bg-alt); }
section.dark { background: var(--black); color: #eaeaea; }
section.dark .muted-text { color: #9c9c9c; }

.section-heading { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-heading .eyebrow { justify-content: center; display: flex; }
.section-heading h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 0 0 14px; font-weight: 600; }
.section-heading p { color: var(--muted); margin: 0; }
section.dark .section-heading p { color: #9c9c9c; }

/* Cards / grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: box-shadow 0.15s, transform 0.15s, border-color .15s;
}
.card:hover { box-shadow: 0 16px 34px rgba(0,0,0,0.08); transform: translateY(-3px); border-color: var(--gold); }

.card .icon {
  width: 46px; height: 46px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.card h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card a.card-link { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--ink); font-size: 0.85rem; letter-spacing: .02em; }
.card a.card-link:hover { color: var(--gold); }

/* Service detail lists */
.service-block { margin-bottom: 40px; }
.service-block h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.service-block ul { list-style: none; margin: 0; padding: 0; }
.service-block li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.94rem;
}
.service-block li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
}
.service-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 48px;
}

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.team-member { text-align: center; }
.team-member .avatar {
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--black);
  border: 1.5px solid var(--gold);
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-weight: 700; font-size: 1.3rem;
  overflow: hidden;
}
.team-member .avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-member h3 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 600; }
.team-member .role { color: var(--gold); font-size: 0.82rem; font-weight: 600; margin-bottom: 8px; letter-spacing: .02em; text-transform: uppercase; }
.team-member p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Two column */
.two-col { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.two-col h2 { font-size: 1.85rem; margin: 0 0 18px; font-weight: 600; }
.two-col p { color: var(--muted); margin: 0 0 14px; }

.media-block {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    repeating-linear-gradient(135deg, #efeee9 0 2px, #f7f6f2 2px 34px);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.85rem; letter-spacing: .04em; text-transform: uppercase;
}
.media-block.dark {
  border-color: #2a2a2a;
  background: repeating-linear-gradient(135deg, #1c1c1c 0 2px, #131313 2px 34px);
  color: #7d7d7d;
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-top: 52px; }
.stat { text-align: center; }
.stat .num { font-size: 2.1rem; font-weight: 700; color: var(--gold); }
.stat .label { color: var(--muted); font-size: 0.86rem; margin-top: 6px; letter-spacing: .02em; }

/* Contact / location */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); height: 340px; filter: grayscale(0.3); }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

.office-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 18px;
  background: #fff;
}
.office-card h4 { margin: 0 0 6px; font-size: 0.98rem; font-weight: 600; color: var(--ink); }
.office-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: none; }
.contact-list .tag { color: var(--muted); min-width: 70px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.contact-list a:hover { color: var(--gold); }

/* Project / IP showcase card (Tshedimoso etc.) */
.project-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: center;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  padding: 30px;
  background: var(--charcoal);
}
@media (max-width: 700px) { .project-card { grid-template-columns: 1fr; } }
.project-card .logo-box {
  aspect-ratio: 1/1;
  background: #fff;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.project-card h3 { margin: 0 0 12px; font-size: 1.15rem; color: #fff; font-weight: 600; }
.project-card p { margin: 0; color: #a8a8a8; font-size: 0.94rem; }

/* CTA band */
.cta-band { background: var(--black); color: #fff; padding: 64px 28px; text-align: center; }
.cta-band h2 { margin: 0 0 12px; font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 600; }
.cta-band p { color: #a8a8a8; margin: 0 0 28px; }

/* Footer */
footer.site-footer { background: var(--black); color: #8f8f8f; padding: 56px 28px 30px; font-size: 0.88rem; border-top: 1px solid #232323; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; max-width: 1160px; margin: 0 auto 36px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; margin: 0 0 16px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold-bright); }
.footer-grid p { margin: 0; color: #8f8f8f; }
.social-row { display: flex; gap: 14px; margin-top: 18px; }
.social-row a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #333; display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 0.9rem;
}
.social-row a:hover { border-color: var(--gold); color: var(--gold-bright); }

.footer-bottom {
  max-width: 1160px; margin: 0 auto; padding-top: 22px; border-top: 1px solid #232323;
  font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #6f6f6f;
}

@media (max-width: 900px) {
  nav.primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black); flex-direction: column; gap: 0;
    padding: 8px 28px 18px; display: none; border-bottom: 1px solid #2a2a2a;
  }
  nav.primary-nav.open { display: flex; }
  nav.primary-nav a { padding: 13px 0; border-bottom: 1px solid #232323; }
  .nav-toggle { display: inline-block; }
}

/* Portal (driver / admin auth + dashboards) */
.portal-shell { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 64px 24px; }
.portal-card {
  width: 100%; max-width: 400px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 36px;
}
.portal-card h1 { font-size: 1.4rem; margin: 0 0 6px; font-weight: 600; }
.portal-card .sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 4px;
  font-family: inherit; font-size: 0.94rem; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field-hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.btn-block { width: 100%; text-align: center; border: none; cursor: pointer; }
.btn-secondary {
  display: inline-block; background: transparent; color: var(--ink); border: 1px solid var(--border);
  padding: 13px 26px; border-radius: var(--radius); font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-small { padding: 8px 16px; font-size: 0.78rem; }

.form-error {
  background: #fdecec; border: 1px solid #f3b8b8; color: #a12727;
  padding: 11px 14px; border-radius: 4px; font-size: 0.86rem; margin-bottom: 18px; display: none;
}
.form-error.show { display: block; }
.form-success {
  background: #eaf7ee; border: 1px solid #b7e3c3; color: #1c6b34;
  padding: 11px 14px; border-radius: 4px; font-size: 0.86rem; margin-bottom: 18px; display: none;
}
.form-success.show { display: block; }

/* Dashboard layout */
.dash-header {
  background: var(--black); color: #fff; padding: 40px 0 32px;
}
.dash-header .container { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.dash-header h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 600; }
.dash-header .sub { color: #9c9c9c; font-size: 0.9rem; margin: 0; }

.balance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
  margin: -46px auto 0; max-width: 1160px; padding: 0 28px 8px; position: relative; z-index: 2;
}
.balance-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}
.balance-card .label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.balance-card .value { font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.balance-card.highlight { border-color: var(--gold); }
.balance-card.highlight .value { color: var(--gold); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left; padding: 12px 14px; background: var(--bg-alt); color: var(--muted);
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover { background: var(--bg-alt); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap .data-table { border: none; }
.table-empty { padding: 32px; text-align: center; color: var(--muted); font-size: 0.9rem; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-active { background: #eaf7ee; color: #1c6b34; }
.badge-paused { background: #fff6e0; color: #93690a; }
.badge-completed { background: #eef0f4; color: #4a5163; }
.badge-payment { background: #eaf7ee; color: #1c6b34; }
.badge-adjustment { background: #fdecec; color: #a12727; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 28px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }

.driver-row { cursor: pointer; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 0.88rem; }
.back-link:hover { color: var(--gold); }

.logout-link { color: #9c9c9c; font-size: 0.85rem; }
.logout-link:hover { color: #fff; }
