/* ============================================
   SILCC — Society for Indigenous Languages,
   Communities & Cultures of Sierra Leone
   ============================================ */

:root {
  --forest-dark: #182F22;
  --forest: #2C5738;
  --forest-mid: #3E7048;
  --forest-light: #6B9A6E;
  --clay: #BB5A2E;
  --clay-dark: #9C4623;
  --gold: #D9A441;
  --gold-light: #F0C868;
  --cream: #FAF4E9;
  --cream-dark: #F1E6D2;
  --paper: #FFFFFF;
  --ink: #1E2420;
  --ink-soft: #4A5249;
  --line: #E2D8C3;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 10px;
  --shadow: 0 12px 30px -12px rgba(24, 47, 34, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--forest-dark);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin-bottom: 14px;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clay);
  color: #fff;
}
.btn-primary:hover {
  background: var(--clay-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -8px rgba(155, 70, 35, 0.55);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.65);
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--forest-dark);
  color: #fff;
}
.btn-dark:hover {
  background: var(--forest);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold);
  color: var(--forest-dark);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 244, 233, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text .name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--forest-dark);
  letter-spacing: 0.01em;
}

.brand-text .tag {
  font-size: 0.68rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a.active { color: var(--clay-dark); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--forest-dark);
  margin: 5px 0;
  transition: 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24,47,34,0.35) 0%, rgba(20,35,24,0.55) 55%, rgba(15,25,17,0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 80px 24px 64px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.hero-content h1 {
  color: #fff;
  max-width: 16ch;
}

.hero-content .lede {
  color: rgba(255,255,255,0.88);
  font-size: 1.2rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  gap: 28px 32px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.25);
}

.hero-stats .stat b {
  font-family: var(--font-head);
  font-size: 2.1rem;
  display: block;
  color: var(--gold-light);
}
.hero-stats .stat span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

/* Page header for interior pages */
.page-hero {
  position: relative;
  color: #fff;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.page-hero .hero-content { padding: 70px 24px 48px; }
.page-hero .hero-content h1 { max-width: 24ch; }
.page-hero .breadcrumb {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}

/* ---------- Sections ---------- */
section {
  padding: 92px 0;
}

.section-tight { padding: 60px 0; }

.section-cream { background: var(--cream); }
.section-white { background: var(--paper); }
.section-dark {
  background: var(--forest-dark);
  color: rgba(255,255,255,0.92);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lede { color: rgba(255,255,255,0.78); }

.section-head {
  max-width: 720px;
  margin: 0 0 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Pillars / Cards ---------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pillar-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.pillar-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--forest);
}
.pillar-icon svg { width: 26px; height: 26px; }

.pillar-card h3 { margin-bottom: 8px; }
.pillar-card p { color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 0; }

/* ---------- About / split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.split-reverse .split-media { order: 2; }

.stat-row {
  display: flex;
  gap: 36px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.stat-row .stat b {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--clay-dark);
  display: block;
}
.stat-row .stat span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Program / feature callout ---------- */
.callout {
  background: var(--cream-dark);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.callout-figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.callout-figures .fig {
  background: var(--paper);
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  border: 1px solid var(--line);
}
.callout-figures .fig b {
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: var(--forest);
  display: block;
}
.callout-figures .fig span {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ---------- Tree name tags ---------- */
.tag-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.tag-chip {
  background: var(--gold-light);
  color: var(--forest-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 999px;
  transform: rotate(-1.5deg);
}
.tag-chip:nth-child(even) { transform: rotate(1.5deg); background: #fff; border: 1.5px dashed var(--clay); }

/* ---------- Values ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.value-item {
  text-align: center;
  padding: 20px 10px;
}
.value-item .num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--gold-light);
  display: block;
  margin-bottom: 6px;
}

/* ---------- Timeline ---------- */
.timeline {
  border-left: 2px solid var(--line);
  padding-left: 32px;
  margin-left: 8px;
}
.timeline-item {
  position: relative;
  padding-bottom: 36px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -39px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--clay);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--clay);
}
.timeline-item h4 {
  font-family: var(--font-body);
  color: var(--clay-dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ---------- Video grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.video-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card .video-meta { padding: 18px 20px 22px; }
.video-card h3 { margin-bottom: 6px; font-size: 1.1rem; }
.video-card p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.video-quote { font-style: italic; margin: 0 0 10px !important; }
.video-quote span { display: block; font-style: normal; font-size: 0.8rem; margin-top: 4px; color: var(--ink-soft); }
.video-watch-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.86rem; color: var(--clay-dark); }
.video-watch-link:hover { color: var(--clay); }

/* ---------- Languages ---------- */
.focus-banner {
  background: linear-gradient(120deg, var(--forest-dark), var(--forest));
  color: #fff;
  border-radius: 18px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.focus-banner h3 { color: #fff; margin-bottom: 6px; }
.focus-banner p { color: rgba(255,255,255,0.85); margin: 0; max-width: 60ch; }
.focus-banner .focus-tags { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.focus-tags .tag-chip { background: var(--gold-light); color: var(--forest-dark); }

.language-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.language-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.language-card.is-focus {
  border: 2px solid var(--gold);
  box-shadow: var(--shadow);
}
.language-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.language-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 0;
}

.vitality-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  color: #fff;
}
.vitality-not-endangered { background: var(--forest); }
.vitality-threatened { background: var(--gold); color: var(--forest-dark); }
.vitality-endangered { background: var(--clay); }
.vitality-severely-endangered { background: var(--clay-dark); }
.vitality-critically-endangered { background: #7A2323; }
.vitality-extinct { background: var(--ink-soft); }

.vitality-key {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}
.vitality-key .key-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.vitality-key .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-grid a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  position: relative;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-grid a:hover img { transform: scale(1.08); }

.gallery-grid .g-tall { grid-row: span 2; aspect-ratio: auto; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 84vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Cards: get involved ---------- */
.ways-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.way-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px;
}
.way-card .pillar-icon { background: var(--cream-dark); }
.way-card a.link {
  color: var(--clay-dark);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-info-card {
  background: var(--forest-dark);
  color: #fff;
  border-radius: 18px;
  padding: 40px;
}
.contact-info-card h3 { color: #fff; }
.contact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.contact-row .ic {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-row .ic svg { width: 18px; height: 18px; }
.contact-row b { display: block; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 3px; }

.form-field {
  margin-bottom: 18px;
}
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--forest-dark);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  background: var(--paper);
  color: var(--ink);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--forest);
}
.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--forest-dark), var(--forest));
  color: #fff;
  border-radius: 20px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.82); margin: 0; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,0.78);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand .brand-text .name { color: #fff; }
.footer-brand .brand-text .tag { color: rgba(255,255,255,0.6); }
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 0.92rem; margin-top: 14px; }

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.footer-social a:hover { background: var(--clay); }
.footer-social svg { width: 17px; height: 17px; color: #fff; }

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col li { margin-bottom: 11px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-credit {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

.footer-credit a {
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit a:hover {
  color: #fff;
}

/* ---------- Utility reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(3, 1fr); }
  .video-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split-reverse .split-media { order: 0; }
  .callout { grid-template-columns: 1fr; padding: 34px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ways-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .nav-actions .btn-primary { padding: 10px 18px; font-size: 0.88rem; }

  body.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 74px;
    left: 0; right: 0;
    background: var(--cream);
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .hero { min-height: 76vh; }
  .hero-stats { gap: 24px; }
  .pillars-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .ways-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  section { padding: 64px 0; }
  .callout-figures { grid-template-columns: 1fr; }
}
