/* =========================================================================
   Rimba Orangutan Trust — homepage
   Layout/design rebuilt as a static template.
   ====================================================================== */

/* ------------------------------------------------------------ tokens -- */
:root {
  /* brand palette */
  --green:       #0b8043;   /* dark green  — primary                        */
  --green-band:  #0a7038;   /* strip behind the first heading line          */
  --green-dark:  #097038;   /* outlined buttons, links                      */
  --green-deep:  #075c31;   /* hover                                        */
  --leaf:        #6fc078;   /* light green — statistic numerals, focus ring  */
  --brick:       #8b1a1a;   /* dark brick red — deep bands                  */
  --brick-band:  #a33232;   /* strip behind the first heading line          */
  --ember:       #d4551f;   /* orange-red  — accent cards, newsletter       */
  --ember-dark:  #b3441a;   /* hover                                        */
  --canopy:      #0a3324;   /* deepest forest — fourth stage card           */
  --cream:       #f7ecdf;
  --ink:         #333;
  --ink-dark:    #1a1a1a;
  --white:       #fff;

  --font-sans:  Rubik, "Trebuchet MS", "Lucida Grande", Tahoma, sans-serif;
  --font-serif: Bitter, Constantia, "Lucida Bright", Georgia, serif;
  --font-display: "Lilita One", Bitter, Georgia, serif;

  --container: 1280px;
  --gutter: 32px;
  --corner: 25px 25px 25px 0;    /* the signature asymmetric corner        */
  --shadow: 0 0 20px rgba(0, 0, 0, .15);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; border: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: var(--green-dark); }
h1, h2, h3, h4 { font-family: var(--font-serif); margin: 0; font-weight: 700; }

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

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 999;
  background: var(--white); color: var(--green-dark);
  padding: 10px 18px; border-radius: 0 0 12px 12px; font-weight: 700;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }

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

.section { position: relative; }

/* ----------------------------------------------------------- buttons -- */
.button,
.button-secondary,
.button-tertiary {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 25px;
  border: 0;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.button { background: var(--green); color: var(--white); }
.button:hover, .button:focus { background: var(--green-deep); color: var(--white); }

.button-secondary {
  background: transparent;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 2px var(--green-dark);
}
.button-secondary:hover, .button-secondary:focus { background: var(--green-dark); color: var(--white); }

.button-tertiary { background: var(--ember); color: var(--white); }
.button-tertiary:hover, .button-tertiary:focus { background: var(--ember-dark); color: var(--white); }

.button-dark { background: var(--ink-dark); color: var(--white); }
.button-dark:hover, .button-dark:focus { background: #000; color: var(--white); }

/* light pills used on saturated backgrounds */
.intro-button-outer .button,
.button-on-ember,
.button-on-brick {
  background: var(--white);
  color: var(--green);
}
.intro-button-outer .button:hover, .intro-button-outer .button:focus,
.button-on-ember:hover, .button-on-ember:focus,
.button-on-brick:hover, .button-on-brick:focus {
  background: var(--cream);
  color: var(--green-deep);
}
.button-on-ember { color: var(--ember); }
.button-on-brick { color: var(--brick); }

/* ====================================================== 1. HEADER ===== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

/* black secondary bar, pinned to the right */
.header-subnav-outer { pointer-events: none; }
.header-subnav-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
}
.header-subnav {
  pointer-events: auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #000;
  border-radius: 50px 0 35px 50px;
  padding: 8px 11px;
}
.header-subnav-list { display: flex; align-items: center; }
.header-subnav-list .nav-item-link {
  display: block;
  margin: 0 8px;
  padding: 8px 0;
  font-size: 14.4px;
  line-height: 1.5;
  color: var(--white);
  text-decoration: none;
}
.header-subnav-list .nav-item-link:hover { text-decoration: underline; }

.header-search { position: relative; display: flex; }
.header-search input {
  width: 168px;
  border: 0;
  border-radius: 4px;
  padding: 9px 40px 9px 12px;
  font: 400 14px/1.2 var(--font-sans);
  background: var(--white);
  color: var(--ink);
}
.header-search button {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 38px;
  border: 0; border-radius: 0 4px 4px 0;
  background: var(--green);
  cursor: pointer;
}
.header-search svg {
  width: 17px; height: 17px;
  fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round;
}

/* logo + main nav row */
.header-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 32px;
  display: flex;
  align-items: flex-start;
  transition: padding .3s ease;
}
.header-logo {
  display: block;
  width: 190px;
  flex: 0 0 auto;
  margin-top: -66px;
  transition: margin .3s ease, width .3s ease;
}
.header-logo-image { width: 100%; }

