/* ============================================================
   Nkara — Main Stylesheet
   Design: Warm earthy tones, Equity · Opportunity · Impact
   Fonts: Playfair Display (headings), Inter (body)
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  /* Warm paper tone scale — 5 steps for layered depth */
  --color-cream-50:   #FAF7F0;
  --color-cream-100:  #F2EAD8;
  --color-cream-200:  #ECE1CA;
  --color-cream-300:  #E2D4B6;
  --color-cream-400:  #C9B89C;

  /* Backward-compatible aliases */
  --color-cream:        var(--color-cream-100);
  --color-cream-light:  var(--color-cream-50);

  --color-hero-bg:      #D9924E;  /* hero warm amber */
  --color-terracotta:   #B85C38;  /* primary brand / logo text */
  --color-terracotta-dk:#8B3E22;  /* darker terracotta hover */
  --color-orange:       #E07840;  /* CTA button primary */
  --color-orange-dk:    #C86030;  /* CTA button hover */
  --color-sand:         #D4B896;  /* Africa silhouette / subtle accents */
  --color-text:         #1E1E1E;  /* body text */
  --color-text-muted:   #5C5552;  /* secondary / caption text */
  --color-white:        #FFFFFF;

  /* Warm hairlines — ink on paper, not cool grey */
  --color-hairline:     #D9CDB8;
  --color-hairline-dk:  #C9B89C;
  --color-border:       var(--color-hairline);

  /* Warm shadows — tinted with terracotta, not neutral grey */
  --shadow-warm-xs:  0 1px 2px rgba(120, 60, 30, 0.06);
  --shadow-warm-sm:  0 2px 8px rgba(120, 60, 30, 0.07);
  --shadow-warm-md:  0 8px 24px rgba(120, 60, 30, 0.10);
  --shadow-warm-lg:  0 18px 48px rgba(120, 60, 30, 0.14);

  /* Admin / alert colours */
  --color-success: #2e7d32;
  --color-error:   #c62828;
  --color-warning: #e65100;
  --color-info:    #01579b;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Sizes */
  --container-max: 1200px;
  --radius:         6px;
  --radius-lg:     12px;

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 400ms cubic-bezier(0.2, 0.6, 0.2, 1);

  /* Signature motif — Africa silhouette watermark */
  --motif-url: url("/assets/logo-africa.png");
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--color-terracotta); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-terracotta-dk); }

ul { list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

/* Italic accent — editorial voice. Applied inline via <em> on selected words. */
h1 em, h2 em, h3 em,
.hero__title em,
.page-hero__title em,
.section__title em,
.about-split__title em {
  font-style: italic;
  font-weight: 700;
  color: inherit;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Focus ring — global accessible ─────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Skip Link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-terracotta);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 9999;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

/* Interaction — buttons shift by tone, not translate */
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
}
.btn--primary:hover {
  background: var(--color-orange-dk);
  border-color: var(--color-orange-dk);
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-terracotta);
}

.btn--outline-dark {
  background: transparent;
  color: var(--color-terracotta);
  border-color: var(--color-terracotta);
}
.btn--outline-dark:hover {
  background: var(--color-terracotta);
  color: var(--color-white);
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--danger {
  background: var(--color-error);
  color: var(--color-white);
  border-color: var(--color-error);
}

/* ── Navigation ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-hairline);
  box-shadow: var(--shadow-warm-xs);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.nav__logo { flex-shrink: 0; }
.nav__logo-img { height: 44px; width: auto; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline: auto;
}

.nav__link {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav__link:hover,
.nav__link--active {
  background: var(--color-cream);
  color: var(--color-terracotta);
}

.nav__cta { flex-shrink: 0; }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Section Utilities ──────────────────────────────────────── */
.section { padding-block: 5.5rem; }
.section--alt { background: var(--color-cream-200); }
.section--dark { background: var(--color-text); color: var(--color-cream); position: relative; overflow: hidden; }
.section--terracotta { background: var(--color-terracotta); color: var(--color-white); position: relative; overflow: hidden; }

.section__header { text-align: center; margin-bottom: 3.5rem; }
.section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.875rem;
}
.section--dark .section__label { color: var(--color-sand); }
.section__title { font-size: clamp(2rem, 3.4vw, 2.875rem); margin-bottom: 1rem; letter-spacing: -0.01em; }
.section__subtitle { font-size: 1.0625rem; color: var(--color-text-muted); max-width: 600px; margin-inline: auto; }
.section--dark .section__subtitle { color: var(--color-sand); }

