/* ==========================================================================
   The Dotse Foundation — Front Page Styles
   Brand colours sampled directly from images/logo-source.png
   ========================================================================== */

:root {
  /* Brand palette */
  --color-white: #ffffff;
  --color-off-white: #f7f8f9;
  --color-blue: #5170ff;          /* logo blue */
  --color-blue-dark: #3a55d6;     /* hover / darker blue */
  --color-green: #a1cd47;         /* logo green — graphic accents */
  --color-green-deep: #6d9530;    /* readable green for text */
  --color-black: #14181b;
  --color-black-soft: #1f2428;
  --color-text-muted: #5b6670;
  --color-border: #e4e9ec;

  /* Type */
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* Layout */
  --container-width: 1180px;
  --header-height: 84px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(20, 24, 27, 0.08);
  --shadow-md: 0 14px 34px rgba(20, 24, 27, 0.13);
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-black-soft);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

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

/* Keep anchored sections clear of the fixed header */
section[id] {
  scroll-margin-top: var(--header-height);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-green-deep);
  margin-bottom: 12px;
}

/* ---------- Buttons (flat — no glow) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn-lg {
  padding: 15px 34px;
  font-size: 16px;
}

.btn-primary {
  background: var(--color-blue);
  color: var(--color-white);
  border-color: var(--color-blue);
}

.btn-primary:hover {
  background: var(--color-blue-dark);
  border-color: var(--color-blue-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.75);
}

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

.btn-light {
  background: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
}

.btn-light:hover {
  background: transparent;
  color: var(--color-white);
}

.btn-dark {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.btn-dark:hover {
  background: var(--color-blue);
  border-color: var(--color-blue);
}

.link-arrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-blue);
  transition: color var(--transition);
}

.link-arrow::after {
  content: ' \2192';
}

.link-arrow:hover,
.work-card-link:hover .link-arrow {
  color: var(--color-green-deep);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), height var(--transition);
}

.site-header.scrolled {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  height: 74px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 44px;
}

/* Push the nav (and everything after it) over to the right-hand side */
.main-nav {
  margin-left: auto;
}

/* Logo — two artwork variants cross-faded on scroll */
.logo {
  position: relative;
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.logo-img {
  height: 52px;
  width: auto;
  transition: opacity var(--transition), height var(--transition);
}

.site-header.scrolled .logo-img {
  height: 46px;
}

.logo-img-dark {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.site-header.scrolled .logo-img-light {
  opacity: 0;
}

.site-header.scrolled .logo-img-dark {
  opacity: 1;
}

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

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-white);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition);
}

.site-header.scrolled .main-nav a {
  color: var(--color-black-soft);
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-green);
  transition: width var(--transition);
}

.main-nav a:hover::after {
  width: 100%;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: background var(--transition);
}

.site-header.scrolled .nav-toggle span {
  background: var(--color-black);
}

/* ---------- Inner pages (no hero behind the header) ---------- */
.page-inner .site-header {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.page-inner .logo-img-light {
  opacity: 0;
}

.page-inner .logo-img-dark {
  opacity: 1;
}

.page-inner .main-nav a {
  color: var(--color-black-soft);
}

.page-inner .nav-toggle span {
  background: var(--color-black);
}

.page-stub {
  padding: calc(var(--header-height) + 120px) 0 140px;
}

/* ---------- About page ---------- */

/* Founders photo as a full-bleed header, tinted with the brand gradient */
.about-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* holds the three photo layers; absolute on desktop so the title overlays it,
   and a normal-flow banner on mobile so nobody gets cropped out */
.about-hero-frame {
  position: absolute;
  inset: 0;
}

.about-hero-media {
  position: absolute;
  inset: 0;
  background-image: url('../images/founders-banner.jpg');
  background-size: cover;
  /* the group sits centre-left; hold them in frame as the band gets taller */
  background-position: 58% top;
}

/* light blue -> green wash; soft-light tints without draining the photo */
.about-hero-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(81, 112, 255, 0.4) 0%, rgba(79, 143, 212, 0.2) 50%, rgba(161, 205, 71, 0.34) 100%);
  mix-blend-mode: soft-light;
}

