/* Every page except Our Team. Loaded after site.css, which holds the tokens,
   buttons, top bar, menu sheet, mission close and footer.
   Layout rules: README.md, How the other pages work. */

.page {
  background: var(--ink);
}

/* Colour sets, shared by heroes, panels, cards and tiles */
.phero--mint,
.panel--mint,
.card--mint,
.htile--mint {
  --bg: var(--mint);
  --fg: var(--on-mint);
  --deep: var(--ink);
}
.phero--lilac,
.panel--lilac,
.card--lilac,
.htile--lilac {
  --bg: var(--lilac);
  --fg: var(--ink);
  --deep: var(--lilac-deep);
}
.phero--yolk,
.panel--yolk,
.card--yolk,
.htile--yolk {
  --bg: var(--yolk);
  --fg: var(--ink);
  --deep: var(--yolk-deep);
}
.phero--tomato,
.panel--tomato,
.card--tomato,
.htile--tomato {
  --bg: var(--tomato);
  --fg: var(--ink);
  --deep: var(--tomato-deep);
}
.phero--ink,
.panel--ink,
.card--ink,
.htile--ink {
  --bg: var(--ink);
  --fg: var(--paper);
  --deep: var(--mint-on-ink);
}
.panel--paper,
.htile--paper {
  --bg: var(--paper);
  --fg: var(--ink);
  --deep: var(--lilac-deep);
}
.panel--white {
  --bg: var(--white);
  --fg: var(--ink);
  --deep: var(--mint-deep);
}
.phero,
.panel,
.card,
.htile {
  --btn: var(--fg);
  --btn-text: var(--bg);
  --shade: color-mix(in oklab, var(--bg) 72%, black);
  background: var(--bg);
  color: var(--fg);
}
.phero--ink,
.panel--ink {
  --line: #33205f;
  --shade: #33205f;
}

/* Hero: the page's giant word, its own title, and a drawing */

