/* ============================================================
   BRAND AFRIKA CONSULTING — Core Stylesheet
   ============================================================ */

:root {
  /* Palette */
  --charcoal: #181613;
  --charcoal-2: #211e1a;
  --gold: #c89b3c;
  --gold-soft: #d9b463;
  --sand: #f5f1e8;
  --sand-2: #efe9db;
  --forest: #254d32;
  --forest-soft: #35694a;
  --terracotta: #b05b3b;
  --orange: #d46a29;
  --white: #ffffff;

  /* Semantic (light default) */
  --bg: var(--sand);
  --bg-alt: var(--sand-2);
  --surface: #ffffff;
  --ink: #201d18;
  --ink-soft: #5c554a;
  --line: rgba(24, 22, 19, 0.12);
  --accent: var(--gold);
  --accent-2: var(--terracotta);

  /* Type */
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --util: "Space Grotesk", monospace;

  /* Rhythm */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: var(--charcoal);
  --bg-alt: var(--charcoal-2);
  --surface: #24211c;
  --ink: #f3eee2;
  --ink-soft: #b3aa98;
  --line: rgba(245, 241, 232, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--charcoal); }

/* ---------- Type scale ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.04; letter-spacing: -0.01em; }
.display { font-size: clamp(2.8rem, 8vw, 6.5rem); font-weight: 300; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.serif-italic { font-style: italic; font-optical-sizing: auto; }

.eyebrow {
  font-family: var(--util);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

p { color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 11vw, 9rem); }
.section-sm { padding-block: clamp(3rem, 7vw, 5rem); }
.bg-alt { background: var(--bg-alt); }
.bg-ink { background: var(--charcoal); color: var(--sand); }
.bg-ink p { color: rgba(245,241,232,0.7); }
.bg-forest { background: var(--forest); color: var(--sand); }
.bg-forest p { color: rgba(245,241,232,0.72); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--util); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.95em 1.7em; border-radius: 100px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  position: relative; overflow: hidden;
}
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--gold); color: var(--charcoal); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(200,155,60,0.55); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.bg-ink .btn-ghost, .bg-forest .btn-ghost { border-color: rgba(245,241,232,0.3); color: var(--sand); }
.bg-ink .btn-ghost:hover, .bg-forest .btn-ghost:hover { background: var(--sand); color: var(--charcoal); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding-block: 0.75rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--display); font-size: 1.28rem; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-family: var(--util); font-size: 0.52rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a { font-size: 0.9rem; position: relative; font-weight: 450; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1.5px; background: var(--accent); transition: width 0.35s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* dropdown */
.has-drop { position: relative; }
.drop {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 0.6rem; min-width: 230px; opacity: 0; visibility: hidden;
  transition: all 0.3s var(--ease); box-shadow: 0 24px 50px -20px rgba(0,0,0,0.3);
  display: grid; gap: 2px;
}
.has-drop:hover .drop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.drop a { padding: 0.6rem 0.85rem; border-radius: 9px; font-size: 0.86rem; transition: background 0.25s, color 0.25s; }
.drop a::after { display: none; }
.drop a:hover { background: var(--bg-alt); color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 0.9rem; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; display: grid; place-items: center;
  color: var(--ink); transition: transform 0.5s var(--ease), border-color 0.3s;
}
.theme-toggle:hover { transform: rotate(40deg); border-color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--ink); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  transform: translateX(100%); transition: transform 0.5s var(--ease);
  display: flex; flex-direction: column; justify-content: center; gap: 0.5rem;
  padding: var(--gutter); overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { font-family: var(--display); font-size: 1.8rem; padding-block: 0.35rem; }