/* Darkening kept to the two bands that carry white text — a short strip under
   the header nav, and the lower band behind the headline. The middle, where
   the faces are, stays essentially untouched. */
.about-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 16, 24, 0.46) 0%,
    rgba(10, 16, 24, 0.12) 22%,
    rgba(10, 16, 24, 0.05) 40%,
    rgba(10, 16, 24, 0.66) 100%);
}

.about-hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  padding-top: calc(var(--header-height) + 56px);
  padding-bottom: 60px;
  max-width: var(--container-width);
}

.about-hero .eyebrow {
  color: #b9e46a;
}

.about-hero h1 {
  color: var(--color-white);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  margin-bottom: 14px;
  text-shadow: 0 2px 18px rgba(8, 14, 22, 0.4);
}

.about-hero-sub {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
}

/* Founders — one plain paragraph; the photo above carries the page */
.founders {
  padding: 72px 0 0;
}

.founders-inner {
  max-width: 720px;
  margin: 0 auto;
}

.founders-inner p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.founders-inner strong {
  color: var(--color-black);
  font-weight: 600;
}

.about-section {
  padding: 62px 0 0;
}

.about-column {
  max-width: 720px;
  margin: 0 auto;
}

.about-column h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin-bottom: 18px;
}

.about-column p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.about-column p strong {
  color: var(--color-black);
  font-weight: 600;
}

/* Who we serve */
.about-serve {
  padding-bottom: 10px;
}

.serve-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 940px;
  margin: 28px auto 0;
}

.serve-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--color-off-white);
  border-top: 3px solid var(--color-green);
}

.serve-card:last-child {
  border-top-color: var(--color-blue);
}

.serve-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.serve-card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.serve-card p strong {
  color: var(--color-black);
  font-weight: 600;
}

/* Motto */
.about-motto {
  margin-top: 72px;
  padding: 72px 0;
  background: var(--color-black);
  text-align: center;
}

.about-motto .container {
  max-width: 760px;
}

.about-motto .eyebrow {
  color: var(--color-green);
}

.about-motto blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-white);
  margin-bottom: 22px;
}

.about-motto-body {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
}

.about-close {
  padding: 72px 0 120px;
  text-align: center;
}

.about-close .container {
  max-width: 700px;
}

.about-close p {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-black);
  margin-bottom: 32px;
}

.about-close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.page-head {
  padding: calc(var(--header-height) + 80px) 0 48px;
  background: var(--color-off-white);
}

.back-link {
  display: block;
  width: fit-content;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 26px;
  transition: color var(--transition);
}

.back-link::before {
  content: '\2190  ';
}

.back-link:hover {
  color: var(--color-blue);
}

.page-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 14px;
}

.page-lede {
  color: var(--color-text-muted);
  font-size: 18px;
  max-width: 620px;
}

.page-body {
  padding: 56px 0 120px;
}

.page-image {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
}

.page-note {
  margin-top: 32px;
  color: var(--color-text-muted);
  font-size: 16px;
}

.page-stub h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.page-stub p {
  color: var(--color-text-muted);
  font-size: 17px;
  margin-bottom: 28px;
}

/* ---------- Story pages (Our Work write-ups) ---------- */
.story-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.story-hero-media {
  position: absolute;
  inset: 0;
  background-image: url('../images/twao/hero.jpg');
  background-size: cover;
  background-position: center 45%;
}

.story-hero--eotl .story-hero-media {
  background-image: url('../images/eotl/hero.jpg');
  background-position: center 40%;
}

.story-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 18, 26, 0.55) 0%, rgba(12, 18, 26, 0.3) 40%, rgba(12, 18, 26, 0.85) 100%);
}