/* Stats & terracotta sections carry the motif watermark */
.section--dark::before,
.section--terracotta::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -6%;
  transform: translateY(-50%);
  width: min(520px, 55%);
  aspect-ratio: 1 / 1;
  background-image: var(--motif-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.06;
  pointer-events: none;
  filter: brightness(0) invert(1);
}
.section--dark > *,
.section--terracotta > * { position: relative; z-index: 1; }

/* ── Hero ───────────────────────────────────────────────────── */
/* Background matches the inner-page .page-hero gradient so the brand
   reads as one consistent warm across home and inner pages. The old
   amber (--color-hero-bg) is kept as a variable for backward-compat
   but is no longer used on the hero itself. */
.hero {
  background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-terracotta-dk) 100%);
  min-height: 580px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Signature motif — Africa silhouette behind hero content */
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4%;
  transform: translateY(-50%);
  width: min(620px, 48%);
  aspect-ratio: 1 / 1;
  background-image: var(--motif-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.08;
  pointer-events: none;
  filter: brightness(0) invert(1);
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero__content {
  padding: 5.5rem 3rem 5.5rem 0;
  max-width: 600px;
  margin-inline-start: auto;
}

.hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.8vw, 3.75rem);
  color: var(--color-white);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

.hero__body {
  color: rgba(255,255,255,0.95);
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 46ch;
}

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__image {
  height: 100%;
  min-height: 560px;
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero — logo-only variant (used when no photo) */
.hero--logo {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  background: var(--color-cream);
  padding: 6rem 1.5rem;
}
.hero--logo .hero__content {
  padding: 0;
  margin: 0;
  max-width: 700px;
}
.hero--logo .hero__title { color: var(--color-terracotta); }
.hero--logo .hero__body { color: var(--color-text-muted); }
.hero--logo .hero__label { color: var(--color-terracotta); }
.hero--logo .hero__logo-img { max-width: 360px; margin-inline: auto; margin-bottom: 2rem; }
.hero--logo .btn--outline { color: var(--color-terracotta); border-color: var(--color-terracotta); }
.hero--logo .btn--outline:hover { background: var(--color-terracotta); color: var(--color-white); }

/* ── Cards ──────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Single-row variant: columns equal item count (1–5), so featured
   opportunities always sit on one row instead of wrapping. */
.cards-grid--row {
  gap: 1.5rem;
  grid-template-columns: repeat(var(--row-count, 3), minmax(0, 1fr));
}
@media (max-width: 900px) {
  .cards-grid--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cards-grid--row { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-warm-xs);
  transition: box-shadow var(--transition-slow);
}
.card:hover { box-shadow: var(--shadow-warm-md); }

.card__image-wrap { aspect-ratio: 4/5; overflow: hidden; }
.card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.card:hover .card__image-wrap img { transform: scale(1.04); }
.card__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-sand), var(--color-hero-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 2rem;
}

.card__body { padding: 1.75rem 1.75rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.625rem;
}
.card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.card__title a { color: var(--color-text); }
.card__title a:hover { color: var(--color-terracotta); }
.card__summary { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.65; flex: 1; }

.card__footer {
  padding: 1.125rem 1.75rem 1.5rem;
  border-top: 1px solid var(--color-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Card CTAs read as typographic links, not buttons */
.card__footer .btn--small {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--color-terracotta);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  position: relative;
  white-space: nowrap;
}
.card__footer .btn--small::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transition: right var(--transition-slow);
}
.card__footer .btn--small:hover {
  background: transparent;
  color: var(--color-terracotta-dk);
}
.card__footer .btn--small:hover::after { right: 0; }

