/* Rahma Charity — site styles (standalone, no Wix)
   Direction: photo-led and documentary. The photographs carry the page;
   type and colour stay quiet around them. Colours come from the logo. */
:root {
  --ink: #1C1B19;
  --dusk: #24211C;
  --gold: #C99A2E;
  --gold-deep: #8C6A17;       /* gold for text on light backgrounds (AA contrast) */
  --leaf: #3F7D3A;            /* logo leaves — focus rings, small accents */
  --sand: #EFE7D6;
  --paper: #FFFFFF;
  --line: #E4DCCB;
  --muted: #625C52;
  --on-dark: #F3EEE4;
  --on-dark-muted: #B9B1A3;

  /* semantic colours — these are what flip in dark mode */
  --bg: #FFFFFF;
  --fg: #1C1B19;
  --surface: #EFE7D6;      /* sand sections */
  --surface-2: #FFFFFF;    /* cards / inputs sitting on a surface */
  --inv-bg: #1C1B19;       /* inverted buttons, chips */
  --inv-fg: #FFFFFF;
  --footer-bg: #1C1B19;
  --img-bg: #DDD3BD;
  --bar-bg: rgba(255, 255, 255, .94);
  --err: #B3261E;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito Sans', 'Avenir Next', Avenir, 'Segoe UI', sans-serif;

  /* type scale, ratio 1.25 on an 18px base */
  --t-sm: .8rem;
  --t-base: 1rem;
  --t-md: 1.25rem;
  --t-lg: 1.5625rem;
  --t-xl: 1.953rem;
  --t-2xl: clamp(2rem, 3.6vw, 2.75rem);
  --t-3xl: clamp(2.4rem, 5vw, 3.8rem);
  --t-hero: clamp(3.4rem, 9.5vw, 7.5rem);

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 88px;
  --radius: 6px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--t-base)/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.1; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
button { font: inherit; color: inherit; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 30px; border-radius: 999px; border: 1.5px solid transparent;
  font: 700 .85rem/1 var(--sans); letter-spacing: .06em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn--sm { min-height: 42px; padding: 0 20px; font-size: .75rem; }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--inv-bg); color: var(--inv-fg); }
