/* ================================================================
   MASIKHWA KHULISO ATTORNEYS INC – Modernised Styles
   ================================================================ */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --navy:        #0A1628;
  --navy-mid:    #112040;
  --red:         #C62828;
  --red-dark:    #B71C1C;
  --red-light:   rgba(198, 40, 40, 0.12);
  --gold:        #C9993A;
  --ink:         #0D1117;
  --slate:       #4A5568;
  --light-slate: #718096;
  --bg:          #FFFFFF;
  --alt:         #F7F8FC;
  --border:      #E2E8F0;
  --radius:      12px;
  --radius-lg:   18px;
  --shadow:      0 2px 8px rgba(10,22,40,.07);
  --shadow-md:   0 4px 20px rgba(10,22,40,.10);
  --shadow-lg:   0 12px 40px rgba(10,22,40,.13);
  --header-h:    76px;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Scroll offset ───────────────────────────────────────────────── */
.section, [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ── Reset / Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.7 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

/* ── Container ──────────────────────────────────────────────────── */
.container { width: min(1140px, 92%); margin: auto; }

/* ================================================================
   SCROLL REVEAL ANIMATIONS
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s cubic-bezier(.4,0,.2,1), transform .65s cubic-bezier(.4,0,.2,1);
}
.reveal.reveal-delay  { transition-delay: .15s; }
.reveal.reveal-delay2 { transition-delay: .30s; }
.reveal.is-visible    { opacity: 1; transform: none; }

/* ================================================================
   HEADER / NAV
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 0.82rem;
  color: var(--ink);
}
.brand-text strong {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--navy);
  letter-spacing: 0.04em;
}
.brand-text span {
  color: var(--light-slate);
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

/* Primary nav */
.primary-nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin: 0; padding: 0;
  list-style: none;
}
.primary-nav a {
  position: relative;
  padding: 0.35rem 0;
  color: var(--slate);
  font-size: 0.93rem;
  font-weight: 500;
  transition: color .2s;
}
.primary-nav a:hover { color: var(--red); }
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
  border-radius: 2px;
}
.primary-nav a:hover::after { transform: scaleX(1); }

/* Nav CTA button */
.primary-nav .nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 2px 10px rgba(198,40,40,.25);
}
.primary-nav .nav-cta:hover {
  background: var(--red-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(198,40,40,.3);
}
.primary-nav .nav-cta::after { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 7px;
  transition: border-color .2s;
}
.nav-toggle:hover { border-color: var(--red); }
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all .3s ease;
}
/* Animate to X when open */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.93rem;
  border: 2px solid transparent;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all .22s ease;
  white-space: nowrap;
  text-align: center;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(198,40,40,.28);
}
.btn-primary:hover { background: var(--red-dark); color: #fff; box-shadow: 0 6px 24px rgba(198,40,40,.36); }

.btn-outline {
  border-color: var(--red);
  color: var(--red);
  background: transparent;
}
.btn-outline:hover { background: var(--red-light); border-color: var(--red-dark); }

/* Light outline for dark hero */
.btn-outline-light {
  border: 2px solid rgba(255,255,255,.5);
  color: #fff;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(4px);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.8);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--red);
  border-color: transparent;
  padding: 0.55rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.btn-ghost:hover { transform: translateX(4px); color: var(--red-dark); }

.btn-sm { padding: 0.55rem 1rem; font-size: 0.88rem; border-radius: 8px; }

/* ================================================================
   HERO – DARK
   ================================================================ */
.hero {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  padding: 5.5rem 0 5rem;
}

/* Decorative gradient blobs */
.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198,40,40,.18) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17,32,64,.9) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4rem;
}

/* Eyebrow label */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 3vw + 0.8rem, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero .tag {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  margin: 0 0 2rem;
  max-width: 480px;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* Trust stats */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.trust-item { display: flex; flex-direction: column; }
.trust-item strong {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  font-family: var(--font-serif);
}
.trust-item span {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}
.trust-divider {
  width: 1px; height: 40px;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}

/* Hero art / image badge */
.hero-art--badge {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-art--badge .badge {
  position: relative;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  width: 100%; max-width: 500px;
}

/* Subtle glow ring behind badge */
.hero-art--badge::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 28px;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(198,40,40,.2), transparent 70%);
  z-index: -1;
}

/* Slider */
.badge-slider {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  border-radius: 14px;
}
.badge-slider .slide {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.badge-slider .slide.is-active { opacity: 1; transform: scale(1); }
.badge-slider img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

/* Dots */
.badge-dots {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1rem;
}
.badge-dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all .3s ease;
}
.badge-dots .dot:hover { background: rgba(255,255,255,.5); }
.badge-dots .dot.is-active {
  background: var(--gold);
  width: 26px;
  border-radius: 5px;
}

/* ================================================================
   SECTION SHARED STYLES
   ================================================================ */
.section { padding: 5.5rem 0; }
.section.alt {
  background: linear-gradient(180deg, rgba(198,40,40,.04) 0%, var(--alt) 40%, #fff 100%);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 2vw + 0.6rem, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  line-height: 1.15;
}

/* Red underline on section h2s */
.section-header h2::after,
.about-content h2::after,
.contact-section h2::after {
  content: "";
  display: block;
  width: 52px; height: 3px;
  background: linear-gradient(90deg, var(--red), rgba(198,40,40,.4));
  border-radius: 3px;
  margin: 0.9rem auto 0;
}
.about-content h2::after { margin-left: 0; }

.section-sub {
  color: var(--light-slate);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}

/* ================================================================
   GRID / LAYOUT
   ================================================================ */
.grid { display: grid; gap: 1.5rem; }
.services-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s, border-color .3s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(198,40,40,.25);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(198,40,40,.06);
}

