/* All African Farmers Network — site styles */

:root {
  --color-bg: #f6f3ec;
  --color-surface: #fffef9;
  --color-text: #1c1914;
  --color-muted: #5c564a;
  --color-accent: #2d5a3d;
  --color-accent-soft: #e8f0e9;
  --color-gold: #b8860b;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --shadow: 0 4px 24px rgba(28, 25, 20, 0.08);
  --radius: 12px;
  --max: 960px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  z-index: 1000;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(
    90deg,
    rgba(46, 196, 182, 0.18),
    rgba(99, 102, 241, 0.14),
    rgba(255, 209, 102, 0.18)
  );
  background-color: rgba(246, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(45, 90, 61, 0.12);
  box-shadow: 0 10px 30px rgba(28, 25, 20, 0.08);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease;
}

.logo-mark {
  color: var(--color-accent);
  font-size: 1rem;
  display: inline-block;
  transition: transform 0.35s ease;
}

.logo:hover .logo-mark,
.logo:focus-visible .logo-mark {
  transform: rotate(90deg) scale(1.05);
}

.logo:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 4px;
  border-radius: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--color-accent-soft);
  outline: none;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 0 auto;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-list a {
  position: relative;
  color: rgba(28, 25, 20, 0.8);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.25rem;
  border-radius: 10px;
  transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  bottom: 0.15rem;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2ec4b6, #6366f1, #ffd166);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
  outline: none;
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.9),
        rgba(246, 243, 236, 0.92)
      ),
      var(--color-surface);
    border-bottom: 1px solid rgba(45, 90, 61, 0.12);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .site-nav.is-open {
    max-height: 220px;
  }

  .site-nav .nav-list {
    flex-direction: column;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.75rem;
  }

  .site-nav .nav-list a {
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(45, 90, 61, 0.10);
  }
}

/* Hero */

.hero {
  position: relative;
  min-height: min(72vh, 560px);
  display: flex;
  align-items: center;
  padding: 3rem 1.25rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      135deg,
      rgba(45, 90, 61, 0.92) 0%,
      rgba(28, 55, 38, 0.95) 50%,
      rgba(60, 45, 25, 0.88) 100%
    ),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 32rem;
  margin: 0 0 1.75rem;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: #fff;
  color: var(--color-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-accent-soft);
  outline: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: rgba(45, 90, 61, 0.35);
  margin-top: 0.5rem;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  outline: none;
}

/* Sections */

.section {
  padding: 3.5rem 1.25rem;
}

.section-alt {
  background: var(--color-surface);
  box-shadow: inset 0 1px 0 rgba(45, 90, 61, 0.06);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  margin: 0 0 1rem;
  color: var(--color-text);
}

.title-pop {
  display: inline-block;
  background: linear-gradient(90deg, #2ec4b6, #6366f1, #ffd166, #2ec4b6);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 28px rgba(46, 196, 182, 0.18);
  animation: title-shimmer 3.8s ease-in-out infinite;
}

@keyframes title-shimmer {
  0% {
    background-position: 0% 50%;
    transform: translateY(0);
  }
  50% {
    background-position: 100% 50%;
    transform: translateY(-1px);
  }
  100% {
    background-position: 0% 50%;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .title-pop {
    animation: none;
  }
}

.section-intro {
  font-size: 1.125rem;
  color: var(--color-muted);
  margin: 0 0 2rem;
  max-width: 52ch;
}

.eyebrow-section {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--color-accent);
}

.content-stack > :first-child {
  margin-top: 0;
}

.content-stack p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  max-width: 80ch;
}

.history-copy p {
  text-align: justify;
}

.history-section .container {
  max-width: 1040px;
}

.history-title {
  margin-bottom: 1.25rem;
}

.history-copy {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 240, 233, 0.45));
  border: 1px solid rgba(45, 90, 61, 0.08);
  border-radius: 20px;
  padding: 1.5rem 1.5rem 0.75rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.history-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 240px at 12% 0%, rgba(46, 196, 182, 0.12), transparent 62%),
    radial-gradient(820px 260px at 88% 10%, rgba(99, 102, 241, 0.10), transparent 60%);
  pointer-events: none;
}

.history-copy::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2ec4b6, #6366f1, #ffd166);
  opacity: 0.85;
  pointer-events: none;
}

.history-copy > * {
  position: relative;
  z-index: 1;
}

.history-copy p {
  max-width: 100%;
  line-height: 1.8;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.history-copy p + p {
  margin-top: 1.05rem;
}

@media (max-width: 640px) {
  .history-copy {
    padding: 1.25rem 1.1rem 0.75rem;
    border-radius: 18px;
  }

  .history-copy::after {
    top: 14px;
    left: 14px;
    width: 44px;
  }

  .history-copy p {
    font-size: 1rem;
  }
}

.history-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2.75rem;
  align-items: stretch;
}

.history-card {
  grid-column: span 4;
  margin: 0;
  background: var(--color-surface);
  border: 1px solid rgba(45, 90, 61, 0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.history-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(28, 25, 20, 0.12);
}

.history-card-wide {
  grid-column: span 8;
}

.history-card img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: #dfe8df;
}

.history-card-wide img {
  height: 320px;
}

.history-card figcaption {
  padding: 0.9rem 1rem 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  min-height: 4.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 240, 233, 0.28));
}

@media (max-width: 900px) {
  .history-card,
  .history-card-wide {
    grid-column: span 6;
  }

  .history-card-wide img {
    height: 260px;
  }

  .history-copy {
    padding: 1.25rem 1.25rem 0.5rem;
  }
}

@media (max-width: 640px) {
  .history-gallery {
    grid-template-columns: 1fr;
  }

  .history-card,
  .history-card-wide {
    grid-column: auto;
  }

  .history-card img,
  .history-card-wide img {
    height: 220px;
  }

  .history-card figcaption {
    min-height: auto;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 0.5rem;
}

@media (max-width: 760px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--color-surface);
  border: 1px solid rgba(45, 90, 61, 0.08);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: var(--shadow);
}

.panel h3 {
  margin-top: 0;
}

.panel p {
  margin: 0;
  color: var(--color-muted);
}

.bullet-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--color-muted);
  max-width: 90ch;
}

.bullet-list li {
  margin: 0.5rem 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(45, 90, 61, 0.08);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
  color: var(--color-accent);
}

.card p {
  margin: 0;
  color: var(--color-muted);
}

.un-quote {
  margin: 0 0 1.25rem;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  border-left: 4px solid var(--color-gold);
  background: linear-gradient(90deg, var(--color-accent-soft), transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.un-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.45;
}

.status-note {
  margin: 0;
  color: var(--color-muted);
  max-width: 60ch;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 0.5rem;
}

.contact-block h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.contact-block address {
  font-style: normal;
  color: var(--color-muted);
  line-height: 1.7;
}

.phone-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.phone-list li {
  margin-bottom: 0.35rem;
}

.phone-list a {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.phone-list a:hover,
.phone-list a:focus-visible {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.contact-block a[href^="mailto"] {
  color: var(--color-accent);
  font-weight: 600;
  word-break: break-all;
}

.copy-feedback {
  min-height: 1.5rem;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--color-accent);
}

/* Footer */

.site-footer {
  padding: 2rem 1.25rem;
  border-top: 1px solid rgba(45, 90, 61, 0.12);
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.75);
}

.footer-inner {
  text-align: center;
}

.footer-name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}

.footer-meta {
  margin: 0;
  font-size: 0.9rem;
}
