/* =========================================================================================
   Public pages: the landing page (Pages/Index.cshtml) and Help signing in
   (Pages/SignInHelp.cshtml), on Pages/Shared/_LayoutHome.cshtml. Same colours and type as the
   app (indigo header band, orange main action, Poppins), no template CSS or scripts.
   ========================================================================================= */

:root {
  --lp-indigo-900: #2d2585;
  --lp-indigo-700: #3a329f;
  --lp-indigo-600: #514ac0;
  --lp-indigo-400: #736ce0;
  --lp-night: #1f2235;
  --lp-accent: #c2410c;         /* white text on it passes 4.5:1 */
  --lp-accent-dark: #a3360a;
  --lp-ground: #f3f4f9;
  --lp-card: #ffffff;
  --lp-ink: #1d2433;
  --lp-muted: #5b6475;
  --lp-line: #e3e5ee;
}

* { box-sizing: border-box; }

body.lp {
  margin: 0;
  background: var(--lp-ground);
  color: var(--lp-ink);
  font-family: Poppins, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.lp a { color: var(--lp-indigo-700); }
.lp a:hover { color: var(--lp-indigo-900); }
.lp :focus-visible { outline: 3px solid var(--lp-indigo-400); outline-offset: 2px; }

.lp-wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.lp-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--lp-ink);
}

.lp-skip:focus { top: 12px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }   /* Back to top and the "What's inside" / "How it works" links */
}

/* ---- Back to top (shown by the script in _LayoutHome once scrolled down) ---------------- */

.lp-totop {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lp-indigo-700);
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 12px 24px -8px rgba(20, 16, 80, .55);
  opacity: 0;
  visibility: hidden;                 /* out of the tab order until shown */
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background-color .15s ease;
}

.lp-totop.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s, background-color .15s ease; }
.lp-totop:hover { background: var(--lp-indigo-900); }

/* Where the footer text reaches the right edge, leave room so its last lines scroll clear of
   the button (the page is 1240px wide plus margins). */
@media (max-width: 1399.98px) {
  .lp-foot .lp-foot__base { padding-bottom: 88px; }   /* beats .lp-foot__base further down */
}

/* ---- Top bar --------------------------------------------------------------------------- */

.lp-top { background: var(--lp-night); color: #fff; }

.lp-top__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.lp-brand { display: flex; align-items: center; gap: 12px; color: #fff !important; text-decoration: none; }

.lp-brand__logo {
  display: inline-flex;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 3px;
  border-radius: 50%;
  background: #fdfaf3;
}

.lp-brand__logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.lp-brand__name { font-weight: 600; font-size: 17px; }

.lp-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; }
.lp-nav a { color: rgba(255, 255, 255, .82) !important; text-decoration: none; padding: 6px 0; }
.lp-nav a:hover { color: #fff !important; }

/* ---- Notice (System Settings > Notice) ----------------------------------------------- */

.lp-notice { background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c2d12; }
.lp-notice__row { display: flex; align-items: flex-start; gap: 10px; padding-top: 12px; padding-bottom: 12px; font-size: 15px; }
.lp-notice svg { flex: 0 0 auto; margin-top: 2px; }
.lp-notice__row span { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }

/* ---- Hero and sign-in ---------------------------------------------------------------- */

.lp-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(56rem 28rem at 88% -12%, rgba(255, 255, 255, .16), transparent 62%),
    radial-gradient(44rem 26rem at -8% 112%, rgba(194, 65, 12, .30), transparent 62%),
    linear-gradient(135deg, var(--lp-indigo-900) 0%, var(--lp-indigo-700) 38%, var(--lp-indigo-600) 72%, var(--lp-indigo-400) 100%);
}

/* A faint dot grid that fades out towards the bottom. */
.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
  pointer-events: none;
}

.lp-hero__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 48px;
  padding-top: 72px;
  padding-bottom: 88px;
}

.lp-hero__text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.lp-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}

.lp-eyebrow--dark { color: var(--lp-indigo-600); }

.lp-hero h1 {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.lp-lead { margin: 0; max-width: 54ch; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .88); }

/* "every Commission activity." with a warm marker underline */
.lp-hl {
  background: linear-gradient(transparent 72%, rgba(234, 88, 12, .75) 72%, rgba(234, 88, 12, .75) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lp-assure { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.lp-assure li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 9px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-size: 13.5px;
  color: rgba(255, 255, 255, .92);
}

.lp-assure svg { width: 18px; height: 18px; fill: none; stroke: #fdba74; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lp-signin {
  flex: 0 1 420px;          /* wide enough for the button label on one line */
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 20px;
  background: var(--lp-card);
  color: var(--lp-ink);
  box-shadow: 0 24px 48px -24px rgba(20, 16, 80, .55);
}

.lp-signin h2 { margin: 0; font-size: 22px; font-weight: 600; }
.lp-signin p { margin: 0; color: var(--lp-muted); font-size: 15px; }
.lp-signin__head { display: flex; align-items: center; gap: 14px; }

.lp-signin__logo {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: 50%;
  background: #fdfaf3;
  box-shadow: 0 0 0 1px var(--lp-line);
}

.lp-signin__logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.lp-signin__form { margin: 0; display: flex; flex-direction: column; gap: 10px; }

.lp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--lp-accent);
  color: #fff !important;
  font: 600 16px/1.2 Poppins, "Segoe UI", Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}

