/* For a better world (better-world.html): the house style, with pastel green instead of lilac as the
   third colour, so the footer is green on this page too. A sunny valley in the hero, a wood at dusk
   for the statement, One Tree Planted in three numbers, and why trees. The landscapes are drawn
   (SVG); some trees sway, the clouds drift, the birds flap: slowly, and not with reduced motion. */

:root {
  --third: #b9e3c6;
  --wd-g1: #dcf2e1;
  --wd-g2: #b9e3c6;
  --wd-g3: #8fcca1;
  --wd-g4: #5aa673;
}

/* ------------------------------------------------------------ the hero: a valley under the sun */

.wd-hero .pg-frame {
  min-height: calc(100vh - 32px);
  min-height: calc(100svh - 32px);
  background: linear-gradient(180deg, #feeb8d 0%, #feeb8d 38%, #fff4bd 62%, #fffce1 100%);
}

.wd-land {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* the world button on its own page: marked as the page you are on */
.wd .sb-hdr-end .sb-world {
  box-shadow: inset 0 0 0 1.5px #252324;
}

/* ------------------------------------------------------------ the steps: green dots */

.wd-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wd .cx-step::after {
  background: var(--third);
  color: #252324;
}

/* ------------------------------------------------------------ the wood at dusk */

.wd-band {
  position: relative;
  padding: 16px 16px 0;
}

.wd-band__card {
  position: relative;
  overflow: hidden;
  height: clamp(440px, 74vh, 720px);
  border-radius: 40px;
  background: linear-gradient(180deg, #252324 0%, #2f3b33 70%, #35473b 100%);
  color: #fffce1;
}

/* stars over the wood, a few of them twinkling */
.wd-stars {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 50%;
  fill: #fffce1;
}

.wd-star {
  opacity: 0.55;
}

.wd-star--t {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.js.motion .wd-star--t {
  animation: wd-twinkle 3.4s ease-in-out var(--d, 0s) infinite alternate;
}

@keyframes wd-twinkle {
  from { opacity: 0.15; transform: scale(0.7); }
  to { opacity: 0.9; transform: scale(1.15); }
}

.wd-woods {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 78%;
}

.wd-band__say {
  position: absolute;
  left: 40px;
  top: 44px;
  margin: 0;
  font-size: clamp(44px, 5.4vw, 112px);
  font-weight: 550;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.wd-band__say > span {
  display: block;
}

.wd-band__say > span + span {
  color: var(--third);
}

/* ------------------------------------------------------------ One Tree Planted, in three numbers */

.wd-facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.wd-facts li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  padding: 28px 28px 30px;
  border-radius: 28px;
  background: #1a1919;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 225, 0.12);
}

.wd-facts b {
  display: block;
  color: var(--third);
  font-size: clamp(56px, 6.2vw, 116px);
  font-weight: 550;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.wd-facts span {
  display: block;
  margin-top: 18px;
  color: rgba(255, 252, 225, 0.78);
  font-size: clamp(17px, 1.25vw, 23px);
  font-weight: 450;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

/* ------------------------------------------------------------ why trees, on green */

.cx-card--green {
  background: var(--third);
  color: #252324;
}

.cx-card--green .cx-h2 > span + span {
  opacity: 0.55;
}

.wd-why {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.wd-why li {
  padding: 28px 28px 32px;
  border-radius: 28px;
  background: #fffce1;
}

.wd-why__ic {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #252324;
  color: var(--third);
}

.wd-why__ic svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wd-why h3 {
  margin: 40px 0 0;
  font-size: clamp(26px, 2vw, 38px);
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.045em;
}

.wd-why p {
  margin: 12px 0 0;
  color: #6f6d60;
  font-size: clamp(17px, 1.2vw, 22px);
  font-weight: 450;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.cx-card--green .cx-more {
  background: #252324;
}

/* ------------------------------------------------------------ what moves */

.wd-sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.wd-bird,
.wd-sun__glow {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.js.motion .wd-sway {
  animation: wd-sway 6s ease-in-out var(--d, 0s) infinite alternate;
}

.js.motion .wd-cloud {
  animation: wd-drift 40s ease-in-out var(--d, 0s) infinite alternate;
}

.js.motion .wd-bird {
  animation: wd-flap 0.9s ease-in-out var(--d, 0s) infinite alternate;
}

.js.motion .wd-sun__glow {
  animation: wd-glow 5s ease-in-out infinite alternate;
}

@keyframes wd-sway {
  from { transform: rotate(-1.6deg); }
  to { transform: rotate(1.6deg); }
}

@keyframes wd-drift {
  from { transform: translateX(-50px); }
  to { transform: translateX(50px); }
}

@keyframes wd-flap {
  to { transform: scaleY(0.5) translateY(3px); }
}

@keyframes wd-glow {
  to { transform: scale(1.1); opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
  .wd-land *,
  .wd-woods *,
  .wd-stars * {
    animation: none !important;
  }
}

/* ------------------------------------------------------------ smaller screens */

@media (max-width: 1000px) {
  .wd-facts,
  .wd-why {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-facts li {
    min-height: 0;
  }

  .wd-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  /* on a phone the words stand in the sky, the valley lies under them */
  .wd-hero .pg-frame {
    justify-content: flex-start;
  }

  .wd-hero .pg-body {
    padding-top: 112px;
  }

  .wd-band__card {
    height: 460px;
    border-radius: 32px;
  }

  .wd-band__say {
    left: 22px;
    top: 30px;
    font-size: 44px;
  }

  .wd-woods {
    height: 64%;
  }

  .wd-facts,
  .wd-why {
    margin-top: 32px;
  }

  .wd-facts li,
  .wd-why li {
    padding: 24px 22px 26px;
    border-radius: 24px;
  }

  .wd-why h3 {
    margin-top: 28px;
  }
}