.header-nav-container {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  padding: 0 0 0 var(--gutter);
}
.header-nav-inner {
  display: flex;
  align-items: center;
  height: 65px;
  padding: 0 16px;
  background: var(--white);
  border-radius: 50px;
  box-shadow: var(--shadow);
  transition: background-color .3s ease, box-shadow .3s ease;
}

.header-nav-list { display: flex; align-items: center; }
.header-nav-list > li { position: relative; }
.header-nav .nav-item-link {
  display: block;
  margin: 0 11px;
  padding: 8px 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}
.header-nav .nav-item-link::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 3px;
  border-radius: 2px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.header-nav-list > li:hover .nav-item-link::after,
.header-nav .nav-item-link:focus::after { transform: scaleX(1); }

.header-links { display: flex; gap: 8px; padding-left: 8px; }

/* mega dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% 0;
  padding-top: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.header-nav-list > li:hover .dropdown,
.header-nav-list > li:focus-within .dropdown { opacity: 1; visibility: visible; }
.dropdown-inner {
  display: flex;
  gap: 40px;
  min-width: 460px;
  padding: 24px 28px;
  background: var(--white);
  border-radius: var(--corner);
  box-shadow: var(--shadow);
}
.dropdown-inner a {
  display: block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.dropdown-inner a:hover { color: var(--green); text-decoration: underline; }

/* burger (mobile only) */
.nav-toggle {
  display: none;
  width: 56px; height: 56px;
  border: 0; border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.nav-toggle-bars { display: block; width: 24px; margin: 0 auto; }
.nav-toggle-bars i {
  display: block; height: 3px; border-radius: 2px;
  background: var(--ink); margin: 5px 0;
  transition: transform .25s ease, opacity .25s ease;
}
body.nav-open .nav-toggle-bars i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bars i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* compact / stuck state */
.header.is-stuck {
  background: var(--cream);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
}
.header.is-stuck .header-subnav-outer { display: none; }
.header.is-stuck .header-inner { padding-top: 10px; padding-bottom: 10px; align-items: center; }
.header.is-stuck .header-logo { width: 132px; margin-top: 0; }
.header.is-stuck .header-nav-inner { background: transparent; box-shadow: none; height: 56px; }

/* mobile off-canvas */
.rnav-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(0, 0, 0, .5);
}
.rnav-outer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 120;
  width: min(380px, 88vw);
  padding: 88px 24px 32px;
  overflow-y: auto;
  background: var(--cream);
  box-shadow: -6px 0 24px rgba(0, 0, 0, .2);
}
.rnav-search input {
  width: 100%; padding: 12px 14px; margin-bottom: 20px;
  border: 2px solid var(--green); border-radius: 25px;
  font: 400 15px var(--font-sans);
}
.rnav-list a, .rnav-secnav a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  font-family: var(--font-serif);
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.rnav-secnav { margin-top: 12px; }
.rnav-secnav a { font-weight: 400; font-size: 15px; }
.rnav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ======================================================== 2. HERO ===== */
.hero-outer {
  background: var(--green);
  overflow: hidden;
}
.hero { position: relative; display: flex; flex-direction: column; margin-bottom: 114px; }

.hero-image {
  position: absolute;
  inset: 0 0 auto;
  height: 695px;
  margin: 0;
  overflow: hidden;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .2);
}
/* the shallow arc that lifts the band up into the picture */
.hero-image::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 70px;
  background: var(--green);
  -webkit-mask: url("../img/hero-curve.svg") 0 0 / 100% 100% no-repeat;
          mask: url("../img/hero-curve.svg") 0 0 / 100% 100% no-repeat;
}

