@font-face {
    font-family: "Harry Potter Russian Version of Gfdtk";
    src: url("fonts/harry-potter-russian.ttf") format("truetype"),
         url("fonts/Harry Potter Russian Version of Gfdtk.ttf") format("truetype");
    font-display: block;
}

@font-face {
    font-family: "Futura PT Light Italic";
    src: url("fonts/FuturaPT-LightObl.woff2") format("woff2"),
         url("fonts/FuturaPT-LightObl.woff") format("woff"),
         url("fonts/FuturaPT-LightObl.ttf") format("truetype");
    font-display: block;
}

:root {
    --page: #04100E;
    --page-2: #00120d;
    --bg: #1f1f1f;
    --gold: #c5a03d;
    --gold-light: #e2cf86;
    --cream: #f2e7c8;
    --muted: #696947;
    --muted-2: #696947;
    --line: rgba(233, 219, 162, .45);
    --blue: #00a7ff;
    --title-gradient: linear-gradient(90deg, #856220 0%, #f4e683 28%, #bf923d 50%, #4e341b 75%, #f1ea82 100%);
}

* {
    box-sizing: border-box;
}
.bold {
    font-weight: bold;
}
html {
    min-height: 100%;
    background: radial-gradient(circle at 50% 10%, rgba(35, 82, 59, .38), transparent 280px), linear-gradient(180deg, var(--page), var(--page-2));
}

body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at 50% 10%, rgba(35, 82, 59, .38), transparent 280px), linear-gradient(180deg, var(--page), var(--page-2));
    color: var(--cream);
    font-family: "Futura PT Light Italic", "Trebuchet MS", Arial, sans-serif;
    font-style: italic;
    font-weight: 300;
}

