/* ==========================================================================
   CAMNEST-UK — Cameroon-UK Diaspora Network of Engineering, Science & Technology
   ========================================================================== */

:root {
  --green: #1E7A46;
  --green-dark: #14572F;
  --green-tint: #E6F2EB;
  --yellow: #F5C518;
  --yellow-soft: #FDF3CE;
  --red: #A63E28;
  --red-tint: #F7E8E3;
  --ink: #1C2420;
  --slate: #4A5750;
  --mist: #8A968F;
  --line: #E2E7E3;
  --paper: #FFFFFF;
  --cloud: #F5F7F5;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(20, 44, 30, 0.10);
  --shadow-sm: 0 2px 10px rgba(20, 44, 30, 0.07);
  --font: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Red Hat Display", "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; font-weight: 800; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; }
p  { margin-bottom: 1rem; color: var(--slate); }
ul, ol { margin: 0 0 1rem 1.35rem; color: var(--slate); }
li { margin-bottom: 0.45rem; }
strong { color: var(--ink); }

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-tint);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 12px; font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  padding: 12px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-align: center;
}
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
/* Default / secondary solid: green with white text (AA) */
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
/* Main CTA ("Become a member"): yellow with near-black text (AA) */
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #DFAF07; color: var(--ink); }
.btn-yellow:focus-visible { outline-color: var(--green-dark); }
/* Secondary outlined variant on light backgrounds */
.btn-outline { border-color: var(--green); color: var(--green-dark); background: transparent; }
.btn-outline:hover { background: var(--green-tint); color: var(--green-dark); }
/* Secondary outlined variant on dark green backgrounds */
.btn-light { border-color: rgba(255, 255, 255, 0.85); color: #fff; background: transparent; }
.btn-light:hover { background: #fff; border-color: #fff; color: var(--green-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.brand-text { line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.01em; }
.brand-tag { font-size: 0.68rem; font-weight: 600; color: var(--mist); text-transform: uppercase; letter-spacing: 0.08em; }

.main-nav ul { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; }
.main-nav li { margin: 0; }
.main-nav a {
  display: block;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--slate);
  padding: 9px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--green-tint); color: var(--green-dark); }
.main-nav a.active { background: var(--green); color: #fff; }
.main-nav .nav-cta a { background: var(--yellow); color: var(--ink); font-weight: 700; }
.main-nav .nav-cta a:hover { background: #E4B404; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

/* ---------- Hero ---------- */
.hero {
  background: var(--green-dark);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 88px 0;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero p { color: rgba(255, 255, 255, 0.9); font-size: 1.16rem; max-width: 34em; }
.hero .kicker { background: rgba(255, 255, 255, 0.14); color: var(--yellow); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-photo { position: relative; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border-bottom: 6px solid var(--yellow);
}

/* Tricolour brand strip: three solid segments, no gradients */
.hero-strip { position: relative; height: 6px; background: var(--red); }
.hero-strip::before,
.hero-strip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 33.34%;
}
.hero-strip::before { left: 0; background: var(--green); }
.hero-strip::after { right: 0; background: var(--yellow); }

/* Page hero (interior) */
.page-hero {
  background: var(--green-dark);
  color: #fff;
  padding: 64px 0 56px;
}
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: rgba(255, 255, 255, 0.88); max-width: 44em; font-size: 1.12rem; margin-bottom: 0; }
.page-hero .kicker { background: rgba(255, 255, 255, 0.14); color: var(--yellow); }

.breadcrumbs { font-size: 0.88rem; margin-bottom: 18px; color: rgba(255,255,255,0.75); }
.breadcrumbs a { color: rgba(255,255,255,0.9); font-weight: 600; }
.breadcrumbs a:hover { color: var(--yellow); }
.breadcrumbs span[aria-hidden] { margin: 0 6px; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--cloud); }
.section-green { background: var(--green-dark); color: #fff; }
.section-green h2, .section-green h3 { color: #fff; }
.section-green p { color: rgba(255,255,255,0.85); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { flex-grow: 1; }
.card .card-link { font-weight: 700; }
.card .card-link::after { content: " \2192"; }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 32px; height: 32px; }
.card:nth-child(3n+2) .card-icon { background: var(--yellow-soft); }
.card:nth-child(3n) .card-icon { background: var(--red-tint); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 30px 18px;
}
.stat-number { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--yellow); line-height: 1.1; }
.stat-label { font-size: 0.95rem; color: rgba(255, 255, 255, 0.85); margin-top: 6px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 70px; margin-bottom: 30px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { margin-bottom: 6px; }
.step p { margin-bottom: 0; }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-art img { width: 100%; }
.split-art img.photo { aspect-ratio: 8 / 5; object-fit: cover; }

/* ---------- Photography ---------- */
.service-photo {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border-bottom: 6px solid var(--yellow);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Checklist ---------- */
.checklist { list-style: none; margin-left: 0; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4L19 7"/></svg>') center / 12px no-repeat;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--green-dark);
  border-top: 6px solid var(--yellow);
  border-radius: var(--radius);
  padding: 56px 48px;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(245, 197, 24, 0.14);
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.86); margin-bottom: 0; max-width: 34em; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------- Membership tiers ---------- */
.tier { position: relative; }
.tier .tier-price { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--green-dark); margin: 6px 0 2px; }
.tier .tier-per { color: var(--mist); font-size: 0.9rem; margin-bottom: 18px; }
.tier.featured { border: 2px solid var(--yellow); box-shadow: var(--shadow); }
.tier .tier-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.tier .btn { margin-top: 18px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 40px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.93rem; }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 122, 70, 0.15);
}
.form-note { font-size: 0.88rem; color: var(--mist); margin-top: 14px; margin-bottom: 0; }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-card .avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
}
.avatar-green { background: var(--green); }
.avatar-yellow { background: #C79A00; }
.avatar-red { background: var(--red); }
.team-role { color: var(--green); font-weight: 700; font-size: 0.92rem; margin-bottom: 10px; }
.team-card p:last-child { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Blog index ---------- */
.post-card { padding: 0; overflow: hidden; }
.post-card .post-thumb { display: block; border-bottom: 1px solid var(--line); }
.post-card .post-thumb img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
.post-card .post-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex-grow: 1; }
.post-meta { font-size: 0.85rem; color: var(--mist); font-weight: 600; margin-bottom: 10px; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--green); }