.card__date { font-size: 0.8125rem; color: var(--color-text-muted); }

.card__tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }
.tag {
  display: inline-block;
  background: var(--color-cream-50);
  color: var(--color-terracotta);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--color-hairline);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.tag:hover,
.tag--active { background: var(--color-terracotta); color: var(--color-white); border-color: var(--color-terracotta); }

/* ── Team sections (grouped) ────────────────────────────────── */
.team-section {
  margin-bottom: 3.5rem;
}
.team-section:last-child {
  margin-bottom: 0;
}
.team-section__title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-terracotta);
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-hairline);
}

/* ── Team Grid ──────────────────────────────────────────────── */
.team-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.team-card {
  text-align: center;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-warm-xs);
  transition: box-shadow var(--transition-slow);
}
.team-card:hover { box-shadow: var(--shadow-warm-md); }

.team-card__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 3px solid var(--color-sand);
}
.team-card__avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-sand), var(--color-hero-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  color: var(--color-white);
  margin: 0 auto 1.25rem;
  font-weight: 700;
}

.team-card__name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}
.team-card__role {
  font-size: 0.875rem;
  color: var(--color-terracotta);
  font-weight: 600;
  margin-bottom: 1rem;
}
.team-card__bio { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.65; }

/* ── Filters ────────────────────────────────────────────────── */
.filter-bar {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-warm-xs);
}

.filter-bar__row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group { display: flex; flex-direction: column; gap: 0.375rem; flex: 1; min-width: 200px; }
.filter-group label { font-size: 0.875rem; font-weight: 600; color: var(--color-text-muted); }

.filter-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  background: var(--color-cream-50);
  color: var(--color-text);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.filter-input:focus {
  outline: none;
  border-color: var(--color-terracotta);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.12);
}

.tag-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }

/* ── Page Hero (inner pages) ────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-terracotta-dk) 100%);
  color: var(--color-white);
  padding: 6rem 0 5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
/* Signature motif — silhouette bleeds off the right edge */
.page-hero::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
  width: min(460px, 42%);
  aspect-ratio: 1 / 1;
  background-image: var(--motif-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.07;
  pointer-events: none;
  filter: brightness(0) invert(1);
}
.page-hero > .container { position: relative; z-index: 1; }

.page-hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.2vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--color-white);
  margin-bottom: 1.25rem;
  max-width: 18ch;
}
/* Hairline rule beneath the title — editorial anchor */
.page-hero__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  background: var(--color-sand);
  margin-top: 1.5rem;
}
.page-hero__subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 560px;
  margin-inline: 0;
}

/* ── What is Nkara section ──────────────────────────────────── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-split__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.875rem;
}
.about-split__title {
  font-size: clamp(2rem, 3.2vw, 2.625rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.about-split__text { color: var(--color-text-muted); line-height: 1.8; margin-bottom: 1.5rem; }
.about-split__img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-warm-lg);
}

/* Values strip */
.values-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.value-item { text-align: center; }
.value-item__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-cream-50);
  border: 1px solid var(--color-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--color-terracotta);
}
.value-item__icon svg { width: 28px; height: 28px; stroke-width: 1.5; }
.value-item__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1875rem;
  margin-bottom: 0.625rem;
}
.value-item__desc { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.65; }

/* ── Stats bar ──────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}
.stat__number {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3.25rem, 6.5vw, 5rem);
  color: var(--color-terracotta);
  line-height: 1;
  margin-bottom: 0.875rem;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.875rem;
}
.stat__number::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.section--dark .stat__number { color: var(--color-sand); }
.stat__label { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.55; }
.section--dark .stat__label { color: rgba(255, 255, 255, 0.78); }

/* ── CTA Banner ─────────────────────────────────────────────── */
.cta-banner {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}
.cta-banner__title { font-size: clamp(1.75rem, 3vw, 2.5rem); color: var(--color-white); margin-bottom: 1rem; }
.cta-banner__text { color: rgba(255,255,255,0.85); margin-bottom: 2rem; font-size: 1.0625rem; }
.cta-banner__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Contact Form ───────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(184,92,56,0.15);
}
.form-control.is-invalid { border-color: var(--color-error); }

