/* Clickable towel on the hero photo (desktop). Position and size are set by promo.js */
.towel-hotspot { display: none; position: absolute; z-index: 2; border: 0; padding: 0; background: transparent; border-radius: 40% / 50%; cursor: pointer; }
.towel-hotspot:hover,
.towel-hotspot:focus-visible { box-shadow: 0 0 40px 8px rgba(255, 224, 150, .55); outline: 0; }

.towel-hint {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    translate: -50% 0;
    white-space: nowrap;
    padding: .4rem .9rem;
    border-radius: 50rem;
    background: #fff;
    color: var(--color-navy);
    font-size: .8rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    animation: towel-bounce 1.6s ease-in-out infinite;
}

.towel-chip {
    display: inline-flex;
    gap: .5rem;
    margin-top: 1.25rem;
    padding: .55rem 1.1rem;
    border: 1px dashed #b9dc8f;
    border-radius: 50rem;
    background: transparent;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}

@media (min-width: 992px) {
    .towel-hotspot { display: block; }

    /* let clicks pass through the text container to the photo */
    .hero .container { pointer-events: none; }
    .hero-content { pointer-events: auto; }
}

/* Unrolling towel */
.towel-modal .modal-dialog { max-width: 360px; margin-left: auto; margin-right: auto; padding: 0 .5rem; }
.towel-modal .modal-content { background: transparent; border: 0; }
.towel-close { position: absolute; top: -2.25rem; right: .5rem; }

.towel-stage { --towel-height: 440px; position: relative; height: calc(var(--towel-height) + 40px); }

.towel-sheet {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: var(--towel-height);
    margin: 22px 14px 0;
    padding: 1.5rem;
    text-align: center;
    color: var(--color-navy);
    /* terry cloth texture and two woven stripes near the bottom */
    background:
        linear-gradient(transparent 90%, var(--color-green) 90% 91.5%, transparent 91.5% 93.5%, var(--color-brand) 93.5% 95%, transparent 95%),
        radial-gradient(rgba(120, 100, 70, .13) 1px, transparent 1.5px) 0 0 / 6px 6px,
        radial-gradient(#fff 1px, transparent 1.5px) 3px 3px / 6px 6px,
        #f1e9dc;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    clip-path: inset(0 -60px 100% -60px);
}
.towel-sheet h2 { margin: .75rem 0 .5rem; }
.towel-sheet p { margin: 0 0 .5rem; font-size: .95rem; }
.towel-sheet .btn { margin-top: .75rem; }
.towel-discount { font-size: 4rem; line-height: 1.1; color: #4d8a3a; }

.towel-roll {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    border-radius: 22px;
    background:
        radial-gradient(rgba(120, 100, 70, .18) 1px, transparent 1.5px) 0 0 / 6px 6px,
        linear-gradient(#fbf7f0, #e7dccb 60%, #c7b8a0);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
}

.towel-modal.is-unrolled .towel-sheet { animation: towel-reveal 1.4s cubic-bezier(.45, .05, .3, 1) .25s forwards; }
.towel-modal.is-unrolled .towel-roll { animation: towel-unroll 1.4s cubic-bezier(.45, .05, .3, 1) .25s forwards; }
.towel-modal.is-unrolled .towel-discount { animation: towel-pop .6s cubic-bezier(.2, 1.8, .4, 1) 1.5s backwards; }

.towel-confetti { position: absolute; top: 45%; left: 50%; pointer-events: none; }
.towel-confetti i {
    position: absolute;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    animation: towel-burst 1.3s cubic-bezier(.15, .7, .4, 1) forwards;
}

@keyframes towel-bounce { 50% { transform: translateY(-6px); } }
@keyframes towel-reveal { to { clip-path: inset(0 -60px -60px -60px); } }
@keyframes towel-unroll { to { top: var(--towel-height); height: 22px; } }
@keyframes towel-pop { from { transform: scale(0); } }
@keyframes towel-burst {
    from { transform: translate(0, 0) rotate(0); opacity: 1; }
    to { transform: translate(var(--x), var(--y)) rotate(var(--turn)); opacity: 0; }
}

@media (max-height: 600px) {
    .towel-stage { --towel-height: 380px; }
    .towel-discount { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .towel-hint { animation: none; }
    .towel-modal.is-unrolled .towel-sheet,
    .towel-modal.is-unrolled .towel-roll { animation-duration: .01s; animation-delay: 0s; }
    .towel-modal.is-unrolled .towel-discount { animation: none; }
    .towel-confetti { display: none; }
}

.towel-code {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: .25rem 0;
    padding: .35rem 1rem;
    border: 2px dashed var(--color-green);
    border-radius: 10px;
    background: #fff;
    color: var(--color-navy);
    font-weight: 700;
    letter-spacing: .12em;
}
.towel-stage { --towel-height: 480px; }
@media (max-height: 640px) {
    .towel-stage { --towel-height: 430px; }
    .towel-discount { font-size: 2.75rem; }
    .towel-sheet img { display: none; }
}
