/* Three Monkeys Wildlife Conservancy — hand-written rebuild, 2026 */
:root {
  --navy: #232d62;
  --mint: #d9e7de;
  --mint-light: #eaf2ed;
  --black: #0d0d0d;
  --gray-bg: #ececec;
  --gray-text: #9a9a9a;
  --accent: #e87b35;
  --body-text: #3f3f3f;
  --font-head: "Poppins", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Roboto", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--body-text);
  font-size: 16px;
  line-height: 1.65;
  background: #fff;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); }

.section-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 2rem;
  background: transparent;
  transition: background 0.3s ease;
}
.site-header.scrolled { background: var(--black); }
.site-header .logo img { height: 52px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--accent); }
.main-nav .sep { color: rgba(255,255,255,0.35); font-size: 0.8rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a { color: #fff; transition: color 0.2s; }
.social-links a:hover { color: var(--accent); }
.social-links svg { width: 20px; height: 20px; fill: currentColor; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle svg { width: 26px; height: 26px; fill: currentColor; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #1c2b1e;
}
.hero-video {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;          /* 16:9 */
  min-height: 100svh;
  min-width: 177.78svh;      /* 16:9 */
  transform: translate(-50%, -50%);
  border: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}
.hero-quote {
  position: relative;
  z-index: 2;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.9rem);
  line-height: 2;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  text-wrap: balance;
}

/* ---------- About ---------- */
.about {
  background: linear-gradient(180deg, var(--mint) 0%, #ffffff 100%);
  padding: 6rem 0 5rem;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 1rem;
}
.about-grid h3 {
  font-size: 1.45rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

/* ---------- Carousel (shared) ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.25rem 0.25rem 0.5rem;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; flex-shrink: 0; }
.carousel-btn {
  position: absolute;
  top: 40%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.carousel-btn:hover { transform: scale(1.08); }
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: #c9c9c9;
  cursor: pointer;
  padding: 0;
}
.carousel-dots button.active { background: var(--accent); }

/* ---------- Stories ---------- */
.stories { padding: 5rem 0; }
.story-card {
  width: calc((100% - 3.5rem) / 3);
  border-radius: 14px;
  overflow: hidden;
  background: var(--gray-bg);
  display: flex;
  flex-direction: column;
}
.story-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.story-body {
  padding: 1.75rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: center;
  gap: 0.65rem;
}
.story-date { color: var(--gray-text); font-size: 1.05rem; }
.story-ago {
  color: var(--gray-text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.story-ago svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.story-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.45;
  color: #1a1a1a;
}
.story-title a { color: inherit; text-decoration: none; }
.story-title a:hover { color: var(--navy); }
.btn-dark {
  margin-top: auto;
  align-self: center;
  background: var(--black);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  transition: background 0.2s;
}
.btn-dark:hover { background: var(--accent); }

/* ---------- Team ---------- */
.team { background: var(--mint); padding: 5rem 0; }
.team-card {
  position: relative;
  width: calc((100% - 5.25rem) / 4);
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: #222;
  font: inherit;
  text-align: left;
}
.team-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.team-card:hover img { transform: scale(1.05); filter: brightness(0.55); }
.team-label {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.1rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
.team-label .name {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  display: block;
}
.team-label .role { font-size: 0.95rem; opacity: 0.9; }
.team-view {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.team-card:hover .team-view, .team-card:focus-visible .team-view { opacity: 1; }
.team-view span {
  border: 1px solid rgba(255,255,255,0.7);
  padding: 0.55rem 1.2rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.35);
}

/* ---------- Team modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 20, 0.72);
  padding: 1.5rem;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 12px;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.modal-box img { width: 100%; height: 100%; object-fit: cover; }
.modal-content { padding: 2rem; }
.modal-content h3 { color: var(--navy); font-size: 1.5rem; }
.modal-content .role {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.modal-content p { font-size: 0.95rem; margin-bottom: 1rem; }
.modal-content a { color: var(--navy); }
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Partners ---------- */
.partners { padding: 5rem 0 6rem; }
.marquee { overflow: hidden; }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 5rem;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img {
  height: 110px;
  width: auto;
  object-fit: contain;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: #fff;
  padding: 2.5rem 0;
  font-family: var(--font-head);
}
.site-footer .sub { color: rgba(255,255,255,0.45); margin-top: 0.35rem; font-size: 0.95rem; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: #b9b9b9;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.to-top.show { opacity: 0.85; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .story-card { width: calc((100% - 1.75rem) / 2); }
  .team-card { width: calc((100% - 3.5rem) / 3); }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .modal-box { grid-template-columns: 1fr; }
  .modal-box img { max-height: 300px; }
}
@media (max-width: 640px) {
  .site-header { padding: 0.6rem 1rem; background: var(--black); }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--black);
    padding: 0.75rem 0 1.25rem;
  }
  .main-nav.open { display: flex; }
  .main-nav .sep { display: none; }
  .nav-toggle { display: block; }
  .story-card { width: 88%; }
  .team-card { width: 70%; }
  .carousel-btn { display: none; }
  .marquee-track img { height: 72px; }
  .marquee-track { gap: 3rem; }
}