textarea.form-control { min-height: 160px; resize: vertical; }

.form-error {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-error);
  margin-top: 0.375rem;
}

/* ── Alert Messages ─────────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}
.alert--success { background: #e8f5e9; border-color: var(--color-success); color: #1b5e20; }
.alert--error   { background: #fce4ec; border-color: var(--color-error);   color: #880e4f; }
.alert--info    { background: #e3f2fd; border-color: var(--color-info);    color: #0d47a1; }

/* ── Single Opportunity / Story page ────────────────────────── */
.single-content {
  max-width: 760px;
  margin-inline: auto;
}
.single-content__meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.single-content__body { line-height: 1.85; }
.single-content__body p { margin-bottom: 1.25rem; }
.single-content__back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  transition: color var(--transition);
}
.single-content__back:hover { color: var(--color-terracotta); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.8);
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__logo { filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer__tagline { font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--color-sand); margin-bottom: 1rem; }
.footer__mission { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.65); }

.footer__heading { font-family: var(--font-heading); font-size: 1rem; color: var(--color-white); margin-bottom: 1.25rem; }
.footer__nav ul, .footer__cta-block ul, .footer__contact { display: flex; flex-direction: column; gap: 0.625rem; }
.footer__nav a, .footer__cta-block a, .footer__contact a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
  transition: color var(--transition);
}
.footer__nav a:hover, .footer__cta-block a:hover, .footer__contact a:hover { color: var(--color-sand); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

/* ── Resources list ─────────────────────────────────────────── */
.resources-list { display: flex; flex-direction: column; gap: 1rem; }
.resource-item {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-warm-xs);
  transition: box-shadow var(--transition-slow);
}
.resource-item:hover { box-shadow: var(--shadow-warm-sm); }
.resource-item__info { flex: 1; }
.resource-item__category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.25rem;
}
.resource-item__title { font-family: var(--font-heading); font-size: 1.125rem; margin-bottom: 0.5rem; }
.resource-item__desc { font-size: 0.9375rem; color: var(--color-text-muted); }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: background var(--transition), color var(--transition);
}
.pagination__link:hover,
.pagination__link--active {
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
  color: var(--color-white);
}

/* ── No results ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--color-text-muted);
}
.empty-state__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  color: var(--color-terracotta);
  opacity: 0.6;
}
.empty-state__icon svg { width: 100%; height: 100%; stroke-width: 1.5; }
.empty-state__title { font-family: var(--font-heading); font-weight: 700; font-size: 1.625rem; margin-bottom: 0.75rem; color: var(--color-text); }
.empty-state__text { max-width: 420px; margin-inline: auto; line-height: 1.65; }

/* ── Text link — animated underline from left ───────────────── */
.text-link {
  position: relative;
  display: inline-block;
  color: var(--color-terracotta);
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 2px;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right var(--transition-slow);
}
.text-link:hover { color: var(--color-terracotta-dk); }
.text-link:hover::after { right: 0; }