.invite-page {
    width: min(100%, 390px);
    margin: 0 auto;
    overflow-x: hidden;
    overflow-y: visible;
    background:
        radial-gradient(circle at 50% 3%, rgb(12 54 37 / 0%), #aa353500 300px), linear-gradient(180deg, var(--page), var(--page-2));
    box-shadow: 0 0 60px rgba(0, 0, 0, .55);
}

.section {
    padding: 34px 38px;
    position: relative;
    z-index: 2;
}

.section-photo {
    position: relative;
    overflow-y: visible;
    background: var(--page);
}

.photo {
    display: block;
    width: 100%;
    height: auto;
}

.hero {
    height: 388px;
}

.hero__img {
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.photo-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -15px;
    height: 45%;
    background: linear-gradient(180deg, rgba(0, 18, 13, 0), #04100E 82%);
    pointer-events: none;
}

.section-photo--wide .photo {
    min-height: 210px;
    object-fit: cover;
}

.photo--portrait {
    max-height: 420px;
    object-fit: cover;
    object-position: center top;
}

.title {
    margin: 0 0 24px;
    color: var(--gold-light);
    background: linear-gradient(135deg, #856220 0%, #f4e683 27.5%, #bf923d 50%, #d58940 75%, #f1ea82 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: "Harry Potter Russian Version of Gfdtk", "Georgia", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 70px;
    line-height: .9;
    letter-spacing: .02em;
    text-align: center;
    text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 18px rgba(197,160,61,.16);
}
.titlee {
    margin: 0 0 24px;
    color: var(--gold-light);
    background: linear-gradient(135deg, #856220 0%, #f4e683 27.5%, #bf923d 50%, #d58940 75%, #f1ea82 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: "Harry Potter Russian Version of Gfdtk", "Georgia", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 70px;
    line-height: 1.2;
    letter-spacing: .02em;
    text-align: center;
    text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 18px rgba(197,160,61,.16);
}

.title-main {
    margin-top: -30px;
    margin-bottom: 24px;
    font-size: 70px;
}

.text {
    color: var(--cream);
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: .02em;
}

.text p {
    margin: 0 0 22px;
}

.intro-text {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.25;
}

.section-intro {
    padding-top: 0;
    padding-bottom: 46px;
}

.note {
    color: var(--muted-2);
    font-size: 14px;
    line-height: 1.35;
}

.date-ribbon {
    height: 220px;
    position: relative;
    z-index: 3;
    margin: -8px -25px 6px;
    transform: rotate(-8deg);
    background: #eadfbf url("assets/parchment.jpg") center/cover no-repeat;
    box-shadow: 0 18px 30px rgba(0,0,0,.25);
}

.date-ribbon__inner {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 58px;
    overflow: hidden;
}

.date-ribbon__inner::before {
    content: "";
    position: absolute;
    top: 0px;
    left: -1%;
    width: 102%;
    height: 288%;
    background: url(assets/crest1.jpg) center / contain no-repeat;
}

.date-text {
    position: relative;
    z-index: 1;
    font-family: "Harry Potter Russian Version of Gfdtk", "Georgia", serif;
    font-style: normal;
    color: #7B6C4E;
    font-size: 51px;
    letter-spacing: .08em;
    text-shadow: 1px 2px 0 rgba(255, 255, 255, .35);
    margin-top: 53px;
}

.section-timing {
    padding-top: 38px;
    padding-bottom: 28px;
}

.timeline {
    margin-top: 10px;
}

.timeline__item {
    display: flex;
    gap: 21px;
    align-items: start;
    margin-bottom: 42px;
}
.timeline__item.center {
    align-items: center;
}

.timeline__time {
    background: #F0DDB5;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: "Harry Potter Russian Version of Gfdtk", "Georgia", serif;
    font-style: normal;
    font-size: 45px;
    line-height: .95;
    letter-spacing: .02em;
    white-space: nowrap;
}

.timeline__line {
    margin-top: 14px;
    height: 1px;
    background: var(--line);
}

.timeline__main {
    font-size: 18px;
    line-height: .96;
    color: var(--cream);
}

.timeline__content .note {
    margin: 12px 0 0;
}

.timing-note {
    max-width: 230px;
    margin: -8px 0 0 18px;
}

.section-dress {
    padding-top: 50px;
    padding-bottom: 36px;
}

.section-location {
    padding-top: 50px;
    padding-bottom: 30px;
}

.section-story {
    padding-top: 50px;
    padding-bottom: 28px;
}

.story-text .note {
    margin-bottom: 18px;
}

.story-final {
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 30px !important;
}

.section-details {
    padding-top: 50px;
    padding-bottom: 36px;
}

.section-details b {
    color: var(--cream);
    font-weight: 700;
}

.section-questionnaire-title {
    padding-top: 52px;
    padding-bottom: 22px;
}

.section-form {
    padding-top: 42px;
    padding-bottom: 42px;
}

.guest-form {
    width: 100%;
}

.form-card {
    margin: 0 0 28px;
    padding: 26px 22px 22px;
    border: 1px solid rgba(242, 231, 200, .35);
    border-radius: 6px;
    background: rgba(3, 26, 20, .92);
    box-shadow: none;
    overflow: visible;
}

.form-title {
    width: 100%;
    padding: 0;
    margin: 0 0 28px;
    color: var(--gold-light);
    background: #EBCE9B;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: "Harry Potter Russian Version of Gfdtk", "Georgia", serif;
    font-style: normal;
    font-size: 40px;
    line-height: 1;
    text-align: center;
}

.field {
    display: block;
    margin-bottom: 14px;
    color: var(--cream);
    font-size: 13px;
    line-height: 1.2;
}

.field span {
    display: block;
    margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid rgba(242, 231, 200, .35);
    border-radius: 5px;
    padding: 11px 12px;
    background: #071912;
    color: var(--cream);
    font: inherit;
    outline: none;
}

.section-form,
.guest-form,
.form-card {
    overflow: visible;
}

.field-select {
    position: relative;
    z-index: 100;
}

.custom-select__button {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(242, 231, 200, .35);
    border-radius: 5px;
    padding: 10px 36px 10px 12px;
    background: #071912;
    color: rgba(242, 231, 200, .5);
    font: inherit;
    font-style: italic;
    line-height: 1.15;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.custom-select__button.has-value {
    color: var(--cream);
}

.custom-select__text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.custom-select__button::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1px solid rgba(242, 231, 200, .65);
    border-bottom: 1px solid rgba(242, 231, 200, .65);
    transform: translateY(-70%) rotate(45deg);
}

.field-select.is-open .custom-select__button::after {
    transform: translateY(-25%) rotate(225deg);
}

.custom-select__dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    width: 100%;
    max-height: 430px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    background: #081a13;
    border: 1px solid rgba(242, 231, 200, .35);
    border-radius: 5px;
    box-shadow: 0 18px 42px rgba(0,0,0,.55);
    z-index: 999;
    scrollbar-width: thin;
}

.field-select.is-open .custom-select__dropdown {
    display: block;
}

.custom-select__dropdown button {
    width: 100%;
    min-height: 39px;
    margin: 0 0 5px;
    padding: 9px 12px;
    border: 1px solid rgba(153, 172, 113, .5);
    border-radius: 4px;
    background: #081a13;
    color: var(--cream);
    font: inherit;
    font-style: italic;
    font-size: 13px;
    line-height: 1.12;
    text-align: left;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.custom-select__dropdown button:hover,
.custom-select__dropdown button:focus {
    border-color: var(--gold);
    color: var(--gold-light);
    outline: none;
}

.custom-select__dropdown button.is-selected {
    border-color: var(--gold);
    background: rgba(191, 146, 61, .16);
    color: var(--gold-light);
}

.custom-select__dropdown button.is-selected::before {
    content: "✓";
    display: inline-block;
    margin-right: 7px;
    color: var(--gold-light);
}

.custom-select__dropdown .custom-select__confirm {
    min-height: 44px;
    margin-top: 18px;
    border: 0;
    border-radius: 5px;
    background: #c5a03d;
    color: #fff;
    font-style: normal;
    font-weight: 700;
    text-align: center;
}

.field textarea {
    min-height: 64px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(242, 231, 200, .38);
}

.checkboxes {
    color: var(--cream);
    font-size: 14px;
    line-height: 1.12;
    margin-bottom: 26px;
}

.checkboxes p {
    margin: 0 0 8px;
}

.checkboxes label {
    display: block;
    margin-bottom: 5px;
}

.checkboxes input {
    margin: 0 5px 0 0;
    vertical-align: middle;
    accent-color: var(--gold);
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 6px;
    height: 45px;
    font: inherit;
    font-style: normal;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1;
}

.btn-icon::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.btn-icon-check::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%23F7F2E7' stroke-width='2'/%3E%3Cpath d='M8 12.3l2.5 2.5L16 9.5' stroke='%23F7F2E7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.btn-icon-download::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 4v9' stroke='%23F7F2E7' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M8.5 10.5L12 14l3.5-3.5' stroke='%23F7F2E7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 16.5v1A1.5 1.5 0 0 0 6.5 19h11a1.5 1.5 0 0 0 1.5-1.5v-1' stroke='%23F7F2E7' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.btn-main {
    width: 100%;
    background: var(--gold);
    color: white;
    margin-bottom: 14px;
}

.buttons-row {
    display: grid;
    grid-template-columns: 1fr 62px;
    gap: 11px;
}

.btn-secondary {
    background: #6a6048;
    color: white;
	text-decoration: none;
    text-align: center;
    align-content: center;
}

.btn-light {
    background: #efe3c7;
    color: #352b1d;
}

.custom-select__dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select__dropdown::-webkit-scrollbar-thumb {
    background: rgba(244, 230, 131, .35);
    border-radius: 10px;
}

@media (max-width: 360px) {
    .section {
        padding-left: 28px;
        padding-right: 28px;
    }

    .title {
        font-size: 42px;
    }

    .timeline__item {
        grid-template-columns: 78px 16px 1fr;
        gap: 6px;
    }

    .timeline__time {
        font-size: 30px;
    }
}


/* Modal after RSVP */
.magic-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
}

.magic-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.magic-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 10, 7, .78);
    backdrop-filter: blur(5px);
}

.magic-modal__card {
    position: relative;
    width: min(100%, 380px);
    padding: 34px 28px 28px;
    text-align: center;
    color: var(--paper);
    background:
        radial-gradient(circle at top, rgba(244, 230, 131, .14), transparent 42%),
        linear-gradient(180deg, rgba(13, 38, 27, .98), rgba(0, 18, 13, .98));
    border: 1px solid rgba(244, 230, 131, .38);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .62), inset 0 0 28px rgba(244, 230, 131, .05);
    transform: translateY(18px) scale(.96);
    transition: transform .28s ease;
}

