/* ============================================
   Man Made Goal Solutions — Design Tokens
   ============================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #fbf1f4;
  --ink: #2b0f16;
  --ink-soft: #6b5158;
  --accent: #a3123f;
  --accent-tint: #f6dfe6;
  --gold: #d99a2b;
  --line: #ecdfe2;

  --font-display: "Manrope", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --max-w: 1120px;
  --pad: clamp(1.25rem, 4vw, 3rem);

  /* Spacing scale */
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 2rem;
  --sp-section: clamp(3rem, 7vw, 5.5rem);
  --sp-hero: clamp(3.5rem, 9vw, 7rem);
}

* { box-sizing: border-box; }

/* Use `clip` instead of `hidden` so position:sticky keeps working on the header */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ---------- Utility classes ---------- */
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title-sm { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.muted-accent { color: var(--gold); font-weight: 600; font-size: 0.85rem; }
.mt-lg { margin-top: var(--sp-lg); }
.text-center { text-align: center; }
.lede-wide { max-width: 56ch; }
.lede-strong { color: var(--ink); font-weight: 600; }
.stat-text { color: var(--ink); font-size: 1.15rem; font-weight: 500; }
.no-pad-top { padding-top: 0; }
.hero-single h1 { max-width: 30ch; }
.form-status { margin-top: var(--sp-md); font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;                       /* above sidebar (60) */
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
}
.logo-img { height: 46px; width: auto; flex: none; }

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
nav.primary-nav a:not(.nav-mobile-cta) {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
nav.primary-nav a:not(.nav-mobile-cta):hover,
nav.primary-nav a:not(.nav-mobile-cta)[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.35rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--gold); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-whatsapp { background: #25d366; color: #ffffff; }
.btn-whatsapp:hover { background: #1ebe5a; }
.btn-block { width: 100%; }

/* Hide the in-nav CTA everywhere by default.
   Uses .btn.nav-mobile-cta (two classes) so it always beats .btn
   regardless of source order. */
.btn.nav-mobile-cta { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Desktop-only header CTA */
.header-cta {
  color: #ffffff;
  font-size: 1.09rem;
  padding: 0.86rem 1.55rem;
}

/* ---------- Mobile: sidebar nav ---------- */
@media (max-width: 1023px) {

  /* Header row on mobile: hamburger first, then logo */
  .site-header .wrap {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .nav-toggle {
    display: block;
    order: -1;
    margin-left: -0.4rem;
    flex: none;
  }

  /* Hamburger → X animation 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);
  }

  /* Hide the desktop CTA on mobile */
  .header-cta { display: none; }

  /* Sidebar panel: full height, white, slides in from the LEFT */
  nav.primary-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 6rem var(--pad) var(--sp-lg);
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: 8px 0 24px rgba(43, 15, 22, 0.08);
    border-right: 1px solid var(--line);
    z-index: 60;
  }

  nav.primary-nav.open { transform: translateX(0); }

  /* Nav links — exclude the CTA */
  nav.primary-nav a:not(.nav-mobile-cta) {
    font-size: 1.25rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
    width: 100%;
    color: var(--ink-soft);
  }

  /* Show the CTA inside the sidebar (overrides the base display:none) */
  .btn.nav-mobile-cta {
    display: inline-flex;
    align-self: flex-start;
    margin-top: var(--sp-lg);
    width: auto;
  }

  /* Lock body scroll while sidebar is open */
  body.nav-open { overflow: hidden; }

  /* Dim the page behind the sidebar */
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(43, 15, 22, 0.35);
    z-index: 55;
  }
}

/* Tighten the logo on very small phones */
@media (max-width: 420px) {
  .logo { font-size: 0.95rem; }
  .logo-img { height: 38px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--sp-hero) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero.hero-single .wrap { grid-template-columns: 1fr; }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  max-width: 21ch;
}
.brand-highlight {
  font-weight: 800;
  color: var(--accent);
}
.hero .lede {
  font-size: 1.1rem;
  max-width: 55ch;
  margin-top: 1rem;
}
.hero-actions {
  margin-top: var(--sp-lg);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
@media (max-width: 1023px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Sections ---------- */
section { padding: var(--sp-section) 0; }
.section-alt { background: var(--bg-alt); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-lg);
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--sp-md);
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.section-head p { margin: 0; }
@media (max-width: 700px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* Divider list (used for detailed service listings) */
.divider-list { border-top: 1px solid var(--line); }
.divider-item {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: var(--sp-lg);
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.divider-item h3 { font-size: 1.2rem; margin: 0; }
.divider-item p { margin: 0; }
@media (max-width: 700px) {
  .divider-item { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* Two column feature */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 1023px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-lg); }
}

/* Card grid (values, audience, feature cards) — 3 desktop / 2 tablet / 1 mobile */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
}
.card-grid h3 { font-size: 1.08rem; }
@media (max-width: 1023px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Card grid variant with 4 columns (Why MMG) */
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .card-grid-4 { grid-template-columns: 1fr; }
}

/* Quote / callout */
.callout {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.75rem;
  margin: 0;
}
.callout p {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  max-width: 32ch;
}
.callout cite { font-style: normal; font-size: 0.9rem; color: var(--ink-soft); }

/* CTA band */
.cta-band { background: var(--accent); color: #fff; }
.cta-band .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 56ch; margin: 0; }
.cta-band .btn-primary { background: var(--gold); color: var(--ink); margin-top: 0.5rem; }
.cta-band .btn-primary:hover { background: #fff; color: var(--ink); }

/* Brand statement (large typography, no imagery) */
.brand-statement { text-align: center; }
.brand-statement .stack {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  line-height: 1.05;
  color: var(--ink);
  margin: 0 auto var(--sp-lg);
  max-width: none;
}
.brand-statement .stack span { display: block; }
.brand-statement .stack span:nth-child(2) { color: var(--accent); }
.brand-statement .stack span:nth-child(3) { color: var(--gold); }
.brand-statement p { margin: 0 auto; max-width: 52ch; }

/* Timeline (unused currently, kept for future use) */
.timeline { border-top: 1px solid var(--line); }
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--sp-lg);
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item .year { font-family: var(--font-display); font-weight: 600; color: var(--accent); }
@media (max-width: 600px) {
  .timeline-item { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}
@media (max-width: 1023px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.field { margin-bottom: 1.3rem; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-alt);
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.contact-info dt { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1.4rem; }
.contact-info dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  word-break: break-word;
}

/* Pillars: Build / Manage / Grow (homepage overview — light, no boxed border) */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.pillar { padding-top: 0.2rem; }
.pillar .section-label { margin-bottom: 0.8rem; }
.pillar h3 { font-size: 1.15rem; margin-bottom: 1.1rem; }
.pillar ul {
  list-style: none;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}
.pillar li { font-size: 0.92rem; color: var(--ink-soft); padding: 0.4rem 0; }
@media (max-width: 1023px) {
  .pillars { grid-template-columns: 1fr; gap: var(--sp-lg); }
}

/* Numbered compact service cards (3x3 / 2x / 1x grid) */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.service-card {
  background: var(--bg);
  padding: 2rem 1.7rem;
  display: block;
  min-height: 180px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.service-card:hover { background: var(--bg-alt); transform: translateY(-2px); }
.service-card .num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}
.service-card h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.9rem; margin-bottom: 1rem; }
.service-card .learn-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s ease;
}
.service-card:hover .learn-more { gap: 0.55rem; }
@media (max-width: 1023px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* Category detail blocks (BUILD / MANAGE / GROW on Services — heading-led, no colour panels) */
.category-block { padding: var(--sp-lg) 0; border-top: 1px solid var(--line); }
.category-block:first-of-type { border-top: none; padding-top: 0; }
.category-block-head { margin-bottom: 1.5rem; }
.category-block-head h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 0.3rem; }
.category-list {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 3rem;
}
.category-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
@media (max-width: 780px) {
  .category-list { grid-template-columns: 1fr; }
}
.category-item:last-child { border-bottom: none; }
.category-item .cs-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
  margin-right: 0.4rem;
}
.category-item h4 { font-size: 1.08rem; margin-bottom: 0.3rem; display: inline; }
.category-item .cs-lead { color: var(--ink); font-weight: 500; margin: 0.4rem 0 0.4rem; }
.category-item .cs-tags { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }

/* How we work — connected stepper */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}
.stepper::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--line);
}
.step { position: relative; padding-top: 3.2rem; }
.step .step-num {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  z-index: 1;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.step p { font-size: 0.9rem; }
@media (max-width: 1023px) {
  .stepper { grid-template-columns: 1fr; gap: 2rem; }
  .stepper::before { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; }
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-md);
}
.site-footer p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
@media (max-width: 600px) {
  .site-footer .wrap { flex-direction: column; text-align: center; gap: 1rem; }
}