/* BSR Welfare Organisation UK
   Colours come from the logo: Bangladesh flag green and red, with the maroon of the wordmark. */

:root {
  --green: #0A4B33;
  --green-deep: #073826;
  --red: #D3222A;
  --red-dark: #B21A21;
  --maroon: #6B1D22;
  --ink: #17231D;
  --muted: #4A5A51;
  --paper: #FFFFFF;
  --rice: #EEF2EA;
  --mint: #CFE3D2;
  --line: #D5DDD3;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(2.25rem, 5vw, 4rem); color: var(--maroon); }
h3 { font-size: 1.5rem; font-weight: 750; }

p { margin: 0 0 1rem; max-width: 62ch; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .7rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 750;
  font-size: 1.0625rem;
}
.brand-text small { font-size: .8125rem; color: var(--mint); }

.nav-list {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a:not(.btn) {
  display: block;
  padding: .5rem .8rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--mint);
  text-decoration: none;
  border-radius: 6px;
}
.nav-list a:not(.btn):hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.nav-list .btn { margin-left: .5rem; min-height: 2.6rem; padding-block: .5rem; }

.nav-toggle {
  display: none;
  min-height: 2.75rem;
  padding: .5rem 1.1rem;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: 600 1rem/1 var(--body);
  cursor: pointer;
}

/* Hero */

.hero {
  background: var(--green);
  color: #fff;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 6vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.75rem);
  font-stretch: 68%;
  font-weight: 850;
  line-height: .95;
  letter-spacing: -.005em;
  max-width: 14ch;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--mint);
  max-width: 34rem;
  margin-top: 1.75rem;
}

.motto {
  display: flex;
  flex-direction: column;
  margin: 2.5rem 0 0;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
}
.motto-en { font-size: .9375rem; font-weight: 400; color: var(--mint); }

/* The disc: a photo inside the red circle of the flag */
.disc {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  padding: clamp(10px, 1.4vw, 18px);
}
.disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-disc {
  position: relative;
  z-index: 2;
  margin: 0;
  justify-self: center;
  width: min(100%, 33rem);
}
.hero-disc figcaption {
  margin-top: 1rem;
  text-align: center;
  font-size: .9375rem;
  color: var(--mint);
}

