@font-face {
    font-family: "Marianna";
    src: url("marianna.ttf") format("truetype");
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #ffffff;
    color: #2b2b2b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.invitation-header {
    width: 100%;
    padding: 95px 20px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    user-select: none;
    transition: opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
    /* text-align: right; */
}

body.is-state-3-active > .invitation-header {
    opacity: 0;
    pointer-events: none;
}

.title-tenor {
    font-family: "Tenor Sans", serif;
    letter-spacing: 0%;
    font-size: 38px;
    text-transform: uppercase;
}

.title-marianna {
    font-family: "Marianna", serif;
    font-size: 76px;
    line-height: 20%;
    -webkit-text-stroke: 1px #ffffff;
    paint-order: stroke fill;
}

.stage {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px 32px;
    /* max-width: 650px; */
    margin-left: auto;
    margin-right: auto;
}

.state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    /* justify-content: center; */
    padding: 80px 30px 32px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    transition:
        opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1),
        visibility 0s linear 700ms;
    pointer-events: none;
}

.state--2 {
    padding: 40px 30px 32px;
}

.state.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
    transition:
        opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1),
        visibility 0s linear 0s;
}

.state--1 {
    display: flex;
    flex-direction: column;
}

.state--1 .state-image {
    filter: drop-shadow(5px 5px 6px rgba(0, 0, 0, 0.25));
    padding-left: 10px;
}

.state--2 .state-image {
    margin-left: 10px;
}

.state-image--entry {
    padding-top: 70px;
}

.state--3 {
    position: fixed;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    gap: 200px;
    padding-top: 0;
    padding-bottom: 80px;
}

.state--3 > .invitation-header {
    flex: none;
}

.state--2 {
    flex-direction: column;
}

.state--2 > .back-button {
    margin-bottom: 25px;
    padding-bottom: 20px;
}

.back-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: "Montserrat", serif;
    font-size: 14px;
    text-transform: uppercase;
    color: #2b2b2b;
    margin-top: 25px;
    transition: opacity 250ms ease;
}

.back-button:hover {
    opacity: 0.6;
}

/* В стейте 3 действует gap: 200px между всеми детьми — нейтрализуем его,
   чтобы от хедера до кнопки остался ровно 25px. */
.state--3 > .back-button {
    flex: none;
    margin-top: calc(25px - 200px);
}

.info-block {
    position: relative;
    width: 100%;
    max-width: min(720px, 92vw);
}

.info-block-bg {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    /* filter: drop-shadow(5px 5px 6px rgba(0, 0, 0, 0.25)); */
    padding-top: 70px;
    padding-left: 10px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.info-block-text {
    position: absolute;
    top: 94px;
    left: 0;
    right: 0;
    padding: 0 50px;
    text-align: center;
}

.info-block-greeting {
    font-family: "Montserrat", serif;
    font-size: 22px;
    margin: 0 0 16px;
}

.info-block-body {
    font-family: "Montserrat", serif;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.info-section--location {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    user-select: none;
}

.section-title__tenor {
    font-family: "Tenor Sans", serif;
    font-size: 38px;
    text-transform: uppercase;
}

.section-title__marianna {
    font-family: "Marianna", serif;
    font-size: 60px;
    line-height: 20%;
    -webkit-text-stroke: 1px #ffffff;
    paint-order: stroke fill;
}

.info-block-text--timing {
    top: 50%;
    transform: translateY(-50%);
    font-family: "Montserrat", serif;
    font-size: 20px;
    line-height: 20px;
}

.location-link {
    position: relative;
    display: block;
    width: 233px;
    height: 285px;
    text-decoration: none;
    color: inherit;
    transition: transform 350ms ease;
}

.location-link:hover {
    transform: translateY(-2px);
}

.location-link:active {
    transform: scale(0.985);
}

.location-image {
    display: block;
    width: 233px;
    height: 285px;
    user-select: none;
    -webkit-user-drag: none;
    padding-left: 10px;
    /* filter: drop-shadow(4px 4px 6px rgba(0, 0, 0, 0.25)); */
}

.location-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30px;
    margin: 0;
    font-family: "Montserrat", serif;
    font-size: 10px;
    text-align: center;
    text-transform: uppercase;
}

.location-address {
    font-family: "Montserrat", serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    font-weight: 200;
}

.location-name {
    font-size: 24px;
    font-weight: 300;
}

.info-section--dresscode {
    gap: 0;
}

.info-section--dresscode > .dresscode-image {
    margin-top: 25px;
}

.dresscode-text {
    margin: 0;
    padding: 0 32px;
    font-family: "Montserrat", serif;
    font-size: 16px;
    line-height: 16px;
    text-align: justify;
    font-weight: 200;
    padding-top: 40px;
    max-width: 600px;
}

.dresscode-image {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    margin-left: auto;
    margin-right: auto;
}

.dresscode-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 0 30px;
    text-align: center;
    padding-top: 40px;
}

.dresscode-link-icon {
    flex: none;
}

.dresscode-link-text {
    font-family: "Montserrat", serif;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 200;
    font-style: italic;
}

.info-section--wishlist {
    gap: 0;
}

.info-section--wishlist > .wishlist-text {
    margin-top: 40px;
}

