/* Cjay Analytica website. Colours sampled from the logo: navy C, deep-blue A, teal and cyan swoosh.
   Layout: one centred column; full-width bands alternate light, tinted and navy; photos anchor each major section. */
:root {
  --navy: #001b39;
  --navy-2: #0a2b52;
  --blue: #054b90;
  --teal: #098796;
  --teal-dark: #07707c;
  --cyan: #2cd7e8;
  --ink: #0d1b2e;
  --ink-2: #33475e;
  --muted: #5d6f84;
  --line: #dbe4ee;
  --bg: #f6f9fc;
  --surface: #ffffff;
  --band: #eaf2f8;
  --ok: #0f7b4f;
  --bad: #b42318;
  --font-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 27, 57, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8eef6; --ink-2: #c3d0de; --muted: #93a6bb; --line: #1f344d;
    --bg: #07111f; --surface: #0c1a2c; --band: #0a1626; --blue: #6aaef0; --teal: #2bb8c6; --teal-dark: #2bb8c6;
    --ok: #4ad295; --bad: #ff8a80; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e8eef6; --ink-2: #c3d0de; --muted: #93a6bb; --line: #1f344d;
  --bg: #07111f; --surface: #0c1a2c; --band: #0a1626; --blue: #6aaef0; --teal: #2bb8c6; --teal-dark: #2bb8c6;
  --ok: #4ad295; --bad: #ff8a80; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.eyebrow { font: 700 12.5px/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.lead { font-size: 18px; color: var(--ink-2); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--ink-2); }
.check-list li::before { content: ""; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand img { width: 40px; height: 40px; }
.brand b { font: 800 17px/1 var(--font-display); letter-spacing: .02em; }
.brand span { font: 400 17px/1 var(--font-display); letter-spacing: .08em; }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--blue); }
.nav a.btn, .nav a.btn:hover { color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font: 700 15px/1 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; }
@media (max-width: 1000px) { .nav a:not(.btn):not(.keep) { display: none; } }
@media (max-width: 420px) { .brand span { display: none; } .nav .btn { padding: 10px 16px; } }

