* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink: #ffc6d7;
    --pink-light: #fff0f5;
    --rose: #e83d68;
    --rose-dark: #9e1e42;
    --red: #c92750;
    --white: #fffafd;
    --muted: #cdb6bf;
    --dark: #080508;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--dark);
}

body {
    color: var(--white);
    font-family: "DM Sans", sans-serif;
    -webkit-tap-highlight-color: transparent;
}


/* =========================
   FILM GRAIN
========================= */

.grain {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.035;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* =========================
   TOP BAR
========================= */

.topbar {
    position: fixed;
    z-index: 2000;

    top: 20px;
    left: 22px;
    right: 22px;

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

    font-size: 8px;
    letter-spacing: 0.28em;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.65);
}

#counter {
    color: var(--pink);
}


/* =========================
   PROGRESS
========================= */

.progress-track {
    position: fixed;
    z-index: 2000;

    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background: rgba(255, 255, 255, 0.1);
}

#progress {
    width: 4%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--rose-dark),
            var(--pink)
        );

    transition: width 0.6s ease;
}


/* =========================
   SCENES
========================= */

.scene {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

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

    padding: 80px 25px 115px;

    opacity: 0;
    visibility: hidden;

    transform: scale(1.035);

    transition:
        opacity 0.65s ease,
        transform 1s cubic-bezier(0.2, 0.7, 0.2, 1),
        visibility 0.65s ease;

    overflow: hidden;
}

.scene.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}


/* =========================
   CONTENT
========================= */

.scene-content {
    position: relative;
    z-index: 5;

    width: min(800px, 100%);

    text-align: center;
}

.eyebrow {
    margin-bottom: 34px;

    color: var(--pink);

    font-size: 8px;
    font-weight: 500;

    letter-spacing: 0.5em;
    text-transform: uppercase;
}

h1,
h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 500;
}

p {
    color: var(--muted);

    font-size: 14px;
    line-height: 1.9;
}


/* =========================
   INTRO
========================= */

.intro {
    background:
        radial-gradient(
            circle at 50% 42%,
            #471628 0%,
            #1d0a12 42%,
            #080508 100%
        );
}

.vanya-title {
    font-family: "Cormorant Garamond", serif;

    font-size: clamp(90px, 23vw, 240px);

    line-height: 0.62;
    letter-spacing: -0.08em;

    color: transparent;

    background:
        linear-gradient(
            125deg,
            #ffffff 5%,
            #ffe0e9 40%,
            #f37b99 72%,
            #d62f59 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    text-shadow:
        0 20px 80px rgba(232, 61, 104, 0.18);
}

.rose-line {
    width: 60px;
    height: 1px;

    margin: 48px auto 32px;

    background: var(--rose);
}

.intro-text {
    font-family: "Cormorant Garamond", serif;

    font-size: clamp(24px, 5vw, 40px);

    line-height: 1.05;

    color: var(--white);
}

.intro-hint {
    margin-top: 38px;

    font-size: 8px;
    letter-spacing: 0.35em;

    color: rgba(255, 255, 255, 0.35);
}


/* =========================
   STORY SCENES
========================= */

.story {
    background:
        radial-gradient(
            circle at 50% 35%,
            #35121e,
            #12070d 55%,
            #080508
        );
}

.story h2 {
    margin-bottom: 34px;

    font-size: clamp(60px, 12vw, 125px);

    line-height: 0.82;

    letter-spacing: -0.05em;
}

.giant-number {
    margin-bottom: 45px;

    font-family: "Cormorant Garamond", serif;

    font-size: clamp(130px, 30vw, 290px);

    line-height: 0.55;

    color: transparent;

    -webkit-text-stroke: 1px var(--rose);

    opacity: 0.85;
}


/* =========================
   PHOTO SCENES
========================= */

.photo {
    padding: 70px 20px 115px;
    background:
        radial-gradient(
            circle at center,
            #4a1729 0%,
            #1b0911 55%,
            #080508 100%
        );
}

.photo img {
    position: absolute;

    width: min(78vw, 420px);
    height: min(62vh, 540px);

    left: 50%;
    top: 45%;

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

    object-fit: cover;

    border: 7px solid #fffafd;
    border-radius: 4px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 198, 215, 0.5),
        0 0 45px rgba(232, 61, 104, 0.18);

    filter:
        saturate(1.12)
        contrast(1.02)
        brightness(0.98);

    transition:
        transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo.active img {
    transform: translate(-50%, -50%) scale(1);
}

.photo::before {
    content: "";

    position: absolute;

    width: 330px;
    height: 330px;

    left: 50%;
    top: 45%;

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

    background: #e83d68;
    opacity: 0.12;

    filter: blur(90px);
    border-radius: 50%;
}

.photo-overlay {
    position: absolute;

    left: 50%;
    top: 45%;

    width: min(78vw, 420px);
    height: min(62vh, 540px);

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

    background:
        linear-gradient(
            to bottom,
            transparent 55%,
            rgba(8, 5, 8, 0.25)
        );

    pointer-events: none;
}

.photo-text {
    position: absolute;

    z-index: 10;

    left: 20px;
    right: 20px;
    bottom: 28px;

    text-align: center;
}

.photo-text span {
    display: block;

    margin-bottom: 8px;

    color: var(--pink);

    font-size: 7px;
    letter-spacing: 0.35em;
}

.photo-text h2 {
    font-size: clamp(30px, 7vw, 58px);
    line-height: 0.85;
    letter-spacing: -0.04em;

    text-shadow:
        0 8px 30px rgba(0, 0, 0, 0.7);
}


/* =========================
   PHOTO OVERLAY
========================= */

.photo-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.04) 0%,
            rgba(0, 0, 0, 0.02) 40%,
            rgba(8, 5, 8, 0.88) 100%
        );
}


