/* =========================================
   3 YEARS, 1 LOVE
   Vindra for Gita Cantik
   COMPLETE RESPONSIVE DESIGN
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600&family=Great+Vibes&display=swap');

:root {
    --background: #160d18;
    --pink: #e8a9ba;
    --soft-pink: #f4cbd5;
    --cream: #fff1e6;
    --gold: #d8b58a;
    --white: #ffffff;
    --muted: rgba(255,255,255,0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--background);
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

#app {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* =========================================
   SISTEM SCENE
========================================= */

.scene {
    display: none;
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    opacity: 0;
}

.scene.active {
    display: flex;
    animation: sceneAppear 0.8s ease forwards;
}

@keyframes sceneAppear {
    from {
        opacity: 0;
        transform: scale(1.015);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* =========================================
   BACKGROUND
========================================= */

#openingScene,
#passwordScene,
#memoryDoorScene,
#galleryScene {
    justify-content: center;
    align-items: center;
    text-align: center;

    background:
        radial-gradient(
            ellipse at 50% 40%,
            rgba(111,48,91,0.38),
            transparent 60%
        ),
        linear-gradient(
            135deg,
            #160d18,
            #241222,
            #100b17
        );
}

/* =========================================
   BINTANG
========================================= */

.star-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff4e8;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffffff;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.7);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* =========================================
   OPENING
========================================= */

.opening-content {
    position: relative;
    z-index: 2;
    width: min(90%, 750px);
    padding: 45px 20px;
    margin: auto;
    animation: fadeUp 1.5s ease forwards;
}

.opening-subtitle {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1.8;
    margin-bottom: 35px;
}

.opening-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(65px, 11vw, 120px);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -3px;
    color: var(--cream);
}

.opening-content h1 span {
    font-family: 'Great Vibes', cursive;
    color: var(--pink);
    font-size: 1.05em;
    font-weight: 400;
    letter-spacing: 0;
}

.opening-dedication {
    margin-top: 35px;
    color: var(--soft-pink);
    font-family: 'Cormorant Garamond', serif;
    font-size: 25px;
    letter-spacing: 2px;
}

.opening-decoration {
    margin: 25px 0;
    color: var(--pink);
    font-size: 35px;
    animation: heartbeat 1.8s infinite ease-in-out;
}

.opening-footer {
    margin-top: 55px;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    letter-spacing: 2px;
}

/* =========================================
   TOMBOL UMUM
========================================= */

.start-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    max-width: 100%;
    min-height: 48px;
    margin-top: 25px;
    padding: 14px 30px;

    border: 1px solid rgba(232,169,186,0.7);
    border-radius: 50px;

    background: rgba(232,169,186,0.08);
    color: var(--cream);

    font-size: 13px;
    letter-spacing: 1px;

    cursor: pointer;
    transition: all 0.3s ease;
}

.start-button span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.start-button:hover:not(:disabled) {
    background: var(--pink);
    color: #241222;
    box-shadow: 0 0 30px rgba(232,169,186,0.35);
    transform: translateY(-3px);
}

.start-button:hover span {
    transform: translateX(5px);
}

.start-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================
   PASSWORD
========================================= */

#passwordScene {
    background:
        radial-gradient(
            circle at center,
            rgba(116,48,91,0.35),
            transparent 65%
        ),
        linear-gradient(
            135deg,
            #160d18,
            #281326,
            #100b17
        );
}

.password-content {
    position: relative;
    z-index: 2;
    width: min(90%, 650px);
    padding: 40px 20px;
    margin: auto;
    animation: fadeUp 1.2s ease;
}

.lock-icon {
    font-size: 55px;
    margin-bottom: 25px;
    animation: heartbeat 2s infinite;
}

.password-subtitle {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.password-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(32px, 6vw, 52px);
    font-weight: 500;
    line-height: 1.2;
    color: var(--cream);
}

.password-content h2 span {
    color: var(--pink);
    font-style: italic;
}

.password-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    margin-top: 20px;
}

.password-inputs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 35px 0 20px;
}

.password-inputs input {
    width: 48px;
    height: 58px;

    border: 1px solid rgba(232,169,186,0.55);
    border-radius: 12px;

    background: rgba(255,255,255,0.05);
    color: var(--cream);

    text-align: center;
    font-size: 24px;
    outline: none;

    transition: all 0.3s ease;
}

