/* =========================================
   RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =========================================
   HTML / BODY
========================================= */

html,
body {
    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    background: #000;

    overflow: hidden;
}


/* =========================================
   FIRST COVER
========================================= */

.first-cover {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;
    height: 100dvh;

    background: #000;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    z-index: 999999;

    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transition:
        opacity .6s ease,
        visibility .6s ease;
}


.first-cover.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


.first-cover img {
    width: min(
        100vw,
        56.25vh
    );

    height: min(
        100vh,
        177.7777778vw
    );

    aspect-ratio: 9 / 16;

    display: block;

    object-fit: cover;

    object-position: center center;

    background: #000;

    user-select: none;

    -webkit-user-drag: none;

    -webkit-touch-callout: none;
}


/* =========================================
   MAIN WEBSITE
========================================= */

.website-frame {
    width: 100vw;

    height: 100vh;
    height: 100dvh;

    overflow-y: auto;

    overflow-x: hidden;

    background: #000;

    scroll-behavior: smooth;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;

    touch-action: pan-y;

    overscroll-behavior-y: contain;
}


.website-frame::-webkit-scrollbar {
    display: none;
}


/* =========================================
   VIDEO PAGE
========================================= */

.video-page {
    width: 100vw;

    height: 100vh;
    height: 100dvh;

    min-height: 100vh;
    min-height: 100dvh;

    display: flex;

    justify-content: center;
    align-items: center;

    position: relative;

    background: #000;

    overflow: hidden;

    margin: 0;
    padding: 0;

    flex-shrink: 0;
}


/* =========================================
   9:16 INVITATION FRAME
========================================= */

.invitation-frame {
    width: min(
        100vw,
        56.25vh
    );

    height: min(
        100vh,
        177.7777778vw
    );

    aspect-ratio: 9 / 16;

    position: relative;

    overflow: hidden;

    background: #000;

    flex-shrink: 0;
}


/* =========================================
   WEDDING VIDEO
========================================= */

.wedding-video {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: block;

    object-fit: fill;

    background: #000;

    margin: 0;
    padding: 0;

    border: 0;
}


/* =========================================
   TAP TO PLAY
========================================= */

.tap-text {
    position: absolute;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    z-index: 50;

    padding: 12px 23px;

    color: #fff;

    font-family: Arial, sans-serif;

    font-size: 17px;

    letter-spacing: 3px;

    white-space: nowrap;

    border:
        1px solid
        rgba(255,255,255,.9);

    border-radius: 50px;

    background:
        rgba(0,0,0,.35);

    backdrop-filter: blur(6px);

    -webkit-backdrop-filter: blur(6px);

    user-select: none;

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;

    transition:
        opacity .4s ease,
        transform .4s ease;
}


.tap-text.hide {
    opacity: 0;

    transform:
        translate(-50%, -50%)
        scale(.9);

    pointer-events: none;
}


/* =========================================
   BACKGROUND MUSIC
========================================= */

.background-music {
    position: fixed;

    width: 1px;
    height: 1px;

    left: -10px;
    top: -10px;

    opacity: 0;

    pointer-events: none;

    z-index: -1;
}


/* =========================================
   MUSIC BUTTON
========================================= */

.music-button {
    position: fixed;

    top: 20px;
    right: 20px;

    z-index: 9999;

    padding: 9px 14px;

    border:
        1px solid
        rgba(255,255,255,.8);

    border-radius: 30px;

    background:
        rgba(0,0,0,.35);

    color: #fff;

    font-family: Arial, sans-serif;

    font-size: 10px;

    letter-spacing: 1px;

    cursor: pointer;

    backdrop-filter: blur(7px);

    -webkit-backdrop-filter: blur(7px);

    -webkit-tap-highlight-color: transparent;

    transition:
        transform .2s ease,
        opacity .3s ease;
}


.music-button.off {
    opacity: .7;
}


.music-button:active {
    transform: scale(.93);
}