/* ---------- Article (3-column blog post) ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
  padding: 64px 0 84px;
}
.article-toc,
.article-aside { position: sticky; top: 100px; }

.article-toc {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.article-toc h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  margin-bottom: 14px;
}
.article-toc ol { list-style: none; margin: 0; }
.article-toc li { margin-bottom: 4px; }
.article-toc a {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate);
  padding: 7px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all 0.15s ease;
}
.article-toc a:hover { color: var(--green-dark); background: var(--green-tint); }
.article-toc a.active {
  color: var(--green-dark);
  border-left-color: var(--yellow);
  background: var(--green-tint);
}

.article-body .post-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 26px 0 34px;
  box-shadow: var(--shadow-sm);
  border-bottom: 6px solid var(--yellow);
}
.article-body .post-hero-img img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.article-body h2 { margin: 44px 0 16px; scroll-margin-top: 100px; }
.article-body h3 { margin: 28px 0 10px; }
.article-body blockquote {
  border-left: 4px solid var(--yellow);
  background: var(--yellow-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px;
  margin: 26px 0;
  font-style: italic;
  color: var(--ink);
}

.aside-cta {
  background: var(--green-dark);
  border-top: 6px solid var(--yellow);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
}
.aside-cta h3 { color: #fff; margin-bottom: 10px; }
.aside-cta p { color: rgba(255, 255, 255, 0.87); font-size: 0.97rem; }
.aside-cta .btn { width: 100%; margin-top: 6px; }
.aside-links { margin-top: 22px; background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.aside-links h3 { font-size: 1rem; margin-bottom: 12px; }
.aside-links ul { list-style: none; margin: 0; }
.aside-links li { margin-bottom: 10px; font-size: 0.94rem; }
.aside-links li:last-child { margin-bottom: 0; }
.aside-links a { font-weight: 600; }

/* ---------- Prose pages (legal, service detail) ---------- */
.prose { max-width: 780px; }
.prose h2 { margin: 40px 0 14px; }
.prose h3 { margin: 26px 0 10px; }

.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
  padding: 64px 0 84px;
}
.service-aside { position: sticky; top: 100px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-info-card {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.contact-info-card h3 { margin-bottom: 6px; margin-top: 22px; font-size: 1.05rem; }
.contact-info-card h3:first-of-type { margin-top: 0; }
.contact-info-card p { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #142A1D; color: rgba(255, 255, 255, 0.78); margin-top: 0; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 48px;
}
.footer-top h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-top ul { list-style: none; margin: 0; }
.footer-top li { margin-bottom: 9px; }
.footer-top a { color: rgba(255, 255, 255, 0.78); font-size: 0.96rem; }
.footer-top a:hover { color: var(--yellow); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 42px; height: 42px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: rgba(255, 255, 255, 0.55); }
.footer-desc { font-size: 0.95rem; color: rgba(255, 255, 255, 0.68); max-width: 30em; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom a { color: rgba(255, 255, 255, 0.72); }
.footer-bottom a:hover { color: var(--yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .article-toc { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    padding: 12px 24px 20px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { border-radius: var(--radius-sm); padding: 12px 14px; min-height: 44px; display: flex; align-items: center; }
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 64px; gap: 36px; }
  .hero-photo img { aspect-ratio: 3 / 2; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; gap: 36px; }
  .article-toc { display: block; position: static; }
  .article-aside { position: static; order: 3; }
  .btn { width: 100%; max-width: 420px; }
  .hero-actions .btn, .cta-band .btn { width: auto; }
  .service-layout { grid-template-columns: 1fr; }
  .service-aside { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .cta-band { padding: 40px 28px; }
}

@media (max-width: 540px) {
  .grid-4, .stats { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
}