/* Single-content body links inherit the editorial underline behaviour */
.single-content__body a {
  color: var(--color-terracotta);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--transition-slow), color var(--transition);
}
.single-content__body a:hover { background-size: 100% 1px; color: var(--color-terracotta-dk); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .about-split  { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding-block: 3.5rem; }

  .hero { grid-template-columns: 1fr; }
  .hero__image { display: none; }
  .hero__content { padding: 4rem 0; text-align: center; margin: 0; }
  .hero__actions { justify-content: center; }

  .nav__toggle { display: flex; }
  .nav__menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .nav__menu.is-open { display: flex; }
  .nav__link { padding: 0.75rem 1rem; width: 100%; }
  .nav__cta { display: none; }

  .values-list { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .team-grid  { grid-template-columns: 1fr 1fr; }
  .stats-bar  { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Flair pass — additive only. Keep below everything so later
   rules win on cascade without editing the originals.
   ============================================================ */

/* ── Branded text selection ─────────────────────────────────── */
::selection      { background: var(--color-terracotta); color: var(--color-white); }
::-moz-selection { background: var(--color-terracotta); color: var(--color-white); }

/* On already-terracotta / dark surfaces flip the pair so selection stays legible. */
.hero ::selection,
.page-hero ::selection,
.section--terracotta ::selection,
.section--dark ::selection      { background: var(--color-cream-100); color: var(--color-terracotta); }
.hero ::-moz-selection,
.page-hero ::-moz-selection,
.section--terracotta ::-moz-selection,
.section--dark ::-moz-selection { background: var(--color-cream-100); color: var(--color-terracotta); }

/* ── Body-prose links — animated underline ──────────────────── */
/* Only touches anchors that live inside paragraphs, so nav / buttons /
   card titles / pagination / tags / footer lists are unaffected. */
main p a {
  color: var(--color-terracotta);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size var(--transition-slow), color var(--transition);
}
main p a:hover {
  background-size: 100% 1px;
  color: var(--color-terracotta-dk);
}

/* ── Value-item icon — ink-stamp shadow ─────────────────────── */
/* A second warm disc offset behind the icon so it reads as hand-stamped
   on paper rather than dropped onto pixels. */
.value-item__icon {
  box-shadow: 6px 6px 0 -1px var(--color-cream-300);
}

/* ── Entrance reveal (IntersectionObserver-driven) ──────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(10px);
    transition:
      opacity   700ms cubic-bezier(0.2, 0.6, 0.2, 1),
      transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
    will-change: opacity, transform;
  }
  .reveal.is-in { opacity: 1; transform: none; }

  /* Stagger siblings inside a common parent. nth-child avoids per-item
     inline --i variables in the PHP templates. */
  .values-list > .reveal:nth-child(1),
  .team-grid   > .reveal:nth-child(1),
  .stats-bar   > .reveal:nth-child(1) { transition-delay:   0ms; }
  .values-list > .reveal:nth-child(2),
  .team-grid   > .reveal:nth-child(2),
  .stats-bar   > .reveal:nth-child(2) { transition-delay:  80ms; }
  .values-list > .reveal:nth-child(3),
  .team-grid   > .reveal:nth-child(3),
  .stats-bar   > .reveal:nth-child(3) { transition-delay: 160ms; }
  .values-list > .reveal:nth-child(4),
  .team-grid   > .reveal:nth-child(4),
  .stats-bar   > .reveal:nth-child(4) { transition-delay: 240ms; }
  .values-list > .reveal:nth-child(5),
  .team-grid   > .reveal:nth-child(5)  { transition-delay: 320ms; }
  .values-list > .reveal:nth-child(6),
  .team-grid   > .reveal:nth-child(6)  { transition-delay: 400ms; }
}

/* ── Stats — visual argument (arc + count-up) ───────────────── */
/* Each percent stat renders a ring that fills to --stat-pct of 100.
   Circumference = 2 * PI * r (r = 42)  =>  263.89 */
.stat__viz {
  position: relative;
  width: 172px;
  height: 172px;
  margin: 0 auto 1rem;
  display: inline-grid;
  place-items: center;
}
.stat__arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.stat__arc circle { fill: none; stroke-width: 3; }
.stat__arc-track {
  stroke: currentColor;
  opacity: 0.18;
}
/* Arc fill: the visible ring that represents the percentage. The
   default state is ALREADY filled to --stat-pct — the ring's length
   equals (pct/100) × circumference. Works with zero JS. An optional
   CSS keyframe animates it in from empty on page load for users who
   haven't opted out of motion. Circumference = 2 × π × r (r = 42) ≈ 263.89. */
.stat__arc-fill {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-dasharray: 263.89;
  stroke-dashoffset: calc(263.89 - (263.89 * var(--stat-pct, 0) / 100));
}
.section--dark .stat__viz { color: var(--color-sand); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes stat-arc-fill-in {
    from { stroke-dashoffset: 263.89; }
    /* `to` inherits from the element's declared stroke-dashoffset so
       each stat animates to its own --stat-pct without per-stat rules. */
  }
  .stat__arc-fill {
    animation: stat-arc-fill-in 1.4s cubic-bezier(0.2, 0.6, 0.2, 1) both;
    animation-delay: 150ms;
  }
}

/* The existing .stat__number::after underline looks off-centre inside
   the viz — suppress it when a viz wraps the number, keep it otherwise. */
.stat__viz .stat__number {
  margin-bottom: 0;
  padding-bottom: 0;
  position: static;
}
.stat__viz .stat__number::after { display: none; }

/* Year stat — no ring, keep the original typographic treatment. */
.stat--year .stat__number { color: var(--color-sand); }

/* ── Submit-prompt banner (blog / resources / contact reuse) ─ */
.submit-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--color-cream-50);
  border: 1px solid var(--color-hairline);
  border-left: 4px solid var(--color-terracotta);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-warm-xs);
}
.submit-prompt__body { min-width: 0; }
.submit-prompt__title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}
.submit-prompt__text {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.6;
}

