/* Core variables */
:root {
  --blue-dark: #003056;
  --blue-accent: #14c7f4;
  --off-white: #f4f5f4;
  --yellow: #e4ff1a;
  --text-main: #f4f5f4;
  --text-dark: #001728;

  /* Spacing controls (tune these to taste) */
  --section-gap: 2.25rem;  /* gap between major sections */
  --card-pad-y: 3.25rem;
  --card-pad-x: 3rem;
  --card-radius: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Calibri", "Trebuchet MS", system-ui, sans-serif;
  background-color: var(--blue-dark);
  color: var(--text-main);
}

html,
body {
  overscroll-behavior-y: none;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Shared layout container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* NAVBAR */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar {
  width: 100%;
  background-color: rgba(0, 48, 86, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.12);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.nav-left,
.nav-centre,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header.scrolled .navbar {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-img {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.nav-centre a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--off-white);
  opacity: 0.9;
}

.nav-centre a:hover {
  opacity: 1;
}

.nav-right .small {
  font-size: 0.85rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background-color: var(--yellow);
  color: var(--blue-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
  background-color: #f1ff4b;
}

.btn-secondary {
  background-color: var(--blue-dark);
  color: var(--off-white);
}

.btn-secondary:hover {
  background-color: #012b4a;
}

/* White card (this is where the big gaps were coming from) */
.white-card {
  background: #f4f5f4;
  border-radius: var(--card-radius);
  padding: var(--card-pad-y) var(--card-pad-x);
  max-width: 1100px;
  margin: var(--section-gap) auto;

  /* Softer, more atmospheric elevation */
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);

  position: relative;
  z-index: 5;
}


/* Give cards breathing room on small screens */
@media (max-width: 640px) {
  .white-card {
    padding: 2.25rem 1.5rem;
  }
}

/* A shared title style so you can control consistency */
.section-title {
  margin: 0 0 2rem;
  color: var(--blue-dark);
  font-weight: 700;
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding-top: calc(18vh + 80px); /* keeps your existing hero spacing, but accounts for fixed nav */
  overflow: hidden;
}

/* Full video background */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: auto;
  min-height: 100%;
  min-width: 100%;
  object-fit: cover;
  filter: blur(2px);
  transform: translate(-50%, -50%) scale(1.05);
  z-index: -2;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 48, 86, 0.70) 0%,
    rgba(0, 48, 86, 0.55) 35%,
    rgba(0, 48, 86, 0.65) 65%,
    rgba(0, 48, 86, 0.90) 100%
  );
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  background: linear-gradient(
    to bottom,
    rgba(0, 48, 86, 0) 0%,
    rgba(0, 48, 86, 0.35) 55%,
    rgba(0, 48, 86, 0.75) 100%
  );
  z-index: 1;
  pointer-events: none;
}


.hero .container {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.hero-content {
  text-align: left;
  max-width: 800px;
  margin: 0;
  position: relative;
  z-index: 5;
  margin-top: -5vh;
}

.hero h1 {
  font-size: 60pt;
  line-height: 1.05;
  margin: 0 0 1.2rem;
  overflow-wrap: break-word;
}

.hero-subtitle {
  margin: 0 0 2.2rem;
  font-size: 1.25rem;
  color: var(--blue-accent);
  padding-right: 15vw;
}

/* STATS (card content styles) */
.stats-section {
  color: var(--blue-dark);
}

/* Pull stats card up into hero (desktop default) */
#stats {
  margin-top: -7rem;        /* overlap hero */
  position: relative;
  z-index: 10;              /* ensure it sits above hero */
  transition: opacity 280ms ease, filter 280ms ease, transform 280ms ease;
}

/* When you're right at the top, soften it slightly (not “disabled”) */
body.at-top #stats {
  opacity: 0.92;
  filter: saturate(0.95) contrast(0.98);
  transform: translateY(6px);
}


/* Stats heading inside white card */
.stats-section h1 {
  text-align: center;
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 2.75rem;
  color: var(--blue-dark);
  font-weight: 700;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4.5rem;
  text-align: center;
}

.stat-number {
  font-size: 50pt;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13pt;
  opacity: 0.85;
  margin-top: 0.2rem;
  max-width: 260px;
  margin-inline: auto;
}

@media (max-width: 900px) {
  .stats-container {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}

@media (max-width: 768px) {
  #stats {
    margin-top: -3.5rem; /* softer overlap on mobile */
  }

  .stats-section h1 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
}

.stats-sources {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.45);
  font-style: italic;
}

.stats-sources a {
  color: inherit;
  text-decoration: none;
}

.stats-sources a:hover {
  text-decoration: underline; /* optional: only on hover */
}