.mobile-menu .sub { font-family: var(--body); font-size: 1rem; padding-left: 1rem; color: var(--ink-soft); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ---------- Footer ---------- */
.footer { background: var(--charcoal); color: var(--sand); padding-block: clamp(3.5rem,8vw,5.5rem) 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer h4 { font-family: var(--util); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; font-weight: 500; }
.footer-links { display: grid; gap: 0.6rem; }
.footer-links a { color: rgba(245,241,232,0.62); font-size: 0.9rem; transition: color 0.3s, padding-left 0.3s; }
.footer-links a:hover { color: var(--sand); padding-left: 5px; }
.footer-brand p { color: rgba(245,241,232,0.6); max-width: 32ch; margin-top: 1.1rem; font-size: 0.94rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 3.5rem; padding-top: 1.8rem; border-top: 1px solid rgba(245,241,232,0.12); font-size: 0.82rem; color: rgba(245,241,232,0.5); font-family: var(--util); }
.footer-tag { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--sand); margin-top: 0.6rem; }

/* ---------- Custom cursor glow ---------- */
.cursor-glow {
  position: fixed; width: 380px; height: 380px; border-radius: 50%; pointer-events: none;
  z-index: 1; transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(200,155,60,0.16), transparent 62%);
  transition: opacity 0.4s; mix-blend-mode: normal;
}

/* ---------- Utility ---------- */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }
.lead { font-size: clamp(1.1rem,1.7vw,1.35rem); color: var(--ink-soft); line-height: 1.55; max-width: 60ch; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.max-60 { max-width: 60ch; }
.mt-1{margin-top:0.6rem}.mt-2{margin-top:1.2rem}.mt-3{margin-top:2rem}.mt-4{margin-top:3rem}
.mb-2{margin-bottom:1.2rem}.mb-3{margin-bottom:2rem}.mb-4{margin-bottom:3rem}

/* woven divider */
.weave-line { height: 2px; width: 100%; background-image: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 22px); opacity: 0.5; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .g-4 { grid-template-columns: repeat(2,1fr); }
  .g-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 620px) {
  .g-2, .g-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   IMAGE SUPPORT (added with photo integration)
   ============================================================ */
.img-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.ratio { position: relative; overflow: hidden; border-radius: var(--radius); }
.ratio > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4/5; }
.ratio-1610 { aspect-ratio: 16/10; }
.ratio-43 { aspect-ratio: 4/3; }
.ratio-11 { aspect-ratio: 1/1; }
.ratio-169 { aspect-ratio: 16/9; }

/* zoom-on-hover wrapper */
.img-zoom > img { transition: transform 0.8s var(--ease); }
.img-zoom:hover > img { transform: scale(1.05); }

/* hero photo treatment */
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 42%, color-mix(in srgb, var(--bg) 30%, transparent) 100%); }
[data-theme="dark"] .hero-photo::after {
  background: linear-gradient(100deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 45%, color-mix(in srgb, var(--bg) 45%, transparent) 100%); }

/* photo tint for brand consistency on portfolio/case tiles */
.tint-forest::after { content:""; position:absolute; inset:0; background: linear-gradient(0deg, rgba(37,77,50,0.55), rgba(37,77,50,0.05) 55%); }
.tint-charcoal::after { content:""; position:absolute; inset:0; background: linear-gradient(0deg, rgba(24,22,19,0.82) 0%, rgba(24,22,19,0.15) 55%, transparent 80%); }

/* split image blocks */
.split-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; }
.split-img img { width:100%; height:100%; object-fit: cover; display:block; }
.split-img.landscape { aspect-ratio: 4/3; }

/* who-we-are photo cards */
.who-photo { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; }
.who-photo img { width:100%; height:100%; object-fit:cover; display:block; transition: transform 0.8s var(--ease); }
.who-photo:hover img { transform: scale(1.06); }
.who-photo .who-tag { position:absolute; left:0; bottom:0; right:0; z-index:2; padding: 1.4rem 1.5rem 1.3rem;
  background: linear-gradient(0deg, rgba(24,22,19,0.85), transparent); color: var(--sand);
  font-family: var(--display); font-size: 1.4rem; }
.who-photo .who-tag small { display:block; font-family:var(--util); font-size:0.68rem; letter-spacing:0.18em; text-transform:uppercase; color:var(--gold-soft); margin-bottom:0.3rem; }