/* ── Contact channels — hairline-separated rows with ink bullet ─ */
.contact-channels {
  display: flex;
  flex-direction: column;
}
.contact-channels__heading {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  margin-bottom: 1.5rem;
}
.contact-channel {
  padding-block: 1.25rem;
  border-top: 1px solid var(--color-hairline);
}
.contact-channel:first-of-type {
  border-top: none;
  padding-top: 0;
}
.contact-channel__title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.contact-channel__title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-terracotta);
  flex-shrink: 0;
}
.contact-channel p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.65;
}
.contact-channel a { color: var(--color-terracotta); }
.contact-aside {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--color-sand);
  background: var(--color-cream-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── Story — editorial drop cap on the body's first letter ──── */
.single-content__body--drop-cap::first-letter {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 4rem;
  line-height: 0.85;
  float: left;
  padding: 0.3rem 0.625rem 0 0;
  color: var(--color-terracotta);
}

/* ── Page-hero locale line — optional, opt-in per page ──────── */
.page-hero__locale {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

/* ── Team card — flex column so bio fills and button pins bottom ─ */
/* avatar → name → role → bio (grows/clamps) → toggle (pinned).
   Row-stretch in the grid combined with flex:1 on the bio keeps all
   cards in a row naturally aligned, and the toggle always sits at a
   consistent vertical position. */
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.team-card__bio {
  flex: 1 1 auto;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
  /* Animated collapse/expand. JS drives max-height between the
     clamped height and the measured natural height. */
  transition: max-height 340ms cubic-bezier(0.2, 0.6, 0.2, 1);
  will-change: max-height;
}
/* When the card is expanded OR mid-collapse, drop the line-clamp so
   content is free to render at its natural height — otherwise the
   clamp re-engages instantly and the transition looks like a cut. */
.team-card[data-bio-expanded="true"] .team-card__bio,
.team-card[data-bio-collapsing="true"] .team-card__bio {
  -webkit-line-clamp: unset;
}

/* ── Team card "Read more" — inline link with rotating chevron ── */
/* Matches the editorial "Learn More →" treatment used in card
   footers elsewhere: growing-underline on hover, no border, no pill. */
.team-card__bio-toggle {
  display: none;         /* revealed by JS only when clamped */
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  padding: 2px 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--color-terracotta);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}
.team-card__bio-toggle:hover { color: var(--color-terracotta-dk); }
.team-card__bio-toggle:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Label is wrapped by JS so the underline-sweep can live on it only. */
.team-card__bio-toggle-label {
  position: relative;
  display: inline-block;
}
.team-card__bio-toggle-label::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transition: right var(--transition-slow);
}
.team-card__bio-toggle:hover .team-card__bio-toggle-label::after { right: 0; }

