/*!
Theme Name: cvsr
Theme URI: http://underscores.me/
Author: Leo AD
Author URI: https://theleoad.com
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: cvsr
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

cvsr is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

.home-promo-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: transparent;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 9999;
}

.home-promo-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.home-promo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 12, 12, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.home-promo-modal.is-visible .home-promo-modal__backdrop {
    opacity: 1;
}

.home-promo-modal__content {
    position: relative;
    width: min(90vw, 480px);
    background: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.9);
    opacity: 0;
}

@media (min-width: 640px) {
    .home-promo-modal__content {
        width: min(80vw, 520px);
    }
}

@media (min-width: 1024px) {
    .home-promo-modal__content {
        width: min(65vw, 600px);
    }
}

.home-promo-modal.is-visible .home-promo-modal__content {
    animation: homePromoEnter 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-promo-modal.is-closing .home-promo-modal__content {
    animation: homePromoExit 0.3s ease forwards;
}

.home-promo-modal__link {
    display: block;
}

.home-promo-modal__link img {
    display: block;
    width: 100%;
    height: auto;
}

.home-promo-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: #ffffff;
    color: #6e348b;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-promo-modal__close:hover {
    transform: scale(1.05);
}

.home-promo-modal__close:active {
    transform: scale(0.95);
}

.home-promo-modal__close-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

@keyframes homePromoEnter {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.85);
    }

    60% {
        opacity: 1;
        transform: translateY(-8px) scale(1.02);
    }

    80% {
        transform: translateY(4px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes homePromoExit {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
}