.story-hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  padding-bottom: 64px;
  padding-top: calc(var(--header-height) + 48px);
}

.story-hero .eyebrow {
  color: var(--color-green);
}

.story-hero h1 {
  color: var(--color-white);
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  margin-bottom: 12px;
}

.story-hero-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
}

.story-intro {
  padding: 84px 0 56px;
}

.story-intro .container {
  max-width: 760px;
}

.story-intro .back-link {
  margin-bottom: 34px;
}

.story-lede {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-black);
  margin-bottom: 24px;
}

.story-intro p:not(.story-lede) {
  font-size: 17px;
  color: var(--color-text-muted);
}

/* Mosaic — one tall image beside two stacked */
.story-mosaic {
  padding: 24px 0 8px;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-auto-rows: 260px;
  gap: 20px;
}

.mosaic-tall {
  grid-row: span 2;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
  background: var(--color-off-white);
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mosaic-item:hover img {
  transform: scale(1.04);
}

.mosaic-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 18px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-white);
  background: linear-gradient(180deg, rgba(12, 18, 26, 0) 0%, rgba(12, 18, 26, 0.8) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.mosaic-item:hover figcaption,
.mosaic-item:focus-within figcaption {
  opacity: 1;
}

.story-quote {
  padding: 72px 0;
}

.story-quote .container {
  max-width: 820px;
}

.story-quote blockquote {
  position: relative;
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-black);
  text-align: center;
  padding-top: 40px;
}

.story-quote blockquote::before {
  content: '\201C';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5rem;
  line-height: 1;
  color: var(--color-green);
}

.story-band {
  padding: 24px 0 96px;
}

.story-band h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin-bottom: 32px;
  text-align: center;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 20px;
}

.story-close {
  padding: 0 0 120px;
  text-align: center;
}

.story-close .container {
  max-width: 700px;
}

.story-close p {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(10, 14, 18, 0.94);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  margin: 0 auto;
}

.lightbox-figure figcaption {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--color-white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-white);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center 42%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 18, 26, 0.62) 0%, rgba(12, 18, 26, 0.48) 45%, rgba(12, 18, 26, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding-top: var(--header-height);
  color: var(--color-white);
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: var(--color-white);
  margin-bottom: 34px;
}

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

/* ---------- Section heading ---------- */
.section-heading {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  margin-bottom: 14px;
}

.section-sub {
  color: var(--color-text-muted);
  font-size: 16px;
}

/* ---------- About ---------- */
.split-section {
  padding: 110px 0;
  background: var(--color-off-white);
}

.split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.split-media img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
}

.split-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  margin-bottom: 28px;
}

.split-copy .btn {
  margin-top: 4px;
}

/* ---------- Our Work ---------- */
.work-section {
  padding: 110px 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 940px;
  margin: 0 auto;
}

.work-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.work-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

/* The whole card is the link */
.work-card-link {
  display: block;
  height: 100%;
}

.work-card-media {
  height: 260px;
  overflow: hidden;
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-body {
  padding: 30px;
}

.work-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.work-card-body p {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 18px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  padding: 110px 0;
  text-align: center;
  background: linear-gradient(120deg, var(--color-blue) 0%, #4f8fd4 55%, var(--color-green) 100%);
}

.cta-content {
  max-width: 660px;
  color: var(--color-white);
}

.cta-content h2 {
  color: var(--color-white);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 16px;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  margin-bottom: 32px;
}

.cta-content .hero-actions {
  justify-content: center;
}

/* ---------- How to donate ---------- */
.donate-section {
  padding: 110px 0;
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 940px;
  margin: 0 auto;
}

.donate-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 34px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.donate-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.donate-tag {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-green-deep);
  margin-bottom: 8px;
}

.donate-card h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.donate-row {
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}

.donate-row dt {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

/* Account numbers: tabular figures so digits are easy to read and check */
.donate-row dd {
  font-family: 'SFMono-Regular', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-black);
  letter-spacing: 0.04em;
  word-break: break-word;
}

.donate-row dd a {
  color: var(--color-black);
  transition: color var(--transition);
}

.donate-row dd a:hover {
  color: var(--color-blue);
}

.donate-foot {
  margin-top: 36px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 16px;
}

.donate-foot a {
  color: var(--color-blue);
  font-weight: 500;
  word-break: break-word;
}

.donate-foot a:hover {
  text-decoration: underline;
}

/* ---------- Contact ---------- */
.contact-section {
  padding: 110px 0;
  background: var(--color-off-white);
}

.contact-details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 60px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.contact-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-blue);
}

