.program-main {
  max-width: 1536px;
  margin: auto;
  padding: 50px 45px 45px;
}
.programs-opening {
  padding: 0 40px;
}
.programs-opening h1 {
  font-size: clamp(40px, 4.3vw, 62px);
  color: var(--forest);
  margin-top: 18px;
}

/* Tree: positions in % of the 1536 × 1024 drawing */
.program-garden {
  container-type: inline-size;
  margin: 35px -10px 0;
}
.garden-canvas {
  position: relative;
  aspect-ratio: 3 / 2;
  isolation: isolate;
}
.garden-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.garden-route {
  fill: none;
  stroke: var(--white);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 0.001 0.013;
  opacity: 0.7;
  transition:
    opacity 0.25s,
    stroke 0.25s;
  filter: drop-shadow(0 1px 0 color-mix(in srgb, var(--ink) 25%, transparent));
}
.program-leaf {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  z-index: 2;
  outline: none;
  --leaf-light: var(--forest-light);
  --leaf-dark: var(--forest);
  --leaf-fold: var(--forest-dark);
  --leaf-vein: var(--sage);
  --hinge: 51.47% 93.88%;
  --turn: -4deg;
}
.leaf-turn {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: var(--hinge);
  transition:
    transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.4s;
  filter: drop-shadow(
    0 4px 2px color-mix(in srgb, var(--ink) 13%, transparent)
  );
}
.leaf-art {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}
.leaf-tone-light {
  stop-color: var(--leaf-light);
}
.leaf-tone-dark {
  stop-color: var(--leaf-dark);
}
.leaf-paper {
  stroke: var(--white);
  stroke-width: 1;
}
.leaf-fold {
  fill: var(--leaf-fold);
  opacity: 0.22;
}
.leaf-veins {
  fill: none;
  stroke: var(--leaf-vein);
  stroke-width: 1.25;
  opacity: 0.28;
}
.leaf-bud {
  fill: color-mix(in srgb, var(--peach), var(--clay-soft) 35%);
  stroke: color-mix(in srgb, var(--sand), var(--white) 40%);
  stroke-width: 1;
}
.leaf-copy {
  position: absolute;
  top: 28%;
  left: 12%;
  right: 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--ink);
}
.leaf-copy strong {
  font-size: max(23px, 2.45cqw);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.055em;
}
.leaf-copy small {
  font-size: max(13px, 1cqw);
  margin-top: 13px;
  font-weight: 800;
}
.leaf-subtitle {
  font-size: max(14px, 1.08cqw);
  margin-top: 2px;
  font-weight: 800;
}
.program-leaf:hover .leaf-turn,
.program-leaf:focus-visible .leaf-turn {
  transform: rotate(var(--turn));
  filter: drop-shadow(
    0 9px 5px color-mix(in srgb, var(--ink) 17%, transparent)
  );
}
.program-leaf:focus-visible .leaf-paper {
  stroke: var(--clay);
  stroke-width: 3.5;
}
.leaf-gentech .leaf-copy {
  color: var(--white);
  top: 46%;
}
.leaf-crealab {
  --leaf-dark: var(--sand);
  --hinge: 79.14% 93.88%;
  --turn: -5deg;
}
.leaf-crealab,
.leaf-etinclic,
.leaf-passerelles,
.leaf-fabrique {
  --leaf-light: var(--leaf-dark);
  --leaf-fold: var(--leaf-dark);
  --leaf-vein: var(--ink);
}
/* An unsupported color-mix in a variable would turn black */
@supports (color: color-mix(in srgb, red, red)) {
  .leaf-crealab,
  .leaf-etinclic,
  .leaf-passerelles,
  .leaf-fabrique {
    --leaf-light: color-mix(in srgb, var(--leaf-dark), var(--white) 45%);
    --leaf-fold: color-mix(in srgb, var(--leaf-dark), black 15%);
    --leaf-vein: color-mix(in srgb, var(--leaf-dark), black 45%);
  }
}
.leaf-crealab .leaf-copy {
  top: 27%;
  left: 8%;
  right: 15%;
}
.leaf-etinclic {
  --leaf-dark: var(--peach);
  --hinge: 80.3% 84.08%;
  --turn: 5deg;
}
.leaf-etinclic .leaf-copy {
  top: 42%;
  left: 23%;
  right: 8%;
}
.leaf-etinclic .leaf-copy small {
  margin-top: 7px;
}
.leaf-passerelles {
  --leaf-dark: var(--lilac);
  --hinge: 44.44% 96%;
  --turn: 4deg;
}
.leaf-passerelles .leaf-copy {
  top: 29%;
  left: 9%;
  right: 17%;
}
.leaf-passerelles .leaf-copy strong {
  font-size: 2.25cqw;
}
.leaf-fabrique {
  --leaf-dark: var(--sage);
  --hinge: 37.14% 90.74%;
  --turn: -4deg;
}
.leaf-fabrique .leaf-copy {
  top: 32%;
  left: 13%;
  right: 8%;
}
.leaf-fabrique .leaf-copy strong {
  font-size: 2.15cqw;
}
.leaf-fabrique .leaf-copy small {
  margin-top: 10px;
}
.program-garden[data-active='gentech'] .route-gentech,
.program-garden[data-active='crealab'] .route-crealab,
.program-garden[data-active='etinclic'] .route-etinclic,
.program-garden[data-active='passerelles'] .route-passerelles,
.program-garden[data-active='fabrique'] .route-fabrique {
  opacity: 1;
  stroke: var(--clay);
  animation: follow-branch 4s linear infinite;
}
@keyframes follow-branch {
  to {
    stroke-dashoffset: -0.112;
  }
}
.garden-caption {
  text-align: center;
  font-size: 30px;
  margin: 34px 0 42px;
  color: var(--forest);
}
.motion-off .program-leaf:hover .leaf-turn,
.motion-off .program-leaf:focus-visible .leaf-turn {
  transform: none;
}
.is-ready:not(.motion-off) .branch-reveal {
  animation: branch-unfold 1.45s cubic-bezier(0.2, 0.6, 0.25, 1) backwards;
}
.is-ready:not(.motion-off) .branch-foliage {
  animation: foliage-unfold 0.75s 1.15s cubic-bezier(0.18, 0.7, 0.25, 1)
    backwards;
}
.is-ready:not(.motion-off) .program-leaf .leaf-turn {
  animation: leaf-arrive 0.65s 1.35s cubic-bezier(0.18, 0.7, 0.25, 1) backwards;
}
@keyframes branch-unfold {
  from {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  to {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
  }
}
@keyframes foliage-unfold {
  from {
    opacity: 0;
    transform: scale(0.55) rotate(-7deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
@keyframes leaf-arrive {
  from {
    transform: rotate(-8deg) scale(0.86);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* Descriptions, linked from the tree */
.program-description {
  max-width: 1160px;
  margin: 0 auto;
  padding: 80px 0 90px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.program-description:focus {
  outline: none;
}
.program-description:focus-visible .detail-top h2 {
  text-decoration: underline 2px var(--clay);
  text-underline-offset: 8px;
}
.program-description.leaf-gentech {
  --leaf-light: var(--forest);
  --leaf-fold: var(--forest-dark);
  --leaf-vein: var(--sage);
}
.detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 60px;
  align-items: center;
}
.detail-top h2 {
  font-size: clamp(42px, 5vw, 68px);
  margin: 20px 0 25px;
  color: var(--forest);
}
.detail-intro {
  max-width: 700px;
  font-size: 23px;
  font-weight: 600;
  color: var(--body);
  line-height: 1.65;
}
.detail-mark {
  width: 100%;
  height: auto;
}
.detail-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 75px;
  margin: 60px 0 0;
}
.detail-story h3 {
  font-size: 38px;
  margin: 16px 0 24px;
}
.detail-story > p:not(.eyebrow) {
  color: var(--body);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
}
.detail-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-steps li {
  display: flex;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding: 25px 0;
}
.detail-steps li > span {
  color: var(--clay);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
}
.detail-steps h3 {
  font-size: 28px;
}
.detail-steps p {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--body);
  margin-top: 11px;
}

@media (max-width: 1100px) {
  .program-main {
    padding: 40px 22px;
  }
  .programs-opening {
    padding: 0 18px;
  }
  .programs-opening h1 {
    font-size: 46px;
  }
  .garden-caption {
    font-size: 27px;
  }
  .detail-body {
    gap: 45px;
  }
}
@media (max-width: 900px) {
  .program-garden {
    margin: 18px 0 0;
  }
  .garden-canvas {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 0;
  }
  .garden-art {
    position: relative;
    grid-column: 1/-1;
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .garden-paths {
    display: none;
  }
  .program-leaf {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 340 / 250;
  }
  .leaf-copy strong {
    font-size: 28px;
  }
  .leaf-copy small {
    font-size: 14px;
  }
  .leaf-subtitle {
    font-size: 15px;
  }
  .leaf-passerelles .leaf-copy strong,
  .leaf-fabrique .leaf-copy strong {
    font-size: 26px;
  }
  .leaf-fabrique {
    grid-column: 1/-1;
    width: 50%;
    justify-self: center;
  }
  .garden-caption {
    margin-top: 34px;
  }
  .program-description {
    padding: 65px 18px 70px;
  }
  .detail-top {
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 25px;
  }
}
@media (max-width: 800px) {
  .detail-body {
    grid-template-columns: 1fr;
    gap: 35px;
  }
}
@media (max-width: 540px) {
  .program-main {
    padding: 33px 18px 35px;
  }
  .programs-opening {
    padding: 0 5px;
  }
  .programs-opening h1 {
    font-size: 43px;
  }
  .garden-canvas {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .garden-art {
    margin-bottom: 15px;
  }
  .program-leaf {
    width: 94%;
    max-width: 350px;
    justify-self: start;
    margin-top: -8px;
  }
  .program-leaf:nth-of-type(even) {
    justify-self: end;
  }
  .leaf-passerelles .leaf-copy strong,
  .leaf-fabrique .leaf-copy strong {
    font-size: 29px;
  }
  .leaf-fabrique {
    grid-column: auto;
    width: 94%;
  }
  .leaf-copy {
    top: 28%;
  }
  .garden-caption {
    font-size: 27px;
    margin: 30px 0 32px;
  }
  .program-description {
    padding: 50px 5px 55px;
  }
  .detail-top {
    display: block;
    position: relative;
  }
  .detail-top h2 {
    font-size: 40px;
    margin: 17px 0 21px;
  }
  .detail-top .eyebrow {
    min-height: 64px;
    padding-right: 85px;
    display: flex;
    align-items: center;
  }
  .detail-intro {
    font-size: 20px;
  }
  .detail-mark {
    position: absolute;
    top: 0;
    right: 0;
    width: 75px;
  }
  .detail-body {
    margin: 40px 0 0;
    gap: 28px;
  }
  .detail-story h3 {
    font-size: 34px;
  }
  .detail-steps li {
    gap: 19px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .program-leaf:hover .leaf-turn,
  .program-leaf:focus-visible .leaf-turn {
    transform: none;
  }
}