.hero-info {
  position: relative;
  display: flex;
  margin-top: 320px;
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}
.hero-inner {
  position: relative;
  width: 640px;
  max-width: 100%;
  padding: 32px 32px 40px;
  background: var(--white);
  border-radius: var(--corner);
  box-shadow: var(--shadow);
}
.hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.75vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green-dark);
}
.hero-summary {
  padding-top: 16px;
  font-weight: 400;
  color: var(--ink-dark);
}
.hero-inner .button { margin-top: 20px; }

/* ======================================================= 3. INTRO ===== */
.intro-outer {
  position: relative;
  padding: 40px 0 128px;
  background: var(--green);
  overflow: hidden;
}
.intro { position: relative; z-index: 1; }
.intro-summary {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.13vw, 40px);
  font-weight: 300;
  line-height: 1.22;
  color: var(--white);
}
.intro-summary strong { font-weight: 700; }
.intro-button-outer { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* silhouette band shared by the green + brick bands */
.intro-parallax,
.statistic-parallax {
  position: absolute;
  inset: auto 0 0;
  height: 260px;
  overflow: hidden;
  pointer-events: none;
}
.intro-parallax .parallax-image,
.statistic-parallax .parallax-image {
  position: absolute;
  inset: 0;
  display: block;
  background-color: rgba(0, 0, 0, .18);
  -webkit-mask: url("../img/foliage.svg") bottom center / 1600px 260px repeat-x;
          mask: url("../img/foliage.svg") bottom center / 1600px 260px repeat-x;
  will-change: transform;
}

/* ================================================== 4. SECTION HEAD === */
.section-header { position: relative; z-index: 2; margin-bottom: 32px; }
.section-header-inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 32px;
}

.section-header-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(40px, 7.4vw, 95px);
  font-weight: 600;
  line-height: 1.14;
  color: var(--white);
  flex: 0 1 auto;
}
/* second line drops onto the white ground and turns green — block so the
   break always lands where the colour changes, whatever the copy length */
.section-header-title span { display: block; color: var(--green); }

.section-header-title.plain {
  max-width: none;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.2;
}
.section-header-title.green { color: var(--green); }

.section-header-summary {
  flex: 0 1 42%;
  padding: 11px 0 20px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.68;
  color: var(--ink);
}
.section-header.centred { text-align: center; }
.section-header.centred .section-header-inner { display: block; }
.section-header.centred .section-header-summary {
  width: auto;
  max-width: 700px;
  margin: 8px auto 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--white);
}

.section-footer { margin-top: 8px; }
.section-footer.centred { text-align: center; }

/* the coloured band that the first heading line sits on */
.what-wedo::before,
.home-landing::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 104px;
}
.what-wedo::before,
.home-landing::before { height: 92px; }
.what-wedo::before  { background: var(--green-band); }
.home-landing::before { background: var(--brick-band); }

/* ================================================== 5. WHAT WE DO ==== */
.what-wedo { position: relative; padding-bottom: 32px; overflow: hidden; }
.what-wedo .cards-slider-arrows-outer { display: flex; justify-content: flex-end; }
.cards-slider-arrows { display: flex; gap: 10px; }
.prev-arrow, .next-arrow {
  width: 44px; height: 44px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  position: relative;
}
.prev-arrow::after, .next-arrow::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 9px; height: 9px;
  border-right: 2.6px solid var(--green);
  border-bottom: 2.6px solid var(--green);
}
.prev-arrow::after  { transform: translate(-35%, -50%) rotate(135deg); }
.next-arrow::after  { transform: translate(-65%, -50%) rotate(-45deg); }
.prev-arrow:hover, .next-arrow:hover { background: var(--green); }
.prev-arrow:hover::after, .next-arrow:hover::after { border-color: var(--white); }

.what-wedo .cards {
  display: flex;
  gap: 24px 3%;
  padding: 40px 0 32px;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scrollbar-width: none;
}
.what-wedo .cards::-webkit-scrollbar { display: none; }
.what-wedo .card {
  flex: 0 0 calc((100% - 9%) / 4);
  scroll-snap-align: start;
}
.what-wedo .cards { padding-right: var(--gutter); }

