/*
  SmartBrains Kenya brand palette
  Background: White. Accents: Deep Blue, Light Blue, Orange.
  Main text: Deep Blue. Supporting text: Black. Details/borders: Deep Blue.
*/
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}

:root {
  --white: #ffffff;
  --blue: #1054b7;
  --light-blue: #84cbff;
  --orange: #ffa801;
  --black: #000000;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--blue);
}

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

.wrap {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main.wrap {
  flex: 1 0 auto;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

/* Header */
.site-header {
  background: var(--white);
  border-top: 4px solid var(--orange);
  border-bottom: 1px solid var(--blue);
}

.bar {
  display: flex;
  align-items: center;
  height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 3rem;
  width: auto;
}

.brand span {
  padding-left: 0.85rem;
  border-left: 2px solid var(--blue);
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* Typography */
h1 {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 0.25rem;
  color: var(--blue);
  font-size: 1.15rem;
}

.lede {
  max-width: 40rem;
  color: var(--black);
  font-size: 1.05rem;
}

.muted {
  color: var(--blue);
}

/* Search */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.filters input,
.filters select {
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--blue);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--black);
  font: inherit;
}

.filters input {
  flex: 1 1 14rem;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--light-blue);
  outline: none;
}

/* Cards */
.card {
  border: 1px solid var(--light-blue);
  border-left: 5px solid var(--orange);
  border-radius: 0.75rem;
  background: var(--white);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--blue);
  border-left-color: var(--orange);
  box-shadow: 0 4px 16px rgba(16, 84, 183, 0.12);
}

.role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0.25rem 0 0.5rem;
}

.role .meta {
  margin-bottom: 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin: 0.75rem 0 1.1rem;
}

.facts dt {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.facts:empty {
  display: none;
}

.description {
  white-space: pre-line;
  margin: 1.5rem 0;
}

.steps {
  color: var(--black);
  padding-left: 1.25rem;
  margin: 0.5rem 0 1.25rem;
}

.steps li::marker {
  color: var(--blue);
  font-weight: 700;
}

.back {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.back:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border: 2px solid var(--blue);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--blue);
  color: var(--white);
}

/* Orange is the call-to-action colour. Black text keeps it readable. */
.btn.primary {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--black);
}

.btn.primary:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  background: var(--blue);
  border-top: 4px solid var(--orange);
  color: var(--white);
}

.site-footer a {
  color: var(--white);
}

.site-footer a:hover {
  color: var(--light-blue);
}

.foot-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.75rem 3rem;
  padding-top: 2.25rem;
  padding-bottom: 1.75rem;
}

.foot-brand img {
  display: block;
  height: 5rem;
  width: auto;
}

.foot-brand p {
  margin: 0.6rem 0 0;
  max-width: 20rem;
  color: var(--white);
  font-size: 0.9rem;
}

.foot-links h2 {
  margin-bottom: 0.6rem;
  color: var(--light-blue);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foot-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-links li {
  margin-bottom: 0.35rem;
}

.foot-links a {
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.foot-links a:hover {
  text-decoration: underline;
}

.foot-base {
  border-top: 1px solid var(--light-blue);
  padding-top: 1rem;
  padding-bottom: 1.25rem;
  color: var(--white);
  font-size: 0.8rem;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.6rem;
  }

  .brand span {
    display: none;
  }
}

/* Role sections written by the admin */
.description {
  white-space: normal;
}

.role-section {
  margin: 0 0 1.75rem;
}

.role-section h2 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.role-section p {
  margin: 0 0 0.75rem;
}

.role-section ul {
  margin: 0;
  padding-left: 1.25rem;
}

.role-section li {
  margin-bottom: 0.35rem;
}

.role-section li::marker {
  color: var(--orange);
}