/* =========================================
   VIDEO 03
========================================= */

.video-three {
    position: relative;
}


/* =========================================
   SAVE DATE WRAPPER
========================================= */

.save-date-wrapper {
    position: absolute;

    left: 50%;
    top: 45%;

    transform:
        translate(-50%, -50%);

    width: 80%;

    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;

    z-index: 20;
}


/* =========================================
   SAVE THE DATE
   SLIGHTLY SMALLER
========================================= */

.save-title {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 30px;

    font-weight: 600;

    letter-spacing: 2.5px;

    color: #7b3028;

    margin-bottom: 28px;

    white-space: nowrap;

    text-shadow:
        0 1px 1px
        rgba(255,255,255,.7);
}


/* =========================================
   SCRATCH BOX
========================================= */

.scratch-box {
    position: relative;

    width: 260px;

    height: 50px;

    overflow: hidden;

    border-radius: 9px;

    background: #f7ead0;

    border:
        1.5px solid
        rgba(120,80,25,.7);

    box-shadow:
        0 3px 10px
        rgba(40,20,5,.18);

    touch-action: none;
}


/* =========================================
   DATE UNDER SCRATCH
========================================= */

.date-line {
    position: absolute;

    inset: 0;

    z-index: 1;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    white-space: nowrap;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 15px;

    color: #7d332b;

    background:
        linear-gradient(
            135deg,
            #fffaf0,
            #f3dfb8
        );
}


.date-divider {
    color: #ad843c;

    font-size: 20px;
}


/* =========================================
   CANVAS SCRATCH
========================================= */

#scratchCanvas {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 10;

    display: block;

    touch-action: none;

    cursor: crosshair;

    user-select: none;

    -webkit-user-select: none;

    -webkit-touch-callout: none;

    -webkit-tap-highlight-color: transparent;
}


/* =========================================
   COUNTDOWN
========================================= */

.countdown {
    display: flex;

    align-items: flex-start;

    justify-content: center;

    gap: 10px;

    margin-top: 28px;

    opacity: 1;

    transform:
        translateY(0);

    transition:
        opacity .6s ease,
        transform .6s ease;
}


.countdown.hidden {
    opacity: 0;

    transform:
        translateY(10px);

    pointer-events: none;

    visibility: hidden;
}


/* =========================================
   TIME BOX
========================================= */

.time-box {
    display: flex;

    flex-direction: column;

    align-items: center;

    min-width: 48px;
}


.time-box strong {
    font-family:
        Georgia,
        serif;

    font-size: 35px;

    color: #783229;

    line-height: 1;
}


.time-box span {
    font-family:
        Arial,
        sans-serif;

    font-size: 11px;

    letter-spacing: .7px;

    color: #99783f;

    margin-top: 5px;
}


/* =========================================
   COUNTDOWN SEPARATOR
========================================= */

.separator {
    font-family:
        Georgia,
        serif;

    font-size: 20px;

    color: #b08a3e;

    line-height: 42px;
}


/* =========================================
   VENUE BUTTON
   SLIGHTLY SMALLER
========================================= */

.venue-button {
    position: absolute;

    left: 50%;

    bottom: 51%;

    transform:
        translateX(-50%)
        translateY(20px);

    z-index: 50;

    padding: 11px 30px;

    border:
        1px solid
        rgba(255,255,255,.9);

    border-radius: 40px;

    background:
        rgba(0,0,0,.35);

    backdrop-filter: blur(6px);

    -webkit-backdrop-filter: blur(6px);

    color: #fff;

    text-decoration: none;

    font-family: Arial, sans-serif;

    font-size: 9px;

    letter-spacing: 2px;

    white-space: nowrap;

    user-select: none;

    -webkit-tap-highlight-color: transparent;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .8s ease,
        transform .8s ease;
}


.venue-button.show {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateX(-50%)
        translateY(0);
}


