/* ==========================================================
   XPRIZE Africa – shared stylesheet
   ========================================================== */

:root {
  --bg: #05070d;
  --bg-2: #0b0f17;
  --card: #111722;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #9aa3b5;
  --faint: #667085;
  --pink: #ff2d78;
  --orange: #ff8a3d;
  --yellow: #ffc21a;
  --cyan: #19d3e6;
  --grad: linear-gradient(90deg, var(--pink), var(--orange) 60%, var(--yellow));
  --radius: 20px;
  --max: 1160px;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-mono: "Share Tech Mono", "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.section { padding: 110px 0; position: relative; }
.section--alt { background: var(--bg-2); }
.grid-bg {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 70px 70px;
}

/* ---------- Typography ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--pink); margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 44px; height: 1px; background: currentColor; }
.eyebrow--yellow { color: var(--yellow); }
.eyebrow--cyan { color: var(--cyan); }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { content: ""; width: 44px; height: 1px; background: currentColor; }

.h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.12; text-transform: uppercase;
  margin: 0 0 18px; max-width: 820px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 760px; margin: 0 0 40px; }
.mono { font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 500;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--pink); box-shadow: 0 10px 30px -10px rgba(255, 45, 120, .7); }
.btn--primary:hover { box-shadow: 0 14px 36px -8px rgba(255, 45, 120, .9); }
.btn--ghost { background: rgba(255, 255, 255, .06); border-color: var(--line); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--sm { padding: 10px 22px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(5, 7, 13, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-weight: 700; letter-spacing: .12em; font-size: 1.15rem; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav__links { display: flex; align-items: center; gap: 34px; font-size: .92rem; }
.nav__links a, .nav__drop > button {
  background: none; border: 0; padding: 0; opacity: .88; transition: opacity .2s;
}
.nav__links a:hover, .nav__drop > button:hover { opacity: 1; }
.nav__drop { position: relative; }
.nav__drop > button::after { content: " "; color: var(--pink); }
.nav__menu {
  position: absolute; top: 38px; left: -20px; min-width: 250px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; display: none;
}
.nav__drop.open .nav__menu { display: block; }
.nav__menu a { display: block; padding: 10px 14px; border-radius: 8px; opacity: 1; }
.nav__menu a:hover { background: rgba(255, 255, 255, .06); }
.nav__toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: 1.2rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; padding-top: 76px;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background:
    radial-gradient(900px 600px at 0% 0%, rgba(255, 45, 120, .35), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(25, 211, 230, .22), transparent 60%),
    radial-gradient(600px 400px at 50% 0%, rgba(255, 194, 26, .15), transparent 60%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 70px 70px;
}
/* Drop a city photo here: .hero__city { background-image: url("images/city.jpg"); } */
.hero__city {
  position: absolute; right: 0; bottom: 0; width: 55%; height: 75%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 38px),
    linear-gradient(to top, rgba(25, 211, 230, .18), transparent);
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent);
  mask-image: linear-gradient(to left, #000 30%, transparent);
  opacity: .8;
}
.hero__glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  filter: blur(110px); opacity: .35; animation: drift 14s ease-in-out infinite alternate;
}
.hero__glow--a { background: var(--pink); top: 10%; left: -80px; }
.hero__glow--b { background: var(--cyan); bottom: 5%; right: 8%; animation-delay: -6s; }
@keyframes drift { to { transform: translate(60px, -40px) scale(1.15); } }

