@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn/Vazirmatn[wght].woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    font-family: "Vazirmatn", Tahoma, sans-serif;
    color: #fff8ed;
    background: #242424;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100dvh;
    overflow: hidden;
    background: #242424;
}

.splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(7, 7, 7, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 1;
    transition: opacity 700ms ease, visibility 700ms ease;
}

.splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.splash-logo {
    display: block;
    width: min(190px, 48vw);
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

.splash-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
}

.scene {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex: 0 0 100vw;
    overflow: hidden;
    isolation: isolate;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

@media (min-width: 600px) {
    body {
        align-items: center;
    }

    .scene {
        width: 440px;
        height: 956px;
        flex-basis: 440px;
        aspect-ratio: 9 / 16;
    }
}

.shade {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    z-index: -1;
    background: #fff;
}

.intro {
    position: absolute;
    top: 52px;
    right: 28px;
    left: 28px;
    text-align: center;
    text-shadow: 0 2px 12px rgba(30, 16, 9, 0.75);
}

.eyebrow,
.caption,
h1 {
    margin: 0;
}

.eyebrow {
    color: #f4cf9e;
    font-size: 11px;
    letter-spacing: 0;
}

h1 {
    margin-top: 8px;
    color: #fff3dc;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.5;
}

.caption {
    margin-top: 3px;
    color: rgba(255, 246, 228, 0.88);
    font-size: 12px;
}

.letter-hint {
    position: absolute;
    left: 1vw;
    bottom: 12vh;
    z-index: 2;
    width: 42%;
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.62);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.28);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
}

.letter-hint.is-ready {
    animation: letter-hint-pulse 2.2s ease-out infinite;
}

.music-toggle {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: 50%;
    color: #fff;
    background: rgba(35, 35, 35, 0.48);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    font-size: 17px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 220ms ease, transform 220ms ease, background 180ms ease;
}

.music-toggle.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.music-toggle:hover,
.music-toggle:focus-visible {
    background: rgba(35, 35, 35, 0.72);
}

.letter {
    position: absolute;
    right: auto;
    bottom: 16vh;
    left: 4vw;
    z-index: 1;
    width: 130px;
    height: auto;
    filter: drop-shadow(7px 12px 8px rgba(25, 12, 5, 0.45));
    transform: rotate(-7deg);
    cursor: pointer;
    animation: letter-fade-in 2s ease 2s both;
    transition: transform 180ms ease;
}

.letter-video {
    position: absolute;
    right: auto;
    bottom: 29vh;
    right: 11vw;
    z-index: 0;
    width: 42vw;
    height: 24.5vh;
    pointer-events: none;
    object-fit: cover;
    transform: rotate(0deg);
}

.scene-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    object-fit: cover;
}

.letter:hover,
.letter:focus-visible {
    transform: rotate(-7deg) translateY(-7px);
}

@media (max-width: 375px)and (max-height: 667px){
    .letter-video {
        right: 19vw;
        bottom: 31vh;
        width: 33vw;
        height: 25vh;
    }
}

@media (min-width: 600px) {
    .letter {
        bottom: 16%;
    }

    .letter-video {
        right: 11%;
        bottom: 31.5%;
        width: 42%;
        height: 24.5%;
    }
}

.modal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 12, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 86%;
    overflow: hidden;
    padding: 34px 24px 26px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    color: #fff;
    background: rgba(55, 35, 27, 0.54);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
    text-align: right;
    scrollbar-color: rgba(255, 255, 255, 0.55) transparent;
}

.modal-card h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 20px;
    line-height: 1.6;
}

.modal-text {
    min-height: 0;
    max-height: none;
    padding-bottom: 24px;
    overflow-y: auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 2.1;
}

.modal-text p {
    margin: 0 0 5px;
}

.modal-text p:last-child {
    margin-bottom: 0;
}

.modal-close {
    position: absolute;
    top: 9px;
    left: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    cursor: pointer;
    font: inherit;
    font-size: 25px;
    line-height: 28px;
}

.modal-close:hover,
.modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.25);
}

@keyframes letter-fade-in {
    from {
        opacity: 0;
        transform: rotate(-7deg) translateY(-24px);
    }

    to {
        opacity: 1;
        transform: rotate(-7deg) translateY(0);
    }
}

@keyframes letter-hint-pulse {
    0% {
        opacity: 0;
        transform: scale(0.28);
    }

    18% {
        opacity: 0.62;
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}