.lp-btn:hover { background: var(--lp-accent-dark); transform: translateY(-1px); }
.lp-btn--inline { display: inline-flex; width: auto; }

.lp-signin__note { display: flex; align-items: flex-start; gap: 10px; font-size: 13px !important; line-height: 1.55; }
.lp-signin__note svg { flex: 0 0 auto; margin-top: 1px; color: var(--lp-indigo-700); }
.lp-signin__help { padding-top: 14px; border-top: 1px solid var(--lp-line); font-size: 13px !important; }
.lp-signin__unavailable { padding: 12px; border-radius: 10px; background: #fff7ed; color: #7c2d12 !important; }
.lp-signin__error { padding: 12px; border-radius: 10px; border: 1px solid #fecaca; background: #fef2f2; color: #991b1b !important; font-size: 14px !important; }
.lp-signin__done { padding: 12px; border-radius: 10px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534 !important; font-size: 14px !important; }

/* ---- Sections ------------------------------------------------------------------------ */

.lp-section { padding-top: 72px; }

.lp-h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 38px); font-weight: 700; line-height: 1.15; text-wrap: balance; }
.lp-h2 { margin: 0 0 8px; font-size: 28px; font-weight: 600; text-wrap: balance; }
.lp-sub { margin: 0 0 32px; max-width: 62ch; font-size: 16px; color: var(--lp-muted); }

.lp-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.lp-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--lp-line);
  border-radius: 16px;
  background: var(--lp-card);
  box-shadow: 0 1px 2px rgba(29, 36, 51, .04), 0 8px 24px -18px rgba(29, 36, 51, .25);
}

.lp-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--chip-bg, #eef0fd);
  color: var(--chip-fg, var(--lp-indigo-700));
}