/* Icon */
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
  transition: background .2s;
}
.card-icon svg {
  width: 22px; height: 22px;
  color: var(--red);
  stroke: var(--red);
}
.card:hover .card-icon { background: rgba(198,40,40,.18); }

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.card p {
  margin: 0 0 1rem;
  color: var(--slate);
  font-size: 0.93rem;
  line-height: 1.65;
  flex-grow: 1;
}
.card .btn { margin-top: auto; }

/* ================================================================
   ABOUT SECTION
   ================================================================ */
.about-section { background: var(--alt); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-content p { color: var(--slate); margin: 0 0 1rem; line-height: 1.75; }
.about-lead { font-size: 1.08rem; font-weight: 500; color: var(--navy) !important; }

.list-check {
  list-style: none;
  padding: 0; margin: 1.2rem 0 2rem;
}
.list-check li {
  position: relative;
  padding-left: 1.8rem;
  margin: 0.65rem 0;
  color: var(--slate);
  font-size: 0.93rem;
}
.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

.about-cards { display: flex; flex-direction: column; gap: 1.25rem; }

.about-feature-card.card { border-left: 3px solid var(--red); }
.about-feature-card h3 { color: var(--navy); font-size: 1rem; margin-bottom: 0.5rem; }
.about-feature-card p { color: var(--slate); font-size: 0.92rem; margin-bottom: 0; }

/* ================================================================
   CONTACT SECTION
   ================================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: none; }

.contact-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg {
  width: 18px; height: 18px;
  color: var(--red);
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.2rem;
}
.contact-detail strong {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}
.contact-detail a,
.contact-detail span {
  font-size: 0.93rem;
  color: var(--slate);
  line-height: 1.5;
}
.contact-detail a:hover { color: var(--red); }

/* CTA card */
.cta-card.card {
  background: var(--navy);
  border-color: rgba(255,255,255,.06);
  padding: 2.25rem;
}
.cta-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.7rem;
}
.cta-card p { color: rgba(255,255,255,.65); margin-bottom: 1.75rem; }
.cta-card .btn-outline {
  border-color: rgba(255,255,255,.35);
  color: #fff;
}
.cta-card .btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
}
.cta-card:hover { transform: none; border-color: rgba(255,255,255,.1); }

.contact-actions { display: flex; flex-direction: column; gap: 0.9rem; }
.contact-actions .btn { justify-content: center; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--navy);
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,.05);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}

.footer-brand-block .brand-text strong { color: #fff; }
.footer-brand-block .brand-text span { color: rgba(255,255,255,.4); }
.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  font-size: 0.9rem;
  margin: 0.6rem 0 0;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 0.3rem;
}
.footer-nav a {
  color: rgba(255,255,255,.55);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .2s;
}
.footer-nav a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
}
.footer-bottom p {
  margin: 0;
  color: rgba(255,255,255,.35);
  font-size: 0.85rem;
}
.footer-powered {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,.35);
  font-size: 0.82rem;
}
.footer-powered a { display: flex; align-items: center; }
.brand-icon { width: 52px; height: 52px; object-fit: contain; }

/* ================================================================
   BACK TO TOP
   ================================================================ */
.to-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 46px; height: 46px;
  border-radius: 12px;
  border: none;
  background: var(--red);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(198,40,40,.4);
  cursor: pointer;
  transition: all .25s ease;
  z-index: 100;
}
.to-top svg { width: 18px; height: 18px; }
.to-top.show { display: flex; }
.to-top:hover { transform: translateY(-3px); background: var(--red-dark); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .badge-slider { height: 300px; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: calc(var(--header-h) + 8px);
    left: 0; right: 0;
    width: 94%; margin: 0 auto;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
    z-index: 100;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
  }
  .primary-nav a:hover { background: var(--alt); }
  .primary-nav .nav-cta {
    margin-top: 0.5rem;
    text-align: center;
    width: 100%;
  }
  .hero { padding: 4rem 0 3.5rem; }
  .hero h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
  .hero-trust { gap: 1rem; }
  .trust-item strong { font-size: 1.3rem; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .section { padding: 4rem 0; }
  .services-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  html, body { font-size: 15px; }
  .container { width: 94%; }
  .hero { padding: 3rem 0 3rem; }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .hero .tag { font-size: 0.95rem; }
  .hero-trust { flex-wrap: wrap; gap: 1rem 1.5rem; }
  .trust-divider { display: none; }
  .badge-slider { height: 260px; }
  .section { padding: 3rem 0; }
  h2 { font-size: 1.7rem; }
  .services-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .card { padding: 1.4rem; }
  .footer-top { flex-direction: column; gap: 1.5rem; }
  .footer-nav { gap: 1.2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .to-top { right: 1rem; bottom: 1rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(1.6rem, 5vw, 2rem); }
  .badge-slider { height: 230px; }
  h2 { font-size: 1.55rem; }
  .cta-card.card { padding: 1.75rem; }
}
