/* Petrushka – logo */

.wordmark {
    font-size: clamp(28px,3vw,44px);
    font-weight: 900;
    letter-spacing: -2px;
    text-decoration: none;
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    max-height: 56px;
    width: auto;
    max-width: 210px;
}

@media(max-width:650px) {
    .wordmark {
        font-size: 32px;
    }
}

@media(max-width:650px) {
    .custom-logo {
        max-height: 40px;
    }
}

.logo-card {
    display: block;
    width: 230px;
    height: 56px;
    max-width: 70vw;
    perspective: 900px;
    color: var(--paper);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-card-inner {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: petrushka-logo-flip 9s ease-in-out infinite;
}

.logo-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.logo-face-cyrillic {
    transform: rotateY(0deg);
}

.logo-face-cyrillic svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.logo-face-latin {
    transform: rotateY(180deg);
    font-family: Arial,Helvetica,sans-serif;
    font-size: 44px;
    font-weight: 900;
    letter-spacing: -2.5px;
    line-height: 1;
    white-space: nowrap;
}

.logo-card:hover .logo-card-inner {
    animation-play-state: paused;
}

.logo-card:focus-visible .logo-card-inner {
    animation-play-state: paused;
}

@keyframes petrushka-logo-flip {
0%,43%{transform:rotateY(0deg)}50%,93%{transform:rotateY(180deg)}100%{transform:rotateY(360deg)}
}

@media(max-width:650px) {
    .logo-card {
        width: 200px;
        height: 46px;
    }
}

@media(max-width:650px) {
    .logo-face-latin {
        font-size: 38px;
        letter-spacing: -2px;
    }
}

@media(prefers-reduced-motion:reduce) {
    .logo-card-inner {
        animation: none;
        transform: none;
    }
}

@media(prefers-reduced-motion:reduce) {
    .logo-face-latin {
        display: none;
    }
}