/* generic card shell */
.card {
  position: relative;
  border-radius: var(--corner);
  overflow: hidden;
}
.card-image { position: absolute; inset: 0; }
/* <picture> must not interrupt the sizing chain between .card-image and img */
.card-image picture,
.cta-image picture,
.hero-image picture { display: block; width: 100%; height: 100%; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.what-wedo .card { min-height: 658px; }
.what-wedo .card-wrap {
  position: absolute;
  inset: 0;
  background-color: var(--card-colour, var(--green));
  -webkit-mask: url("../img/card-shape.svg") 0 0 / 100% 100% no-repeat;
          mask: url("../img/card-shape.svg") 0 0 / 100% 100% no-repeat;
}
.what-wedo .card-wrap-inner { padding: 32px; color: var(--white); }
.what-wedo .card-header-title {
  padding-bottom: 8px;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--white);
}
.what-wedo .card-summary {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.41;
}

/* Hover reveal: the coloured panel retreats to the foot of the card and the
   photograph behind it comes forward. The panel is anchored bottom-left, so
   animating `top` shrinks it upward while the arrow stays put. The summary
   fades first — it would otherwise be clipped mid-transition by the mask. */
.what-wedo .card-wrap    { transition: top .55s cubic-bezier(.16, 1, .3, 1); }
.what-wedo .card-summary { transition: opacity .2s ease; }
.what-wedo .card-image img {
  transition: transform .7s cubic-bezier(.16, 1, .3, 1);
  transform-origin: 60% 40%;
}

/* `hover: hover` describes the PRIMARY pointer — a Windows touchscreen laptop
   reports that as coarse even with a mouse plugged in, which killed the reveal
   on exactly the machines most likely to use it. `any-hover` asks whether any
   attached device can hover, while still excluding phones and tablets. */
@media (any-hover: hover) {
  .what-wedo .card:hover .card-wrap      { top: 56%; }
  .what-wedo .card:hover .card-summary   { opacity: 0; }
  .what-wedo .card:hover .card-image img { transform: scale(1.06); }
}

/* keyboard parity — the arrow link is the focusable child */
.what-wedo .card:focus-within .card-wrap      { top: 56%; }
.what-wedo .card:focus-within .card-summary   { opacity: 0; }
.what-wedo .card:focus-within .card-image img { transform: scale(1.06); }

/* round arrow affordance pinned to the bottom-left of a card */
.card-link {
  position: absolute;
  left: 32px;
  bottom: 28px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--white);
}
.card-link::after {
  content: "";
  position: absolute; top: 50%; left: 46%;
  width: 8px; height: 8px;
  border-right: 2.4px solid var(--card-colour, var(--green));
  border-bottom: 2.4px solid var(--card-colour, var(--green));
  transform: translate(-50%, -50%) rotate(-45deg);
}
.card-link:hover { background: var(--leaf); }

.what-wedo .card-link { z-index: 3; }

.footer-button-outer { padding-top: 8px; }

/* ============================================== 6. CTA (brick) ======= */
.home-cta {
  position: relative;
  padding: 32px 0;
  background: var(--brick);
  overflow: hidden;
}
.home-cta .cta-info { position: relative; }
.home-cta .cta-image { position: absolute; inset: 0 0 auto; height: 640px; margin: 0; overflow: hidden; }
.home-cta .cta-image img { width: 100%; height: 100%; object-fit: cover; }
.home-cta .cta-image::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 70px;
  background: var(--brick);
  -webkit-mask: url("../img/hero-curve.svg") 0 0 / 100% 100% no-repeat;
          mask: url("../img/hero-curve.svg") 0 0 / 100% 100% no-repeat;
}
.cta-credit {
  position: absolute;
  left: var(--gutter);
  top: 604px;
  display: flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
}
.cta-credit i {
  display: grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  font-style: normal; font-size: 11px;
}

.home-cta .cta-inner { position: relative; padding-top: 32px; }
.home-cta .cta-inner-content {
  width: 640px;
  max-width: 100%;
  margin: 416px 0 40px auto;
  padding: 32px 32px 0;
  background: var(--ember);
  border-radius: var(--corner);
  box-shadow: var(--shadow);
  color: var(--white);
}
.cta-title {
  font-size: clamp(28px, 3.2vw, 41px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--white);
}
.cta-summary {
  padding: 11px 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 300;
  line-height: 1.4;
  color: var(--white);
}
.cta-inner-content-secondary {
  margin: 32px -32px 0;
  padding: 20px 32px 24px;
  background: var(--white);
  border-radius: 0 0 25px 0;
  color: var(--ink-dark);
}
.cta-inner-content-secondary .cta-summary {
  padding: 0 0 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-dark);
}

