/* ==========================================================================
   EcoPulse site styles

   1. Font
   2. Design tokens   (colors, type and spacing live here)
   3. Base
   4. Layout helpers
   5. Buttons and links
   6. Navigation bar
   7. Home hero
   8. The landscape
   9. Mission block
   10. What we do
   11. Closing block
   12. Footer
   13. Inner pages    (the top of About, Projects and Get Involved)
   14. About page
   15. Projects page
   16. Get Involved page
   ========================================================================== */


/* 1. Font ----------------------------------------------------------------- */

/* One typeface for the whole site */
@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}


/* 2. Design tokens -------------------------------------------------------- */

:root {
  /* Layout idea: the landscape is the one big picture. Everything around it
     stays plain, with one typeface, three text sizes and no effects. */
  color-scheme: light;

  /* Colors, sampled from the logo */
  --paper: #ffffff;
  --ink: #0c2a17;          /* body text */
  --forest: #063f16;       /* the deep green of "Eco" */
  --teal: #03898c;         /* the teal of the water drop */
  --teal-deep: #066e65;    /* the teal of "Pulse", dark enough for text */
  --mist: #eef7f5;         /* very pale teal */
  --muted: #47604f;        /* secondary text */

  /* Type. Three sizes: the tagline, headings, and body text. */
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --text-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --text-heading: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --text-tagline: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);

  /* Space */
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --max-width: 72rem;
  --space-section: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 0.5rem;
}


/* 3. Base ----------------------------------------------------------------- */

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

/* On very wide screens the whole layout grows a little, so the text and the
   pictures stay in proportion. Nothing changes below 1600 pixels. Every size
   in this file is in rem, so this one line scales all of them together. */
html {
  font-size: clamp(100%, 58.333% + 0.41667vw, 125%);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img,
svg {
  display: block;
}

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

a {
  color: var(--teal-deep);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--forest);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

[hidden] {
  display: none !important;
}


/* 4. Layout helpers ------------------------------------------------------- */

/* The page is at least as tall as the screen. When a short page meets a tall
   screen, the footer grows down to the bottom edge, so no white shows
   under it. */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  overflow: clip;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
}

/* Section headings */
.heading {
  color: var(--forest);
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}


/* 5. Buttons and links ---------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  background: var(--forest);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn:hover {
  background: var(--teal-deep);
}

.btn--small {
  min-height: 2.6rem;
  padding: 0.45rem 1.1rem;
}

/* A white button for green and teal backgrounds. Any button on the Get
   Involved block gets this look on its own. */
.btn--light,
.contact .btn {
  background: #ffffff;
  color: var(--teal-deep);
}

.btn--light:hover,
.contact .btn:hover {
  background: var(--mist);
}

.text-link {
  color: var(--teal-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
}

.text-link:hover {
  text-decoration-thickness: 2.5px;
}

.text-link--light {
  color: #ffffff;
}


/* 6. Navigation bar ------------------------------------------------------- */

site-header {
  display: block;
  position: relative;
  z-index: 10;
  min-height: 5rem;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--forest);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* Before site.js runs, the plain fallback link sits where the bar will be */
site-header > .brand {
  min-height: 5rem;
  margin-inline: max(var(--gutter), (100% - var(--max-width)) / 2);
}

.brand img {
  width: 2.75rem;
  height: 2.75rem;
}

.brand__pulse {
  color: var(--teal-deep);
}

/* The logo beats once, like a heart, when a visitor points at it or taps
   it. site.js adds is-beating to the large logo on the Home page. */
.hero__logo img {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .brand:hover img,
  .hero__logo .is-beating {
    animation: logo-beat 0.9s ease-out;
  }
}

@keyframes logo-beat {
  0%,
  60%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.07);
  }
  28% {
    transform: scale(0.99);
  }
  42% {
    transform: scale(1.04);
  }
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  padding: 0;
  list-style: none;
}

.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.site-nav a:not(.btn):hover {
  color: var(--teal-deep);
}

.site-nav a:not(.btn)[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--teal);
}

.nav-toggle {
  display: none;
  min-height: 2.6rem;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--forest);
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 47.99rem) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.25rem var(--gutter) 1.5rem;
    border-bottom: 1px solid rgba(6, 63, 22, 0.14);
    background: var(--paper);
  }

  site-header[data-open] .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li + li {
    border-top: 1px solid rgba(6, 63, 22, 0.14);
  }

  .site-nav a:not(.btn) {
    width: 100%;
    min-height: 3.25rem;
    font-size: 1.125rem;
  }

  .site-nav li:last-child {
    padding-top: 1rem;
  }

  .site-nav .btn {
    width: 100%;
    min-height: 3rem;
  }
}


