/* Crescita Consult Uganda — shared styles */

:root {
  --navy-900: #071a3a;
  --navy-800: #0b2554;
  --navy-700: #12336f;
  --navy-600: #1c4590;
  --gold-500: #d6a62a;
  --gold-400: #e6bd4f;
  --gold-100: #fbf3dc;
  --ink: #14213d;
  --body: #3d4a63;
  --muted: #6b7690;
  --line: #e3e7ef;
  --paper: #ffffff;
  --mist: #f4f6fa;

  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(7, 26, 58, 0.25);
  --shadow-lg: 0 24px 60px -20px rgba(7, 26, 58, 0.35);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 84px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy-900); color: #c9d3e6; }
.section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-500);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow::after { content: ""; width: 28px; height: 2px; background: currentColor; }
.lead { font-size: 1.18rem; color: var(--body); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn--gold { background: var(--gold-500); color: var(--navy-900); }
.btn--gold:hover { background: var(--gold-400); color: var(--navy-900); }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn--outline { border-color: var(--navy-800); color: var(--navy-800); }
.btn--outline:hover { background: var(--navy-800); color: #fff; }

/* Header */
.topbar { background: var(--navy-900); color: #b8c4dc; font-size: 0.88rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #e3e9f5; text-decoration: none; }
.topbar a:hover { color: var(--gold-400); }
.topbar__group { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; }
.topbar svg { width: 15px; height: 15px; color: var(--gold-500); flex: none; }

.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(7, 26, 58, 0.35); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-weight: 800; font-size: 1.32rem; color: var(--navy-800); letter-spacing: 0.02em; }
.brand__sub { font-family: var(--font-head); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; color: var(--gold-500); text-transform: uppercase; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block; padding: 10px 14px; font-family: var(--font-head); font-weight: 500; font-size: 0.95rem;
  color: var(--ink); text-decoration: none; border-radius: var(--radius-sm); position: relative;
}
.nav__link:hover { color: var(--navy-600); }
.nav__link[aria-current="page"] { color: var(--navy-700); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--gold-500);
}
.nav__cta { margin-left: 12px; padding: 11px 20px; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-sm); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--navy-800); position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero (home) */
.hero {
  position: relative; color: #fff; min-height: min(88vh, 760px); display: flex; align-items: center;
  background: var(--navy-900); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(7, 26, 58, 0.94) 0%, rgba(7, 26, 58, 0.82) 45%, rgba(7, 26, 58, 0.35) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 96px; }
.hero__content { max-width: 680px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero p { font-size: 1.2rem; color: #d3dcee; max-width: 580px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 44px; font-size: 0.95rem; color: #b8c4dc; }
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 18px; height: 18px; color: var(--gold-500); }

/* Page hero (inner pages) */
.page-hero { position: relative; color: #fff; background: var(--navy-900); overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.32; }
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 26, 58, 0.95) 0%, rgba(7, 26, 58, 0.6) 100%);
}
.page-hero .wrap { position: relative; z-index: 1; padding-top: clamp(64px, 9vw, 110px); padding-bottom: clamp(56px, 8vw, 96px); }
.page-hero h1 { color: #fff; max-width: 760px; }
.page-hero p { color: #d3dcee; font-size: 1.15rem; max-width: 640px; margin-bottom: 0; }
.breadcrumb { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: 0.9rem; color: #9fb0cf; }
.breadcrumb a { color: #d3dcee; text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-400); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #6f82a8; }

/* Value strip */
.values-strip { position: relative; z-index: 3; margin-top: -56px; }
.values-strip__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.value { padding: 28px 26px; border-right: 1px solid var(--line); }
.value:last-child { border-right: 0; }
.value h3 { font-size: 1.02rem; margin-bottom: 6px; }
.value p { font-size: 0.95rem; margin: 0; color: var(--muted); }
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-100); color: var(--navy-800); margin-bottom: 14px;
}
.icon-badge svg { width: 24px; height: 24px; }

/* Grids and cards */
.grid { display: grid; gap: 24px; }
.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: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.98rem; }
.card p + p { margin-top: 12px; }
.card strong { color: var(--navy-800); }
/* White cards inside navy sections must not inherit the section's light text */
.section--navy .card { color: var(--body); }
.section--navy .card h3 { color: var(--ink); }
.section--navy .card:hover { border-color: var(--gold-500); }
.card__link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-family: var(--font-head);
  font-weight: 600; font-size: 0.9rem; text-decoration: none; color: var(--navy-700);
}
.card__link::after { content: "\2192"; transition: transform .2s; }
.card__link:hover::after { transform: translateX(4px); }