/* ================================================= 7. STATISTICS ===== */
.home-stats {
  position: relative;
  padding: 72px 0 40px;
  background: var(--brick);
  overflow: hidden;
}
.home-stats .section-header-title.plain { color: var(--white); }

.statistic {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 3%;
  margin: 56px 0 24px;
}
.statistic > li { flex: 1 1 0; }
.statistic-value { line-height: 1; }
.statistic-value-number,
.statistic-suffix {
  font-family: var(--font-display);
  font-size: clamp(64px, 9.4vw, 120px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--leaf);
}
.statistic-title {
  position: relative;
  margin-top: 10px;
  padding-left: 32px;
  font-size: clamp(20px, 2.34vw, 30px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--white);
}
.statistic-title::before {
  content: "";
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 5px;
  border-radius: 3px;
  background: var(--white);
}
.home-stats .section-footer { position: relative; z-index: 1; margin-top: 40px; padding-bottom: 96px; }

/* ================================================== 8. CAMPAIGNS ===== */
.home-landing { position: relative; padding-bottom: 32px; overflow: hidden; }
.home-landing .cards { display: flex; flex-wrap: wrap; gap: 24px 2%; }

.card-feature {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 426px;
  border-radius: var(--corner);
  background: var(--green);
}
.card-feature .card-image { position: relative; inset: auto; }
.card-feature .card-image img { height: 100%; min-height: 426px; }
.card-feature .card-wrap { display: flex; align-items: center; }
.card-feature .card-wrap-inner { padding: 32px 40px; color: var(--white); }
.card-feature .card-header-title {
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 400;
  line-height: 1.24;
  color: var(--white);
}
.card-feature .card-summary {
  margin: 12px 0 20px;
  font-weight: 700;
  line-height: 1.5;
}
.card-feature .button { background: var(--white); color: var(--green); }
.card-feature .button:hover { background: var(--cream); }

.card-tile {
  flex: 0 0 calc((100% - 6%) / 4);
  min-height: 208px;
  display: flex;
  align-items: flex-end;
}
.card-tile .card-wrap {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(11, 128, 67, .12) 0%, rgba(7, 66, 38, .88) 72%);
}
.card-tile .card-wrap-inner { padding: 60px 24px 20px; }
.card-header-title.small {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.26;
  color: var(--white);
}
.card-header-title.small .card-link {
  position: static;
  width: auto; height: auto;
  background: none;
  color: var(--white);
  text-decoration: none;
}
.card-header-title.small .card-link::after { content: none; }
.card-tile:hover .card-header-title.small { text-decoration: underline; }

/* ================================================ 9. CTA (torn) ====== */
.home-cta-full {
  position: relative;
  padding: 32px 0;
  background: var(--green);
  overflow: hidden;
}
.home-cta-full .cta-image { position: absolute; inset: 0; margin: 0; }
.home-cta-full .cta-image img { width: 100%; height: 100%; object-fit: cover; }
.home-cta-full .cta-image::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .12);
}
.home-cta-full .cta-inner { position: relative; z-index: 3; }
.home-cta-full .cta-inner-content {
  max-width: 940px;
  margin: 24px auto 300px;
  padding: 36px 48px 44px;
  background: var(--ember);
  color: var(--white);
  text-align: center;
  -webkit-mask: url("../img/torn-panel.svg") 0 0 / 100% 100% no-repeat;
          mask: url("../img/torn-panel.svg") 0 0 / 100% 100% no-repeat;
  padding-top: 44px;
  padding-bottom: 52px;
}
.home-cta-full .cta-title { font-weight: 700; }
.home-cta-full .cta-summary {
  max-width: 720px;
  margin: 0 auto;
  font-weight: 300;
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.35;
}
.home-cta-full .button { margin-top: 18px; }