.password-inputs input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 15px rgba(232,169,186,0.35);
    transform: translateY(-3px);
}

.password-message {
    min-height: 25px;
    margin-top: 18px;
    color: var(--pink);
    font-size: 13px;
    line-height: 1.6;
}

/* =========================================
   PINTU KENANGAN
========================================= */

#memoryDoorScene {
    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(153,75,112,0.35),
            transparent 55%
        ),
        linear-gradient(
            135deg,
            #160d18,
            #2b1729,
            #100b17
        );
}

.memory-door-content {
    position: relative;
    z-index: 2;
    width: min(90%, 650px);
    padding: 35px 20px;
    margin: auto;
    animation: fadeUp 1.2s ease;
}

.door-subtitle {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.memory-door-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 500;
    line-height: 1.2;
    color: var(--cream);
}

.memory-door-content h2 span {
    display: block;
    color: var(--pink);
    font-style: italic;
}

.memory-door {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 35px auto;
}

.door-frame {
    position: relative;
    width: 155px;
    height: 230px;

    border: 3px solid var(--gold);
    border-radius: 85px 85px 5px 5px;

    background:
        linear-gradient(
            145deg,
            #75415b,
            #321b32,
            #170e1c
        );

    box-shadow:
        0 0 15px rgba(216,181,138,0.4),
        0 0 45px rgba(232,169,186,0.2),
        inset 0 0 25px rgba(0,0,0,0.6);

    animation: doorGlow 3s infinite ease-in-out;
}

.door-frame::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(216,181,138,0.6);
    border-radius: 75px 75px 2px 2px;
}

.door-knob {
    position: absolute;
    right: 22px;
    top: 55%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold);
}

.door-heart {
    position: absolute;
    top: 43%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--pink);
    font-size: 38px;
    animation: heartbeat 2s infinite;
}

@keyframes doorGlow {
    0%, 100% {
        box-shadow:
            0 0 15px rgba(216,181,138,0.3),
            0 0 35px rgba(232,169,186,0.15);
    }

    50% {
        box-shadow:
            0 0 25px rgba(216,181,138,0.65),
            0 0 60px rgba(232,169,186,0.35);
    }
}

.door-description {
    max-width: 420px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

/* =========================================
   GALERI KENANGAN
========================================= */

#galleryScene {
    display: none;
    justify-content: flex-start;
    align-items: center;
    text-align: center;

    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;

    padding: 20px 0 35px;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;

    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(153,75,112,0.3),
            transparent 60%
        ),
        linear-gradient(
            135deg,
            #160d18,
            #291626,
            #100b17
        );
}

#galleryScene.active {
    display: flex;
}

.gallery-content {
    width: min(90%, 650px);
    padding: 15px 20px 25px;
    margin: auto;
    flex-shrink: 0;
    animation: fadeUp 1.2s ease;
}

.gallery-subtitle {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.gallery-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(34px, 6vw, 54px);
    font-weight: 500;
    line-height: 1.1;
    color: var(--cream);
}

.gallery-content h2 span {
    display: block;
    color: var(--pink);
    font-style: italic;
}

.gallery-description {
    max-width: 420px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

/* BINGKAI FOTO */

.gallery-frame {
    width: min(100%, 320px);
    margin: 20px auto 12px;
    padding: 10px 10px 16px;

    background: var(--cream);
    transform: rotate(-2deg);

    box-shadow:
        0 15px 45px rgba(0,0,0,0.4),
        0 0 25px rgba(232,169,186,0.15);

    transition: transform 0.5s ease;
}

.gallery-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.gallery-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #382538;
}

.gallery-photo img {
    position: relative;
    z-index: 2;

    display: block;
    width: 100%;
    height: 100%;

    object-fit: contain;

    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-photo img.changing {
    opacity: 0;
    transform: scale(0.96);
}

/* PLACEHOLDER FOTO */

.photo-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;

    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;

    background:
        radial-gradient(circle, #59384e, #251626);

    color: var(--soft-pink);
}

.photo-placeholder span {
    font-family: 'Great Vibes', cursive;
    font-size: 60px;
}

.photo-placeholder p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
}

/* CAPTION FOTO */

.photo-caption {
    color: #57394a;
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    line-height: 1.4;
    margin-top: 10px;
}