#stats.white-card {
  padding-bottom: 1rem;
}

#stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(
    to bottom,
    rgba(0, 48, 86, 0.12),
    transparent
  );
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  pointer-events: none;
}


/* PROBLEMS */
.problems-section {
  padding: calc(var(--section-gap) + 1rem) 0;
}

.problems-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}

.problem-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 900px;
}

.problem-img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
}

.problem-text {
  text-align: left;
  max-width: 450px;
}

.problem-text h3 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  font-weight: 700;
}

.problem-text p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--blue-accent);
}

@media (max-width: 900px) {
  .problem-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .problem-img {
    width: 100%;
    height: auto;
  }
}

/* ABOUT (card content styles) */
.about-section {
  color: var(--blue-dark);
}

.about-inner {
  text-align: centre;
}

.about-text {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  font-size: 2.1rem;          /* bigger */
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
  color: var(--blue-dark);
}

@media (max-width: 768px) {
  .about-text {
    font-size: 1.7rem;
    line-height: 1.35;
  }
}


/* =========================
   WE'RE BUILDING MANTARAI
   ========================= */

.building-section {
  padding: calc(var(--section-gap) + 1rem) 0;
  color: var(--off-white);
}

.building-inner {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

/* Top copy stays centred */
.building-copy {
  text-align: center;
  margin-inline: auto;
  max-width: 820px;
}

.building-logo {
  display: block;
  margin: 0 auto 1.75rem;
  width: min(460px, 92%);
  height: auto;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.28));
}

.building-copy p {
  margin: 0 0 2.75rem; /* was 0 */
  max-width: 820px;
  margin-inline: auto;
  font-size: 1.35rem;
  line-height: 1.65;
  color: var(--off-white);
  opacity: 0.98;
}

/* Two-column layout: left text + right image */
.building-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3.5rem;
  align-items: stretch; /* makes both columns same row height */
}

/* Left: feature list (bigger + fills the height of the grid row) */
.building-features {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  justify-content: space-between; /* spreads items so the block has clear top/bottom */
  height: 100%;                  /* critical for matching image height */
  min-height: 0;
}

.feature-item h3 {
  margin: 0 0 0.55rem;
  font-size: 1.55rem; /* bigger */
  line-height: 1.2;
  font-weight: 700;
  color: var(--off-white);
}

.feature-item p {
  margin: 0;
  font-size: 1.12rem; /* bigger */
  line-height: 1.6;
  color: rgba(20, 199, 244, 0.95);
  max-width: 44ch;
}

/* Right: image matches the full height of the left column */
.building-image {
  display: flex;
  justify-content: flex-end;
  align-items: stretch; /* stretch to match left column height */
  height: 100%;         /* critical */
  min-height: 0;
  border-radius: 26px;
}

.building-image-frame {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;

  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.2);
}

.building-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 26px;
}

/* Responsive */
@media (max-width: 900px) {
  .building-copy p {
    font-size: 1.15rem;
  }

  .building-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .building-features {
    justify-content: flex-start;
    gap: 1.5rem;
  }

  .building-image {
    justify-content: center;
  }

  .building-image-frame {
    height: auto;
    aspect-ratio: 16 / 10;
    width: min(900px, 100%);
  }

  .feature-item h3 {
    font-size: 1.35rem;
  }

  .feature-item p {
    font-size: 1.02rem;
    max-width: none;
  }
}


/* SUPPORTED BY */
.supported-section {
  padding: calc(var(--section-gap) + 0.5rem) 0 calc(var(--section-gap) + 1.5rem);
  text-align: center;
  color: var(--off-white);
}


.supported-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.supported-section .container {
  max-width: 1100px;
}

.logo-marquee {
  position: relative;
  overflow: hidden;
  height: 120px;
  width: 100%;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
}

.logo-track {
  display: flex;
  width: max-content;
  animation: logo-slide 20s linear infinite;
}

.logo-track img {
  height: 120px;
  width: auto;
  flex-shrink: 0;
  user-select: none;
  pointer-events: none;
}

@keyframes logo-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.logo-marquee::before,
.logo-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 340px;
  z-index: 5;
  pointer-events: none;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--blue-dark), rgba(0, 48, 86, 0.9), transparent);
}

.logo-marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--blue-dark), rgba(0, 48, 86, 0.9), transparent);
}

@media (max-width: 768px) {
  .supported-section h2 {
    font-size: 1.7rem;
  }
}



/* =========================
   NEWSLETTER
   ========================= */

.newsletter-section {
  color: var(--blue-dark);
}

