:root {
    --images-z-index: 3;
    font-family: "Kurale", serif;
    font-weight: 400;
    font-style: normal;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.person-card,
.music-button__icon,
.heart-container,
.map-dropdown,
.map-button:hover,
.map-button:active,
.rsvp-divider {
    -webkit-transform: translateZ(0);
        -ms-transform: translateZ(0);
            transform: translateZ(0);
}

.invitation,
.invitation-content,
.contacts-list,
.contact-item,
.countdown-timer,
.rsvp-form,
.content-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.calendar__grid,
.calendar__weekdays,
.calendar__week,
.calendar__days {
    display: -ms-grid;
    display: grid;
}

.person-card__img,
.title-screen__img {
    font-family: 'object-fit: cover;';
}

.person-card::before,
.calendar::before {
    -webkit-clip-path: polygon(
        0% 0%, 100% 0%, 100% 100%, 0% 100%
    );
}

@supports (-webkit-touch-callout: none) {
    .main-content {
        background-attachment: scroll;
    }
}

.person-card,
.map-dropdown {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.title-screen {
    height: 1200px;
    overflow-x: hidden;
    position: relative;
    pointer-events: none;
    user-select: none;
}

.contact-tg {
    pointer-events: all;
}

.music-button {
    position: absolute;
    left: 6vw;
    top: 20px;
    width: 140px;
    height: 140px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    z-index: 5;
    pointer-events: auto;
}

.music-button__ring {
    width: 100%;
    height: 100%;
    animation: spin 10s linear infinite;
    -webkit-animation: spin 10s linear infinite;
    font-family: "Kurale", serif;
    font-size: 11px;
    letter-spacing: 0.35em;
    fill: rgba(0, 0, 0, 0.55);
}

.music-button__icon {
    position: absolute;
    inset: 50%;
    width: 46px;
    height: 46px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.65);
}

.music-button__icon svg {
    width: 26px;
    height: 26px;
}

.title-screen__img {
    width: 100%;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.person-card__img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    display: block;
    z-index: var(--images-z-index);
    /* filter: sepia(0.35) saturate(0.7) contrast(0.95) brightness(1.02); */
}

.person-card__img-container {
    z-index: var(--images-z-index);
    width: 100%;
    height: 100%;
}

.black-overlay {
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 0;
    opacity: .2;
    background-color: black;
}

.person-card {
    z-index: 2;
    -webkit-transform-origin: 50% 10%;
    -ms-transform-origin: 50% 10%;
    transform-origin: 50% 10%;
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 300px;
    position: absolute;
    padding: 1rem 1rem 0 1rem;
    box-sizing: border-box;
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.08),
        0 18px 30px rgba(0,0,0,0.12);
}

.person-card#dmitry {
    animation: sway 3s ease-in-out infinite;
    -webkit-animation: sway 3s ease-in-out infinite;
}

.person-card#victoria {
    animation: sway2 3s ease-in-out infinite;
    -webkit-animation: sway2 3s ease-in-out infinite;
}

.person-card::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 110px;
    height: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(230, 224, 210, 0.75)),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05), transparent 35%, rgba(255, 255, 255, 0.35) 70%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 8px, rgba(0, 0, 0, 0.03) 8px 16px),
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.025) 0 2px, transparent 2px 5px),
        repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.02) 0 3px, transparent 3px 6px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(60deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 6px);
    border-radius: 4px;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.12),
        inset 0 0 10px rgba(255, 255, 255, 0.5);
    opacity: 0.98;
    filter: contrast(1.12) saturate(0.9);
    pointer-events: none;
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 8%, 96% 12%, 100% 18%, 95% 24%, 100% 30%, 94% 36%, 100% 42%, 95% 48%, 100% 54%,
        96% 60%, 100% 66%, 95% 72%, 100% 78%, 96% 84%, 100% 90%, 95% 96%, 100% 100%,
        0% 100%, 4% 96%, 0% 90%, 5% 84%, 0% 78%, 6% 72%, 0% 66%, 5% 60%, 0% 54%,
        6% 48%, 0% 42%, 5% 36%, 0% 30%, 6% 24%, 0% 18%, 5% 12%, 0% 8%
    );
}

.person-card#dmitry {
    top: 150px;
    left: 25vw;
}

.person-card#victoria {
    top: 750px;
    left: 60vw;
}

.person-card-name {
    text-align: center;
    margin: 1rem 0 1rem 0;
}

.typing-container {
    z-index: 4;
    display: block;
    position: absolute;
    top: 580px;
    left: calc(50vw - 20rem);
    text-transform: uppercase;
    word-break: keep-all;
    text-align: center;
}

.typing-text {
    font-size: 3rem;
}

.typing-caret {
    display: inline-block;
    margin-left: 4px;
    animation: caret-blink 1s steps(1) infinite;
    -webkit-animation: caret-blink 1s steps(1) infinite;
}