.hero__content { position: relative; padding: 70px 0 40px; }
.hero h1 {
  font-family: var(--font-head);
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: .96;
  margin: 0 0 28px;
}
.hero p { max-width: 560px; color: #d3d8e3; font-size: 1.15rem; margin: 0 0 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 56px; }
.stats { display: flex; flex-wrap: wrap; gap: 56px; border-top: 1px solid rgba(255, 45, 120, .5); padding-top: 28px; max-width: 560px; }
.stat strong { display: block; font-size: 1.8rem; line-height: 1.1; }
.stat span { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .25em; color: var(--faint); text-transform: uppercase; }

.ticker {
  position: relative; border-block: 1px solid var(--line);
  background: rgba(5, 7, 13, .85); overflow: hidden; white-space: nowrap; padding: 16px 0;
}
.ticker__track { display: inline-flex; gap: 40px; animation: scroll 38s linear infinite; }
.ticker__track span { font-family: var(--font-mono); letter-spacing: .15em; font-size: .9rem; text-transform: uppercase; color: #d3d8e3; }
.ticker__track i { color: var(--pink); font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Filter chips & tabs ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  font-size: .9rem; transition: all .2s;
}
.chip:hover { border-color: rgba(255, 255, 255, .25); }
.chip.active { background: var(--pink); border-color: var(--pink); }
.chip--cyan.active {
  background: rgba(25, 211, 230, .1); border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(25, 211, 230, .35);
}

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .2); }
.card[hidden] { display: none; }
/* Photo slot: set style="background-image:url(...)" or replace with <img> */
.card__img { position: relative; height: 190px; background-size: cover; background-position: center; }
.card__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, var(--card)); }
.card__img--health { background-image: linear-gradient(135deg, #1d4ed8, #0ea5e9 60%, #082f49); }
.card__img--water  { background-image: linear-gradient(135deg, #0f766e, #19d3e6 55%, #082f49); }
.card__img--learn  { background-image: linear-gradient(135deg, #7c2d12, #ff8a3d 55%, #451a03); }
.card__img--food   { background-image: linear-gradient(135deg, #166534, #84cc16 55%, #14532d); }
.card__img--climate{ background-image: linear-gradient(135deg, #312e81, #19d3e6 55%, #0f172a); }
.card__img--ai     { background-image: linear-gradient(135deg, #831843, #ff2d78 55%, #1e1b4b); }
.badge {
  position: absolute; z-index: 1; top: 16px; left: 16px;
  padding: 6px 12px; border-radius: 999px; background: rgba(5, 7, 13, .7);
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--pink); border: 1px solid var(--line);
}
.card__body { padding: 8px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.2rem; font-weight: 400; margin: 6px 0 10px; }
.card p { color: var(--muted); font-size: .95rem; margin: 0 0 18px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted);
}
.card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-top: 1px solid var(--line); padding-top: 16px; font-size: .78rem; color: var(--faint);
}
.card__foot .btn { font-size: .82rem; padding: 8px 16px; background: transparent; border-color: var(--line); }

/* ---------- Ecosystems ---------- */
.eco {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-top: 10px;
}
.eco__icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px;
  border: 1px solid rgba(25, 211, 230, .4); background: rgba(25, 211, 230, .08);
  color: var(--cyan); font-size: 1.3rem;
}
.eco__count { margin-left: 14px; font-family: var(--font-mono); color: var(--faint); letter-spacing: .15em; }
.eco h3 { font-size: 1.7rem; font-weight: 400; margin: 24px 0 12px; }
.eco p { color: var(--muted); font-size: 1.05rem; }
.checks li { padding: 6px 0 6px 30px; position: relative; color: #d3d8e3; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: #34d399; }
.eco__img {
  position: relative; height: 400px; border-radius: 18px; border: 1px solid var(--line);
  background-size: cover; background-position: center;
}
.eco__img .badge { 
  top: auto; 
  bottom: -16px; 
  left: 22px; 
  color: var(--cyan); 
  border-color: #19d3e666; 
  background-image:linear-gradient(135deg,#7c2d12,#ff8a3d 60%,#451a03);
}

.eco2{ 
  background-image:linear-gradient(135deg,#1e3a8a,#19d3e6 60%,#0f172a);
}

.eco3{ 
  background-image:linear-gradient(135deg,#312e81,#ff2d78 60%,#1e1b4b);
}

.eco4{ 
  background-image:linear-gradient(135deg,#14532d,#34d399 60%,#052e16);
}

.eco5{ 
  background-image:linear-gradient(135deg,#713f12,#ffc21a 60%,#1c1917);
}

.eco__panel[hidden] { display: none; }

/* ---------- Partners ---------- */
.partners { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.partner {
  height: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2);
}
.partner strong { letter-spacing: .15em; text-transform: uppercase; font-weight: 500; }
.partner span { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }
.note { margin-top: 24px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .15em; color: var(--faint); text-transform: uppercase; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 26px; text-align: center; }
.avatar {
  width: 92px; height: 92px; margin: 0 auto 24px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1.4rem;
  border: 3px solid var(--c); color: var(--c);
}
.person h3 { font-weight: 400; font-size: 1.1rem; margin: 0 0 6px; }
.person .role { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c); }
.person p { color: var(--muted); font-size: .95rem; margin: 14px 0 12px; }
.person small { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .15em; color: var(--faint); text-transform: uppercase; }

/* ---------- Get involved ---------- */
.involved { text-align: center; background: radial-gradient(700px 400px at 50% 20%, rgba(255, 45, 120, .15), transparent), var(--bg); }
.involved .h2, .involved .lead { margin-inline: auto; }
.involved .h2 { font-weight: 700; }
.cta-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: left; margin-top: 50px; }
.cta { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; transition: transform .25s; }
.cta:hover { transform: translateY(-4px); }
.cta__icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 26px;
  border: 1px solid var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
}
.cta h3 { font-weight: 400; font-size: 1.15rem; margin: 0 0 8px; }
.cta p { color: var(--muted); font-size: .92rem; margin: 0 0 24px; }
.cta a { color: var(--c); font-size: .92rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 50px 0 36px; background: var(--bg); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.footer p { color: var(--muted); max-width: 380px; font-size: .9rem; margin: 10px 0 0; }
.footer ul { display: flex; flex-wrap: wrap; gap: 26px; color: var(--muted); font-size: .9rem; }
.footer ul a:hover { color: var(--text); }
.footer small { color: var(--faint); font-size: .78rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(0, 0, 0, .75); backdrop-filter: blur(6px); }
.modal.open { display: grid; }
.modal__box { position: relative; width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.modal__img { height: 180px; background-size: cover; background-position: center; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(5, 7, 13, .7); border: 1px solid var(--line); font-size: 1.1rem; }
.modal__body { padding: 28px; }
.modal__body h3 { font-size: 1.6rem; font-weight: 400; margin: 6px 0 14px; }
.modal__body p { color: var(--muted); }
.builds {
  display: flex; gap: 12px; align-items: center; margin: 20px 0 24px; padding: 16px;
  border-radius: 12px; background: rgba(255, 194, 26, .07); border: 1px solid rgba(255, 194, 26, .3);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards, .board, .cta-cards { grid-template-columns: 1fr 1fr; }
  .partners { grid-template-columns: 1fr 1fr; }
  .eco { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    gap: 6px; padding: 18px 20px 26px; background: var(--bg); border-bottom: 1px solid var(--line); display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links > a, .nav__drop > button { padding: 10px 0; font-size: 1.05rem; }
  .nav__menu { position: static; display: block; background: none; border: 0; padding: 0 0 0 14px; }
  .nav__drop > button::after { content: ""; }
}
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .cards, .board, .cta-cards { grid-template-columns: 1fr; }
  .stats { gap: 36px; }
  .eco__img { height: 280px; }
  .hero__actions .btn { width: fit-content; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track, .hero__glow { animation: none; }
}

.son {
  --c:var(--pink);
}

.one {
  --c:var(--cyan);
}

.two {
  --c:var(--yellow);
}

.pers {
  --c:var(--cyan);
}

.three {
  --c:var(--pink);
}

.psn {
  --c:var(--yellow);
}


/* =========================================
   REAL PHOTOGRAPHY – XPRIZE AFRICA
   Add this at the bottom of styles.css
========================================= */

/* Hero – African city / innovation atmosphere */
.hero__city {
  background-image:
    linear-gradient(rgba(5, 12, 25, 0.45), rgba(5, 12, 25, 0.72)),
    url("https://images.unsplash.com/photo-1519501025264-65ba15a82390?auto=format&fit=crop&w=2000&q=85");
  background-size: cover;
  background-position: center;
}

/* Challenge track photographs */
.card__img--health {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1000&q=85");
  background-size: cover;
  background-position: center;
}

.card__img--water {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=1000&q=85");
  background-size: cover;
  background-position: center;
}

.card__img--learn {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1503676260728-1c00da094a0b?auto=format&fit=crop&w=1000&q=85");
  background-size: cover;
  background-position: center;
}

.card__img--food {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1000&q=85");
  background-size: cover;
  background-position: center;
}

.card__img--climate {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=1000&q=85");
  background-size: cover;
  background-position: center;
}

.card__img--ai {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1000&q=85");
  background-size: cover;
  background-position: center;
}

/* Ecosystem photographs */
.eco1 {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1521737711867-e3b97375f902?auto=format&fit=crop&w=1200&q=85");
  background-size: cover;
  background-position: center;
}

.eco2 {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1200&q=85");
  background-size: cover;
  background-position: center;
}

.eco3 {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1528605248644-14dd04022da1?auto=format&fit=crop&w=1200&q=85");
  background-size: cover;
  background-position: center;
}

.eco4 {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=1200&q=85");
  background-size: cover;
  background-position: center;
}

.eco5 {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1200&q=85");
  background-size: cover;
  background-position: center;
}
