/* =====================================================================
   NPSIMS · Citizen Portal — public-facing service site
   Lighter, friendlier than the internal system. Kenya flag as
   ceremonial accent. Big hero, service tiles, station finder.
   ===================================================================== */

body.citizen-body {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(201, 162, 39, 0.08) 0%, transparent 55%),
    radial-gradient(60% 60% at 0% 100%, rgba(60, 116, 201, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface-1));
  color: var(--ink-1);
  min-height: 100vh;
}

/* ================ KENYA FLAG RIBBON (top edge, always visible) ================ */
.ke-flag-ribbon {
  height: 4px;
  background: linear-gradient(90deg,
    var(--ke-black) 0%, var(--ke-black) 25%,
    var(--ke-red)   25%, var(--ke-red)   50%,
    #FFF            50%, #FFF            65%,
    var(--ke-green) 65%, var(--ke-green) 100%);
}

/* ================ TOPBAR ================ */
.cit-top {
  padding: 12px 24px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.cit-top .brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.cit-top .brand img { width: 36px; height: 36px; object-fit: contain; }
.cit-top .brand .txt { display: flex; flex-direction: column; line-height: 1.15; }
.cit-top .brand .t1 { font-size: 15px; font-weight: 800; color: var(--nps-navy-900); letter-spacing: 0.04em; }
.cit-top .brand .t1 em { font-style: normal; color: var(--nps-gold-600); }
.cit-top .brand .t2 { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-4); }

.cit-nav {
  display: flex; align-items: center; gap: 20px;
}
.cit-nav a {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: var(--fw-semi);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.cit-nav a:hover { color: var(--nps-navy-900); }
.cit-nav .lang-toggle {
  display: inline-flex; gap: 3px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: 999px;
}
.cit-nav .lang-toggle button {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  background: transparent; border: 0;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.cit-nav .lang-toggle button.active { background: var(--nps-navy-900); color: #FFF; }
.cit-nav .cta-login {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--nps-navy-800), var(--nps-navy-900));
  color: #FFF;
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

@media (max-width: 700px) {
  .cit-nav a:not(.lang-toggle):not(.cta-login) { display: none; }
}

/* ================ HERO ================ */
.cit-hero {
  padding: 60px 24px 40px;
  max-width: 1180px;
  margin-inline: auto;
  text-align: center;
}
.cit-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--nps-gold-800);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.cit-hero .eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.cit-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--nps-navy-900);
  line-height: 1;
  margin-bottom: 16px;
}
.cit-hero h1 .gold {
  background: linear-gradient(120deg, var(--nps-gold-600), var(--nps-gold-400), var(--nps-gold-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 5s linear infinite;
}
.cit-hero p.lead {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.55;
}
.cit-search {
  max-width: 620px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 20px;
  background: var(--surface-0);
  border: 2px solid var(--border-2);
  border-radius: 60px;
  box-shadow: 0 12px 40px rgba(11, 37, 69, 0.1);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.cit-search:focus-within { border-color: var(--nps-navy-700); box-shadow: 0 12px 40px rgba(11, 37, 69, 0.16); }
.cit-search svg { width: 20px; height: 20px; color: var(--ink-4); flex-shrink: 0; }
.cit-search input {
  flex: 1;
  border: 0; outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink-0);
  font-family: var(--font-sans);
}
.cit-search input::placeholder { color: var(--ink-4); }
.cit-search .search-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--nps-gold-500), var(--nps-gold-600));
  color: var(--nps-navy-900);
  border: 0;
  border-radius: 40px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform var(--dur-fast) var(--ease-out);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.35);
}
.cit-search .search-btn:hover { transform: translateY(-1px); }

.cit-quick-links {
  margin-top: 20px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cit-quick-links span { font-size: 12px; color: var(--ink-4); font-weight: 600; }
.cit-quick-links a {
  padding: 6px 12px;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  font-size: 12px;
  color: var(--nps-navy-800);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease-out);
}
.cit-quick-links a:hover { border-color: var(--nps-gold-600); background: var(--nps-gold-100); color: var(--nps-navy-900); }

/* ================ EMERGENCY BANNER ================ */
.emergency-bar {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.06), transparent);
  border-top: 1px solid rgba(220, 38, 38, 0.2);
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
  padding: 12px 24px;
  text-align: center;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.emergency-bar strong { color: var(--danger); }
.emergency-bar a {
  color: var(--danger);
  text-decoration: underline;
  font-weight: 800;
  margin-left: 4px;
}

