/*
Theme Name: Motswala Technology Solutions
Theme URI: https://example.com
Author: Motswala Technology Solutions
Description: Custom theme built to match the Motswala Technology Solutions brand: dark hero with gradient headline, B-BBEE credentialed About section, an 8-item services grid, a dark "Why Choose Us" section, and a portfolio section with client badges and case studies.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: motswala-tech
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --navy: #12224B;
  --navy-deep: #0B1120;
  --gold: #D9A62B;
  --gold-dark: #B8860F;
  --teal: #2DD4BF;
  --ink: #101828;
  --muted: #5B6472;
  --muted-on-dark: #A7AEC4;
  --paper: #EEF2FA;
  --surface: #FFFFFF;
  --line: #E2E6F0;
  --line-dark: #232B45;

  --font-display: 'Poppins', 'Arial', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1240px;
  --gutter: 24px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}
p { margin: 0 0 1.1em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   EYEBROW LABEL (used above section headings)
   ============================================================ */
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before, .eyebrow::after {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.eyebrow.align-left { justify-content: flex-start; }
.eyebrow.align-left::after { display: none; }

.section-intro { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-intro p { color: var(--muted); font-size: 1.08rem; }
.section-intro.align-left { text-align: left; margin-left: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; }
.btn:hover { transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #0D1B3D; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-glass { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); backdrop-filter: blur(4px); }
.btn-glass:hover { background: rgba(255,255,255,0.2); }
.btn-link { color: var(--navy); font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px; }
.btn-link.on-dark { color: #fff; }
.btn-link svg { width: 15px; height: 15px; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 60;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark svg { width: 40px; height: 40px; }
.brand-text-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.28rem;
  color: var(--navy);
  line-height: 1.1;
  margin: 0;
}
.brand-text-tag {
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 600;
}
.brand-lockup a { display: flex; align-items: center; gap: 12px; }

.primary-nav ul { display: flex; gap: 32px; }
.primary-nav a { color: var(--ink); font-weight: 500; font-size: 0.98rem; }
.primary-nav a:hover { color: var(--navy); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
}
.menu-toggle span::before, .menu-toggle span::after { content: ''; position: absolute; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 20px var(--gutter) 26px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 16px; }
  .header-actions .btn { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(11,17,32,0.92) 0%, rgba(11,17,32,0.72) 45%, rgba(11,17,32,0.55) 100%),
    var(--navy-deep);
}
.hero-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 90px var(--gutter) 60px;
  width: 100%;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 800;
  max-width: 15ch;
  margin-bottom: 26px;
}
.hero h1 .accent-gold {
  background: linear-gradient(90deg, #F2C94C, #D9A62B);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .accent-teal {
  background: linear-gradient(90deg, #4FD1C5, #3B82F6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead { color: #C9CEDE; font-size: 1.12rem; max-width: 54ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 42px; }
.hero-trust {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--navy-deep);
  margin-left: -10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff;
}
.avatar-stack .avatar:first-child { margin-left: 0; }
.trust-item { display: flex; align-items: center; gap: 12px; color: #E5E8F2; font-size: 0.92rem; }
.trust-item strong { color: #fff; }
.trust-stars { color: var(--gold); letter-spacing: 2px; }

@media (max-width: 720px) {
  .hero { min-height: auto; }
  .hero-inner { padding: 56px var(--gutter) 48px; }
  .hero-trust { gap: 20px; }
}

/* ============================================================
   SECTION SPACING
   ============================================================ */
.section { padding: 96px var(--gutter); }
.section-paper { background: var(--paper); }
.section-dark { background: var(--navy-deep); color: #fff; }
.section-dark .section-intro p { color: var(--muted-on-dark); }
.section-dark h2 { color: #fff; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.about-visual { position: relative; }
.about-visual-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.35);
}
.about-visual-frame img, .about-visual-frame svg { width: 100%; height: auto; display: block; }
.badge-black-owned {
  position: absolute;
  top: -16px;
  left: 24px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 20px -8px rgba(18,34,75,0.5);
}
.badge-bbee {
  position: absolute;
  bottom: -28px;
  right: -20px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 40px -20px rgba(15,23,42,0.3);
  max-width: 250px;
}
.badge-bbee-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.badge-bbee-icon svg { width: 22px; height: 22px; stroke: #fff; }
.badge-bbee-text strong { display: block; font-size: 1.05rem; }
.badge-bbee-text span { color: var(--muted); font-size: 0.85rem; }

.about-copy h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.about-copy h2 .accent-navy { color: var(--navy); }
.about-copy > p { color: var(--muted); font-size: 1.05rem; max-width: 54ch; }
.about-point { display: flex; gap: 18px; margin-top: 26px; }
.about-point-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.about-point-icon.mission { background: rgba(18,34,75,0.08); }
.about-point-icon.mission svg { stroke: var(--navy); }
.about-point-icon.vision { background: rgba(217,166,43,0.14); }
.about-point-icon.vision svg { stroke: var(--gold-dark); }
.about-point-icon svg { width: 20px; height: 20px; }
.about-point h3 { font-size: 1.08rem; margin-bottom: 4px; }
.about-point p { color: var(--muted); margin: 0; font-size: 0.98rem; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { margin-bottom: 40px; }
  .badge-bbee { position: static; margin-top: 20px; max-width: none; }
  .badge-black-owned { top: 16px; left: 16px; }
}

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.service-card:hover { box-shadow: 0 20px 40px -24px rgba(15,23,42,0.25); transform: translateY(-3px); }
.service-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 26px; height: 26px; stroke: #fff; fill: none; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }

.icon-bg-1 { background: linear-gradient(135deg, #1E293B, #2563EB); }
.icon-bg-2 { background: linear-gradient(135deg, #6D28D9, #3B82F6); }
.icon-bg-3 { background: linear-gradient(135deg, #14B8A6, #0D9488); }
.icon-bg-4 { background: linear-gradient(135deg, #A855F7, #EC4899); }
.icon-bg-5 { background: linear-gradient(135deg, #D9A62B, #3B82F6); }
.icon-bg-6 { background: linear-gradient(135deg, #10B981, #059669); }
.icon-bg-7 { background: var(--navy); }

@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   WHY CHOOSE US
   ============================================================ */
.why-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 64px;
}
.why-card {
  background: #131C33;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.why-card h3 { color: #fff; font-size: 1.08rem; margin-bottom: 10px; }
.why-card p { color: var(--muted-on-dark); font-size: 0.95rem; margin: 0; }
.why-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.why-icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; }
.why-bg-1 { background: linear-gradient(135deg, #D9A62B, #9CA3AF); }
.why-bg-2 { background: linear-gradient(135deg, #2DD4BF, #3B82F6); }
.why-bg-3 { background: linear-gradient(135deg, #8B5CF6, #14B8A6); }
.why-bg-4 { background: linear-gradient(135deg, #7C3AED, #A855F7); }
.why-bg-5 { background: linear-gradient(135deg, #D9A62B, #92400E); }
.why-bg-6 { background: linear-gradient(135deg, #2563EB, #1D4ED8); }

.stats-row {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--line-dark);
}
.stat-figure { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.5rem); display: block; margin-bottom: 6px; }
.stat-figure.c-gold { color: var(--gold); }
.stat-figure.c-blue { color: #5B8DEF; }
.stat-figure.c-green { color: #34D399; }
.stat-figure.c-white { color: #fff; }
.stat-label { color: var(--muted-on-dark); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.client-row {
  max-width: var(--max-width);
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.client-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
}
.client-icon {
  width: 50px; height: 50px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.client-icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; }
.client-card strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.client-card span { color: var(--muted); font-size: 0.82rem; }

.client-bg-1 { background: #2563EB; }
.client-bg-2 { background: #16A34A; }
.client-bg-3 { background: #0F172A; }
.client-bg-4 { background: #7C3AED; }
.client-bg-5 { background: #16A34A; }

.case-study-row {
  max-width: var(--max-width);
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.case-study-card {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 26px;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.case-study-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,17,32,0.15), rgba(11,17,32,0.9));
}
.case-study-card > * { position: relative; z-index: 1; }
.case-study-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.case-study-card h3 { color: #fff; font-size: 1.25rem; margin-bottom: 6px; }
.case-study-card p { color: #D6DAEA; font-size: 0.92rem; margin: 0; max-width: 40ch; }

.tag-gold { background: var(--gold); color: var(--navy-deep); }
.tag-blue { background: #3B82F6; color: #fff; }

.case-bg-1 { background-color: #1A2233; background-image: linear-gradient(160deg, #1A2233, #0B1120 70%); }
.case-bg-2 { background-color: #0E2A4A; background-image: linear-gradient(160deg, #123055, #0B1120 70%); }

.portfolio-cta { text-align: center; }

@media (max-width: 900px) {
  .client-row { grid-template-columns: repeat(3, 1fr); }
  .case-study-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .client-row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   CONTACT PAGE (reused pattern)
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.contact-field { margin-bottom: 20px; }
.contact-field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; }
.contact-field input, .contact-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
}
.contact-field textarea { min-height: 140px; resize: vertical; }
.contact-details { background: var(--paper); border-radius: var(--radius); padding: 32px; }
.contact-details h3 { margin-top: 0; }
.contact-details .detail-row { padding: 16px 0; border-top: 1px solid var(--line); }
.contact-details .detail-row:first-of-type { border-top: none; }
.detail-label { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer { background: var(--navy-deep); color: var(--muted-on-dark); padding: 64px var(--gutter) 30px; }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .brand-text-title { color: #fff; }
.footer-brand p { color: var(--muted-on-dark); font-size: 0.92rem; margin-top: 14px; max-width: 30ch; }
.footer-col h4 { color: #fff; font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--muted-on-dark); font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.85rem;
}
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }


