/* The home page, and the shared look of the frogs and invite pages. */
@font-face {
  font-family: Kalam;
  src: url(fonts/kalam-bold.ttf) format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Kalam;
  src: url(fonts/kalam-regular.ttf) format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url(fonts/fraunces.ttf) format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url(fonts/fraunces-italic.ttf) format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url(fonts/figtree.ttf) format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --paper: #f7f6ef;
  --card: #fbfbf6;
  --ink: #233029;
  --muted: #5a675e;
  --line: #d6dccd;
  --accent: #3b7553;
  --accent-deep: #2c5c40;
  --accent-soft: #dfeadb;
  --display: Fraunces, Georgia, serif;
  --hand: Kalam, cursive;
  --space-2: 8px;
  --space-3: 12px;
  --round: 999px;
  --radius: 18px;
  /* a soft hand-drawn wave, used between sections instead of a straight rule */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'%3E%3Cpath d='M0 7 C 15 1, 25 1, 40 7 S 65 13, 80 7 S 105 1, 120 7' fill='none' stroke='%23b9c6b3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  font-family: Figtree, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--accent-soft);
}
a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
a:hover {
  color: var(--accent);
}
button {
  font: inherit;
}
a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.wrap {
  width: min(980px, calc(100% - 80px));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 15px;
  padding: 12px 20px;
  background: var(--card);
  border-radius: var(--round);
  z-index: 10;
}
.skip-link:focus {
  top: 15px;
}

/* a wavy line across the top of a section */
.waved {
  background-image: var(--wave);
  background-repeat: repeat-x;
  background-position: top center;
  background-size: 120px 14px;
}

/* ---- header ---- */

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 650;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -0.6px;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark svg {
  width: 30px;
  height: 30px;
  fill: var(--accent-soft);
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  font-size: 14px;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--round);
}
.site-header nav a {
  padding: 7px 14px;
  text-decoration: none;
  border-radius: var(--round);
}
.site-header nav a:hover {
  color: var(--ink);
  background: var(--accent-soft);
}
.site-header nav a[aria-current="page"] {
  color: #fff;
  background: var(--accent);
}

/* ---- hero: words on the left, the frog on its lily pad on the right ---- */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  column-gap: 48px;
  align-items: center;
  padding: 40px 0 84px;
}
.hero > :not(.hero-frog) {
  grid-column: 1;
}
.hero-frog {
  grid-column: 2;
  grid-row: 1 / span 4;
  justify-self: center;
  position: relative;
  width: 280px;
  aspect-ratio: 1;
}
/* the lily pad the frog stands on */
.hero-frog::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -2%;
  height: 26%;
  background: var(--accent-soft);
  border-radius: 50%;
  clip-path: polygon(0 0, 46% 0, 50% 50%, 54% 0, 100% 0, 100% 100%, 0 100%);
}
.frog-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

/* the frog that follows you down the page, peeking up from the bottom corners */
.companion {
  --w: 160px;
  --peek: 38%;
  --edge: 24px;
  --x: calc(100vw - var(--w) - 24px);
  --y: 120%;
  --flip: 1;
  --tilt: -6deg;
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 5;
  width: var(--w);
  aspect-ratio: 1;
  pointer-events: none;
  transform: translate(var(--x), var(--y));
  transition: transform 0.7s steps(7);
}
.companion-hop {
  width: 100%;
  height: 100%;
}
.companion .frog-art {
  transform: rotate(var(--tilt)) scaleX(var(--flip));
  transition: transform 0.35s steps(3);
}
.companion-hop.hop {
  animation: hop 0.42s steps(3);
}
.footer-frog-spot {
  width: 110px;
  aspect-ratio: 1;
  margin-top: -120px;
  visibility: hidden;
}
.footer-frog-spot.here {
  visibility: visible;
}
@keyframes hop {
  50% {
    transform: translateY(-22px);
  }
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 560;
  font-variation-settings: "SOFT" 100, "WONK" 0;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(46px, 5.4vw, 74px);
  letter-spacing: -1.8px;
  line-height: 1.02;
}
.hero-lead {
  font-family: var(--display);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  margin: 0 0 16px;
  color: var(--accent-deep);
}
.hero-description {
  max-width: 500px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 28px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.land-link {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--accent);
  border-radius: var(--round);
  box-shadow: 0 2px 0 var(--accent-deep);
  transition: transform 0.15s, box-shadow 0.15s;
}
.land-link:hover {
  color: #fff;
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #1f4430;
}
.inline-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

h2 {
  font-size: 38px;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 0 0 22px;
}
p {
  line-height: 1.8;
}

/* ---- the live glimpse of the pond ---- */

.glimpse {
  margin-block: 0;
  padding-bottom: 64px;
  text-align: center;
}
.glimpse-view {
  position: relative;
  aspect-ratio: 16 / 9;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}
