@font-face {
  font-family: Bricolage;
  src: url("./bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --paper: #fbf4e8;
  --ink: #004d4e;
  --celeste: #5abefd;
  --coral: #d94628;
  --lime: #ddf72c;
  --portrait-radius: 37% 1.15rem 21% 1.15rem;
  --gutter: clamp(1.25rem, 5.6vw, 6.25rem);
  background: var(--paper);
  color: var(--ink);
  font-family: Bricolage, "Trebuchet MS", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { color: var(--ink); background: var(--lime); }
.poster { position: relative; isolation: isolate; overflow: clip; display: grid; min-height: 100svh; --lap: 10s; }
.poster > main, .coast { grid-area: 1 / 1; }
.motion-field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.message, .launch { position: relative; z-index: 4; }
main { width: min(100%, 106rem); margin-inline: auto; padding-inline: var(--gutter); }
.wordmark {
  grid-column: 1 / -1;
  justify-self: center;
  z-index: 4;
  width: clamp(7.5rem, 11vw, 11rem);
  height: auto;
}
.launch-figure { margin: 0; min-width: 0; }
.launch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  justify-items: center;
  text-align: center;
  color: var(--ink);
}
.detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  column-gap: .5rem;
  text-align: start;
  max-width: 100%;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  font-size: clamp(1rem, 1.45vw, 1.4rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.035em;
  transition: transform 150ms ease-out, filter 150ms ease-out;
}
.detail[hidden] { display: none; }
.detail svg { grid-column: 1; width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.detail:has(time, small) svg { grid-row: 1 / span 2; }
.detail time, .detail small { grid-column: 2; margin-top: .2rem; font-size: max(.69rem, .78em); font-weight: 640; letter-spacing: 0; }
.countdown { font-variant-numeric: tabular-nums; }
.countdown b { font-weight: inherit; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .detail:hover { transform: translateY(-4px); filter: drop-shadow(0 2px 2px rgb(0 77 78 / 20%)); }
}
@media (prefers-reduced-motion: no-preference) {
  .detail:focus-visible { transform: translateY(-4px); filter: drop-shadow(0 2px 2px rgb(0 77 78 / 20%)); }
}
main { display: grid; grid-template-columns: 1fr 1.09fr; align-items: center; align-content: center; gap: clamp(1.25rem, 2vw, 2rem) clamp(1.5rem, 3vw, 3.5rem); padding-block: clamp(3rem, 8svh, 7rem); }
h1 {
  margin: 0;
  color: var(--celeste);
  font-size: clamp(3.3rem, 6.1vw, 6.8rem);
  line-height: .95;
  font-weight: 800;
  letter-spacing: -.048em;
  -webkit-text-stroke: clamp(3px, .055em, 5px) var(--paper);
  paint-order: stroke fill;
}
h1 em { font-style: normal; color: var(--coral); }
.intro { max-width: 34ch; font-size: clamp(1.08rem, 1.45vw, 1.42rem); line-height: 1.42; font-weight: 450; margin: 1.45rem 0 0; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.portrait { position: relative; z-index: 2; isolation: isolate; aspect-ratio: 1.29; border-radius: var(--portrait-radius); }
#portrait-mask { clip-path: inset(0 round var(--portrait-radius)) fill-box; }
.photo, .route, .rays { position: absolute; width: 100%; height: 100%; inset: 0; }
.route, .rays { pointer-events: none; }
.photo, .route { border-radius: inherit; }
.photo { object-fit: cover; }
.rays { overflow: visible; fill: #d9fc34; }
.snake { fill: none; stroke: #d9fc34; stroke-width: clamp(13px, 2.35vw, 36px); stroke-linecap: round; }
.snake { opacity: 0; }
.moving .snake { opacity: 1; stroke-dasharray: 19 121; animation: recorrer var(--lap) linear infinite, tinta 30s steps(1,end) infinite; }
@keyframes recorrer { from { stroke-dashoffset: 14; } to { stroke-dashoffset: -126; } }
@keyframes tinta { 0% { stroke: #d9fc34; } 33.333% { stroke: #014243; } 66.667% { stroke: #feba19; } }
.rays path { opacity: 0; }
.moving .rays path { animation: destello var(--lap) ease-in-out infinite backwards; animation-delay: calc(var(--face-cue) + var(--step, 0s)); }
.rays path:nth-child(2) { --step: .13s; }
.rays path:nth-child(3) { --step: .26s; }
.rays path:nth-child(4) { --step: .39s; }
.rays path:nth-child(5) { --step: .52s; }
.rays path:nth-child(6) { --step: .65s; }
.rays path:nth-child(7) { --step: .78s; }
@keyframes destello {
  0%, 100% { opacity: 0; fill: #d9fc34; }
  3.5% { opacity: 1; fill: #d9fc34; }
  9% { opacity: 1; fill: #5abefd; }
  14% { opacity: 1; fill: #fd7bbe; }
  19% { opacity: 0; fill: #fd7bbe; }
}
.coast {
  position: relative;
  align-self: end;
  height: clamp(13rem, 35svh, 27rem);
  max-height: 37.5vw;
  overflow: hidden;
  background: url("./avenida-peru-poster-desktop.webp") center / 100% auto no-repeat;
}
.coast video {
  display: block;
  width: 100%;
  position: absolute;
  top: 50%;
  height: auto;
  transform: translateY(-50%);
}
.coast::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--paper), rgb(251 244 232 / 96%) 16%, rgb(251 244 232 / 74%) 38%, rgb(251 244 232 / 28%) 62%, transparent 84%);
}
@media (min-width: 761px) and (max-height: 800px) {
  .portrait { max-height: 59svh; width: 100%; }
}
@media (max-width: 760px) {
  :root { --portrait-radius: 26% 1rem 18% 1rem; }
  .coast { height: clamp(11rem, 27svh, 18rem); max-height: 62.5vw; background-image: url("./avenida-peru-poster-mobile.webp"); }
  main { grid-template-columns: 1fr; gap: 1.7rem; padding-block: clamp(3rem, 8svh, 5.5rem) clamp(7rem, 16svh, 12rem); }
  .wordmark { width: 7rem; }
  .launch-figure { padding-top: clamp(1.7rem, 5vw, 3rem); }
  h1 { font-size: clamp(3.25rem, 10.5vw, 5rem); }
  .intro { max-width: 38ch; margin: 1.05rem 0 0; }
  .portrait { aspect-ratio: 1.72; }
  .launch { margin-inline: calc(-.65 * var(--gutter)); }
  .detail { font-size: clamp(.76rem, 3vw, 1rem); }
  .detail svg { width: 1.25rem; height: 1.25rem; }
}
@media (max-width: 480px) {
  .launch { grid-template-columns: 1.12fr .88fr 1fr 1fr; }
  .detail { column-gap: .2rem; }
  .detail svg { width: 1rem; height: 1rem; }
}
@media (max-width: 370px) {
  .detail { font-size: .71rem; }
}
