.contact-section {
    background: var(--blue);
    color: var(--paper);
    padding: 40px 4.2%;
}

.contact-top {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    border-bottom: 1px solid #ffffff50;
    padding-bottom: 28px;
}

.big-contact {
    width: 100%;
    text-align: left;
    color: inherit;
    font-size: clamp(40px, 8.4vw, 140px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.055em;
    padding: 50px 0;
    position: relative;
}

.big-contact i {
    font-family: Georgia, serif;
    font-weight: 400;
}

.big-contact b {
    position: absolute;
    right: 0;
    top: 50px;
    font-weight: 400;
    transition: transform .2s;
}

.big-contact:hover b {
    transform: translate(5px, -5px);
}

.modal-open {
    overflow: hidden;
}

.contact-card {
    width: 100%;
    aspect-ratio: 1.58;
    perspective: 1400px;
}

.contact-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .75s cubic-bezier(.2, .7, .2, 1);
}

.contact-card.is-flipped .contact-card-inner {
    transform: rotateY(180deg);
}

.contact-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.contact-card-front {
    display: grid;
    place-items: center;
    background: var(--paper);
    color: var(--blue);
    border: 1px solid var(--blue);
}

.contact-star {
    width: clamp(76px, 18%, 112px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 0;
    transition: transform .35s ease;
}

.contact-star:hover {
    transform: rotate(22.5deg) scale(1.06);
}

.contact-star img {
    display: block;
    width: 100%;
    height: 100%;
}

.contact-email {
    position: absolute;
    bottom: 7%;
    left: 0;
    width: 100%;
    padding: 8px 18px;
    color: var(--blue);
    font-size: clamp(13px, 2.3vw, 18px);
    font-weight: 700;
    letter-spacing: -.025em;
    text-align: center;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-underline-offset: .22em;
}

.contact-card-back {
    transform: rotateY(180deg);
    background: var(--blue);
    color: var(--paper);
}

.contact-card-return {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 7%;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(36px, 8.1vw, 83px);
    font-weight: 400;
    letter-spacing: -.065em;
    line-height: .87;
    text-align: center;
}

.contact-card-return em {
    font-weight: 400;
}

.contact-period {
    color: #d5fa3e;
}

#contact {
    border: 0;
    padding: 0;
    width: min(640px, calc(100% - 36px));
    max-height: 90dvh;
    background: transparent;
    overflow: visible;
    opacity: 0;
    transition: opacity .24s ease, display .24s allow-discrete, overlay .24s allow-discrete;
}

.contact-close {
    position: absolute;
    top: -42px;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    color: white;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

#contact[open] {
    opacity: 1;
}

@starting-style {
    #contact[open] {
        opacity: 0;
    }
}

#contact::backdrop {
    background: #141d3d66;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity .24s ease, display .24s allow-discrete, overlay .24s allow-discrete;
}

#contact[open]::backdrop {
    opacity: 1;
}

@starting-style {
    #contact[open]::backdrop {
        opacity: 0;
    }
}

@media(prefers-reduced-motion:reduce) {
    #contact,
    #contact::backdrop,
    .contact-card-inner {
        transition-duration: .01ms;
    }
}

@media(max-width:800px) {
    .contact-top>span:last-child {
        display: none;
    }

    .big-contact {
        padding: 40px 0;
    }

    .big-contact b {
        top: 35px;
    }
}

@media(max-width:540px) {
    .contact-section {
        padding: 25px 20px;
    }

    .contact-top {
        padding-bottom: 20px;
    }

    .big-contact {
        font-size: 10.4vw;
        letter-spacing: -.06em;
        padding: 35px 0;
    }

    .big-contact b {
        font-size: 40px;
        top: 30px;
    }

    .contact-card-return {
        font-size: clamp(31px, 9vw, 52px);
    }

    .contact-email {
        font-size: clamp(12px, 3.5vw, 16px);
    }
}