/* 7. Home hero ------------------------------------------------------------ */

.hero {
  padding-top: clamp(0.5rem, 3vw, 3rem);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
}

.hero__logo {
  order: -1;
  justify-self: center;
  width: min(50vw, 12rem);
}

.tagline {
  color: var(--forest);
  font-size: var(--text-tagline);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Keeps the tagline on two lines */
.tagline span {
  display: block;
}

.hero__lead {
  max-width: 32em;
  margin-top: clamp(0.9rem, 2vw, 1.25rem);
}

.hero .actions {
  margin-top: clamp(1.4rem, 3vw, 2rem);
}

@media (min-width: 60rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .hero__logo {
    order: 0;
    justify-self: end;
    width: clamp(13rem, 21vw, 17rem);
    margin-right: clamp(0rem, 3vw, 3rem);
  }
}


/* 8. The landscape -------------------------------------------------------- */

/* The drawing is wider than a phone screen. On small screens it keeps its
   left side, where the heartbeat is, and lets the right side run off. */
.scene {
  margin-top: clamp(-3rem, -3vw, -0.5rem);
}

.scene__art {
  width: 100%;
  aspect-ratio: 1600 / 440;
  min-height: 15.5rem;
  max-height: 36rem;
  margin-bottom: -1px;
  overflow: hidden;
}

.pulse__line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* One short dark stretch that runs along the line when a visitor clicks the
   landscape. It rests out of sight before the start of the line. */
.pulse__beat {
  fill: none;
  stroke: var(--forest);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 34 1000;
  stroke-dashoffset: 34;
}

.pulse__beat.is-beating {
  animation: pulse-beat 2.2s linear both;
}

@keyframes pulse-beat {
  from {
    stroke-dashoffset: 34;
  }
  to {
    stroke-dashoffset: -1000;
  }
}

/* The ring a click makes on the lake */
.scene-ring {
  fill: none;
  stroke: #cdeae6;
  stroke-width: 2.6;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: scene-ring 1.6s cubic-bezier(0.1, 0.6, 0.3, 1) both;
}

@keyframes scene-ring {
  from {
    opacity: 0.95;
    transform: scale(0.12);
  }
  to {
    opacity: 0;
    transform: scale(1);
  }
}

/* Added by site.js to the drawings a visitor can plant in */
.can-plant {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* The birds. Each one rests at its own place in the sky (--home). When
   motion is allowed they fly slowly from right to left, bob a little and
   flap. Each wing turns around the point where the two wings meet. */
.bird {
  opacity: 0.7;
  transform: translateX(var(--home));
}

.bird__wing {
  fill: none;
  stroke: var(--forest);
  stroke-width: 2.6;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: no-preference) {
  .bird {
    animation: bird-fly 64s linear var(--start, 0s) infinite;
  }

  .bird__bob {
    animation: bird-bob 3.2s ease-in-out var(--bob, 0s) infinite alternate;
  }

  .bird__wing--left {
    animation: wing-left 0.9s ease-in-out var(--flap, 0s) infinite;
  }

  .bird__wing--right {
    animation: wing-right 0.9s ease-in-out var(--flap, 0s) infinite;
  }
}

@keyframes bird-fly {
  from {
    transform: translateX(1680px);
  }
  to {
    transform: translateX(-80px);
  }
}

@keyframes bird-bob {
  from {
    transform: translateY(-4px);
  }
  to {
    transform: translateY(4px);
  }
}

@keyframes wing-left {
  0%,
  100% {
    transform: rotate(18deg);
  }
  50% {
    transform: rotate(-24deg);
  }
}

@keyframes wing-right {
  0%,
  100% {
    transform: rotate(-18deg);
  }
  50% {
    transform: rotate(24deg);
  }
}

@media (max-width: 47.99rem) {
  .pulse__line {
    stroke-width: 4.6;
  }

  .pulse__beat {
    stroke-width: 6.5;
  }
}


/* 9. Mission block -------------------------------------------------------- */

/* The same green as the front hill of the landscape, so the land carries on
   down the page. The hillside drawing is fixed to the bottom of the block.
   On wide screens the words sit beside the tree. On small screens the drawing
   sits under the words and shows its right side, where the plants are. */
.mission {
  position: relative;
  padding-top: clamp(2rem, 5vw, 4rem);
  background: var(--forest);
  color: #ffffff;
}

.mission .heading,
.closing .heading {
  color: #ffffff;
}

.mission__text {
  position: relative;
  z-index: 1;
  max-width: 34em;
}

.mission__text p {
  margin-top: 1rem;
}

.mission__text .mission__more {
  margin-top: 1.5rem;
}

.mission__scene {
  position: relative;
  width: 172%;
  margin: 1.5rem 0 0 -72%;
}

.mission__art {
  width: 100%;
  max-width: none;
}

/* The layer where planted trees are drawn. It lies exactly over the picture. */
.mission__plot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The planting controls */
.plant {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.plant__button {
  min-height: 2.75rem;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.plant__button:hover {
  background: #ffffff;
  color: var(--forest);
}

.plant__reset {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.mission__text .plant__hint {
  flex: 1 1 12rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9375rem;
}

/* Read out by screen readers when a tree is planted, not shown */
.mission__text .plant__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.mission :focus-visible,
.closing :focus-visible,
site-footer :focus-visible {
  outline-color: #ffffff;
}

@media (min-width: 40rem) {
  .mission__scene {
    width: 130%;
    margin-left: -30%;
  }
}

@media (min-width: 60rem) {
  /* The block is always tall enough for the tree */
  .mission {
    min-height: calc(30vw + 1.5rem);
    padding-bottom: clamp(9.5rem, 13vw, 16rem);
  }

  .mission__text {
    max-width: min(34em, 50%);
  }

  .mission__scene {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
  }
}

/* A planted tree. It starts as a drop of water, then a sprout, then grows.
   People who ask their device for less motion get the grown tree at once. */
.tree--new .tree__drop {
  animation: tree-drop 0.42s cubic-bezier(0.5, 0, 0.9, 0.6) both;
}

.tree--new .tree__mound {
  animation: tree-pop 0.3s 0.36s ease-out both;
}

.tree--new .tree__sprout {
  animation: tree-sprout 1.5s 0.4s ease-out both;
}

.tree--new .tree__grow {
  animation: tree-grow 2.6s 1s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.tree--out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes tree-drop {
  0% {
    opacity: 0;
    transform: translateY(-120px);
  }
  20%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes tree-pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes tree-sprout {
  0% {
    opacity: 1;
    transform: scale(0);
  }
  22%,
  70% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes tree-grow {
  from {
    transform: scale(0.04);
  }
  to {
    transform: scale(1);
  }
}


/* 10. What we do ---------------------------------------------------------- */

.work {
  padding-block: var(--space-section) clamp(1rem, 3vw, 2.5rem);
}

.work__intro {
  max-width: 34em;
}

.work__intro p {
  margin-top: 1rem;
}

/* Each project is a picture with its name underneath */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.25rem) clamp(1rem, 2.5vw, 1.75rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 0;
  list-style: none;
}

.tile {
  display: grid;
  gap: 0.75rem;
  color: var(--forest);
  text-decoration: none;
}

.tile__art {
  display: block;
  overflow: hidden;
  border-radius: 0.75rem;
  background: var(--mist);
  aspect-ratio: 4 / 5;
}

.tile__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile__name {
  font-weight: 600;
  line-height: 1.3;
}

.tile:hover .tile__name {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
}

@media (min-width: 60rem) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* 11. Closing block ------------------------------------------------------- */

/* The page ends at the lake. The drawing sits above a block in the color of
   its water, so the water carries on to the foot of the page. On small
   screens the drawing keeps its middle and lets the sides run off. */
.closing {
  position: relative;
  overflow: hidden;
}

.closing__scene {
  width: 100%;
  height: clamp(11rem, 21.25vw, 28rem);
  margin-bottom: -1px;
  object-fit: cover;
  object-position: center bottom;
}

/* The Home page ends with one tall drawing: a mountain, the village on the
   shore and the lake. The drawing always fills its box from top to bottom,
   so a spot on the mountain is the same share of the way down at every
   screen size. The founder's name is set on that spot. On narrow screens
   the drawing keeps its middle and lets the sides run off. */
.lakeside {
  position: relative;
}

.closing__scene--lakeside {
  display: block;
  height: max(38rem, 53.75vw);
}

/* The words on the mountain: a quiet first line, the name set large, the
   heartbeat line from the logo, the academy, and a button */
.lakeside__sign {
  position: absolute;
  top: 31.5%;
  left: 50%;
  width: min(100% - 2.5rem, 28rem);
  transform: translateX(-50%);
  text-align: center;
}

.lakeside__label {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.lakeside__name {
  margin-top: 0.1rem;
  color: var(--forest);
  font-size: clamp(1.875rem, 1.2rem + 1.7vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.lakeside__pulse {
  display: block;
  width: clamp(6.5rem, 9vw, 8.5rem);
  margin: 0.7rem auto 0.55rem;
  overflow: visible;
}

.lakeside__pulse-line,
.lakeside__pulse-beat {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lakeside__pulse-line {
  stroke: var(--teal);
  stroke-width: 2.6;
}

/* A short dark stretch travels along the line every few seconds, like a
   heartbeat on a monitor. It stays hidden when motion is switched off. */
.lakeside__pulse-beat {
  stroke: var(--forest);
  stroke-width: 3.4;
  stroke-dasharray: 9 100;
  stroke-dashoffset: 9;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .lakeside__pulse-beat {
    animation: lakeside-beat 3.6s linear infinite;
  }
}

@keyframes lakeside-beat {
  0% {
    opacity: 1;
    stroke-dashoffset: 9;
  }
  45% {
    opacity: 1;
    stroke-dashoffset: -100;
  }
  46%,
  100% {
    opacity: 0;
    stroke-dashoffset: -100;
  }
}

.lakeside__part {
  color: var(--muted);
  line-height: 1.4;
}

.lakeside__part strong {
  color: var(--forest);
  font-weight: 700;
}

.lakeside__more {
  margin-top: 1.1rem;
}

/* After a green hillside the lake has no sky: the meadow runs straight down
   to the bank. The drawing starts in the green of the meadow above it and
   ends in the teal of the block below it, so the three join without a seam. */
.closing__scene--shore {
  display: block;
  height: clamp(9.5rem, 18.75vw, 26rem);
  margin-top: -1px;
}

.closing__body {
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
  background: var(--teal-deep);
  color: #ffffff;
}

.closing .heading {
  max-width: 24em;
}

.closing .actions {
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

/* The ring a visitor makes by clicking the water (see site.js) */
.water-ring {
  position: absolute;
  width: 1rem;
  height: 0.3rem;
  border: 2px solid #cdeae6;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: water-ring 1.7s cubic-bezier(0.1, 0.6, 0.3, 1) both;
}

@keyframes water-ring {
  from {
    width: 1rem;
    height: 0.3rem;
    opacity: 0.9;
  }
  to {
    width: 15rem;
    height: 4.2rem;
    opacity: 0;
  }
}


/* 12. Footer -------------------------------------------------------------- */

site-footer {
  display: block;
  flex-grow: 1;
  background: var(--teal-deep);
  color: #ffffff;
}

/* When you pull past the end of a page, the browser shows a strip of the
   page background before it springs back. site.js adds this class near the
   end of the page, so that strip is the footer color and not white. Keep it
   the same color as the footer above. */
html.is-near-end {
  background: var(--teal-deep);
}

/* Before site.js runs, the plain fallback line still reads well */
site-footer:not(:has(.site-footer)) {
  padding: 2rem var(--gutter);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.site-footer__inner::before {
  content: "";
  flex: 0 0 100%;
  height: 1px;
  margin-bottom: clamp(0.25rem, 2vw, 0.75rem);
  background: rgba(255, 255, 255, 0.3);
}

/* On the inner pages the footer sits right under the lake drawing, so it
   needs room above it and no dividing line */
body:not([data-page="home"]) .site-footer__inner {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
}

body:not([data-page="home"]) .site-footer__inner::before {
  display: none;
}

.site-footer__name {
  font-size: 1.125rem;
  font-weight: 700;
}

/* The small credit on its own line at the very bottom */
.site-footer__credit {
  flex: 0 0 100%;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(1.25rem, 3vw, 2rem);
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.4em;
}

.site-footer__nav a:hover,
.site-footer__nav a[aria-current="page"] {
  text-decoration: underline;
}


/* 13. Inner pages --------------------------------------------------------- */

/* An inner page opens with its title and one sentence, set large. On wide
   screens the title sits on the left and the sentence on the right, on the
   same two columns the mission block uses. */
.page-head {
  padding-top: clamp(1.25rem, 4vw, 3.5rem);
}

.page-head__inner {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.25rem) clamp(2rem, 5vw, 4rem);
}

.page-head__title {
  color: var(--forest);
  font-size: var(--text-tagline);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page-head__lead {
  max-width: 24em;
  color: var(--forest);
  font-size: var(--text-heading);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (min-width: 60rem) {
  .page-head__inner {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: baseline;
  }
}

/* Short facts under the sentence: a role and a name, side by side when
   there are several */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(2rem, 5vw, 3.5rem);
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
}

.facts dt {
  color: var(--muted);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.4;
}

.facts dd {
  margin-top: 0.15em;
  color: var(--forest);
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* A wide drawing that runs the full width of the page. On small screens it
   keeps its middle and lets the sides run off. */
.band {
  width: 100%;
  height: clamp(15.5rem, 27.5vw, 36rem);
  margin-top: clamp(-1.5rem, -1.5vw, 0rem);
  margin-bottom: -1px;
  object-fit: cover;
  object-position: center bottom;
}

/* A strip of hilltop that opens a green block when no drawing sits above it */
.cap {
  width: 100%;
  height: clamp(4rem, 8.125vw, 9rem);
  margin-bottom: -1px;
  object-fit: cover;
  object-position: left bottom;
}

/* A plain section on white */
.section {
  padding-block: var(--space-section);
}

.section--first {
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

/* The lake at the foot of an inner page needs a little less sky above it */
.section + .closing {
  margin-top: calc(var(--space-section) * -0.5);
}


/* 14. About page ---------------------------------------------------------- */

/* The mission block without the hillside drawing, for the full mission text.
   On wide screens the heading sits beside the text. A strip of meadow closes
   the block, the same way the hillside closes it on the Home page. */
.mission--plain {
  min-height: 0;
  padding-bottom: 0;
}

.mission--plain .wrap {
  display: grid;
  gap: 0.25rem clamp(2rem, 5vw, 4rem);
}

.mission--plain .mission__text {
  max-width: 38em;
}

.mission__ground {
  display: block;
  width: 100%;
  height: clamp(4.5rem, 7.5vw, 8rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
  object-fit: cover;
  object-position: center bottom;
}

@media (min-width: 60rem) {
  .mission--plain .wrap {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }

  .mission--plain .mission__text p:first-child {
    margin-top: 0.2rem;
  }
}

.subheading {
  margin-top: 1.5rem;
  color: var(--forest);
  font-size: 1.125rem;
  font-weight: 700;
}


/* 15. Projects page ------------------------------------------------------- */

/* The four projects sit in one row on wide screens and two by two on
   small ones */
.projects {
  padding-block: clamp(2rem, 4.5vw, 3.5rem) var(--space-section);
}

.projects + .closing {
  margin-top: calc(var(--space-section) * -0.5);
}

.projects__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 2.5vw, 1.75rem);
  padding: 0;
  list-style: none;
}

@media (min-width: 60rem) {
  .projects__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* One project: its picture, its name, and whatever is added under the name */
.project {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  scroll-margin-top: 1.5rem;
}

.project__art {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  background: var(--mist);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.project__name {
  color: var(--forest);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

/* A link from the Home page lands on one project. A ring shows which. */
.project:target .project__art {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

/* Photos added to a project sit side by side */
.project__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.project__photos img {
  width: 100%;
  border-radius: 0.5rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* The list of updates. The newest goes at the top. */
.updates {
  padding: 0;
  list-style: none;
}

.updates li {
  padding-block: 0.9rem;
  border-top: 1px solid rgba(6, 63, 22, 0.14);
}

.updates li:last-child {
  border-bottom: 1px solid rgba(6, 63, 22, 0.14);
}

.updates__date {
  display: block;
  color: var(--forest);
  font-weight: 600;
}



/* 16. Get Involved page --------------------------------------------------- */

/* The whole page is one green block: the title, the email, and the hillside
   where visitors plant trees */
.contact .page-head__title {
  color: #ffffff;
}

.contact .mission__text p {
  margin-top: clamp(0.9rem, 2vw, 1.25rem);
}

.contact .mission__text .contact__email {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.contact .mission__text .contact__form {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
}

.contact .plant {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}

/* The hilltop strip sits right under the navigation bar on this page */
body[data-page="get-involved"] .cap {
  margin-top: clamp(0rem, 1vw, 1rem);
}