/* =========================
   PHOTO TEXT
========================= */

.photo-text {
    position: absolute;
    z-index: 10;

    left: 20px;
    right: 20px;
    bottom: 112px;

    text-align: center;
}

.photo-text span {
    display: block;

    margin-bottom: 22px;

    color: var(--pink);

    font-size: 8px;
    letter-spacing: 0.4em;
}

.photo-text h2 {
    font-size: clamp(48px, 11vw, 110px);

    line-height: 0.82;

    letter-spacing: -0.045em;

    text-shadow:
        0 12px 45px rgba(0, 0, 0, 0.7);
}


/* =========================
   BREAD
========================= */

.bread {
    margin-top: 20px;

    font-family: "Cormorant Garamond", serif;

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

    line-height: 0.7;

    color: var(--pink);

    text-shadow:
        0 0 40px rgba(255, 198, 215, 0.35);
}


/* =========================
   MIDNIGHT
========================= */

.midnight {
    background:
        radial-gradient(
            circle at center,
            #421526 0%,
            #180810 48%,
            #080508 100%
        );
}

.time {
    margin-bottom: 48px;

    color: #e6c9ae;

    font-size: 9px;
    letter-spacing: 0.55em;
}

.quote {
    margin-bottom: 45px;

    font-family: "Cormorant Garamond", serif;

    font-size: clamp(48px, 10vw, 105px);

    line-height: 0.82;

    color: var(--white);
}


/* =========================
   FINAL SCENE
========================= */

.finale {
    background:
        radial-gradient(
            circle at 50% 45%,
            #55172e 0%,
            #1a0810 50%,
            #080508 100%
        );
}

.heart {
    margin-bottom: 28px;

    color: var(--rose);

    font-size: 58px;

    animation:
        heartbeat 1.7s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);

        text-shadow:
            0 0 35px rgba(232, 61, 104, 0.7);
    }
}

.finale h2 {
    font-size: clamp(65px, 13vw, 135px);

    line-height: 0.8;

    letter-spacing: -0.05em;
}

.final-line {
    width: 60px;
    height: 1px;

    margin: 38px auto;

    background: var(--pink);
}

.final-name {
    margin-top: 38px;

    font-family: "Cormorant Garamond", serif;

    font-size: clamp(28px, 6vw, 52px);

    color: var(--pink);
}


/* =========================
   BUTTON CONTROLS
========================= */

.controls {
    position: fixed;
    z-index: 3000;

    left: 50%;
    bottom: 22px;

    transform: translateX(-50%);

    width: min(430px, calc(100% - 30px));

    display: flex;
    gap: 10px;
}

.controls button {
    height: 57px;

    border-radius: 999px;

    font-family: "DM Sans", sans-serif;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.back {
    width: 57px;

    flex-shrink: 0;

    border: 1px solid rgba(255, 198, 215, 0.5);

    background: rgba(18, 7, 13, 0.88);

    color: var(--pink);

    font-size: 21px;

    backdrop-filter: blur(18px);
}

.next {
    flex: 1;

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

    gap: 20px;

    border: 1px solid rgba(255, 255, 255, 0.55);

    background:
        linear-gradient(
            135deg,
            var(--rose-dark),
            var(--rose)
        );

    color: white;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.16em;

    box-shadow:
        0 12px 38px rgba(201, 39, 80, 0.35),
        0 0 25px rgba(232, 61, 104, 0.15);
}

.next .arrow {
    font-size: 19px;
}

.next:hover {
    transform: translateY(-3px);

    box-shadow:
        0 18px 48px rgba(201, 39, 80, 0.48);
}

.back:hover {
    transform: translateY(-3px);
}

.controls button:active {
    transform: scale(0.95);
}


/* =========================
   SWIPE HINT
========================= */

.swipe-hint {
    position: fixed;
    z-index: 2000;

    left: 50%;
    bottom: 6px;

    transform: translateX(-50%);

    color: rgba(255, 255, 255, 0.28);

    font-size: 6px;

    letter-spacing: 0.35em;
}


/* =========================
   FLOATING HEARTS
========================= */

#hearts {
    position: fixed;
    inset: 0;

    z-index: 1500;

    pointer-events: none;
}

.floating-heart {
    position: fixed;

    bottom: -30px;

    color: var(--pink);

    font-size: 14px;

    opacity: 0;

    pointer-events: none;

    animation:
        floatHeart linear forwards;
}

@keyframes floatHeart {

    0% {
        opacity: 0;

        transform:
            translateY(0)
            translateX(0)
            rotate(0deg);
    }

    12% {
        opacity: 0.65;
    }

    100% {
        opacity: 0;

        transform:
            translateY(-110vh)
            translateX(var(--drift))
            rotate(35deg);
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .topbar {
        top: 17px;
        left: 17px;
        right: 17px;
    }

    .scene {
        padding:
            70px 20px 105px;
    }

    .vanya-title {
        font-size: 27vw;
    }

    .intro-text {
        font-size: 27px;
    }

    .story h2 {
        font-size: 16vw;
    }

    .photo-text {
        bottom: 108px;
    }

    .photo-text h2 {
        font-size: 13vw;
    }

    .controls {
        bottom: 18px;
    }

    .controls button {
        height: 58px;
    }
}
