/*
 * jApps — company site.
 *
 * Plain CSS, no build step, no framework. A brochure site changes a few times
 * a year; anything with a toolchain would rot between edits. Fonts are
 * self-hosted so the site owes nothing to a third party and loads on a poor
 * connection in Dar es Salaam.
 */

@font-face {
  font-family: "Jakarta";
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "InterVar";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #151719;
  --ink-deep: #0d0f10;
  --ink-2: #4a4f55;
  --muted: #7c8288;
  --paper: #ffffff;
  --surface: #f4f6f5;
  --line: #e3e6e5;
  --accent: #1fb6a6;
  --accent-deep: #12897d;
  --coral: #ff5c38;
  --radius: 16px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: InterVar, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: Jakarta, Georgia, serif;
  color: var(--ink);
  letter-spacing: -0.022em;
  line-height: 1.12;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.12rem; font-weight: 700; margin-top: 1.8em; }
p { margin: 0 0 1.1em; }
a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--ink-2); line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

/* ---- header ---- */

header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .bar {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
header.site img { height: 26px; width: auto; display: block; }
header.site nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
header.site nav a {
  font-size: 0.93rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--ink); }
header.site nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ---- sections ---- */

section { padding: 64px 0; }
section.hero { padding: 92px 0 72px; }
section.ink { background: var(--ink); color: rgba(255,255,255,0.78); }
section.ink h1, section.ink h2, section.ink h3 { color: #fff; }
section.ink a { color: #fff; }
section.soft { background: var(--surface); }

.eyebrow {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent-deep); margin: 0 0 14px;
}
section.ink .eyebrow { color: var(--accent); }

/* ---- grid & cards ---- */

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: block; text-decoration: none;
}
a.card { transition: border-color .18s ease, transform .18s ease; }
a.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; font-size: 0.96rem; }
.card .tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--surface); color: var(--muted); margin-bottom: 12px;
}
.card .tag.live { background: rgba(31,182,166,0.12); color: var(--accent-deep); }

/* ---- buttons ---- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
}
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
section.ink .btn { background: #fff; color: var(--ink); border-color: #fff; }
section.ink .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- lists ---- */

ul.plain { list-style: none; padding: 0; margin: 0 0 1.2em; }
ul.plain li { position: relative; padding-left: 22px; margin-bottom: 10px; }
ul.plain li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

dl.facts { margin: 0; }
dl.facts div {
  display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
dl.facts dt { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
dl.facts dd { margin: 0; font-size: 0.95rem; }
section.ink dl.facts div { border-color: rgba(255,255,255,0.12); }
section.ink dl.facts dt { color: #fff; }

/* ---- footer ---- */

footer.site { background: var(--ink-deep); color: rgba(255,255,255,0.62); padding: 56px 0 40px; font-size: 0.9rem; }
footer.site img { height: 22px; margin-bottom: 18px; }
footer.site a { color: rgba(255,255,255,0.82); text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site .cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
footer.site h4 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin: 0 0 12px; font-family: InterVar, sans-serif; font-weight: 700; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 8px; }
footer.site .base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; color: rgba(255,255,255,0.4); }

/* ---- notice ---- */

.notice {
  border-left: 3px solid var(--coral); background: #fff7f5;
  padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 24px 0;
  font-size: 0.93rem;
}
.notice strong { color: var(--ink); }

@media (max-width: 620px) {
  /* The bar must wrap, or a nav set to full width simply overflows. */
  header.site .bar { gap: 10px 14px; flex-wrap: wrap; padding-bottom: 10px; }
  header.site nav { gap: 18px; width: 100%; margin-left: 0; }
  header.site nav a { font-size: 0.88rem; }
  dl.facts div { grid-template-columns: 1fr; gap: 4px; }
}