.wishlist-text {
    margin: 0;
    padding: 0 32px;
    font-family: "Montserrat", serif;
    font-size: 16px;
    line-height: 1.25;
    text-align: justify;
    font-weight: 200;
    max-width: 600px;
}

.wishlist-text-padding {
    padding-top: 20px;
}

.wishlist-text span {
    font-family: "Marianna", serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 0;
}

.wishlist-image {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    /* filter: drop-shadow(4px 4px 5px rgba(0, 0, 0, 0.25)); */
    padding-top: 25px;
    margin-left: auto;
    margin-right: auto;
}

.contacts-image {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    /* filter: drop-shadow(4px 4px 5px rgba(0, 0, 0, 0.25)); */
    padding-top: 40px;
    margin-left: auto;
    margin-right: auto;
}

.contacts-text {
    margin: 0;
    padding: 25px 25px 10px;
    font-family: "Montserrat", serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: justify;
    font-weight: 200;
    max-width: 600px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 400px;
    padding: 0 25px;
    row-gap: 12px;
    align-items: left;
    font-weight: 200;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.contacts-name {
    font-family: "Montserrat", serif;
    font-size: 16px;
    text-align: left;
}

.contacts-phone {
    font-family: "Montserrat", serif;
    font-size: 16px;
    text-align: right;
    text-decoration: none;
    color: inherit;
}

.info-section--form > .wishlist-text {
    margin-top: 40px;
}

.guest-form {
    width: 100%;
    max-width: min(560px, 92vw);
    margin-top: 40px;
    padding: 0 32px;
    display: flex;
    flex-direction: column;
    gap: 36px;
    font-family: "Montserrat", serif;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-question {
    font-family: "Montserrat", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    color: #2b2b2b;
}

.form-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #6f6f6f;
    background: transparent;
    padding: 6px 0;
    font-family: "Montserrat", serif;
    font-size: 14px;
    font-weight: 300;
    color: #2b2b2b;
    outline: none;
}

.form-input::placeholder {
    font-size: 14px;
    color: #6f6f6f;
    font-weight: 300;
}

.form-input:focus {
    border-bottom-color: #2b2b2b;
}

.form-textarea {
    resize: none;
    overflow: hidden;
    line-height: 1.5;
    min-height: 32px;
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.form-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.form-box {
    flex: none;
    width: 18px;
    height: 18px;
    border: 1px solid #6f6f6f;
    background: transparent;
    position: relative;
    transition:
        background-color 150ms ease,
        border-color 150ms ease;
    border-radius: 4px;
}

.form-option input:checked + .form-box {
    background-color: #151515;
}

.form-option input:focus-visible + .form-box {
    outline: 2px solid #6f6f6f;
    outline-offset: 2px;
}

.form-option-text {
    font-family: "Montserrat", serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.35;
    color: #2b2b2b;
}

.form-submit {
    align-self: center;
    margin-top: 8px;
    padding: 14px 48px;
    border: none;
    background: none;
    font-family: "Montserrat", serif;
    font-size: 16px;
    /* letter-spacing: 0.2em; */
    cursor: pointer;
    transition:
        transform 350ms ease,
        opacity 250ms ease;
    text-decoration: underline;
    color: #000;
    font-weight: 300;
}

.form-submit:hover {
    transform: translateY(-2px);
}

.form-submit:active {
    transform: scale(0.985);
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.form-status {
    margin: 0;
    text-align: center;
    font-family: "Montserrat", serif;
    font-size: 14px;
    font-weight: 300;
    min-height: 18px;
}

.form-status.is-error {
    color: #9b2226;
}

.form-status.is-success {
    color: #2b2b2b;
}

.info-section--countdown {
    gap: 0;
}

.info-section--countdown > .countdown {
    margin-top: 40px;
}

.info-section--countdown > .end-image {
    margin-top: 25px;
}

.countdown {
    font-family: "Tenor Sans", serif;
    font-size: 35px;
    text-align: center;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.end-image {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(4px 4px 6px rgba(0, 0, 0, 0.25));
}

.state.is-leaving {
    opacity: 0;
    transform: scale(1.02);
    visibility: visible;
    pointer-events: none;
}

.state-trigger {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: block;
    transition: transform 350ms ease;
}

.state-trigger:hover {
    transform: translateY(-2px);
}

.state-trigger:active {
    transform: scale(0.985);
}

.state-image {
    display: block;
    max-width: min(560px, 88vw);
    max-width: 450px;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.state-image--info {
    /* max-width: min(340px, 92vw); */
    max-height: none;
}

@media (max-width: 600px) {
    .invitation-header {
        padding-top: 95px;
    }

    .state-image {
        max-width: 100vw;
        padding-left: 10px;
    }

    .state-image--1 {
        max-width: 88vw;
        padding-left: 16px;
    }

    .state-image--3 {
        max-width: 88vw;
        padding-left: 16px;
    }
}

.state--1--info {
    font-family: "Montserrat";
    font-size: 20px;
}

@media (max-width: 600px) {
    .dresscode-image {
        max-width: 260px;
    }
}

@media (max-width: 600px) {
    .contacts-image {
        max-width: 290px;
    }
}

@media (max-width: 600px) {
    .end-image {
        max-width: 290px;
    }
}