/* Hero */
.hero { position: relative; color: #fff; isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("img/nairobi.jpg") center 40% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(0, 27, 57, .96) 0%, rgba(0, 27, 57, .88) 45%, rgba(5, 75, 144, .55) 100%); }
.hero .wrap { padding-block: 92px 84px; display: grid; gap: 22px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero .lede { font-size: clamp(17px, 2vw, 20px); color: #d3e1f0; max-width: 58ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero-pillars { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.hero-pillars li { font: 600 13px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; padding: 10px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #e6f3fa; }
.hero-pillars li b { color: var(--cyan); margin-right: 6px; }

/* Sections */
section { padding-block: 84px; }
.band { background: var(--band); }
.dark { background: var(--navy); color: #fff; }
.dark .lead, .dark p { color: #c9d8ea; }
.section-head { display: grid; gap: 12px; max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split.top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.photo { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; max-width: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.wide { aspect-ratio: 16 / 10; }

/* Outcomes */
.outcomes { margin-top: 26px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.service-media { aspect-ratio: 16 / 7; max-width: 100%; background: var(--navy); position: relative; }
.service-media img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.service-media .num { position: absolute; left: 18px; bottom: 14px; font: 800 13px/1 var(--font-display); letter-spacing: .16em; color: #fff; background: rgba(0, 27, 57, .8); padding: 8px 12px; border-radius: 999px; }
.service-body { padding: 24px; display: grid; gap: 12px; align-content: start; }
.service-body p { color: var(--ink-2); }
.service-body ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; columns: 2; column-gap: 26px; }
.service-body li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .service-body ul { columns: 1; } }

/* Platform */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.feature { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 20px; display: grid; gap: 6px; }
.feature h3 { font-size: 16.5px; color: #fff; }
.feature p { font-size: 15px; }
.feature svg { width: 26px; height: 26px; color: var(--cyan); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.local-note { margin-top: 26px; padding: 16px 18px; border-radius: 12px; background: rgba(44, 215, 232, .08); border: 1px solid rgba(44, 215, 232, .25); color: #d7f6fa; font-size: 15.5px; }

/* Training */
.courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; margin-top: 22px; }
.courses div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 15.5px; }
.courses div::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--teal); }
@media (max-width: 520px) { .courses { grid-template-columns: 1fr; } }
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.formats span { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--band); color: var(--ink-2); border: 1px solid var(--line); }

/* Approach */
.cycle { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.cycle li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.cycle li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 800 13px/1 var(--font-display); color: var(--teal); }
.cycle b { font-family: var(--font-display); font-size: 15.5px; }
.cycle span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.cycle { padding: 0; margin: 0; }
@media (max-width: 1000px) { .cycle { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lenses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.lenses div { border-top: 3px solid var(--teal); padding-top: 12px; }
.lenses p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
@media (max-width: 800px) { .lenses { grid-template-columns: 1fr 1fr; } }
.principle { margin-top: 34px; font: 700 clamp(19px, 2.4vw, 24px)/1.35 var(--font-display); color: var(--navy); max-width: 46ch; }
:root[data-theme="dark"] .principle { color: var(--cyan); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .principle { color: var(--cyan); } }

/* Tools */
.tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.tool b { font-family: var(--font-display); font-size: 15.5px; }
.tool span { font-size: 14px; color: var(--muted); line-height: 1.45; }
@media (max-width: 1000px) { .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Clients */
.clients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.client { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); height: 150px; display: grid; place-items: center; padding: 18px; }
.client img { max-height: 112px; width: auto; object-fit: contain; }
.client-word { text-align: center; display: grid; gap: 4px; }
.client-word b { font: 800 24px/1.1 var(--font-display); color: #0f3d2e; letter-spacing: .02em; }
.client-word span { font: 600 12px/1 var(--font-display); letter-spacing: .26em; text-transform: uppercase; color: #8a6d1f; }
.clients-note { margin-top: 16px; color: var(--muted); font-size: 15px; text-align: center; }
@media (max-width: 760px) { .clients { grid-template-columns: 1fr; } }

/* Why us */
.standards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 30px; }
.standards div { display: grid; gap: 6px; }
.standards p { color: var(--ink-2); font-size: 15.5px; }
.standards h3 { display: flex; gap: 10px; align-items: center; }
.standards h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--teal), var(--blue)); }
@media (max-width: 860px) { .standards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .standards { grid-template-columns: 1fr; } }
.promise { margin-top: 40px; padding: 28px 30px; border-radius: 20px; background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; display: grid; gap: 8px; }
.promise p { color: #dbe8f5; font-size: 18px; max-width: 70ch; }

/* About */
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.vm div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.vm p { color: var(--ink-2); margin-top: 8px; font-size: 15.5px; }
@media (max-width: 560px) { .vm { grid-template-columns: 1fr; } }
.values { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.values div { border-top: 2px solid var(--teal); padding-top: 12px; }
.values b { font-family: var(--font-display); }
.values p { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; line-height: 1.5; }
@media (max-width: 1000px) { .values { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 700 16.5px/1.4 var(--font-display); display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--teal); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 18px; color: var(--ink-2); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-details { display: grid; gap: 18px; margin-top: 26px; }
.contact-details div { display: grid; gap: 2px; }
.contact-details dt { font: 700 12px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-details dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } .form { padding: 20px; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; font: 400 16px/1.4 var(--font-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(9, 135, 150, .18); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 13.5px; color: var(--muted); }
.form-status { padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.form-status.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.form-status.err { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }

/* Footer */
.site-foot { background: var(--navy); color: #a9bbd0; padding-block: 48px 36px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 30px; }
.foot-grid h4 { font: 700 13px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { color: #dbe7f3; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-brand { display: grid; gap: 12px; }
.foot-brand img { width: 56px; height: 56px; border-radius: 14px; background: #fff; padding: 4px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); }
.socials a:hover { background: var(--teal); text-decoration: none; }
.socials svg { width: 18px; height: 18px; fill: #fff; }
.foot-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding-block: 56px 72px; }
.legal h1 { font-size: clamp(30px, 4.4vw, 42px); font-weight: 800; }
.legal .updated { color: var(--muted); margin-top: 8px; }
.legal h2 { font-size: 22px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; display: grid; gap: 6px; }

/* Chat assistant */
.chat-fab { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 50; width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(135deg, var(--teal), var(--blue)); color: #fff; box-shadow: 0 12px 30px rgba(0, 27, 57, .35); display: grid; place-items: center; }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab .dot { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); border: 2px solid #fff; }
.chat-panel { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 51; width: min(380px, calc(100vw - 40px)); max-height: min(620px, calc(100vh - 130px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 27, 57, .3); overflow: hidden; }
.chat-panel[hidden], .form-status[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--navy); color: #fff; }
.chat-head img { width: 38px; height: 38px; border-radius: 10px; background: #fff; padding: 3px; }
.chat-head b { font-family: var(--font-display); display: block; font-size: 15px; }
.chat-head small { color: #a9d8e4; font-size: 12.5px; }
.chat-head button { margin-left: auto; background: none; border: none; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; color: var(--ink); }
.msg.me { background: var(--teal); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg a { color: inherit; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 600 13.5px/1.2 var(--font-body); padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chips button:hover { border-color: var(--teal); color: var(--teal); }
.chips button.wa { background: #1fa855; color: #fff; border-color: #1fa855; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form input { flex: 1; min-width: 0; font: 400 15px/1.3 var(--font-body); padding: 11px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.chat-form button { border: none; border-radius: 999px; padding: 0 16px; background: var(--teal); color: #fff; font-weight: 700; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