/* Layout */
.newsletter-inner {
  display: grid;
  grid-template-columns: 160px 1fr; /* pushes content right */
  gap: 3rem;
  align-items: center; /* vertical centring of logo */
}

/* Logo */
.newsletter-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-logo img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

/* Content */
.newsletter-content {
  text-align: left;
}

.newsletter-content h1 {
  margin: 0 0 1.25rem;
  line-height: 1.15;
}

/* Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.newsletter-input {
  width: min(360px, 100%);
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #d0d0d0;
  font-size: 0.95rem;
}

.newsletter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.newsletter-status {
  font-size: 0.95rem;
  color: var(--blue-dark);
  white-space: nowrap;
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 768px) {
  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
  }

  .newsletter-logo img {
    width: 96px;
    height: 96px;
  }

  .newsletter-content {
    text-align: center;
  }

  .newsletter-form {
    align-items: center;
  }
}

.newsletter-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.75;
}


/* FOOTER */
.site-footer {
  position: relative;
  margin-inline: 1.5rem;
  padding: 4.5rem 0 5rem;
  font-size: 0.8rem;
  color: var(--off-white);
  z-index: 1;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--blue-dark);
  border-radius: 28px 28px 0 0;
  z-index: -1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.footer-copy {
  margin: 0;
  opacity: 0.7;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: right;
}

.footer-right a {
  opacity: 0.8;
}

.footer-right a:hover {
  opacity: 1;
}

/* Scroll reveal – only hides things if JS is enabled */
html.js .fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

html.js .fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .nav-centre {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    text-align: left;
  }
}

/* 1) Centre "Why organisations need support" */
#stats .section-title,
#stats h2 {
  text-align: center;
  width: 100%;
}

/* 2) Centre the About text (fixes centre typo + ensures the heading centres) */
.about-inner {
  text-align: center;
}

.about-text {
  text-align: center;
  margin-inline: auto;
  max-width: 920px; /* optional: keeps line length nice */
}

/* 3) "What we're building" aligned to top + bigger header */
#building .building-inner {
  align-items: start; /* top-align copy + image */
}

#building .building-copy h2 {
  font-size: 2.1rem;   /* bigger header */
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

#building .building-copy p {
  margin-top: 0;
  line-height: 1.55;
}

/* 4) Make "Be the first to try MantaRAI" bigger */
#newsletter .section-title,
#newsletter h2,
#newsletter h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

/* =========================
   TEAM PAGE
   ========================= */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: stretch;
}

.team-card {
  position: relative; /* enables reliable z-index + overlay safety */
  background: #F4F5F4; /* matches your “white box” colour */
  border-radius: var(--card-radius);
  padding: 2.75rem;
  color: var(--blue-dark);

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);

  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* If you ever add decorative overlays with pseudo-elements, don't let them steal clicks */
.team-card::before,
.team-card::after {
  pointer-events: none;
}

.team-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 22px;
  margin: 0 0 1.25rem 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.team-name {
  margin: 0 0 0.25rem;
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--blue-dark);
}

.team-role {
  margin: 0 0 1.25rem;
  font-weight: 600;
  color: rgba(0, 23, 40, 0.65);
}

.team-bio {
  margin: 0 0 1.75rem;
  line-height: 1.65;
  color: rgba(0, 23, 40, 0.85);
  max-width: 60ch;
}

.team-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;   /* stack vertically */
  align-items: flex-start;  /* left align */
  gap: 1rem;
}

.team-email {
  display: block;           /* forces it onto its own line */
  margin: 0;                /* remove inline spacing */
}


.team-email:hover {
  text-decoration: underline;
  opacity: 0.95;
}

/* Button should not be forced to auto-margin now; actions container handles positioning */
.team-card .btn {
  margin-top: 0;
  width: fit-content;
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    padding: 2.25rem 1.75rem;
  }

  .team-photo {
    width: 128px;
    height: 128px;
  }
}

/* =========================
   CONTACT PAGE
   ========================= */

.contact-title {
  margin: 0 0 0.75rem;
  font-size: 3rem;
  line-height: 1.1;
  color: var(--off-white);
}

.contact-intro {
  margin: 0;
  max-width: 640px;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--blue-accent);
}

.contact-container {
  max-width: 640px;
  color: var(--blue-dark);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(0, 23, 40, 0.8);
}

.contact-field input,
.contact-field textarea {
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid #d0d0d0;
  font-family: inherit;
}

.contact-field textarea {
  resize: vertical;
}

.contact-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: rgba(0, 23, 40, 0.65);
}

.contact-note a {
  color: inherit;
  text-decoration: underline;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .contact-title {
    font-size: 2.3rem;
  }

  .contact-container {
    max-width: 100%;
  }
}
