@font-face {
    font-family: "Handwriting";
    src: url("fonts/Alexhandwriting-Regular.otf") format("opentype");
}

@font-face {
    font-family: "Abril";
    src: url("fonts/AbrilFatface-Regular.ttf") format("truetype");
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 300vh;
    background: #f7bed0;
}

.home {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 200vh;

    overflow: visible;

    z-index: 0;
}

/* contains all moving columns */
.wallpaper {
    position: absolute;

    top: -20vh;
    left: -10vw;

    display: flex;

    width: 120vw;
    height: calc(100% + 40vh);

    overflow: hidden;

    background: #f7bed0;

    transform: rotate(7deg);
    transform-origin: center;
}

.text-column {
    flex: 1;

    height: 100%;

    overflow: hidden;

    display: flex;
    justify-content: center;

    margin: 0 -10px;
}

.track {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 0;

    will-change: transform;
}

.track span {
    font-family: "Abril", serif;
    text-shadow: 4px 4px 1px rgba(180, 70, 110, 0.25);

    font-size: clamp(90px, 11vw, 170px);
    user-select: none;

    line-height: 0.68;

    color: #f28eae;

    opacity: 0.15;

    writing-mode: vertical-rl;
    text-orientation: mixed;

    white-space: nowrap;
}

/* ---------------------
   MOVEMENT
--------------------- */

.up .track {
    animation-name: move-up;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.down .track {
    animation-name: move-down;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.slow .track {
    animation-duration: 24s;
}

.medium .track {
    animation-duration: 18s;
}

.fast .track {
    animation-duration: 14s;
}

.text-column:nth-child(2) .track {
    animation-delay: -7s;
}

.text-column:nth-child(3) .track {
    animation-delay: -12s;
}

.text-column:nth-child(4) .track {
    animation-delay: -3s;
}

.text-column:nth-child(5) .track {
    animation-delay: -9s;
}

.text-column:nth-child(6) .track {
    animation-delay: -15s;
}

.text-column:nth-child(7) .track {
    animation-delay: -5s;
}

@keyframes move-up {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-500px);
    }
}

@keyframes move-down {
    from {
        transform: translateY(-500px);
    }

    to {
        transform: translateY(0);
    }
}

/* ---------------------
   HEARTS
--------------------- */

.heart-emitter {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

.heart-particle {
    position: absolute;

    user-select: none;
    -webkit-user-select: none;

    pointer-events: none;

    z-index: 9999;

    animation: heart-animation var(--duration) ease-in-out forwards;
}

.heart-symbol {
    display: block;

    color: #ed4b4b;

    transform-origin: center;

    animation: heart-spin var(--spin-speed) linear infinite;

    text-shadow:
        0 0 4px rgba(255, 100, 150, 0.9),
        0 0 10px rgba(236, 73, 73, 0.6),
        0 0 20px rgba(245, 14, 14, 0.3);
}

@keyframes heart-animation {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    30% {
        opacity: var(--heart-opacity);
        transform: scale(var(--heart-scale));
    }

    70% {
        opacity: var(--heart-opacity);
        transform: scale(var(--heart-scale));
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes heart-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ---------------------
   INTRO
--------------------- */

.intro-text {
    position: absolute;

    top: 50vh;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index: 10;

    width: 100%;

    text-align: center;

    pointer-events: none;
}

.intro-message {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 100%;

    font-family: "Abril", serif;

    font-size: clamp(55px, 8vw, 130px);

    line-height: 0.9;

    color: #fff3fd;

    text-shadow: 3px 3px 1px rgba(180, 70, 110, 0.2);

    opacity: 0;
}

.message-name {
    animation: intro-fade 4s ease-in-out 0s forwards;
}

.message-vietnamese {
    animation: intro-fade 4s ease-in-out 4s forwards;
}

.message-birthday {
    animation: intro-fade-final 4s ease-in-out 8s forwards;
}

@keyframes intro-fade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.96);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.02);
    }
}

@keyframes intro-fade-final {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.96);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes arrow-fade-final {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

.bottom-image {
    position: absolute;

    left: 40%;
    top: 95vh;

    transform: translate(-50%, -100%);

    width: 50px;
    height: auto;

    z-index: 999;

    opacity: 0;
}

.pst {
    position: absolute;

    left: 50%;
    top: 90vh;

    transform: translate(-50%, -100%);

    font-family: "Handwriting", serif;

    font-size: 25px;

    line-height: 0.9;

    color: #fff3fd;

    z-index: 999;

    opacity: 0;
}

.arrow-animation {
    animation: arrow-fade-final 4s ease-in-out 20s forwards;
}

/* ---------------------
   TOP BANNER
--------------------- */

.top-banner {
    position: absolute;

    top: 5px;
    left: 0;

    width: 100%;
    height: 55px;

    overflow: hidden;

    z-index: 20;

    display: flex;
    align-items: center;
}

.banner-message {
    font-family: "Handwriting", serif;

    font-size: 32px;
    color: #ffffff;

    white-space: nowrap;

    transform: translateX(100vw);

    animation: banner-scroll 40s linear forwards 5s;
}

@keyframes banner-scroll {
    from {
        transform: translateX(100vw);
    }

    to {
        transform: translateX(-100%);
    }
}

/* ---------------------
   SECURITY GATE / EYEBROW
--------------------- */

/*
   This section is outside .home on purpose.
   That means .home can stay exactly 140vh tall without breaking the emoji animation.
*/
.gate-section {
    position: absolute;

    top: 100vh;
    left: 0;

    width: 100%;
    height: 160vh;

    pointer-events: none;
    z-index: 20000;
}

/*
   Fixed is intentional here. The JS decides when this stage is visible.
   That guarantees the emoji is ALWAYS centred in the actual viewport,
   instead of being pushed upward by the 140vh .home element.
*/
.eyebrow-stage {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    pointer-events: none;

    visibility: hidden;

    z-index: 20000;
}

.eyebrow-stage.active {
    visibility: visible;
}

.eyebrow-emoji {
    font-size: 100px;
    line-height: 1;

    transform: scale(0);
    transform-origin: center center;

    will-change: transform;

    user-select: none;
    -webkit-user-select: none;
}


/* detah screen */

.death-screen {

    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    background: white;

    z-index: 999999;

    display: none;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    text-align: center;

    overflow: hidden;

}


.death-screen.active {

    display: flex;

}


/* hide original website when dead */

body.dead .home,
body.dead .gate-section {

    display: none;

}


.cursed-photo {

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0.25;

    filter:
        grayscale(100%)
        contrast(200%)
        brightness(70%);

}


.death-text {

    position: relative;

    z-index: 2;

    color: black;

}


.death-text h1 {

    font-family: "Abril", serif;

    font-size: clamp(50px, 8vw, 120px);

    color: red;

    letter-spacing: 8px;

}


.death-text p {

    font-family: "Handwriting", serif;

    font-size: 35px;

    line-height: 1.3;

}


.death-text button {

    margin-top: 40px;

    padding: 15px 40px;

    background: black;

    color: white;

    border: none;

    cursor: pointer;

    font-size: 20px;

}