.phero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4svh, 48px);
  min-height: min(92svh, 1000px);
  padding: var(--pad);
  padding-bottom: calc(var(--pad) + var(--round) + 24px);
  overflow: clip;
  --line: color-mix(in oklab, var(--bg) 86%, black);
}
.meander--phero {
  top: 2svh;
  right: -4vw;
  width: min(54vw, 820px);
}
.phero__grid {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template: "word word" auto "say art" 1fr / minmax(0, 1fr) auto;
  gap: clamp(16px, 3svh, 36px) clamp(20px, 4vw, 64px);
  align-items: end;
}
.phero__grid:not(.phero__grid--art) {
  grid-template: "word" auto "say" 1fr / minmax(0, 1fr);
}
.phero__word {
  grid-area: word;
  align-self: start;
  overflow: hidden;
  font-size: min(
    calc((100vw - 2 * var(--pad)) / (var(--n) * 0.6)),
    clamp(120px, 34svh, 360px)
  );
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.phero__word span {
  display: inline-block;
  padding-bottom: 0.06em;
  transform-origin: 0 100%;
}
.phero__say {
  grid-area: say;
  max-width: 40em;
}
.phero__group {
  margin-bottom: 12px;
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 600;
}
.phero__title {
  max-width: 17em;
  font-size: clamp(30px, 4vw, 62px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.phero__lead {
  margin-top: clamp(14px, 2svh, 24px);
  max-width: 34em;
  font-size: clamp(19px, 1.5vw, 24px);
  line-height: 1.4;
}
.phero__art {
  grid-area: art;
  width: min(36vw, 50svh, 500px);
  height: auto;
  border-radius: var(--bubble);
  transform-origin: 0 100%;
}

/* Panels: each of their sections, one colour each, rounded, overlapping */

.pmain {
  position: relative;
}
.panel {
  position: relative;
  margin-top: calc(var(--round) * -1);
  padding: clamp(64px, 9vw, 140px) var(--pad)
    calc(clamp(56px, 8vw, 110px) + var(--round));
  border-radius: var(--round) var(--round) 0 0;
}
.panel a:not(.btn) {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}
.panel > .p-h,
.panel h2.p-h {
  max-width: 15em;
  margin-bottom: clamp(24px, 4vw, 56px);
  font-size: clamp(38px, 6vw, 100px);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.panel h3.p-h,
.panel h4.p-h {
  margin: 1.4em 0 0.5em;
  font-size: clamp(24px, 2.3vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
/* a main heading further down a section */
.panel h2.p-h--mid {
  margin: 1.2em 0 0.5em;
  font-size: clamp(30px, 3.6vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.panel h3.p-h:first-child,
.panel h4.p-h:first-child {
  margin-top: 0;
}
.panel p,
.panel li,
.panel blockquote {
  max-width: 36em;
  font-size: clamp(18px, 0.45vw + 15.5px, 22px);
  line-height: 1.55;
}
.panel p + p,
.panel p + .p-list,
.panel .p-list + p {
  margin-top: 0.9em;
}
.panel blockquote {
  margin: 1em 0;
  padding-left: 0.8em;
  border-left: 6px solid var(--deep);
  font-weight: 500;
}
.p-list {
  margin-top: 0.6em;
}
.p-list li {
  position: relative;
  padding-left: 1.3em;
}
.p-list li + li {
  margin-top: 0.4em;
}
.p-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55em;
  height: 0.5em;
  border-radius: var(--bubble);
  background: var(--deep);
}
.p-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1em;
}
.panel .p-chips li {
  padding: 6px 16px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
}
.p-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.panel .p-actions {
  max-width: none;
}
/* their longest button labels must wrap on a phone */
.panel .btn {
  max-width: 100%;
  padding-block: 12px;
  white-space: normal;
  text-align: center;
}

/* Text beside one photo in their speech-bubble shape */
.panel__flow--photo {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.panel__photo,
.p-photo {
  width: 100%;
  height: auto;
  border-radius: var(--bubble);
  box-shadow: clamp(10px, 1.2vw, 18px) clamp(10px, 1.2vw, 18px) 0 var(--shade);
  transform-origin: 0 100%;
}
.panel__fig {
  position: sticky;
  top: var(--pad);
}
.p-fig {
  max-width: 560px;
  margin: 1.4em 0;
}
.p-fig figcaption {
  margin-top: 12px;
  font-size: 0.9em;
}

/* Cards: a section whose parts each have a heading */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
  margin-top: clamp(20px, 3vw, 40px);
}
.panel .cards {
  max-width: none;
}
.card {
  padding: clamp(22px, 2.4vw, 34px);
  border-radius: 30px;
  border-bottom-left-radius: 10px;
}
.card__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 22px;
}
.panel .card__step {
  margin-bottom: 6px;
  font-size: clamp(44px, 4.4vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
}
.card__title {
  margin-bottom: 10px;
  font-size: clamp(22px, 1.9vw, 30px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.card p,
.card li {
  font-size: clamp(17px, 0.3vw + 15.5px, 19px);
}

/* Questions: one opens at a time to read, all show with the script off */
.faq {
  max-width: 1100px;
  border-top: 3px solid currentColor;
}
.faq__item {
  border-bottom: 3px solid currentColor;
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2.4vw, 30px) 0;
  font-size: clamp(22px, 2.4vw, 38px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary .chev {
  width: 34px;
  height: 34px;
  transition: transform 0.3s var(--ease);
}
.faq__item[open] summary .chev {
  transform: rotate(90deg);
}
.faq__body {
  padding-bottom: clamp(22px, 3vw, 40px);
}

/* People: board members, photo in the bubble shape, bio on request */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: clamp(20px, 3vw, 40px) 18px;
}
.panel .people {
  max-width: none;
}
.person__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--bubble);
  box-shadow: 10px 10px 0 var(--lilac);
}
.person__name {
  margin-top: 18px;
  font-size: clamp(20px, 1.6vw, 25px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.person__bio {
  margin-top: 10px;
}
.person__bio summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.person__bio summary::-webkit-details-marker {
  display: none;
}
.person__bio[open] summary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.person__bio p {
  margin-top: 0.8em;
  font-size: 17px;
}

/* Logos: their partners, on white tiles */
.logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 12px;
}
.panel .logos {
  max-width: none;
}
.logos li {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  background: var(--white);
}
.logos .p-fig {
  margin: 0;
}
.logos .p-photo {
  width: auto;
  max-height: 110px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

/* A section that is one picture on their site (their infographics) */
.panel--figure {
  display: grid;
  place-items: center;
}
.panel__infographic {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: 24px;
}

/* Video */
.p-embed {
  max-width: 980px;
  margin: 1.4em 0;
  aspect-ratio: 16 / 9;
}
.p-embed video,
.p-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 24px;
  background: var(--ink);
}

/* Home */

.hhero__grid {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template: "title title" auto "say art" 1fr / minmax(0, 1fr) auto;
  gap: clamp(16px, 3svh, 36px) clamp(20px, 4vw, 64px);
  align-items: end;
}
.hhero__title {
  grid-area: title;
  font-size: min(8.2vw, 17svh);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.055em;
}
.hhero__title .w {
  display: block;
  transform-origin: 0 100%;
}
.hhero__say {
  grid-area: say;
}
.hhero__sub {
  max-width: 16em;
  font-size: clamp(24px, 2.8vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.htiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.htile {
  position: relative;
  display: grid;
  grid-template: "photo photo" 1fr "label chev" auto / 1fr auto;
  gap: 16px;
  min-height: clamp(300px, 30vw, 440px);
  padding: 14px 22px 22px 14px;
  overflow: hidden;
  border-radius: 34px;
  border-bottom-left-radius: 12px;
  text-decoration: none;
}
.htile__photo {
  grid-area: photo;
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  border-radius: 24px;
  transition: transform 0.4s var(--ease);
}
.htile:hover .htile__photo,
.htile:focus-visible .htile__photo {
  transform: scale(1.03) rotate(-1deg);
}
.htile__faces {
  grid-area: photo;
  display: flex;
  align-items: center;
  justify-content: center;
}
.htile__faces img {
  width: 34%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-left: -6%;
  border: 4px solid var(--bg);
  border-radius: var(--bubble);
}
.htile__label {
  grid-area: label;
  align-self: end;
  padding-left: 8px;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.htile .chev {
  grid-area: chev;
  align-self: end;
  width: 32px;
  height: 32px;
}

.hnew__title {
  font-size: clamp(44px, 8vw, 140px) !important;
}
.hnew .p-embed {
  margin: 0 0 clamp(28px, 4vw, 56px);
}
.hnew__text p {
  font-size: clamp(20px, 1.6vw, 26px);
}
.hnew__link {
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 600;
}

.hsched {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.hsched__list {
  border-top: 3px solid currentColor;
}
.hsched__list li {
  max-width: none;
  padding: 14px 0;
  border-bottom: 3px solid currentColor;
  font-size: clamp(19px, 1.5vw, 25px);
}
.hsched__mini {
  font-size: clamp(19px, 1.5vw, 25px) !important;
}
.hsched__fig .panel__photo {
  max-width: 520px;
}

.hsay__fig {
  max-width: 980px;
}
.hsay__img {
  width: 100%;
  height: auto;
  border-radius: 24px;
}

/* Small screens */

@media (max-width: 900px) {
  .phero__grid,
  .phero__grid:not(.phero__grid--art),
  .hhero__grid {
    grid-template: "word" auto "title" auto "say" auto "art" auto / minmax(
        0,
        1fr
      );
  }
  .phero__art {
    width: min(78vw, 420px);
    justify-self: end;
  }
  .panel__flow--photo,
  .hsched {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel__fig {
    position: static;
    max-width: 480px;
  }
  .htiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .htiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .htile {
    min-height: 280px;
  }
  .top__give {
    display: none;
  }
  .hhero__title {
    font-size: 12.4vw;
  }
}

/* Motion: only with motion allowed, and only movement, never fading */

@media (prefers-reduced-motion: no-preference) {
  .phero__word span,
  .hhero__title .w {
    animation: rise 0.9s var(--ease) both;
  }
  .hhero__title .w:nth-child(2) {
    animation-delay: 0.35s;
  }
  .meander--phero path {
    animation: draw 2.4s 0.2s var(--ease) both;
  }
  .motion .phero__word,
  .motion .hhero__title {
    transform: translateY(calc(var(--out, 0) * -18%));
  }
  .motion .phero__art {
    transform: rotate(calc((1 - var(--q, 1)) * -9deg))
      scale(calc(0.82 + 0.18 * var(--q, 1)));
  }
  .motion .panel > .p-h {
    transform: translateY(calc((1 - var(--in, 1)) * 60px));
  }
  .motion .panel__photo,
  .motion .person__photo,
  .motion .p-photo {
    transform: rotate(calc((1 - var(--in, 1)) * 7deg))
      scale(calc(0.9 + 0.1 * var(--in, 1)));
  }
  .motion .card,
  .motion .person,
  .motion .htile,
  .motion .hsched__list li {
    transform: translateY(
      calc((1 - var(--in, 1)) * (50px + var(--i, 0) * 26px))
    );
  }
}
@keyframes rise {
  from {
    transform: translateY(40%) scale(0.92);
  }
}
@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}