.media-card { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.media-card__img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.media-card__body { padding: 22px 24px 26px; }
.media-card__body h3 { margin-bottom: 6px; }
.media-card__body p { margin: 0; font-size: 0.97rem; }

/* Split layout */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.split--reverse > :first-child { order: 2; }
.split__media { position: relative; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__badge {
  position: absolute; left: -18px; bottom: -22px; background: var(--navy-800); color: #fff;
  padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 240px;
  font-family: var(--font-head); font-size: 0.92rem; line-height: 1.4;
}
.split__badge strong { display: block; color: var(--gold-400); font-size: 1.05rem; margin-bottom: 2px; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b2554' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 18px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: var(--gold-500); line-height: 1; display: block; margin-bottom: 14px;
}
.step::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(214, 166, 42, 0.35); }
.step h3 { color: #fff; }
.section:not(.section--navy) .step h3 { color: var(--ink); }
.step p { margin: 0; font-size: 0.97rem; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-600)); color: #fff; border-radius: calc(var(--radius) * 1.5);
  padding: clamp(36px, 5vw, 60px); display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 40px solid rgba(214, 166, 42, 0.18);
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #d3dcee; margin: 0; max-width: 560px; }
.cta-band > * { position: relative; z-index: 1; }

/* Footer */
.site-footer { background: var(--navy-900); color: #a9b6d0; font-size: 0.97rem; }
.site-footer .wrap { padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.site-footer a { color: #d3dcee; text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); }
.footer-brand img { width: 64px; height: 64px; background: #fff; border-radius: 14px; padding: 6px; margin-bottom: 16px; }
.footer-brand p { max-width: 320px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; color: var(--gold-500); flex: none; margin-top: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 22px 0 28px; display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 0.88rem; color: #8494b4;
}
.footer-tagline { font-style: italic; color: var(--gold-400); }

/* Forms */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.88rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1px solid #cfd6e3; border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(28, 69, 144, 0.15); }
.form__note { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form__status { font-weight: 600; color: var(--navy-700); margin: 0; }

/* Misc */
.map-frame { border: 0; width: 100%; height: 420px; border-radius: var(--radius); display: block; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 600; font-family: var(--font-head); color: var(--navy-700); background: var(--gold-100); padding: 4px 10px; border-radius: 999px; }

/* Reveal on scroll */
/* main.js adds .is-pending only to blocks below the fold, so content stays visible without JavaScript */
.reveal { transition: opacity .7s ease, transform .7s ease; }
.reveal.is-pending { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-pending { opacity: 1; transform: none; transition: none; }
  .btn, .card, .media-card { transition: none; }
}

/* Responsive */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .values-strip__grid { grid-template-columns: repeat(2, 1fr); }
  .value:nth-child(2) { border-right: 0; }
  .value:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; flex-direction: column; align-items: stretch;
    padding: 16px var(--gutter) 28px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__list { flex-direction: column; }
  .nav__link { padding: 14px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--gold-500); }
  .nav__cta { margin: 18px 0 0; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  /* An odd last card spans the full row instead of sitting alone in a half-width column */
  .grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .split__badge { left: 16px; }
}

@media (max-width: 680px) {
  :root { --header-h: 72px; }
  .topbar__group--secondary { display: none; }
  .brand img { width: 44px; height: 44px; }
  .brand__name { font-size: 1.15rem; }
  .grid--2, .grid--3, .grid--4, .steps, .footer-grid, .form__row { grid-template-columns: 1fr; }
  .grid { gap: 16px; }
  .card { padding: 24px 20px; }
  .values-strip { margin-top: -36px; }
  .values-strip__grid { grid-template-columns: 1fr; }
  .value { border-right: 0; border-bottom: 1px solid var(--line); }
  .value:last-child { border-bottom: 0; }
  .hero { min-height: auto; }
  .hero .wrap { padding-top: 56px; padding-bottom: 88px; }
  .hero__actions .btn { width: 100%; }
  .cta-band .btn { width: 100%; }
}
