/* =========================================================
   Zakafrica Water Technical Services Ltd — Technical Insights
   Plain CSS design system (no frameworks)
   ========================================================= */

:root {
  --radius: 0.375rem;
  --background: #ffffff;
  --foreground: #23324a;
  --card: #ffffff;
  --muted: #f5f7fa;
  --muted-foreground: #6b7a90;
  --secondary: #eff3f8;
  --border: #dde3ec;
  --input: #dde3ec;
  --deep: #14284d;
  --deep-foreground: #eef5f8;
  --teal: #3aafc4;
  --teal-strong: #1c8fa8;
  --on-teal: #ffffff;
  --ring: rgba(58, 175, 196, 0.4);
  --shadow-card: 0 1px 2px rgba(20, 40, 77, 0.06), 0 12px 28px -18px rgba(20, 40, 77, 0.35);
  --font-sans: "Plus Jakarta Sans", sans-serif;
  --font-display: "Fraunces", serif;
  --maxw: 80rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.uppercase-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------------- Animations ---------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-up {
  animation: fade-up 0.45s ease both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-up {
    animation: none;
  }
}

.btn-cta:hover {
  background: var(--deep);
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  height: 2.5rem;
  width: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--deep);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--border);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 0.625rem 0.25rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.mobile-nav a:hover {
  color: var(--teal-strong);
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav,
  .mobile-nav.open {
    display: none;
  }

/* ---------------- Hero ---------------- */
.hero {
  border-bottom: 1px solid var(--border);
  background: var(--deep);
  color: var(--deep-foreground);
}

.hero .wrap {
  padding-block: 3.5rem;
}

.hero-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--teal);
}

.hero h1 {
  margin-top: 1rem;
  max-width: 48rem;
  font-size: 1.875rem;
  line-height: 1.15;
  font-weight: 800;
}

.hero p {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(238, 245, 248, 0.8);
}

@media (min-width: 768px) {
  .hero .wrap {
    padding-block: 5rem;
  }
  .hero h1 {
    font-size: 3rem;
  }
}

/* ---------------- Layout ---------------- */
.layout {
  display: grid;
  gap: 2.5rem;
  padding-block: 3rem;
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.feed {
  min-width: 0;
}

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feed-head h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--deep);
}

.feed-count {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.back-link {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal-strong);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--deep);
}

/* ---------------- Card grid ---------------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--teal);
}

.card > img {
  height: 11rem;
  width: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.card-cat {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-strong);
}

.card h2 {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--deep);
}

.card p {
  margin: 0.75rem 0 0;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.card-open {
  font-weight: 600;
  color: var(--teal-strong);
  transition: color 0.2s ease;
}

.card:hover .card-open {
  color: var(--deep);
}

.empty-state {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ---------------- Share bar ---------------- */
.sharebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sharebar-label {
  margin-right: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.share-btn {
  display: grid;
  place-items: center;
  height: 2.25rem;
  width: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.share-btn:hover {
  border-color: var(--teal);
  color: var(--deep);
}

.share-btn svg {
  height: 1rem;
  width: 1rem;
}

.sharebar.compact {
  margin-top: 0.75rem;
}

.sharebar.compact .share-btn {
  height: 2rem;
  width: 2rem;
}

.share-btn.copied {
  border-color: var(--teal);
  color: var(--teal-strong);
}

.sharebar.full {
  margin-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* ---------------- Sidebar ---------------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.widget {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.widget label,
.widget > h2 {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep);
}

.field {
  width: 100%;
  margin-top: 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  outline: none;
}

.field:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--ring);
}

.cat-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cat-btn {
  width: 100%;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.cat-btn:hover {
  background: var(--secondary);
  color: var(--deep);
}

.cat-btn[aria-current="true"] {
  background: var(--deep);
  color: var(--deep-foreground);
  font-weight: 600;
}

.survey {
  border: 1px solid rgba(58, 175, 196, 0.4);
  border-radius: 0.5rem;
  background: var(--secondary);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.survey h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep);
}

.survey > p {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.survey-fields {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.survey-fields .field {
  margin-top: 0;
}

.btn-submit {
  width: 100%;
  border-radius: var(--radius);
  background: var(--teal-strong);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-teal);
  transition: background-color 0.2s ease;
}

.btn-submit:hover {
  background: var(--deep);
}

.form-status {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal-strong);
}

/* ---------------- Articles ---------------- */
.article {
  max-width: 48rem;
}

.article-cat {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-strong);
}

.article h2 {
  margin-top: 0.75rem;
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--deep);
}

.article-byline {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.article > img {
  margin-top: 1.5rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  object-fit: cover;
}

.article-lede {
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
}

@media (min-width: 768px) {
  .article h2 {
    font-size: 2.25rem;
  }
}

.prose-tech p {
  margin-block: 1rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

.prose-tech h3 {
  margin-top: 2.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--deep);
}

.prose-tech h4 {
  margin-top: 1.5rem;
  font-size: 1.075rem;
  font-weight: 700;
  color: #2b4a7a;
}

.prose-tech ul {
  margin-block: 1rem;
  padding-left: 1.15rem;
  list-style: disc;
  line-height: 1.8;
  color: var(--muted-foreground);
}

.prose-tech strong {
  color: var(--foreground);
}


[hidden] {
  display: none !important;
}