.magic-modal.is-open .magic-modal__card {
    transform: translateY(0) scale(1);
}

.magic-modal__spark {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #f4e683;
    border: 1px solid rgba(244, 230, 131, .4);
    background: rgba(244, 230, 131, .08);
    font-size: 25px;
}

.magic-modal__title {
    margin: 0 0 12px;
    font-family: var(--font-title);
    font-size: 42px;
    line-height: .95;
    font-weight: 400;
    background: linear-gradient(90deg, #856220 0%, #f4e683 28%, #bf923d 50%, #4e341b 75%, #f1ea82 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.magic-modal__text {
    margin: 0 0 22px;
    font-size: 17px;
    line-height: 1.35;
    color: #efe3c7;
}

.magic-modal__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.magic-modal__button,
.magic-modal__download {
    width: 100%;
    margin: 0;
}

.magic-modal__download {
    
    place-items: center;
}

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: #00120d !important;
    }

    .invite-page {
        width: 100% !important;
        max-width: none !important;
        box-shadow: none !important;
    }

    .buttons-row,
    .btn-main,
    .magic-modal {
        display: none !important;
    }
}

/* Desktop layout upgrade */
@media (min-width: 900px) {
    body {
        padding: 34px 0;
    }
    .date-ribbon__inner::before {
        content: "";
        position: absolute;
        top: -396px;
        left: -1%;
        width: 102%;
        height: 288%;
        background: url(assets/crest.jpg) center / contain no-repeat;
    }
    .invite-page {
        width: min(100% - 56px, 980px);
        border-radius: 28px;
        overflow: hidden;
        box-shadow: 0 30px 95px rgb(5 36 23);
        /* border: 1px solid rgba(244, 230, 131, .12); */
    }

    .section {
        padding: 58px 82px;
    }

    .section-intro {
        padding-top: 26px;
        padding-bottom: 66px;
    }

    .hero {
        height: 620px;
    }

    .hero__img {
        object-position: center 18%;
    }

    .section-photo--wide .photo {
        height: 430px;
        min-height: 0;
        object-fit: cover;
    }

    .photo--portrait {
        width: 100%;
        max-height: none;
        height: 1026px;
        object-position: center 18%;
    }

    .photo-fade {
        bottom: -40px;
        height: 38%;
    }

    .title,
    .titlee {
        font-size: 94px;
        margin-bottom: 34px;
    }

    .title-main {
        margin-top: -56px;
        font-size: 102px;
    }

    .text {
        max-width: 720px;
        margin: 0 auto;
        font-size: 21px;
        line-height: 1.36;
        text-align: center;
    }

    .intro-text {
        font-size: 22px;
        line-height: 1.38;
    }

    .note {
        font-size: 20px;
        line-height: 1.42;
    }

    .date-ribbon {
        height: 340px;
        margin: 2px -45px 18px;
    }

    .date-ribbon__inner {
        padding-top: 72px;
    }

    .date-ribbon__inner::before {
        height: 308%;
    }

    .date-text {
        font-size: 82px;
        margin-top: 155px;
    }

    .timeline {
        max-width: 760px;
        margin: 0 auto;
    }

    .timeline__item {
        gap: 30px;
        margin-bottom: 34px;
        align-items: center;
    }

    .timeline__time {
        min-width: 175px;
        font-size: 68px;
        text-align: right;
    }

    .timeline__main {
        font-size: 27px;
        line-height: 1.1;
    }

    .section-timing .note {
        /* max-width: 720px; */
        margin: -14px auto 42px;
        text-align: center;
    }

    .section-dress,
    .section-location,
    .section-story,
    .section-details {
        padding-top: 25px;
        padding-bottom: 45px;
    }

    .story-final {
        font-size: 24px;
    }

    .section-questionnaire-title {
        padding-top: 60px;
        padding-bottom: 40px;
    }

    .section-form {
        padding-top: 66px;
        padding-bottom: 72px;
    }

    .guest-form {
        max-width: 680px;
        margin: 0 auto;
    }

    .form-card {
        padding: 38px 42px 34px;
        border-radius: 16px;
        box-shadow: 0 26px 70px rgba(0, 0, 0, .28), inset 0 0 38px rgba(244, 230, 131, .035);
    }

    .form-title {
        font-size: 58px;
        margin-bottom: 32px;
    }

    .field {
        font-size: 17px;
        margin-bottom: 18px;
    }

    .field input,
    .field textarea,
    .field select,
    .custom-select__button {
        min-height: 48px;
        font-size: 17px;
        padding: 13px 15px;
    }

    .field textarea {
        min-height: 110px;
    }

    .custom-select__dropdown {
        max-height: 360px;
        padding: 10px;
    }

    .custom-select__dropdown button {
        min-height: 46px;
        font-size: 15px;
        padding: 11px 14px;
    }

    .checkboxes {
        max-width: 640px;
        margin: 0 auto 28px;
        font-size: 17px;
        line-height: 1.35;
    }

    .btn {
        height: 52px;
        font-size: 20px;
        gap: 12px;
    }

    .btn-icon::before {
        width: 20px;
        height: 20px;
    }

    .buttons-row {
        grid-template-columns: 1fr 150px;
        gap: 14px;
    }

    .magic-modal__card {
        width: min(100%, 520px);
        padding: 42px 42px 36px;
    }

    .magic-modal__title {
        font-size: 58px;
    }

    .magic-modal__text {
        font-size: 19px;
    }
}

@media (min-width: 1280px) {
    .invite-page {
        width: min(100% - 80px, 1080px);
    }

    .section {
        padding-left: 96px;
        padding-right: 96px;
    }

    .hero {
        height: 800px;
    }

    .section-photo--wide .photo {
        height: 800px;
    }
   
}
@media (max-width: 1280px) {
 .date-ribbon__inner::before {
        content: "";
        position: absolute;
        top: -353px;
        left: -1%;
        width: 102%;
        height: 275%;
        background: url(assets/crest.jpg) center / contain no-repeat;
    }
}
@media (max-width: 769px) {
 .date-ribbon__inner::before {
        content: "";
        position: absolute;
        top: 0px;
        left: -1%;
        width: 102%;
        height: 275%;
        background: url(assets/crest1.jpg) center / contain no-repeat;
    }
}