/* torn paper edges — the CTA, the ways-to-help cards and the footer */
.home-cta-full::before, .home-cta-full::after,
.home-footer-ctas::before, .home-footer-ctas::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 92px;
  z-index: 4;
  background: var(--white);
  -webkit-mask: url("../img/rip.svg") 0 0 / 100% 100% no-repeat;
          mask: url("../img/rip.svg") 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
.home-cta-full::before, .home-footer-ctas::before { top: -1px; }
.home-cta-full::after,  .home-footer-ctas::after  { bottom: -1px; transform: scaleY(-1); }

/* ============================================== 10. WAYS TO HELP ===== */
.home-footer-ctas { position: relative; padding: 0; overflow: hidden; }
.home-footer-ctas .cards { display: flex; }
.home-footer-ctas .card {
  flex: 1 1 0;
  min-height: 800px;
  border-radius: 0;
  box-shadow: 0 0 15px rgba(0, 0, 0, .25);
}
.home-footer-ctas .card-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 25%, rgba(0, 0, 0, .55) 62%, rgba(0, 0, 0, .82) 100%);
}
.home-footer-ctas .card-wrap-inner { width: 100%; padding: 32px 32px 96px; }
.home-footer-ctas .card-header-title {
  font-size: clamp(34px, 3.75vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}
.home-footer-ctas .card-summary {
  max-width: 340px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
  margin-top: 10px;
  color: var(--white);
  font-size: 15px;
  line-height: 1.5;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .3s ease, max-height .3s ease;
}
.home-footer-ctas .card:hover .card-summary,
.home-footer-ctas .card:focus-within .card-summary { opacity: 1; max-height: 200px; }
.home-footer-ctas .card-link { left: 32px; bottom: 44px; z-index: 3; }
.home-footer-ctas .card-link::after { border-color: var(--ink-dark); }

/* ==================================================== 11. BLOG ======= */
.home-blog { padding: 48px 0 32px; }
.home-blog .section-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--green);
}
.home-blog .cards { display: flex; flex-wrap: wrap; gap: 24px 3%; margin-top: 28px; }
.home-blog .card {
  flex: 1 1 calc((100% - 3%) / 2);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-radius: 0;
  overflow: visible;
}
.home-blog .card-image {
  position: relative;
  inset: auto;
  flex: 0 0 82px;
  height: 82px;
  border-radius: 25px 25px 25px 0;
  overflow: hidden;
}
.home-blog .card-header-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
}
.home-blog .card-header-title .card-link {
  position: static;
  width: auto; height: auto;
  background: none;
  color: var(--ink-dark);
  text-decoration: none;
}
.home-blog .card-header-title .card-link::after { content: none; }
.home-blog .card-header-title .card-link:hover { color: var(--green); text-decoration: underline; }
.home-blog .card-summary { margin-top: 8px; font-size: 15px; font-weight: 700; line-height: 1.5; }

/* ================================================== 12. FOOTER ======= */
.site-footer {
  position: relative;
  padding-top: 150px;
  background: var(--cream);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute; top: -1px; left: 0;
  width: 100%; height: 78px;
  background: var(--white);
  -webkit-mask: url("../img/rip.svg") 0 0 / 100% 100% no-repeat;
          mask: url("../img/rip.svg") 0 0 / 100% 100% no-repeat;
}
.site-footer > .container { position: relative; z-index: 2; }

.footer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  margin-bottom: 32px;
}
.footer-logo { display: block; width: 165px; flex: 0 0 auto; }
.footer-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  background: var(--white);
  border-radius: 45px 50px 50px 0;
  box-shadow: 0 0 4px rgba(0, 0, 0, .1);
}
.footer-nav.social { display: flex; gap: 6px; margin-left: 6px; }
.social-link {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
}
.social-link svg { width: 22px; height: 22px; fill: currentColor; }
.social-link:hover { background: var(--green-deep); }