.venue-button:active {
    transform:
        translateX(-50%)
        scale(.95);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .website-frame {
        width: 100vw;

        height: 100dvh;

        overflow-y: auto;

        overflow-x: hidden;

        background: #000;

        scroll-behavior: smooth;

        -webkit-overflow-scrolling: touch;

        touch-action: pan-y;

        overscroll-behavior-y: contain;
    }


    .video-page {
        width: 100vw;

        height: 100dvh;

        min-height: 100dvh;

        display: flex;

        align-items: center;

        justify-content: center;

        background: #000;

        overflow: hidden;

        margin: 0;

        padding: 0;
    }


    .invitation-frame {
        width: 100vw;

        height: 100dvh;

        max-width: 100vw;

        max-height: 100dvh;

        aspect-ratio: auto;

        position: relative;

        overflow: hidden;

        background: #000;

        flex-shrink: 0;
    }


    .wedding-video {
        position: absolute;

        inset: 0;

        width: 100%;

        height: 100%;

        object-fit: cover;

        object-position: center center;

        display: block;

        background: #000;
    }


    /* =====================================
       COVER MOBILE
    ====================================== */

    .first-cover {
        width: 100vw;

        height: 100dvh;

        min-height: 100dvh;

        display: flex;

        align-items: center;

        justify-content: center;
    }


    .first-cover img {
        width: 100vw;

        height: 177.7777778vw;

        max-height: 100dvh;

        max-width: 100vw;

        aspect-ratio: 9 / 16;

        object-fit: cover;

        object-position: center center;
    }


    /* =====================================
       TAP TEXT
    ====================================== */

    .tap-text {
        font-size: 14px;

        padding: 10px 19px;

        letter-spacing: 2px;
    }


    /* =====================================
       MUSIC BUTTON
    ====================================== */

    .music-button {
        top: 15px;

        right: 15px;

        padding: 8px 12px;

        font-size: 9px;

        letter-spacing: .8px;
    }


    /* =====================================
       SAVE DATE
    ====================================== */

    .save-date-wrapper {
        width: 90%;

        top: 52%;

        left: 50%;

        transform:
            translate(-50%, -50%);
    }


    .save-title {
        font-size: 17px;

        letter-spacing: 1.8px;

        margin-bottom: 20px;
    }


    /* =====================================
       SCRATCH BOX
    ====================================== */

    .scratch-box {
        width: 225px;

        height: 52px;

        border-radius: 8px;
    }


    .date-line {
        gap: 7px;

        font-size: 12px;
    }


    .date-divider {
        font-size: 12px;
    }


    #scratchCanvas {
        width: 100%;

        height: 100%;

        touch-action: none;

        cursor: pointer;
    }


    /* =====================================
       COUNTDOWN
    ====================================== */

    .countdown {
        margin-top: 22px;

        gap: 5px;
    }


    .time-box {
        min-width: 32px;
    }


    .time-box strong {
        font-size: 18px;

        line-height: 1;
    }


    .time-box span {
        font-size: 5px;

        margin-top: 3px;
    }


    .separator {
        font-size: 12px;

        line-height: 18px;
    }


    /* =====================================
       VENUE MOBILE
    ====================================== */

    .venue-button {
        bottom: 51%;

        padding: 9px 24px;

        font-size: 10px;

        letter-spacing: 1.5px;
    }

}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 380px) {

    .scratch-box {
        width: 215px;

        height: 50px;
    }


    .date-line {
        font-size: 11px;

        gap: 6px;
    }


    .save-title {
        font-size: 16px;
    }


    .countdown {
        gap: 4px;
    }

}


/* =========================================
   LANDSCAPE PHONE
========================================= */

@media (
    max-height: 500px
) and (
    orientation: landscape
) {

    .first-cover img {
        width: auto;

        height: 100dvh;

        aspect-ratio: 9 / 16;

        object-fit: cover;

        background: #000;
    }


    .invitation-frame {
        height: 100dvh;

        width: auto;

        aspect-ratio: 9 / 16;
    }

}