/* =========================================
   NAVIGASI GALERI
========================================= */

.gallery-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;

    width: 100%;
    min-height: 48px;

    margin: 14px auto;
}

.gallery-navigation button {
    flex-shrink: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 44px;
    height: 44px;

    border: 1px solid var(--pink);
    border-radius: 50%;

    background: rgba(232,169,186,0.06);
    color: var(--cream);

    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-navigation button:hover {
    background: var(--pink);
    color: #241222;
    transform: scale(1.08);
}

.gallery-navigation button:active {
    transform: scale(0.95);
}

#photoCounter {
    min-width: 65px;
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 2px;
}

#galleryScene .start-button {
    margin-top: 8px;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 768px) {

    .opening-subtitle {
        letter-spacing: 2px;
    }

    .gallery-content {
        width: 94%;
    }

}

/* =========================================
   HP
========================================= */

@media (max-width: 450px) {

    .opening-content {
        padding: 25px 15px;
    }

    .opening-subtitle {
        font-size: 10px;
        letter-spacing: 2px;
        margin-bottom: 25px;
    }

    .opening-content h1 {
        font-size: clamp(58px, 17vw, 85px);
    }

    .opening-dedication {
        font-size: 21px;
    }

    .opening-footer {
        margin-top: 35px;
    }

    .start-button {
        padding: 13px 22px;
        font-size: 12px;
    }

    .password-content {
        padding: 30px 12px;
    }

    .password-inputs {
        gap: 7px;
    }

    .password-inputs input {
        width: 42px;
        height: 52px;
        font-size: 20px;
    }

    .memory-door-content {
        padding: 25px 15px;
    }

    .door-frame {
        width: 135px;
        height: 205px;
    }

    /* GALERI HP */

    #galleryScene {
        padding: 12px 0 24px;
        min-height: 100dvh;
    }

    .gallery-content {
        width: 100%;
        padding: 8px 12px 20px;
        margin: auto;
    }

    .gallery-subtitle {
        font-size: 10px;
        letter-spacing: 3px;
        margin-bottom: 7px;
    }

    .gallery-content h2 {
        font-size: clamp(30px, 8vw, 36px);
        line-height: 1.05;
    }

    .gallery-description {
        max-width: 340px;
        padding: 0 8px;
        font-size: 12px;
        line-height: 1.5;
        margin-top: 7px;
    }

    .gallery-frame {
        width: min(65vw, 235px);
        margin: 12px auto 7px;
        padding: 8px 8px 11px;
    }

    .gallery-photo {
        aspect-ratio: 1 / 1;
    }

    .photo-caption {
        font-size: 15px;
        line-height: 1.3;
        margin-top: 7px;
    }

    .gallery-navigation {
        gap: 20px;
        min-height: 44px;
        margin: 8px auto;
    }

    .gallery-navigation button {
        width: 42px;
        height: 42px;
        font-size: 19px;
    }

    #photoCounter {
        min-width: 60px;
        font-size: 11px;
    }

    #galleryScene .start-button {
        margin-top: 5px;
    }

}

/* =========================================
   HP DENGAN LAYAR PENDEK
========================================= */

@media (max-width: 450px) and (max-height: 750px) {

    #galleryScene {
        padding-top: 8px;
    }

    .gallery-content {
        padding-top: 5px;
        padding-bottom: 16px;
    }

    .gallery-frame {
        width: min(58vw, 205px);
        margin-top: 9px;
    }

    .gallery-navigation {
        margin: 6px auto;
    }

    .gallery-description {
        margin-top: 5px;
    }

}

/* =========================================
   LAPTOP DENGAN LAYAR PENDEK
========================================= */

@media (min-width: 451px) and (max-height: 650px) {

    .opening-content {
        padding: 20px;
    }

    .opening-subtitle {
        margin-bottom: 15px;
    }

    .opening-dedication {
        margin-top: 18px;
    }

    .opening-decoration {
        margin: 12px 0;
    }

    .opening-footer {
        margin-top: 20px;
    }

    .memory-door {
        margin: 20px auto;
    }

    .door-frame {
        width: 120px;
        height: 175px;
    }

    .gallery-frame {
        width: min(100%, 240px);
        margin: 12px auto;
    }

    .gallery-description {
        margin-top: 8px;
    }

}

/* =========================================
   AKSESIBILITAS
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}