.dvij-logo {
    position: relative;
    aspect-ratio: 1676 / 578;
    --dvij-logo-image: url("../img/vanila-logo.webp?v=001");
}

.dvij-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.dvij-logo::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    mask: var(--dvij-logo-image) center / 100% 100% no-repeat;
    background: linear-gradient(108deg, transparent 42%, #fdfded 50%, transparent 58%) 125% 0 / 250% 100%;
    opacity: 0;
}

.vanila .dvij-logo {
    animation: dvij-logo-arrive 1.3s var(--dvij-hero-delay, 0s) ease-out both;
}

.vanila .dvij-logo::after {
    animation: dvij-logo-sweep 12s calc(var(--dvij-hero-delay, 0s) + 1.5s) ease-in-out infinite;
}

@media (min-width: 992px) and (max-height: 1000px) {
    .vanila .dvij-logo {
        width: min(100%, 580px);
    }
}

.dvij-intro {
    display: none;
}

[data-dvij-intro] {
    --dvij-intro-hold: 2.14s;
    --dvij-hero-delay: var(--dvij-intro-hold);
}

[data-dvij-intro] .dvij-intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    pointer-events: none;
    color: #fdfded;
    background: radial-gradient(ellipse at center, rgba(211, 5, 29, .2), transparent 52%), #080303;
    animation: dvij-intro-exit .36s var(--dvij-intro-hold) ease-in forwards;
}

.dvij-intro:has(~ :focus-within) {
    visibility: hidden;
}

.dvij-intro__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 480px);
    text-align: center;
}

.dvij-intro__content .dvij-logo {
    width: 100%;
    animation: dvij-logo-arrive .68s ease-out both;
}

.dvij-intro__content .dvij-logo::after {
    animation: dvij-intro-sweep 1.1s .22s ease-in-out both;
}

.dvij-intro__line {
    width: min(68%, 230px);
    height: 1px;
    margin: 10px 0 16px;
    transform-origin: center;
    background: linear-gradient(90deg, transparent, #d3051d 32%, #fdfded 50%, #d3051d 68%, transparent);
    animation: dvij-intro-line .72s .16s ease-out both;
}

.dvij-intro__text {
    margin: 0;
    font: 500 clamp(14px, 3.6vw, 20px)/1.25 "Druk Cyr", sans-serif;
    letter-spacing: .075em;
    text-transform: uppercase;
    animation: dvij-logo-arrive .4s .45s ease-out both;
}

@keyframes dvij-logo-arrive {
    from { opacity: 0; transform: translateY(8px) scale(.975); }
    to { opacity: 1; transform: none; }
}

@keyframes dvij-logo-sweep {
    0% { opacity: 0; background-position: 125% 0; }
    8%, 15% { opacity: .5; }
    25%, 100% { opacity: 0; background-position: -25% 0; }
}

@keyframes dvij-intro-sweep {
    0% { opacity: 0; background-position: 125% 0; }
    30% { opacity: .65; }
    100% { opacity: 0; background-position: -25% 0; }
}

@keyframes dvij-intro-line {
    from { opacity: 0; transform: scaleX(.08); }
    to { opacity: 1; transform: scaleX(1); }
}

@keyframes dvij-intro-exit {
    to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    [data-dvij-intro] .dvij-intro,
    .dvij-logo::after {
        display: none;
    }

    .vanila .dvij-logo {
        animation: none;
    }
}