.date-stack {
    position: absolute;
    left: 62vw;
    top: 200px;
    display: grid;
    gap: 14px;
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.18);
    text-align: center;
    z-index: 1;
}

.date-stack span {
    line-height: 1;
    letter-spacing: 0.08em;
}

.heart-container {
    z-index: var(--images-z-index);
    width: auto;
    height: auto;
    position: absolute;
    top: 800px;
    left: 35vw;
    transform: rotate(-20deg);
    opacity: .4;
}

.heart {
    width: auto;
    height: 150px;
    z-index: var(--images-z-index);
}

.calendar {
    width: min(320px, 90vw);
    margin: 24px 0 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 18px 30px rgba(0, 0, 0, 0.12);
    padding: 22px 22px 18px;
    position: relative;
}

.calendar::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 120px;
    height: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(230, 224, 210, 0.75)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 8px, rgba(0, 0, 0, 0.03) 8px 16px),
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.03) 0 2px, transparent 2px 5px);
    border-radius: 4px;
    opacity: 0.9;
    pointer-events: none;
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 8%, 96% 12%, 100% 18%, 95% 24%, 100% 30%, 94% 36%, 100% 42%, 95% 48%, 100% 54%,
        96% 60%, 100% 66%, 95% 72%, 100% 78%, 96% 84%, 100% 90%, 95% 96%, 100% 100%,
        0% 100%, 4% 96%, 0% 90%, 5% 84%, 0% 78%, 6% 72%, 0% 66%, 5% 60%, 0% 54%,
        6% 48%, 0% 42%, 5% 36%, 0% 30%, 6% 24%, 0% 18%, 5% 12%, 0% 8%
    );
}

.calendar__grid {
    display: grid;
    gap: 10px;
}

.calendar__weekdays,
.calendar__week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
}

.calendar__days {
    display: grid;
    gap: 8px;
}

.calendar__day {
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.75);
    border-radius: 999px;
}

.calendar__day.is-empty {
    opacity: 0;
}

.calendar__day.is-selected {
    border: 1px solid rgba(0, 0, 0, 0.35);
    color: rgba(0, 0, 0, 0.9);
}

.calendar__footer {
    margin-top: 14px;
    font-size: 20px;
    text-align: center;
    color: rgba(0, 0, 0, 0.65);
}

.main-content {
    background-image: url("../images/white-paper-texture-.jpg.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    display: flex;
    overflow-x: hidden;
    justify-content: center;
    pointer-events: none;
    user-select: none;
}

.content-wrapper {
    max-width: 60vw;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.invitation {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.cursive {
    padding: 1rem;
    margin-top: 3rem;
    font-family: "Great Vibes", cursive;
    font-weight: 100;
    font-style: normal;
    font-size: 5rem;
    text-align: center;
}

.invitation-content {
    display: flex;
    font-size: 1.2rem;
    padding: 1rem;
    width: 400px;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    overflow: visible;
}

.invitation-content#programme {
    text-align: left;
}

.map-button {
    margin-top: 18px;
    min-width: 150px;
    padding: 10px 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 240, 230, 0.9));
    border: 1px solid rgba(0, 0, 0, 0.7);
    color: rgba(0, 0, 0, 0.9);
    font-family: "Kurale", serif;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: 0.04em;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 2px 0 rgba(0, 0, 0, 0.2),
        0 10px 18px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.map-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 3px 0 rgba(0, 0, 0, 0.22),
        0 12px 20px rgba(0, 0, 0, 0.14);
}

.map-button:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 1px 0 rgba(0, 0, 0, 0.22),
        0 6px 12px rgba(0, 0, 0, 0.12);
}

.map-dropdown {
    margin-top: 14px;
    width: min(1200px, 96vw);
    height: 460px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 18px 30px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    border-radius: 4px;
    pointer-events: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: auto;
}