.footer-nav-outer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 32px;
}
.footer-nav-item-title {
  padding-bottom: 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--green);
}
.footer-nav .nav-item-link {
  display: block;
  padding: 5px 0;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.footer-nav .nav-item-link:hover { color: var(--green); text-decoration: underline; }

.footer-credits { position: relative; z-index: 2; padding: 24px 0 240px; margin-top: 40px; }
.footer-credits > .container:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  border-top: 2px dashed rgba(0, 0, 0, .3);
  font-size: 13px;
  line-height: 1.6;
}
.footer-credits-logo {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .04em;
}
.footer-credits-logo span {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--white);
  font-size: 10px;
  letter-spacing: .02em;
}
.backup-outer { display: flex; justify-content: flex-end; margin-top: 20px; }
.backtotop { display: inline-flex; align-items: center; gap: 6px; padding-right: 12px; }
.backtotop svg { width: 18px; height: 18px; }

.footer-image {
  position: absolute;
  inset: auto 0 0;
  height: 300px;
  z-index: 1;
}
.footer-image img { width: 100%; height: 100%; object-fit: cover; object-position: bottom; }
.footer-image::after {
  content: "";
  position: absolute; inset: auto 0 0;
  height: 14px;
  background: var(--green);
}

/* ================================================= 13. RESPONSIVE ==== */
@media (max-width: 1180px) {
  .header-nav .nav-item-link { font-size: 16px; margin: 0 8px; }
  .header-nav-inner { padding: 0 12px; }
  .what-wedo .card { flex: 0 0 calc((100% - 6%) / 3); }
}

@media (max-width: 1024px) {
  .header-subnav-outer { display: none; }
  .header-inner { padding: 16px var(--gutter); align-items: center; }
  .header-logo { width: 146px; margin-top: 0; }
  .header-nav-inner { display: none; }
  .nav-toggle { display: block; }
  .header { background: var(--cream); box-shadow: 0 2px 12px rgba(0, 0, 0, .1); }

  .hero-info { margin-top: 260px; }
  .hero-image { height: 560px; }

  .section-header-inner { display: block; }
  .section-header-summary {
    width: auto;
    margin-top: 12px;
    font-size: 17px;
    line-height: 1.5;
  }
  .what-wedo .card { flex: 0 0 68%; min-height: 560px; }
  .home-cta .cta-inner-content { margin-top: 340px; }
  .home-cta .cta-image { height: 520px; }
  .cta-credit { top: 480px; }
  .home-footer-ctas .card { min-height: 560px; }
  .home-footer-ctas .card-summary { opacity: 1; max-height: 200px; }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .card-feature { grid-template-columns: 1fr; }
  .card-feature .card-image img { min-height: 240px; }
  .card-tile { flex: 0 0 calc((100% - 2%) / 2); }
  .statistic { flex-wrap: wrap; gap: 28px; }
  .statistic > li { flex: 0 0 100%; }
  .home-footer-ctas .cards { flex-wrap: wrap; }
  .home-footer-ctas .card { flex: 0 0 100%; min-height: 420px; }
  .home-blog .card { flex: 0 0 100%; }
  .footer-nav-outer { grid-template-columns: repeat(2, 1fr); }
  .footer-header { flex-direction: column; align-items: flex-start; }
  .footer-header-inner { flex-wrap: wrap; border-radius: 30px 30px 30px 0; }
  .footer-credits > .container:first-child { flex-direction: column; }
}

@media (max-width: 560px) {
  .hero-image { height: 440px; }
  .hero-info { margin-top: 200px; }
  .hero-inner { padding: 24px 22px 30px; }
  .intro-outer { padding-bottom: 150px; }
  .what-wedo .card { flex: 0 0 84%; }
  .card-tile { flex: 0 0 100%; }
  .home-cta .cta-inner-content { margin-top: 300px; padding: 24px 22px 0; }
  .cta-inner-content-secondary { margin-left: -22px; margin-right: -22px; padding: 18px 22px 22px; }
  .home-cta-full .cta-inner-content { padding: 30px 24px 34px; margin-bottom: 220px; }
  .footer-nav-outer { grid-template-columns: 1fr; }
  .backup-outer { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  /* a snap between the two card states is worse than no reveal at all */
  .what-wedo .card:hover .card-wrap,
  .what-wedo .card:focus-within .card-wrap { top: 0; }
  .what-wedo .card:hover .card-summary,
  .what-wedo .card:focus-within .card-summary { opacity: 1; }
  .what-wedo .card:hover .card-image img,
  .what-wedo .card:focus-within .card-image img { transform: none; }

  *, *::before, *::after { animation: none !important; transition: none !important; }
}