/* ================ SERVICE TILES ================ */
.cit-services {
  padding: 60px 24px;
  max-width: 1180px;
  margin-inline: auto;
}
.cit-section-head {
  margin-bottom: 32px;
  text-align: center;
}
.cit-section-head .eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nps-gold-800);
  font-weight: 800;
  margin-bottom: 6px;
}
.cit-section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  color: var(--nps-navy-900);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.cit-section-head p {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 auto;
}

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.svc-tile {
  display: flex; flex-direction: column;
  padding: 24px;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
  min-height: 200px;
}
.svc-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.svc-tile:hover {
  transform: translateY(-4px);
  border-color: var(--nps-gold-600);
  box-shadow: 0 20px 44px rgba(11, 37, 69, 0.14);
}
.svc-tile:hover::before { opacity: 1; }
.svc-tile.featured {
  background: linear-gradient(135deg, var(--nps-navy-900), var(--nps-navy-800));
  color: #FFF;
  border-color: var(--nps-navy-800);
}
.svc-tile.featured .svc-name { color: #FFF; }
.svc-tile.featured .svc-desc { color: rgba(255,255,255,0.75); }
.svc-tile.featured .svc-icon { background: linear-gradient(135deg, var(--nps-gold-500), var(--nps-gold-600)); color: var(--nps-navy-900); }
.svc-tile.featured .svc-cta { color: var(--nps-gold-400); }

.svc-tag {
  position: absolute; top: 20px; right: 20px;
  padding: 3px 10px;
  background: rgba(201, 162, 39, 0.14);
  color: var(--nps-gold-800);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.svc-tile.featured .svc-tag { background: rgba(255,255,255,0.14); color: var(--nps-gold-300); }

.svc-icon {
  width: 52px; height: 52px;
  background: var(--nps-navy-50);
  color: var(--nps-navy-800);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.svc-tile:hover .svc-icon { transform: rotate(-6deg) scale(1.06); }
.svc-icon svg { width: 26px; height: 26px; }

.svc-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--nps-navy-900);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.2;
}
.svc-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}
.svc-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  color: var(--ink-4);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.svc-meta .m {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.svc-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--nps-navy-700);
  letter-spacing: 0.02em;
}
.svc-cta svg { width: 14px; height: 14px; transition: transform var(--dur-fast) var(--ease-out); }
.svc-tile:hover .svc-cta svg { transform: translateX(4px); }

/* ================ LIVE STATS STRIP ================ */
.cit-stats-strip {
  padding: 40px 24px;
  background: var(--nps-navy-950);
  color: #FFF;
  position: relative;
  overflow: hidden;
}
.cit-stats-strip::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 20% 30%, rgba(201, 162, 39, 0.14), transparent 70%),
    radial-gradient(60% 60% at 80% 70%, rgba(60, 116, 201, 0.14), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.cit-stats-inner {
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
@media (max-width: 800px) { .cit-stats-inner { grid-template-columns: repeat(2, 1fr); } }
.cit-stat-cell { text-align: center; }
.cit-stat-cell .n {
  font-size: 40px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #FFF;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #FFF, var(--nps-gold-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cit-stat-cell .l {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 6px;
}

/* ================ STATION FINDER ================ */
.station-finder {
  padding: 60px 24px;
  max-width: 1180px;
  margin-inline: auto;
}
.finder-shell {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  overflow: hidden;
}
@media (max-width: 900px) { .finder-shell { grid-template-columns: 1fr; } }

.finder-map {
  background: linear-gradient(180deg, var(--nps-navy-950), #030815);
  min-height: 400px;
  position: relative;
}
.finder-map svg { width: 100%; height: 100%; position: absolute; inset: 0; }
.station-dot {
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.station-dot:hover { transform: scale(1.2); }
.station-dot circle.core { fill: var(--nps-gold-500); }
.station-dot circle.ring { fill: none; stroke: var(--nps-gold-500); opacity: 0.4; animation: pulse-ring 2s ease-out infinite; }
.station-dot text { fill: #FFF; font-size: 9px; font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.03em; text-anchor: middle; }

.station-list { padding: 20px; }
.station-list h4 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 800;
  margin-bottom: 14px;
}
.station-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface-1);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.station-item:hover { background: var(--surface-2); }
.station-item .st-icon {
  width: 36px; height: 36px;
  background: var(--nps-navy-50);
  color: var(--nps-navy-800);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.station-item .st-icon svg { width: 18px; height: 18px; }
.station-item .st-body { flex: 1; min-width: 0; }
.station-item .st-name { font-size: 13px; font-weight: 700; color: var(--ink-0); }
.station-item .st-meta { font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.station-item .st-dist { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--nps-navy-700); }

/* ================ FOOTER ================ */
.cit-foot {
  padding: 48px 24px 24px;
  background: var(--nps-navy-950);
  color: rgba(255,255,255,0.6);
}
.cit-foot .inner {
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 700px) { .cit-foot .inner { grid-template-columns: 1fr 1fr; } }
.cit-foot .brand-block {
  display: flex; align-items: flex-start; gap: 12px;
}
.cit-foot .brand-block img { width: 44px; height: 44px; }
.cit-foot .brand-block .t1 { font-size: 15px; color: #FFF; font-weight: 800; letter-spacing: 0.04em; }
.cit-foot .brand-block .t1 em { color: var(--nps-gold-500); font-style: normal; }
.cit-foot .brand-block .t2 { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; letter-spacing: 0.12em; text-transform: uppercase; }
.cit-foot .brand-block p { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 8px; line-height: 1.5; }
.cit-foot h5 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  font-weight: 800;
  margin-bottom: 12px;
}
.cit-foot ul { list-style: none; padding: 0; margin: 0; }
.cit-foot li { margin-bottom: 8px; }
.cit-foot a { color: rgba(255,255,255,0.6); font-size: 13px; text-decoration: none; }
.cit-foot a:hover { color: var(--nps-gold-400); }
.cit-foot .bottom {
  padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: rgba(255,255,255,0.4);
  flex-wrap: wrap; gap: 10px;
}
.cit-foot .bottom .flag {
  display: inline-flex; width: 20px; height: 14px;
  border-radius: 2px; overflow: hidden;
  flex-direction: column;
}
.cit-foot .bottom .flag span { flex: 1; }
.cit-foot .bottom .flag .b { background: var(--ke-black); }
.cit-foot .bottom .flag .r { background: var(--ke-red); }
.cit-foot .bottom .flag .g { background: var(--ke-green); }