.glimpse #land {
  display: block;
  width: 100%;
  height: 100%;
}
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.frog-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
  line-height: 1.1;
  text-shadow:
    0 0 3px var(--paper),
    0 0 3px var(--paper);
}
.frog-name {
  font-family: var(--hand);
  font-size: 14px;
  font-weight: 700;
}
.frog-model {
  font-size: 11px;
  color: var(--muted);
}
.bubble {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 220px;
  width: max-content;
  padding: var(--space-2) var(--space-3);
  font-family: var(--hand);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  background: #fbfaf6;
  border: 2px solid #161616;
  border-radius: 18px 14px 16px 12px / 14px 18px 12px 16px;
  overflow-wrap: anywhere;
}
/* the caption is a little chip with a live dot */
.glimpse figcaption {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  max-width: 100%;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.glimpse figcaption::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: live 1.8s ease-in-out infinite;
}
@keyframes live {
  50% {
    opacity: 0.25;
  }
}
.glimpse figcaption a {
  font-weight: 600;
  color: var(--accent);
}

/* ---- sections ---- */

.story-section {
  max-width: 660px;
  padding-block: 32px 80px;
  text-align: center;
}
.story-copy h2 {
  font-size: 40px;
  margin-bottom: 22px;
}
.story-copy p {
  font-size: 16px;
}
.story-copy .source-note {
  margin-top: 26px;
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  text-align: left;
}
.prose p {
  font-size: 16px;
  line-height: 1.85;
  margin: 0 0 18px;
}
.prose p:last-child {
  margin-bottom: 0;
}
.essay {
  max-width: 660px;
  padding-block: 64px 72px;
  text-align: center;
  background-image: var(--wave);
  background-repeat: repeat-x;
  background-size: 120px 14px;
}

.possibilities-section {
  max-width: 760px;
  padding-block: 40px 70px;
}
.section-heading {
  text-align: center;
  margin-bottom: 28px;
}
.section-heading h2 {
  margin-bottom: 10px;
}
.section-heading p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}
/* pill-shaped tabs */
.activities {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--round);
}
.activity {
  padding: 9px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--round);
  cursor: pointer;
}
.activity:hover {
  color: var(--ink);
  background: var(--accent-soft);
}
.activity.active {
  color: #fff;
  background: var(--accent);
}
.activity-preview {
  max-width: 600px;
  margin: 24px auto 0;
  padding: 28px 32px;
  min-height: 190px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.activity-preview h3 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.activity-preview p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}

/* questions as cards that open */
.questions-section {
  max-width: 680px;
  padding-block: 40px 64px;
}
.questions-section h2 {
  margin-bottom: 26px;
  text-align: center;
}
details {
  margin-bottom: 12px;
  padding: 0 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
details[open] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  transition: transform 0.2s;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 20px;
}

.project-note {
  max-width: 680px;
  padding: 56px 0 150px;
  text-align: center;
  background-image: var(--wave);
  background-repeat: repeat-x;
  background-size: 120px 14px;
}
.project-note p {
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  line-height: 1.5;
  margin: 0;
  color: var(--accent-deep);
}

/* ---- footer: a soft green band ---- */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-block: 30px 34px;
  text-align: center;
  background: var(--accent-soft);
  border-radius: 28px;
}
.site-footer .wordmark {
  font-size: 24px;
}
.site-footer .wordmark svg {
  width: 24px;
  height: 24px;
  fill: var(--card);
}
.site-footer p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.site-footer > a:last-child {
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .wrap {
    width: calc(100% - 48px);
  }
  /* stacked: the frog first, then the words, all centred */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 0 64px;
  }
  .hero-frog {
    width: 220px;
    margin-bottom: 22px;
  }
  .hero-description {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 580px) {
  .companion {
    --w: 92px;
    --peek: 56%;
    --edge: -30px;
  }
  .glimpse {
    padding-bottom: 44px;
  }
  .glimpse-view {
    aspect-ratio: 1;
  }
  html {
    scroll-padding-top: 25px;
  }
  .wrap {
    width: calc(100% - 36px);
  }
  .site-header {
    height: auto;
    min-height: 104px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding-top: 16px;
  }
  .wordmark {
    font-size: 28px;
  }
  .site-header nav {
    font-size: 13px;
  }
  .site-header nav a {
    padding: 6px 11px;
  }
  .hero-frog {
    width: 190px;
  }
  h1 {
    font-size: clamp(40px, 11vw, 54px);
    letter-spacing: -1.2px;
  }
  .hero-lead {
    font-size: 21px;
  }
  .hero-description {
    font-size: 15px;
  }
  .wide-only {
    display: none;
  }
  h2,
  .story-copy h2 {
    font-size: 31px;
  }
  .activities {
    width: 100%;
    justify-content: space-between;
  }
  .activity {
    padding: 8px 12px;
    font-size: 14px;
  }
  .activity-preview {
    padding: 22px 20px;
    min-height: 230px;
  }
  .project-note p {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .companion-hop.hop,
  .glimpse figcaption::before {
    animation: none;
  }
  .companion,
  .companion .frog-art {
    transition: none;
  }
}

/* the pond, as a still picture (the live view is on the pond page) */
.glimpse-view.still {
  display: block;
}
.glimpse-view.still img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