.btn--dark { background: var(--inv-bg); color: var(--inv-fg); }
.btn--dark:hover { background: var(--gold); color: var(--ink); }
.btn--dark[disabled], .btn--gold[disabled] { opacity: .6; cursor: wait; }
.btn--glass { color: #fff; border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--glass:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--outline { border-color: var(--fg); color: var(--fg); background: transparent; }
.btn--outline:hover { background: var(--inv-bg); color: var(--inv-fg); }
.text-link { font-weight: 700; color: var(--gold-deep); text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 1.5px; }
.text-link:hover { color: var(--fg); }
.round-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; cursor: pointer; font-size: 1.4rem; transition: background-color .2s, color .2s; }
.round-btn:hover { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.round-btn:disabled { opacity: .3; cursor: default; background: transparent; color: inherit; }

/* ---------- header ---------- */
.announce { position: relative; z-index: 60; background: var(--gold); color: var(--ink); text-align: center; padding: 8px 16px; font-weight: 700; font-size: var(--t-sm); }
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line);
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.has-hero .site-header { position: fixed; left: 0; right: 0; background: transparent; color: #fff; border-color: transparent; }
.has-hero .site-header.is-solid, .site-header.menu-open { background: var(--bg); color: var(--fg); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; overflow: hidden; flex: none; }
.brand__mark img { width: 56px; height: 56px; object-fit: contain; }
.brand__name { font: 700 1.45rem/1 var(--serif); letter-spacing: .01em; display: flex; gap: .3em; }
.brand__name span { font-weight: 400; }
.site-nav__list { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.site-nav__list a {
  position: relative; display: block; padding: 10px 12px; text-decoration: none;
  font: 600 .85rem/1 var(--sans); letter-spacing: .02em;
}
.site-nav__list a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.site-nav__list a:hover::after, .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-donate { display: none; }
.nav-toggle { display: none; width: 46px; height: 46px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { position: absolute; left: 11px; width: 24px; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle__bars { top: 22px; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- home hero slideshow ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; max-height: 1100px; color: #fff; background: var(--dusk); overflow: hidden; isolation: isolate; }
.hero__slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity 1s var(--ease); }
.slide.is-active { opacity: 1; }
.slide__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 6s linear; }
.slide.is-active .slide__media { transform: scale(1); }
.hero__shade { position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(180deg, rgba(20, 18, 15, .55) 0%, rgba(20, 18, 15, 0) 22%),
  linear-gradient(0deg, rgba(20, 18, 15, .82) 0%, rgba(20, 18, 15, .35) 45%, rgba(20, 18, 15, 0) 75%); }
.hero__content { position: absolute; left: 0; right: 0; bottom: 120px; z-index: 2; }
.hero__title { font: 800 var(--t-hero)/.92 var(--serif); letter-spacing: -.02em; margin-bottom: 18px; }
.hero__title span { display: block; }
.hero__title span + span { font-weight: 400; font-style: italic; color: var(--gold); padding-left: .55em; }
.hero__tagline { font: italic 400 var(--t-lg)/1.3 var(--serif); color: var(--on-dark); margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__foot { position: absolute; left: 0; right: 0; bottom: 36px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero__caption { font-weight: 700; font-size: var(--t-sm); letter-spacing: .03em; color: var(--on-dark); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .45); padding-bottom: 3px; }
.hero__caption:hover { color: #fff; border-color: var(--gold); }
.hero__progress { display: flex; gap: 8px; margin-left: auto; }
.hero__progress button { width: 44px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.hero__progress i { display: block; height: 3px; background: rgba(255, 255, 255, .35); border-radius: 2px; overflow: hidden; position: relative; }
.hero__progress i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero__progress [aria-selected="true"] i::after { animation: fill var(--slide-ms, 5000ms) linear forwards; }
.hero.is-paused .hero__progress [aria-selected="true"] i::after { animation-play-state: paused; }
.hero__progress .done i::after { transform: scaleX(1); }
@keyframes fill { to { transform: scaleX(1); } }

/* ---------- glimpse + filmstrip ---------- */
.glimpse { background: var(--bg); color: var(--fg); padding: clamp(80px, 10vw, 130px) 0 0; text-align: center; }
.glimpse__line { font: italic 400 var(--t-3xl)/1.2 var(--serif); max-width: 18ch; margin: 0 auto; color: var(--muted); }
.filmstrip { overflow: hidden; }
.filmstrip__track { display: flex; gap: 14px; width: max-content; animation: drift 80s linear infinite; }
.filmstrip:hover .filmstrip__track { animation-play-state: paused; }
.filmstrip img { height: clamp(180px, 22vw, 280px); width: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: #333; }
.filmstrip img:nth-child(3n + 2) { aspect-ratio: 4 / 3; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 110px); align-items: center; padding: clamp(80px, 10vw, 140px) 0; }
.about__img { margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__title { font: 600 var(--t-3xl)/1.05 var(--serif); margin-bottom: 44px; }
.about__block { max-width: 34em; }
.about__block h3 { font: 800 var(--t-md)/1.3 var(--sans); margin-bottom: 8px; }
.about__block p { color: var(--muted); }
.about__block + .about__block { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- section heads ---------- */
.section-head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px 60px; align-items: end; margin-bottom: 56px; }
.section-head--row { grid-template-columns: 1fr auto; }
.section-title { font: 600 var(--t-3xl)/1.05 var(--serif); }
.section-intro { color: var(--muted); max-width: 40em; margin: 0; }
.section-head--row .section-intro { margin-top: 18px; }

/* ---------- services ---------- */
.services { background: var(--surface); padding: clamp(80px, 10vw, 130px) 0; }
.services__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
.service__img { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; background: var(--img-bg); }
.service__img img { width: 100%; height: 100%; object-fit: cover; }
.service h3 { font: 600 var(--t-xl)/1.15 var(--serif); margin-bottom: 14px; }
.service p { color: var(--muted); font-size: .92rem; margin: 0; }
.service__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.service.is-open .service__text { -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.more { margin-top: 10px; padding: 6px 0; border: 0; background: none; font-weight: 700; font-size: var(--t-sm); color: var(--gold-deep); text-decoration: underline; text-underline-offset: .3em; cursor: pointer; }
.more:hover { color: var(--fg); }

/* ---------- project rail ---------- */
.rail-section { padding: clamp(80px, 10vw, 130px) 0 90px; }
.rail-ctl { display: flex; gap: 10px; }
.rail {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
  padding: 4px max(var(--gutter), (100vw - var(--wrap)) / 2) 8px; scroll-padding-inline: max(var(--gutter), (100vw - var(--wrap)) / 2);
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.is-dragging a { pointer-events: none; }
.rail .work-card { flex: 0 0 clamp(250px, 26vw, 340px); scroll-snap-align: start; }
.rail-more { margin: 32px auto 0; }

/* ---------- work cards (rail + Our Work grid) ---------- */
.work-card { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--dusk); color: #fff; text-decoration: none; }
.work-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 18, 15, .85), rgba(20, 18, 15, 0) 55%); }
.work-card__body { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; display: grid; gap: 6px; }
.work-card__label { font: 600 var(--t-lg)/1.15 var(--serif); }
.work-card__cat { font-size: var(--t-sm); color: var(--on-dark-muted); }
.work-card:hover img, .work-card:focus-visible img { transform: scale(1.06); }

/* ---------- donate band ---------- */
.cta-band { position: relative; min-height: 560px; display: grid; align-items: center; color: #fff; overflow: hidden; background: var(--dusk); isolation: isolate; }
.cta-band .cover { z-index: -2; height: 120%; top: -10%; will-change: transform; }
.cta-band__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 18, 15, .88) 0%, rgba(20, 18, 15, .55) 55%, rgba(20, 18, 15, .2) 100%); }
.cta-band__inner { padding: 100px 0; }
.cta-band h2 { font: 600 var(--t-3xl)/1.05 var(--serif); margin-bottom: 20px; }
.cta-band p { max-width: 30em; color: var(--on-dark); font-size: var(--t-md); margin-bottom: 34px; }

/* ---------- inner page hero ---------- */
.page-hero { position: relative; min-height: min(68vh, 640px); display: flex; align-items: flex-end; color: #fff; background: var(--dusk); overflow: hidden; isolation: isolate; }
.page-hero .cover { z-index: -2; }
.page-hero__shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(20, 18, 15, .55) 0%, rgba(20, 18, 15, 0) 30%),
  linear-gradient(0deg, rgba(20, 18, 15, .8) 0%, rgba(20, 18, 15, .15) 60%); }
.page-hero__inner { padding: calc(var(--header-h) + 60px) 0 64px; }
.page-hero__title { font: 800 clamp(2.6rem, 7vw, 6rem)/.95 var(--serif); letter-spacing: -.015em; }
.page-hero__lead { max-width: 38em; margin: 22px 0 0; font-size: var(--t-md); color: var(--on-dark); }
.page-hero--project { min-height: min(78vh, 760px); }
.page-hero--project .page-hero__title { font-size: clamp(2.2rem, 6vw, 5rem); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-weight: 700; font-size: var(--t-sm); text-decoration: none; color: var(--on-dark); }
.back:hover { color: var(--gold); }
.back--dark { color: var(--gold-deep); }
.back--dark:hover { color: var(--fg); }

/* ---------- our work page ---------- */
.work { padding: 64px 0 120px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.chip { border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: var(--t-sm); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work-grid .work-card { aspect-ratio: 4 / 3; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.work-grid .work-card.is-out { opacity: 0; transform: scale(.97); }
.work-grid .work-card[hidden] { display: none; }

/* ---------- project story + viewer ---------- */
.story { padding: clamp(64px, 8vw, 110px) 0 40px; }
.story__text { max-width: 42em; margin-inline: auto; }
.story__text p { color: var(--muted); font-size: 1.05rem; }
.story__text .story__lead { font: 400 var(--t-lg)/1.5 var(--serif); color: var(--fg); margin-bottom: 1.2em; }
.viewer-section { padding: 30px 0 60px; }
.viewer__stage { position: relative; aspect-ratio: 16 / 10; max-height: 82vh; width: 100%; background: var(--dusk); border-radius: var(--radius); overflow: hidden; }
.viewer__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s; }
.viewer__slide.is-active { opacity: 1; visibility: visible; }
.viewer__open { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.viewer__open.is-video { cursor: pointer; }
.viewer__open img { width: 100%; height: 100%; object-fit: contain; }
.viewer__prev, .viewer__next { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; color: #fff; border-color: rgba(255, 255, 255, .6); background: rgba(20, 18, 15, .35); backdrop-filter: blur(4px); }
.viewer__prev { left: 18px; }
.viewer__next { right: 18px; }
.viewer__prev:hover, .viewer__next:hover { background: #fff; color: var(--ink); border-color: #fff; }
.viewer__count { position: absolute; right: 18px; bottom: 14px; margin: 0; z-index: 2; color: #fff; font-size: var(--t-sm); font-weight: 700; background: rgba(20, 18, 15, .55); padding: 4px 10px; border-radius: 999px; }
.play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--ink); font-size: 2.4rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .25s var(--ease); }
.viewer__open:hover .play { transform: scale(1.08); }
.play--sm { width: 30px; height: 30px; font-size: 1rem; box-shadow: none; }
.viewer__thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.tile { position: relative; flex: 0 0 auto; width: 92px; height: 92px; padding: 0; border: 0; border-radius: 4px; overflow: hidden; cursor: pointer; background: var(--surface); opacity: .55; transition: opacity .2s; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile:hover, .tile.is-current { opacity: 1; }
.tile.is-current { outline: 3px solid var(--gold); outline-offset: -3px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; padding: 40px 0 110px; border-top: 1px solid var(--line); margin-top: 40px; }
.pager__link { display: grid; gap: 6px; text-decoration: none; padding: 18px 0; }
.pager__link small { font-size: var(--t-sm); color: var(--muted); font-weight: 700; }
.pager__link span { font: 600 var(--t-xl)/1.15 var(--serif); transition: color .2s; }
.pager__link:hover span { color: var(--gold-deep); }
.pager__link--next { text-align: right; }

/* ---------- get involved ---------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 60px); padding: clamp(70px, 9vw, 120px) 0; }
.way { border-top: 3px solid var(--gold); padding-top: 28px; display: flex; flex-direction: column; align-items: flex-start; }
.way h2 { font: 600 var(--t-2xl)/1.1 var(--serif); margin-bottom: 16px; }
.way p { color: var(--muted); flex: 1; margin-bottom: 28px; }
.marquee { background: var(--dusk); overflow: hidden; padding: 34px 0; }
.marquee__track { display: flex; width: max-content; animation: drift 40s linear infinite; }
.marquee__track span { font: italic 400 clamp(2.2rem, 5vw, 4rem)/1 var(--serif); color: var(--on-dark); padding-right: 1.2em; white-space: nowrap; }
.marquee__track span:nth-child(odd) { color: var(--gold); }

/* ---------- newsletters ---------- */
.reports { padding: clamp(70px, 9vw, 120px) 0; display: grid; gap: clamp(56px, 7vw, 96px); }
.report { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.report:nth-child(even) .report__img { order: 2; }
.report__img { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.report__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.report:hover .report__img img { transform: scale(1.04); }
.report__body h2 { font: 600 var(--t-2xl)/1.1 var(--serif); margin-bottom: 18px; }
.report__body h2 a { text-decoration: none; }
.report__body p { color: var(--muted); margin-bottom: 28px; }
.subscribe { background: var(--dusk); color: var(--on-dark); padding: clamp(70px, 9vw, 110px) 0; }
.subscribe__box { display: grid; grid-template-columns: 1fr 1fr; gap: 30px clamp(40px, 6vw, 90px); align-items: center; }
.subscribe__box h2 { font: 600 var(--t-2xl)/1.1 var(--serif); color: #fff; margin-bottom: 16px; }
.subscribe__sub { font: italic 400 var(--t-md)/1.5 var(--serif); color: var(--on-dark-muted); margin: 0; }
.subscribe__form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.subscribe__form .field { margin: 0; }
.subscribe__form .field span { color: var(--on-dark); }
.subscribe__form .field input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); color: #fff; }
.subscribe__form .form-status, .subscribe__note { grid-column: 1 / -1; }
.subscribe__note { font-size: var(--t-sm); color: var(--on-dark-muted); margin: 0; }

/* ---------- report page ---------- */
.doc-head { padding: calc(var(--header-h) * .5 + 40px) 0 40px; max-width: 46em; }
.doc-head h1 { font: 700 var(--t-3xl)/1.05 var(--serif); margin-bottom: 18px; }
.doc-head p { color: var(--muted); margin-bottom: 26px; }
.pdf { padding-bottom: 110px; }
.pdf__frame { height: min(88vh, 1100px); border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.pdf__frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-weight: 700; font-size: var(--t-sm); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--fg); background: var(--surface-2);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 15px; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(63, 125, 58, .18); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-status { margin: 10px 0 0; font-weight: 700; min-height: 1.2em; }
.form-status.ok { color: var(--leaf); }
.subscribe .form-status.ok { color: #9ED493; }
.form-status.err { color: var(--err); }
.subscribe .form-status.err { color: #F2B8B5; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 7vw, 110px); padding: clamp(70px, 9vw, 120px) 0; align-items: start; }
.contact__line { display: flex; align-items: center; gap: 16px; font: 400 var(--t-lg)/1.3 var(--serif); text-decoration: none; padding: 18px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.contact__line svg { color: var(--gold-deep); font-size: 1.3rem; }
.contact__line:hover span { color: var(--gold-deep); }
.social { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 12px; }
.social a { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--inv-bg); color: var(--inv-fg); font-size: 1.15rem; transition: background-color .2s; }
.social a:hover { background: var(--gold); color: var(--ink); }
.contact__logo { width: min(240px, 70%); margin-top: 44px; }
.contact__form { background: var(--surface); padding: clamp(28px, 4vw, 48px); border-radius: var(--radius); }
.contact__form h2 { font: 600 var(--t-2xl)/1.1 var(--serif); margin-bottom: 28px; }

/* ---------- donate ---------- */
.donate { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.donate__media { position: relative; background: var(--surface); min-height: 360px; }
.donate__media .cover { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); }
.donate__text { padding: clamp(50px, 7vw, 100px) clamp(24px, 6vw, 90px); }
.donate__text h1 { font: 700 var(--t-3xl)/1.05 var(--serif); margin-bottom: 22px; }
.donate__text > p { font-size: var(--t-md); color: var(--muted); max-width: 30em; margin-bottom: 30px; }

/* ---------- legal ---------- */
.legal { padding: calc(var(--header-h) * .5 + 40px) 0 110px; max-width: 46em; }
.legal h1 { font: 700 var(--t-3xl)/1.05 var(--serif); margin-bottom: 36px; }
.legal__body h2 { font: 800 var(--t-md)/1.3 var(--sans); margin: 36px 0 10px; }
.legal__body a { color: var(--gold-deep); }
.legal__body li { margin-bottom: 6px; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--on-dark-muted); font-size: .9rem; }
.site-footer__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 64px 0 56px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.site-footer__tag { font: italic 400 var(--t-2xl)/1.15 var(--serif); color: #fff; margin: 0; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.f-tag { font: italic 400 var(--t-md)/1.3 var(--serif); color: #fff; }
.f-logo { width: 112px; height: 112px; object-fit: contain; background: #fff; border-radius: 50%; padding: 6px; margin-bottom: 18px; }
.f-col p { margin-bottom: 10px; }
.f-loc { display: flex; align-items: center; gap: 6px; }
.f-loc svg { color: var(--gold); }
.f-h { font: 800 var(--t-sm)/1.3 var(--sans); color: #fff; letter-spacing: .04em; margin-bottom: 18px; }
.f-list { list-style: none; padding: 0; margin: 0; }
.f-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.f-list svg { color: var(--gold); }
.f-list a { text-decoration: none; word-break: break-word; }
.f-list a:hover { color: #fff; text-decoration: underline; }
.f-copy { padding: 22px 0 34px; margin: 0 auto; font-size: var(--t-sm); border-top: 1px solid rgba(255, 255, 255, .12); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(14, 13, 11, .96); display: grid; grid-template-columns: 76px 1fr 76px; align-items: center; }
.lightbox[hidden] { display: none; }
.lightbox__stage { margin: 0; height: 100vh; display: grid; place-items: center; padding: 64px 0; }
.lightbox__stage img, .lightbox__stage video { max-height: calc(100vh - 128px); max-width: 100%; width: auto; border-radius: 4px; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; display: grid; place-items: center; height: 76px; opacity: .75; }
.lightbox button:hover { opacity: 1; color: var(--gold); }
.lightbox__close { position: absolute; top: 10px; right: 10px; font-size: 2rem !important; width: 60px; }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #aaa; margin: 0; font-size: var(--t-sm); }
.lb-note { color: #ddd; text-align: center; max-width: 420px; }
body.lb-open, body.menu-locked { overflow: hidden; }

/* ---------- gentle entrance for the hero only ---------- */
.js .hero__title span, .js .hero__tagline, .js .hero__actions { opacity: 0; transform: translateY(24px); animation: rise .9s var(--ease) forwards; }
.js .hero__title span + span { animation-delay: .12s; }
.js .hero__tagline { animation-delay: .28s; }
.js .hero__actions { animation-delay: .42s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .site-nav__list a { padding: 10px 8px; }
  .site-nav__list a::after { left: 8px; right: 8px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  :root { --header-h: 76px; }
  .nav-toggle { display: block; }
  .header-donate { display: none; }
  .site-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg); color: var(--fg); padding: 32px var(--gutter); visibility: hidden; opacity: 0; transition: opacity .3s var(--ease), visibility .3s; overflow-y: auto; }
  .site-nav.is-open { visibility: visible; opacity: 1; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { font: 600 var(--t-2xl)/1.1 var(--serif); padding: 16px 0; border-bottom: 1px solid var(--line); letter-spacing: 0; transform: translateY(12px); opacity: 0; transition: transform .4s var(--ease), opacity .4s var(--ease); }
  .site-nav.is-open .site-nav__list a { transform: none; opacity: 1; }
  .site-nav.is-open li:nth-child(2) a { transition-delay: .04s; }
  .site-nav.is-open li:nth-child(3) a { transition-delay: .08s; }
  .site-nav.is-open li:nth-child(4) a { transition-delay: .12s; }
  .site-nav.is-open li:nth-child(5) a { transition-delay: .16s; }
  .site-nav__list a::after { display: none; }
  .nav-donate { display: inline-flex; margin-top: 32px; width: 100%; }
  .site-nav__list a[aria-current="page"] { color: var(--gold-deep); }
  .about, .contact, .report, .subscribe__box, .donate { grid-template-columns: 1fr; }
  .report:nth-child(even) .report__img { order: 0; }
  .services__list, .ways { grid-template-columns: 1fr; max-width: 620px; }
  .section-head { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .about__img { aspect-ratio: 4 / 3; }
  .donate__media .cover { position: absolute; height: 100%; }
}
@media (max-width: 640px) {
  html { font-size: 106.25%; }
  .brand__name { font-size: 1.2rem; }
  .brand__mark { width: 52px; height: 52px; }
  .brand__mark img { width: 47px; height: 47px; }
  .hero { min-height: 560px; }
  .hero__content { bottom: 104px; }
  .hero__title span + span { padding-left: .3em; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__progress button { width: 28px; }
  .section-head--row { grid-template-columns: 1fr; }
  .rail-ctl { display: none; }
  .work-grid { grid-template-columns: 1fr; }
  .row2, .subscribe__form { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { text-align: left; }
  .viewer__stage { aspect-ratio: 4 / 5; }
  .viewer__prev, .viewer__next { width: 40px; height: 40px; }
  .tile { width: 72px; height: 72px; }
  .lightbox { grid-template-columns: 44px 1fr 44px; }
  .lightbox button { font-size: 2rem; }
}

/* ---------- autoplaying videos ---------- */
.viewer__still, .viewer__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer__video { opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.viewer__slide.is-playing .viewer__video { opacity: 1; }
.viewer__open.is-video { z-index: 1; }
.viewer__slide .play { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.viewer__slide.is-playing .play { opacity: 0; transform: scale(.85); }
.sound-chip { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(20, 18, 15, .6); color: #fff; font-size: var(--t-sm); font-weight: 700; opacity: 0; transition: opacity .3s; }
.viewer__slide.is-playing .sound-chip { opacity: 1; }
.video-toggle { position: absolute; z-index: 3; right: var(--gutter); bottom: 30px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .6); background: rgba(20, 18, 15, .35); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); font-size: 1.1rem; }
.video-toggle:hover { background: #fff; color: var(--ink); }
.video-toggle[hidden] { display: none; }
.hero .video-toggle { bottom: auto; top: calc(var(--header-h) + 16px); }


/* ---------- dark mode ----------
   Follows the device setting automatically; the header switch can force light or dark. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13120F;
  --fg: #EEE8DC;
  --surface: #1E1C17;
  --surface-2: #28251E;
  --line: #3A352C;
  --muted: #B5AD9E;
  --gold-deep: #E2B85A;
  --leaf: #8BCB83;
  --inv-bg: #EEE8DC;
  --inv-fg: #13120F;
  --footer-bg: #0B0A08;
  --dusk: #1A1814;
  --img-bg: #2A261F;
  --bar-bg: rgba(30, 28, 23, .94);
  --err: #F2B8B5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #13120F;
  --fg: #EEE8DC;
  --surface: #1E1C17;
  --surface-2: #28251E;
  --line: #3A352C;
  --muted: #B5AD9E;
  --gold-deep: #E2B85A;
  --leaf: #8BCB83;
  --inv-bg: #EEE8DC;
  --inv-fg: #13120F;
  --footer-bg: #0B0A08;
  --dusk: #1A1814;
  --img-bg: #2A261F;
  --bar-bg: rgba(30, 28, 23, .94);
  --err: #F2B8B5;
  }
}
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 1.2rem; flex: none; transition: background-color .2s; }
.theme-toggle:hover { background: rgba(128, 128, 128, .15); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
/* photos sit a touch softer on a dark page */
:root[data-theme="dark"] .about__img img, :root[data-theme="dark"] .service__img img, :root[data-theme="dark"] .report__img img { filter: brightness(.92); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .about__img img, :root:not([data-theme="light"]) .service__img img, :root:not([data-theme="light"]) .report__img img { filter: brightness(.92); }
}


/* ---------- formatted text from the admin ---------- */
.rich > :last-child { margin-bottom: 0; }
.rich ul, .rich ol, .legal__body ul, .legal__body ol { padding-left: 1.3em; margin: 0 0 1em; }
.rich li { margin-bottom: .3em; }
.rich a, .story__text a, .about__block a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: .2em; }
.rich + .rich, p + .rich, .rich + p { margin-top: 1em; }

/* ---------- phones: banners fill the whole screen ---------- */
.fit-bg { display: none; }
@media (max-width: 760px) {
  .video-toggle { display: none; }            /* phones: videos just play, no pause button */
  .hero { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .hero { height: 100svh; min-height: 0; max-height: none; }
  .hero .slide__media { object-position: center 30%; }
  .hero__shade { background:
    linear-gradient(180deg, rgba(20, 18, 15, .55) 0%, rgba(20, 18, 15, 0) 18%),
    linear-gradient(0deg, rgba(20, 18, 15, .9) 0%, rgba(20, 18, 15, .55) 35%, rgba(20, 18, 15, 0) 62%); }
  .page-hero { min-height: 70svh; }
  .page-hero--project { min-height: 78svh; }
}

/* ---------- phone-first layer ---------- */
.nav-extra, .action-bar, .swipe-dots { display: none; }
@media (max-width: 960px) {
  .site-header { transition: transform .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease); }
  .site-header.is-hidden { transform: translateY(-100%); }
  .site-nav { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .nav-extra { display: grid; gap: 4px; margin-top: 28px; }
  .nav-extra > a { display: flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; color: var(--muted); font-weight: 600; word-break: break-word; }
  .nav-extra > a svg { color: var(--gold-deep); font-size: 1.15rem; }
  .nav-extra .social { margin-top: 14px; }

  /* always-reachable donate bar */
  .action-bar {
    display: flex; gap: 10px; position: fixed; z-index: 45;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 6px; border-radius: 999px; background: var(--bar-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(28, 27, 25, .22), 0 0 0 1px rgba(28, 27, 25, .06);
    transform: translateY(calc(100% + 30px)); transition: transform .4s var(--ease);
  }
  .action-bar.is-visible { transform: none; }
  .action-bar__share { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surface); color: var(--fg); font-weight: 700; font-size: .8rem; cursor: pointer; }
  .action-bar__share svg { font-size: 1.05rem; }
  .action-bar__donate { flex: 1; min-height: 50px; }
  .page-donate .action-bar, body.menu-locked .action-bar, body.lb-open .action-bar { display: none; }
  .site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  /* hero */
  .hero__content { bottom: 92px; }
  .hero__tagline { font-size: 1.2rem; margin-bottom: 26px; }
  .hero__foot { bottom: 28px; justify-content: center; }
  .hero__caption { display: none; }
  .hero__progress { margin: 0 auto; }
  .page-hero { min-height: 70svh; }
  .page-hero--project { min-height: 78svh; }
  .page-hero__inner { padding-bottom: 40px; }
  .page-hero__title { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .page-hero__lead { font-size: 1rem; }

  /* tighter section rhythm */
  .glimpse { padding: 56px 0 0; }
  .glimpse__line { font-size: 1.7rem; }
  .about, .services, .rail-section, .ways, .reports, .contact, .story { padding-top: 60px; padding-bottom: 60px; }
  .about { gap: 32px; }
  .about__title { margin-bottom: 28px; }
  .section-head { margin-bottom: 30px; }
  .section-title { font-size: 2.3rem; }

  /* services become a swipeable row of cards */
  .services__list { display: flex; gap: 14px; max-width: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scroll-padding-inline: var(--gutter); }
  .services__list::-webkit-scrollbar { display: none; }
  .service { flex: 0 0 84%; scroll-snap-align: start; background: var(--surface-2); border-radius: 12px; overflow: hidden; padding-bottom: 22px; }
  .service__img { border-radius: 0; margin-bottom: 18px; }
  .service h3, .service p, .service .more { margin-left: 18px; margin-right: 18px; }
  .service h3, .service p { padding: 0; }
  .service h3 { font-size: 1.5rem; }
  .swipe-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
  .swipe-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background-color .2s, width .2s; }
  .swipe-dots i.on { width: 22px; border-radius: 4px; background: var(--fg); }

  /* project row & grid */
  .rail .work-card { flex-basis: 78vw; }
  .work { padding-top: 0; }
  .filters { position: sticky; top: var(--header-h); z-index: 20; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 18px; padding: 14px var(--gutter); background: var(--bg); transition: top .35s var(--ease); }
  .filters::-webkit-scrollbar { display: none; }
  body.header-hidden .filters { top: 0; }
  .chip { flex: none; min-height: 44px; }
  .work-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .work-grid .work-card { aspect-ratio: 4 / 5; }
  .work-card__body { left: 14px; right: 14px; bottom: 12px; }
  .work-grid .work-card__label { font-size: 1.05rem; }
  .work-grid .work-card__cat { display: none; }

  /* project gallery runs edge to edge */
  .viewer.wrap { width: 100%; }
  .viewer__stage { border-radius: 0; aspect-ratio: 1 / 1; }
  .viewer__thumbs { padding-inline: var(--gutter); }
  .story__text .story__lead { font-size: 1.3rem; }
  .pager { grid-template-columns: 1fr 1fr; padding-bottom: 50px; }
  .pager__link--next { text-align: right; }
  .pager__link span { font-size: 1.2rem; }

  /* footer: compact two-column */
  .site-footer__cta { padding: 44px 0 36px; }
  .site-footer__tag { font-size: 1.7rem; }
  .site-footer__cta .btn { width: 100%; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .f-col--brand, .site-footer__grid .f-col:nth-child(2) { grid-column: 1 / -1; }
  .f-list a { padding: 6px 0; display: inline-block; }

  /* forms */
  .contact__form { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; }
  .contact__line { font-size: 1.2rem; }
  .field input, .field textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .hero__title span, .js .hero__tagline, .js .hero__actions { opacity: 1; transform: none; }
  .filmstrip { overflow-x: auto; }
  .filmstrip__track, .marquee__track { animation: none; }
  .slide__media { transform: none !important; }
}
