/* ===========================================================
   Save the World Foundation — styles.css
   =========================================================== */

/* --- Colour variables (used throughout with var(--name)) --- */
:root {
  --ink:    #13303A;  /* dark text */
  --slate:  #5B6B78;  /* secondary text */
  --forest: #0F7A52;  /* dark green */
  --leaf:   #16A34A;  /* medium green */
  --grn:    #22C55E;  /* bright green */
  --teal:   #2DD4BF;  /* teal accent */
  --blu:    #3B82F6;  /* blue accent */
  --mint:   #D6F0EA;  /* light green tint */
  --bg1:    #EAF6F3;  /* page background start */
  --bg2:    #E7F0FB;  /* page background end */
  --gold:   #F2B23E;  /* gold accent */
  --line:   #E2ECEA;  /* border / divider colour */
}

/* --- Box sizing for all elements --- */
* {
  box-sizing: border-box;
}

/* --- Smooth scroll when clicking nav links --- */
html {
  scroll-behavior: smooth;
}

/* --- Base page styles --- */
body {
  margin: 0;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  background: linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* --- Text selection highlight --- */
::selection {
  background: var(--grn);
  color: #fff;
}

/* --- Headings use the display font --- */
h1, h2, h3, h4, .font-display {
  font-family: "Bricolage Grotesque", sans-serif;
}

/* --- Gradient text (used on "Save the World" in logo + hero) --- */
.brand-grad {
  background: linear-gradient(100deg, var(--teal), var(--leaf));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Small uppercase label above headings --- */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}


/* ===================== BUTTONS ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* Green gradient button (primary CTA) */
.btn-primary {
  background: linear-gradient(100deg, var(--grn), var(--leaf));
  color: #fff;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 12px 26px -12px rgba(22, 163, 74, 0.65);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -14px rgba(22, 163, 74, 0.8);
}

/* Teal-to-blue gradient button */
.btn-grad {
  background: linear-gradient(100deg, var(--teal), var(--blu));
  color: #fff;
  padding: 0.85rem 1.6rem;
  box-shadow: 0 12px 26px -12px rgba(59, 130, 246, 0.55);
}
.btn-grad:hover {
  transform: translateY(-2px);
}

/* White outline button */
.btn-soft {
  background: #fff;
  color: var(--forest);
  padding: 0.8rem 1.5rem;
  border: 1.5px solid var(--line);
}
.btn-soft:hover {
  border-color: var(--grn);
  color: var(--leaf);
  transform: translateY(-2px);
}

/* Semi-transparent button (used on dark backgrounds) */
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}


/* ===================== CARDS ===================== */

.card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px -30px rgba(16, 40, 32, 0.30);
}

.card-hover {
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -28px rgba(16, 40, 32, 0.40);
}

/* Small icon tile (green-tinted square with icon inside) */
.icon-tile {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #E3F6EF, #DCEFFB);
  color: var(--leaf);
}

/* Team member initials avatar (circle with initials) */
.avatar {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--blu));
  color: #fff;
  margin: 0 auto;
}

/* Team member photo (when a real photo is available) */
.team-photo {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  object-fit: cover;
  object-position: top;
  display: block;
  margin: 0 auto;
  border: 2px solid var(--line);
}

/* Value card coloured left border accents */
.value    { border-left: 4px solid var(--grn); }
.value.v2 { border-color: var(--teal); }
.value.v3 { border-color: var(--blu); }
.value.v4 { border-color: var(--gold); }


/* ===================== SCROLL REVEAL ===================== */
/* Elements start invisible + shifted down, then get class "in" to animate in */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}


/* ===================== HERO BLOBS ===================== */
/* The big blurred colour circles behind the hero section */

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}


/* ===================== IMAGE FRAME ===================== */
/* Rounded image container with dark gradient overlay and caption */

.frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 24px 50px -28px rgba(16, 40, 32, 0.45);
}

.frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.frame:hover img {
  transform: scale(1.05);
}

/* Dark gradient at the bottom so the caption is readable */
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 40, 30, 0.5), transparent 55%);
}

.frame .caption {
  position: absolute;
  left: 1rem;
  bottom: 0.9rem;
  z-index: 2;
  color: #fff;
  font-weight: 600;
}


/* ===================== CONTRIBUTION / DONATION FORM ===================== */

/* Preset amount buttons ($5, $10, $25 etc) */
.amount {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.6rem 0;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.amount:hover {
  border-color: var(--grn);
}
.amount.active {
  background: linear-gradient(100deg, var(--grn), var(--leaf));
  color: #fff;
  border-color: transparent;
}

/* Contribution option buttons (Cash / Goods / Labour) */
.payopt {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.payopt:hover {
  border-color: var(--grn);
}
.payopt.active {
  border-color: var(--grn);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Form inputs and selects */
.field {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
}
.field:focus {
  border-color: var(--grn);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}


/* ===================== BIO TOGGLE ===================== */
/* Expandable bio text on team cards */

.bio {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}
.bio.open {
  max-height: 340px;
  opacity: 1;
  margin-top: 1rem;
}



/* ===================== NAVIGATION ===================== */

.nav-link {
  position: relative;
  color: var(--slate);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--forest);
}
/* Underline indicator for the active section */
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(100deg, var(--teal), var(--leaf));
  border-radius: 2px;
}


/* ===================== MARQUEE ===================== */
/* Scrolling text banner */

.marquee {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ===================== FORM SECTION VISIBILITY ===================== */
/* Used to hide cash/volunteer fields until the matching option is selected */

.hidden-section {
  display: none;
}


/* ===================== REDUCED MOTION ===================== */
/* Respects the OS setting for users who get motion sickness */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee {
    animation: none;
  }
  .frame img {
    transition: none;
  }
}