/* Inline SVG chevron — rotates 180° when the bio is expanded. */
.team-card__bio-toggle-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  transition: transform 260ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.team-card[data-bio-expanded="true"] .team-card__bio-toggle-icon {
  transform: rotate(180deg);
}

/* ── Page-hero two-column layout (copy + optional featured aside) ── */
/* Only engaged on wider screens; mobile stacks naturally. */
.page-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: center;
}
.page-hero__copy { min-width: 0; }

/* ── Team featured carousel ───────────────────────────────────── */
/* Slow-rotating horizontal marquee of square portraits. List is
   duplicated so a -50% translate wraps seamlessly. Paused on hover
   and on keyboard focus so users can read names and click through.
   Respects prefers-reduced-motion. */

.team-featured {
  width: 320px;
  max-width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  /* Soft edge fade so faces glide in/out instead of clipping hard. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.team-featured__track {
  --tf-gap: 1rem;
  display: flex;
  gap: var(--tf-gap);
  width: max-content;
  /* ~3s per item keeps the carousel leisurely regardless of team size. */
  animation: team-featured-scroll calc(var(--tf-count, 5) * 3s) linear infinite;
}
.team-featured:hover .team-featured__track,
.team-featured__track:focus-within {
  animation-play-state: paused;
}
/* The extra half-gap offset lands the loop exactly at the duplicate
   boundary (gap only separates within each set, not across the wrap). */
@keyframes team-featured-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-50% - var(--tf-gap) / 2), 0, 0); }
}

.team-featured__tile {
  flex-shrink: 0;
  width: 88px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.team-featured__photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 220ms cubic-bezier(0.2, 0.6, 0.2, 1),
              border-color 220ms,
              box-shadow 220ms;
}
.team-featured__tile:hover .team-featured__photo,
.team-featured__tile:focus-visible .team-featured__photo {
  transform: scale(1.06);
  border-color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.team-featured__tile:focus-visible { outline: none; }
.team-featured__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
  max-width: 88px;
}

@media (prefers-reduced-motion: reduce) {
  .team-featured__track { animation: none; }
}

@media (max-width: 768px) {
  .page-hero__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .team-featured { width: 100%; }
  .team-featured__tile { width: 72px; }
  .team-featured__photo { width: 56px; height: 56px; border-radius: 8px; }
  .team-featured__name { font-size: 0.6875rem; max-width: 72px; }
}

/* Scroll-margin on profile cards so the header-hash landing doesn't
   hide under the sticky site nav. */
.team-card[id] { scroll-margin-top: 88px; }

/* ── Inline SVG graphics (hero + about) ─────────────────────── */
/* These replace raster assets that would otherwise 404. The rules
   here just make the SVGs fill their wrappers cleanly and inherit
   the same radius/shadow treatment the originals expected. */
.hero__image .hero__graphic {
  width: 100%;
  height: 100%;
  display: block;
}
.about-split__img {
  /* The wrapper now holds an <svg> instead of an <img>; clip to the
     warm-card radius so the SVG corners follow the rounded edges. */
  overflow: hidden;
  background: var(--color-cream-50);
}
.about-split__img .about-split__graphic {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Pulse when a featured ticker click lands on the card ─────── */
/* Composed box-shadows so the card's existing warm shadow stays put
   while the terracotta ring expands outward and fades. ~900ms total;
   JS fires it a beat after the smooth-scroll completes. */
@keyframes team-card-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(184, 92, 56, 0.55),
      var(--shadow-warm-xs);
  }
  55% {
    box-shadow:
      0 0 0 14px rgba(184, 92, 56, 0.12),
      var(--shadow-warm-sm);
  }
  100% {
    box-shadow:
      0 0 0 22px rgba(184, 92, 56, 0),
      var(--shadow-warm-xs);
  }
}
.team-card--pulse {
  animation: team-card-pulse 900ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .team-card--pulse { animation: none; }
}