.dresscode-title {
    margin-top: 8px;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.dresscode-swatches {
    margin: 14px 0 10px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.swatch {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #eee;
}

.swatch--red { background: #3d020d; }
.swatch--cream  { background: #efe7de; }
.swatch--sand   { background: #dfc9b5; }
.swatch--red2   { background: #bd2f2f; }
.swatch--brown   { background: #542416; }
.swatch--red3  { background: #8a0414; }

.rsvp-subtitle {
    margin-top: 8px;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.75);
}

.rsvp-divider {
    margin: 10px auto 18px;
    width: 22px;
    height: 22px;
    border-left: 2px solid rgba(0, 0, 0, 0.6);
    border-bottom: 2px solid rgba(0, 0, 0, 0.6);
    transform: rotate(-45deg);
}

.rsvp-form {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin: 0 auto;
    pointer-events: auto;
}

.rsvp-label {
    text-align: left;
    font-size: 1.1rem;
    margin-top: 6px;
    width: 100%;
    pointer-events: auto;
}

.rsvp-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.75);
    background: rgba(255, 255, 255, 0.7);
    outline: none;
    font-family: "Kurale", serif;
    font-size: 1rem;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0);
    transition: box-shadow 120ms ease, border-color 120ms ease;
    pointer-events: auto;
}

.rsvp-input:focus {
    border-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 0 0 2px rgba(40, 60, 140, 0.35);
}

.rsvp-extra {
    width: 100%;
}

.rsvp-group {
    border: none;
    padding: 0;
    margin: 6px 0 0;
    text-align: left;
    width: 100%;
    pointer-events: auto;
}

.rsvp-group legend {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.rsvp-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    font-size: 1rem;
    pointer-events: auto;
}

.rsvp-option input {
    width: 16px;
    height: 16px;
    pointer-events: auto;
}

.rsvp-submit {
    margin: 14px auto 0;
    padding: 12px 28px;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.7);
    font-family: "Kurale", serif;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 2px 0 rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
}

.rsvp-submit:hover {
    transform: translateY(-1px);
}

.contacts-subtitle {
    margin-top: 6px;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.75);
}

.contacts-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.contact-name {
    font-size: 1.15rem;
}

.contact-phone {
    font-size: 1.05rem;
}

.contact-icon {
    margin-top: 4px;
    font-size: 1.2rem;
    line-height: 1;
}

.countdown-timer {
    margin: 18px 0 12px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

.countdown-cell {
    width: 62px;
    height: 62px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.countdown-number {
    font-size: 1.1rem;
    line-height: 1;
    animation: countdown-pulse 1s ease-in-out infinite;
    -webkit-animation: countdown-pulse 1s ease-in-out infinite;
}

.countdown-label {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.countdown-heart {
    margin: 10px 0 8px;
    font-size: 1.6rem;
}

.countdown-sign {
    font-size: 1.15rem;
    margin-top: 6px;
}

.countdown-names {
    font-family: "Great Vibes", cursive;
    font-size: 3rem;
}

.desire::after {
    content: "";
    display: block;
    width: 96px;
    height: 96px;
    margin: 18px auto;
    background: url("../images/photo.png.webp") center / contain no-repeat;
    opacity: 0.9;
}

.invitation-content#countdown::after {
    content: "";
    display: block;
    width: 96px;
    height: 96px;
    margin: 18px auto;
    background: url("../images/photo.png.webp") center / contain no-repeat;
    opacity: 0.9;
}

[x-cloak] {
    display: none !important;
}

@media (max-width: 768px) {
    .person-card#dmitry {
        top: 200px;
        left: 10vw;
    }

    .person-card#victoria {
        top: 750px;
        left: 55vw;
    }

    .typing-container {
        top: 570px;
        left: 7vw;
    }
}

@media (max-width: 800px) {
    .music-button {
        left: 4vw;
        width: 120px;
        height: 120px;
    }
/* 
    .person-card {
        width: 150px;
        height: 200px;
    } */
}

/* @media (max-width: 700px)
{
    .heart-container {
        top: 115vh;
    }

    .date-stack {
        font-size: 3rem;
    }

    .title-screen {
        height: 200vh;
    }

    .person-card {
        width: 150px;
        height: 230px;
    }

    .person-card__img {
        width: 120px;
        height: 140px;
        object-fit: cover;
        display: block;
        z-index: var(--images-z-index);
        filter: sepia(0.35) saturate(0.7) contrast(0.95) brightness(1.02);
    }

    .person-card#victoria {
        top: 115vh;
        left: 50vw;
    }

    .typing-container {
        top: calc(550px + 2rem);
        left: calc(8vw + 2.25em);
        left: 12.5%;
    }

    .typing-text {
        font-size: 2.25rem;
    }
} */

@media (max-width: 1200px) {
    .heart-container {
        left: 30vw;
    }
}

@media (max-width: 700px) {
    .heart-container {
        left: 3vw;
    }
}

@media (max-width: 600px) {
    .date-stack {
        right: 0;
    }
}

@keyframes sway {
    0% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
    100% { transform: rotate(-2deg); }
}

@keyframes sway2 {
    0% { transform: rotate(2deg); }
    50% { transform: rotate(-2deg); }
    100% { transform: rotate(2deg); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

@keyframes countdown-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

@-webkit-keyframes sway {
    0% { -webkit-transform: rotate(-2deg); }
    50% { -webkit-transform: rotate(2deg); }
    100% { -webkit-transform: rotate(-2deg); }
}

@-webkit-keyframes sway2 {
    0% { -webkit-transform: rotate(2deg); }
    50% { -webkit-transform: rotate(-2deg); }
    100% { -webkit-transform: rotate(2deg); }
}

@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}

@-webkit-keyframes caret-blink {
    50% { opacity: 0; }
}

@-webkit-keyframes countdown-pulse {
    0% { -webkit-transform: scale(1); opacity: 0.9; }
    50% { -webkit-transform: scale(1.08); opacity: 1; }
    100% { -webkit-transform: scale(1); opacity: 0.9; }
}