.contact-item a,
.contact-item span:last-child {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-black);
}

.contact-item a:hover {
  color: var(--color-blue);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-black);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 28px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.footer-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Logo sits in the right corner, dimmed until hovered */
.footer-logo {
  flex-shrink: 0;
  line-height: 0;
  opacity: 0.55;
  transition: opacity var(--transition), transform var(--transition);
}

.footer-logo:hover,
.footer-logo:focus-visible {
  opacity: 1;
  transform: scale(1.03);
}

.footer-logo img {
  height: 68px;
  width: auto;
}

.footer-motto {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 17px;
  color: var(--color-green);
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--color-white);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  /* copyright sits bottom-left; the right side stays clear of the
     fixed back-to-top button that overlaps this corner */
  padding-right: 80px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.footer-social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.footer-social a:hover {
  color: var(--color-black);
  background: var(--color-white);
  border-color: var(--color-white);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--color-blue);
  color: var(--color-white);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), background var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-blue-dark);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .split-media img {
    height: 360px;
  }
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .main-nav.open {
    max-height: 320px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 14px 0;
    color: var(--color-black-soft) !important;
  }

  .nav-toggle {
    display: flex;
  }

  /* nav is out of flow here, so the toggle needs its own push right */
  .header-actions {
    margin-left: auto;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .logo-img {
    height: 44px;
  }

  .work-grid,
  .donate-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mosaic-grid,
  .story-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: 14px;
  }

  .mosaic-tall {
    grid-row: span 1;
  }

  /* no hover on touch — keep captions permanently visible */
  .mosaic-item figcaption {
    opacity: 1;
  }

  .story-hero {
    min-height: 60vh;
  }

  .story-intro {
    padding: 56px 0 40px;
  }

  .story-band {
    padding: 20px 0 72px;
  }

  .story-close {
    padding-bottom: 84px;
  }

  .serve-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .founders {
    padding-top: 56px;
  }

  /* Photo becomes a banner and the title drops below it — a 3.25:1 photo
     cropped into a tall band loses two of the four founders off the sides. */
  .about-hero {
    display: block;
    min-height: 0;
    background: var(--color-black);
    padding-top: var(--header-height);
  }

  .about-hero-frame {
    position: relative;
    inset: auto;
    aspect-ratio: 16 / 10;
  }

  .about-hero-media {
    background-position: center;
  }

  .about-hero-scrim {
    background: linear-gradient(180deg, rgba(10, 16, 24, 0.34) 0%, rgba(10, 16, 24, 0.12) 45%, rgba(10, 16, 24, 0.5) 100%);
  }

  .about-hero-content {
    padding-top: 32px;
    padding-bottom: 40px;
  }

  .about-motto {
    margin-top: 56px;
    padding: 56px 0;
  }

  .about-close {
    padding: 56px 0 84px;
  }

  .about-close-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .split-section,
  .work-section,
  .donate-section,
  .contact-section {
    padding: 76px 0;
  }

  .cta-banner {
    padding: 84px 0;
  }

  .contact-details {
    gap: 32px;
  }

  .footer-top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 28px;
  }

  .footer-logo {
    opacity: 1;
  }

  .footer-bottom {
    padding-right: 64px;
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .cta-content .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