.lp-tile svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* One colour per module, in the order they are listed. */
.lp-tile:nth-child(1) { --chip-bg: #eef0fd; --chip-fg: #3a329f; }
.lp-tile:nth-child(2) { --chip-bg: #ccfbf1; --chip-fg: #0f766e; }
.lp-tile:nth-child(3) { --chip-bg: #fef3c7; --chip-fg: #b45309; }
.lp-tile:nth-child(4) { --chip-bg: #e0f2fe; --chip-fg: #0369a1; }
.lp-tile:nth-child(5) { --chip-bg: #d1fae5; --chip-fg: #047857; }
.lp-tile:nth-child(6) { --chip-bg: #ede9fe; --chip-fg: #6d28d9; }
.lp-tile:nth-child(7) { --chip-bg: #ffe4e6; --chip-fg: #be123c; }
.lp-tile:nth-child(8) { --chip-bg: #ffedd5; --chip-fg: #c2410c; }

.lp-tile h3 { margin: 0; font-size: 17px; font-weight: 600; }
.lp-tile p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--lp-muted); }

.lp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.lp-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  align-items: start;
  align-content: start;
  font-size: 14px;
  line-height: 1.5;
  color: #3f4047;
}

.lp-steps__num {
  grid-row: span 2;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lp-indigo-700);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 0 0 6px #e4e3f7;
}

.lp-steps__name { padding-top: 2px; font-size: 16px; font-weight: 600; color: var(--lp-ink); }
.lp-steps__text { color: var(--lp-muted); }

/* The line joining one number to the next */
.lp-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 44px;
  bottom: -18px;
  width: 2px;
  background: linear-gradient(var(--lp-indigo-400), #c9c6f3);
}

.lp-steps li.lp-steps__last .lp-steps__num { background: var(--lp-accent); box-shadow: 0 0 0 6px #fde3d3; }

@media (min-width: 900px) {
  .lp-steps { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .lp-steps li { grid-template-columns: 1fr; row-gap: 10px; }
  .lp-steps__num { grid-row: auto; }

  .lp-steps li:not(:last-child)::after {
    left: 56px;
    right: -10px;
    top: 21px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--lp-indigo-400), #c9c6f3);
  }
}

/* ---- Across Kenya: the map, and what helps staff in the field ------------------------- */

.lp-reach {
  margin-top: 80px;
  color: #fff;
  background:
    radial-gradient(40rem 24rem at 10% 0%, rgba(115, 108, 224, .35), transparent 65%),
    var(--lp-night);
}

.lp-reach__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 64px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.lp-reach__map { flex: 1 1 300px; max-width: 400px; margin: 0 auto; }
.lp-reach__map svg { display: block; width: 100%; height: auto; overflow: visible; }
.lp-map__fill { fill: url(#lp-dots); }
#lp-dots circle { fill: rgba(255, 255, 255, .28); }
.lp-map__line { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .7); stroke-width: 2; stroke-linejoin: round; }
.lp-map__hq circle { fill: #fb923c; }
.lp-map__hq .lp-map__pulse { fill: none; stroke: #fb923c; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: lp-pulse 2.4s ease-out infinite; }
.lp-map__label { fill: #fff; font: 600 17px Poppins, "Segoe UI", Arial, sans-serif; }
.lp-map__sub { fill: rgba(255, 255, 255, .75); font: 500 13px Poppins, "Segoe UI", Arial, sans-serif; }

/* A dark halo so the labels stay readable over the dotted fill */
.lp-map__label, .lp-map__sub { paint-order: stroke; stroke: var(--lp-night); stroke-width: 5px; stroke-linejoin: round; }

@keyframes lp-pulse {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(3.2); opacity: 0; }
}

.lp-reach__text { flex: 1 1 420px; min-width: 0; }
.lp-reach .lp-eyebrow { margin-bottom: 8px; color: #fdba74; }
.lp-reach .lp-h2 { color: #fff; }
.lp-reach__lead { margin: 0 0 28px; max-width: 52ch; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .8); }

.lp-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.lp-perks li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .78);
}

.lp-perks strong { display: block; margin-bottom: 2px; font-size: 16px; font-weight: 600; color: #fff; }

.lp-perks__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(251, 146, 60, .16);
  color: #fdba74;
}

.lp-perks__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Help signing in ----------------------------------------------------------------- */

.lp-help { padding-bottom: 80px; }
.lp-help__wrap { max-width: 920px; }

.lp-howto { margin: 0 0 32px; padding-left: 1.4em; display: flex; flex-direction: column; gap: 22px; }
.lp-howto > li::marker { font-weight: 700; color: var(--lp-indigo-700); }
.lp-howto h2 { margin: 0 0 6px; font-size: 19px; font-weight: 600; }
.lp-howto p, .lp-howto ul { margin: 0; color: #3f4047; }
.lp-howto ul { margin-top: 8px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }

.lp-help__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }

.lp-help__card {
  padding: 20px 22px;
  border: 1px solid var(--lp-line);
  border-radius: 14px;
  background: var(--lp-card);
}

.lp-help__card h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.lp-help__card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--lp-muted); }
.lp-help__back { margin: 32px 0 0; }

/* ---- Footer -------------------------------------------------------------------------- */

.lp-foot { background: #171a2b; color: rgba(255, 255, 255, .78); font-size: 14px; line-height: 1.6; }

.lp-foot__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 64px;
  padding-top: 44px;
  padding-bottom: 32px;
}

.lp-foot__brand { flex: 1 1 280px; display: flex; align-items: center; gap: 14px; }
.lp-foot__brand > div { display: flex; flex-direction: column; }
.lp-foot__brand strong { color: #fff; font-size: 16px; font-weight: 600; }
.lp-foot__col { display: flex; flex-direction: column; gap: 4px; }
.lp-foot__col strong { margin-bottom: 4px; color: #fff; font-weight: 600; }
.lp-foot a { color: rgba(255, 255, 255, .78) !important; text-decoration: none; }
.lp-foot a:hover { color: #fff !important; text-decoration: underline; }

.lp-foot__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  padding-top: 18px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}

/* ---- Phones -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
  .lp-wrap { padding-left: 16px; padding-right: 16px; }
  .lp-hero__row { padding-top: 40px; padding-bottom: 48px; }
  .lp-signin { padding: 24px 20px; }
  .lp-lead { font-size: 16px; }
  .lp-section { padding-top: 48px; }
  .lp-help { padding-bottom: 56px; }
  .lp-reach { margin-top: 56px; }
  .lp-reach__row { padding-top: 48px; padding-bottom: 48px; }
  .lp-reach__map { max-width: 260px; }
  .lp-assure { display: none; }      /* the sign-in card says the same, and stays higher up */
  .lp-btn { padding: 0 14px; font-size: 15px; gap: 8px; }

  /* Tiles: icon beside the text, to keep the list short */
  .lp-tiles { gap: 12px; }
  .lp-tile { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 4px; padding: 16px; }
  .lp-tile__icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; }
  .lp-nav { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-map__hq .lp-map__pulse { animation: none; opacity: 0; }
  .lp-totop, .lp-totop.is-visible { transition: none; }
  .lp-btn { transition: none; }
  .lp-btn:hover { transform: none; }
}