/* One load moment: the disc rises into place like the sun on the flag */
@media (prefers-reduced-motion: no-preference) {
  .hero-disc .disc { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > * { animation: fade .8s ease both; }
  .hero-copy > :nth-child(2) { animation-delay: .1s; }
  .hero-copy > :nth-child(3) { animation-delay: .2s; }
  .hero-copy > :nth-child(4) { animation-delay: .3s; }
}
@keyframes rise {
  from { transform: translateY(18%) scale(.92); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* About */

.about { padding-block: var(--section); }

.about-intro { max-width: 40rem; }
.about-intro h2 { margin-bottom: 1.5rem; }

.villages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin: clamp(3rem, 7vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
}
.villages li {
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--maroon);
  padding-top: .5rem;
}
.letter {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(6rem, 19vw, 15rem);
  line-height: .85;
  color: var(--maroon);
}
.village {
  margin-top: .75rem;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 700;
  font-size: clamp(1.125rem, 2.2vw, 1.625rem);
}

/* Work */

.work {
  background: var(--rice);
  padding-block: var(--section);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem var(--gutter);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head p { color: var(--muted); margin: 0; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem, 2.5vw, 2rem);
}

.project h3 { margin: 1.1rem 0 .4rem; color: var(--ink); }
.project p { color: var(--muted); margin: 0; }

.zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 6px;
  overflow: hidden;
}
.zoom img {
  width: 100%;
  height: var(--h, clamp(15rem, 26vw, 24rem));
  object-fit: cover;
}

.p-flood  { grid-column: span 8; --h: clamp(18rem, 34vw, 30rem); }
.p-food   { grid-column: span 4; --h: clamp(18rem, 34vw, 30rem); }
.p-homes  { grid-column: span 5; }
.p-trees  { grid-column: span 7; }
.p-winter { grid-column: span 7; }
.p-london {
  grid-column: span 5;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(15rem, 26vw, 24rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--green);
  color: #fff;
  border-radius: 6px;
}
.p-london h3 { color: #fff; margin-top: auto; }
.p-london p { color: var(--mint); }
.place {
  margin: 0;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: .9;
  color: var(--red);
}

/* Who we help */

.who { padding-block: var(--section); }
.statement {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 750;
  font-size: clamp(2rem, 4.6vw, 3.75rem);
  line-height: 1.05;
  max-width: 24ch;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.statement-note {
  margin-top: 2rem;
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 44ch;
}

/* Accounts */

.accounts {
  background: var(--rice);
  padding-block: var(--section);
}
.accounts-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.accounts h2 { margin-bottom: 1.5rem; }

.text-link {
  font-weight: 600;
  color: var(--maroon);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--red); }

.facts { margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: .25rem 1.5rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
}
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 1rem; padding-top: .2rem; }
.facts dd {
  margin: 0;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.25;
}

/* Support */

.support {
  background: var(--green);
  color: #fff;
  padding-block: var(--section);
}
.support h2 { color: #fff; }
.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.support-disc { margin: 0; width: min(100%, 22rem); justify-self: center; }

.ways {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
  margin: clamp(1rem, 3vw, 2rem) 0 0;
  padding: 0;
  list-style: none;
}
.ways li { border-top: 2px solid rgba(255, 255, 255, .25); padding-top: 1.25rem; }
.ways h3 { margin-bottom: .5rem; }
.ways p { color: var(--mint); margin: 0; }

/* Footer */

.site-footer {
  background: var(--green-deep);
  color: var(--mint);
  font-size: 1rem;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.site-footer h2 {
  font-size: 1.25rem;
  font-stretch: 85%;
  color: #fff;
  margin-bottom: .75rem;
}
.site-footer a { color: #fff; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--mint); }
.site-footer p, .site-footer address { margin: 0 0 .5rem; font-style: normal; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem var(--gutter);
}
.footer-brand { display: flex; gap: 1.25rem; align-items: flex-start; }
.footer-brand img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.footer-brand strong { color: #fff; }

.footer-base {
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .875rem;
}
.footer-base p { margin: 0; }

/* Photo viewer */

.lightbox {
  width: min(92vw, 70rem);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(7, 56, 38, .85); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; max-height: calc(92vh - 4rem); object-fit: contain; background: #000; }
.lightbox figcaption { padding: 1rem 6.5rem 1rem 1.25rem; font-size: 1rem; }
.lightbox-close {
  position: absolute;
  right: .75rem;
  bottom: .6rem;
  min-height: 2.5rem;
  padding: .4rem 1.1rem;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: 600 1rem/1 var(--body);
  cursor: pointer;
}

/* Tablet */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-disc { order: -1; width: min(78%, 26rem); }
  .hero h1 { max-width: 14ch; }

  .section-head { grid-template-columns: 1fr; }

  .p-flood, .p-food, .p-homes, .p-trees, .p-winter, .p-london { grid-column: span 6; --h: clamp(14rem, 34vw, 20rem); }
  .p-flood { grid-column: span 12; --h: clamp(16rem, 50vw, 26rem); }

  .accounts-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .support-disc { order: -1; width: min(60%, 16rem); justify-self: start; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Mobile menu */

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-list {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
    background: var(--green);
    border-bottom: 1px solid rgba(255, 255, 255, .15);
  }
  .nav-list.is-open { display: flex; }
  .nav-list a:not(.btn) { padding: .9rem 0; font-size: 1.125rem; border-bottom: 1px solid rgba(255, 255, 255, .1); border-radius: 0; }
  .nav-list .btn { margin: 1rem 0 0; }
}

/* Phone */

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .brand-text strong { font-size: .95rem; }
  .brand-text small { font-size: .75rem; }

  .hero-disc { width: min(86%, 22rem); }

  .villages { gap: .75rem; }
  .village { font-size: 1rem; overflow-wrap: anywhere; }

  .p-flood, .p-food, .p-homes, .p-trees, .p-winter, .p-london { grid-column: 1 / -1; --h: auto; }
  .zoom img { aspect-ratio: 4 / 3; }
  .p-london { min-height: 14rem; }

  .facts div { grid-template-columns: 1fr; }

  .ways { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { flex-direction: column; }

  .actions .btn { flex: 1 1 100%; }
}
