/* Match the floor at the end of the page when the browser extends the canvas. */
html,
body.reference-home {
  background-color: #564f74;
}

.reference-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #49255d;
  color: #ffe1cc;
}

.reference-footer-stage {
  position: relative;
  display: grid;
  isolation: isolate;
  container-type: inline-size;
  max-width: 2700px;
  margin: auto;
  aspect-ratio: 2 / 1;
  overflow: hidden;
}

.reference-footer-wall,
.footer-projections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.reference-footer-wall { z-index: -1; object-fit: fill; }

.footer-projections {
  z-index: 3;
  pointer-events: none;
  background: url('assets/cartoon/footer-shadows-women.webp') center / 100% 100% no-repeat;
  opacity: .46;
}

.reference-footer-diego {
  position: absolute;
  z-index: 1;
  top: 34.5%;
  left: 50%;
  width: 43%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 .65cqw .18cqw #2c194d65);
}

.reference-footer-diego-poster {
  display: block;
  width: 100%;
  height: auto;
}

.reference-footer-diego-motion {
  position: absolute;
  top: 1.2%;
  left: 50%;
  width: 98.7%;
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

[data-footer-animation] .reference-footer-diego-poster { opacity: 0; }
[data-footer-animation="video"] video.reference-footer-diego-motion,
[data-footer-animation="image"] img.reference-footer-diego-motion { opacity: 1; }

.reference-footer-sign {
  position: absolute;
  z-index: 2;
  top: 12.6%;
  left: 50%;
  width: 48%;
  display: grid;
  justify-items: center;
  gap: clamp(3px, .36cqw, 10px);
  text-align: center;
  color: #a73820;
  transform: translate(-50%, -50%) rotate(-5.5deg);
}

.reference-footer-sign h2 {
  display: inline-flex;
  align-items: flex-start;
  color: #d24f29;
  font: 400 clamp(43px, 6.35cqw, 172px)/.86 Luckiest, var(--display);
  letter-spacing: .01em;
  margin: 0;
}

.reference-footer-registration {
  margin: .04em 0 0 .14em;
  font: 800 .31em/1 Arial, sans-serif;
  letter-spacing: 0;
}

.reference-footer-sign p {
  margin: 0;
  font: 400 clamp(14px, 2.05cqw, 55px)/1.08 Anton, var(--display);
  letter-spacing: .045em;
  text-transform: uppercase;
}

.reference-footer-boards { display: contents; }

.reference-footer-board {
  position: absolute;
  z-index: 2;
  left: var(--poster-center);
  top: 35.7%;
  width: 15.5%;
  height: 37.7%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, .98cqw, 26px);
  padding: 1.1cqw .72cqw;
  text-align: center;
}

.reference-footer-board--social { --poster-center: 15.55%; }
.reference-footer-board--explore { --poster-center: 34.32%; }
.reference-footer-board--legal { --poster-center: 65%; }
.reference-footer-board--contact { --poster-center: 83.73%; }

.reference-footer-board h3 {
  margin: 0 0 .21em;
  color: #521e18;
  font: 400 clamp(18px, 2.14cqw, 58px)/1 Anton, var(--display);
  text-transform: uppercase;
}

.reference-footer-board p,
.reference-footer-board a,
.reference-footer-board > button {
  border: 0;
  background: transparent;
  color: inherit;
  font: 400 clamp(11px, 1.51cqw, 41px)/1.12 'Archivo Black', var(--body);
  text-decoration: none;
  text-transform: uppercase;
}

.reference-footer-board :is(a, button):hover { color: #fff5df; text-decoration: underline; }

.reference-footer-board small {
  display: block;
  font: 400 clamp(9px, 1.04cqw, 26px)/1.2 'Archivo Black', var(--body);
  color: #ffe1cc;
  text-transform: uppercase;
}

.reference-footer-socials {
  display: grid;
  width: min(88%, 11cqw);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(4px, .85cqw, 20px);
  margin: 0 auto;
}

.reference-footer-socials :is(a, button) {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.footer-social-icon {
  display: block;
  width: 70%;
  height: 70%;
  fill: currentColor;
}

.reference-footer-socials span.footer-social-icon {
  background: currentColor;
  mask: var(--social-icon) center / contain no-repeat;
}

.footer-social-icon--x { --social-icon: url('assets/cartoon/xtwitterlogo_r.svg'); }
.footer-social-icon--instagram { --social-icon: url('assets/cartoon/iglogo_r.svg'); }
.footer-social-icon--telegram { --social-icon: url('assets/cartoon/telegramlogo_r.svg'); }

.reference-footer-board .reference-footer-email {
  display: grid;
  justify-items: center;
  gap: clamp(7px, .9cqw, 24px);
  max-width: 100%;
  font-size: clamp(9px, 1.06cqw, 28px);
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  text-transform: none;
}

.reference-footer-email svg {
  display: block;
  width: clamp(28px, 4.1cqw, 111px);
  height: auto;
  fill: none;
  stroke: currentColor;
}

.motion-off .footer-projections { display: none; }

@media (prefers-reduced-motion: reduce) {
  .footer-projections { display: none; }
}

@media (max-width: 760px) {
  .reference-footer-stage {
    aspect-ratio: 434 / 944;
    background: #564f74 url('assets/cartoon/footer-mobile-wall.png') center / 100% 100% no-repeat;
  }

  .reference-footer-wall { display: none; }

  .footer-projections { background-size: auto 84%; background-position: center bottom; opacity: .39; }

  .reference-footer-diego {
    top: auto;
    bottom: 7%;
    width: 94%;
    filter: drop-shadow(0 1.2cqw .8cqw #2c194d6b);
  }

  .reference-footer-sign {
    top: 11.05%;
    width: 82%;
  }

  .reference-footer-sign h2 { font-size: clamp(28px, 10.9cqw, 83px); }
  .reference-footer-sign p { font-size: clamp(10px, 3.9cqw, 29px); }

  .reference-footer-board {
    top: var(--portrait-board-top);
    width: 29%;
    height: 16.5%;
    padding: 1.3cqw .9cqw;
    gap: 2.2cqw;
  }

  .reference-footer-board--social { --poster-center: 20.1%; --portrait-board-top: 23.4%; }
  .reference-footer-board--legal { --poster-center: 80.35%; --portrait-board-top: 23.4%; }
  .reference-footer-board--explore { --poster-center: 20.1%; --portrait-board-top: 45.6%; }
  .reference-footer-board--contact { --poster-center: 80.35%; --portrait-board-top: 45.6%; }

  .reference-footer-board h3 { font-size: clamp(15px, 4.65cqw, 35px); }
  .reference-footer-board :is(a, p) { font-size: clamp(10px, 3.2cqw, 22px); }
  .reference-footer-board small { font-size: clamp(8px, 2.13cqw, 16px); }
  .reference-footer-socials { width: min(96%, 24cqw); }
  .reference-footer-board .reference-footer-email {
    font-size: clamp(8px, 2.2cqw, 16px);
    gap: 1.5cqw;
  }
  .reference-footer-email svg { width: clamp(23px, 8cqw, 54px); }
}
