@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

section {
    width: 100%;
}

@keyframes zoomFade2x {
  0% {
    transform: translateY(33%) scale(1.7);
    opacity: 0;
  }
  50% {
    transform: translateY(33%) scale(1.7);
    opacity: 0;
  }
  100% {
    transform: translateY(33%) scale(2);
    opacity: 0.4;
  }
}
@keyframes zoomFade3x {
  0% {
    transform: scale(1.4);
    opacity: 0.4;
  }
  100% {
    transform: scale(3.5);
    opacity: 0.6;
  }
}

@keyframes zoomInText {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  25% {
    transform: scale(0.1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideLeftRight {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes slideRightLeft {
  0% {
    transform: translateX(10%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(10%);
  }
}

.slide-left {
    animation: slideLeft 1s ease-in-out;
}

.slide-right {
    animation: slideRight 1s ease-in-out;
}

.slide-left-bouquet {
    animation: slideLeft 1s ease-in-out;
    top: 45%;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.scroll-down-btn {
    animation: floating 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulseZoom {
    0%, 100% { 
        transform: scale(3); 
        opacity: 0.6;
    }
    50% { 
        transform: scale(3.05); 
        opacity: 0.5;
    }
}

.top-ornament {
    position: absolute;
    overflow: hidden;
    width: 100%;   
    z-index: -1;
    top: -3%;
}
.gift-ornament {
    position: absolute;
    overflow: hidden;
    width: 100%;   
    z-index: -1;
    top: -3%;
}
.bottom-ornament {
    position: absolute;
    width: 100%;
    overflow: hidden;
    z-index: -1; 
} 

.bottom-ornament1 {
    position: absolute;
    width: 100%;
    bottom: 0;
    overflow: hidden;
    z-index: -1; 
} 

.bottom-ornament1 img {
    animation: pulse 3s ease-in-out infinite;
    width: 100%;
}

.bottom-ornament2 {
    position: absolute;
    width: 100%;
    bottom: -45px;
    overflow: hidden;
    z-index: -1; 
} 

.bottom-ornament2 img {
    animation: slideRightLeft 8s ease-in-out infinite;
    width: 100%;
}

.bottom-ornament3 {
    position: absolute;
    width: 100%;
    bottom: -20px;
    overflow: hidden;
    z-index: -1; 
} 

.bottom-ornament3 img {
    animation: slideLeftRight 8s ease-in-out infinite;
    width: 100%;
}

.bottom-ornament4 {
    position: absolute;
    width: 100%;
    bottom: -1;
    overflow: hidden;
    z-index: -1; 
} 

.bottom-ornament4 img {
    animation: pulse 4s ease-in-out infinite;
    width: 100%;
}

.top-ornament img {
    animation: pulse 2s ease-in-out infinite;
    width: 100%;
}

.top-ornament1 {
    position: absolute;
    overflow: hidden;
    /* width: 100%;    */
    height: 100%;   
    z-index: -2;
    /* top: -3%; */
}

.top-ornament1 img {
    transform: scale(1.4);
    opacity: 0.4 !important;
}

.section-animate.animate-in .top-ornament1 img {
    animation: zoomFade3x 6s ease-in-out forwards;
    animation-delay: 0s, 3.9s; /* zoomFade3x starts immediately, pulse starts after 4s */
    transform: scale(3.5);
    opacity: 0.6 !important;
}


.top-ornament1-hover img:hover {
    animation: none; /* reset first */
    animation: zoomFade3x 6s ease-in-out forwards;
    animation-delay: 0s, 3.9s; /* zoomFade3x starts immediately, pulse starts after 4s */
    transform: scale(3.5);
    opacity: 0.6;
}

.welcome-background {
    position: absolute;
    overflow: hidden;
    width: 100%;   
    height: 100%;   
    z-index: -1;
    /* top: -3%; */
}
.welcome-background img {
    transform: translateY(33%) scale(1.7);
    opacity: 0;
}

.section-animate.animate-in .welcome-background img {
    animation: zoomFade2x 5s ease-in-out forwards;
    animation-delay: 0s;
    transform: translateY(33%) scale(2);
    opacity: 0.4;
}
.wedding-of {
    /* position: absolute; */
    overflow: hidden;
    /* width: 100%;    */
    /* height: 100%;    */
    /* z-index: -1; */
    /* top: -3%; */
}
.wedding-of h2 {
    transform: scale(0);
    opacity: 0;
}

.footer-ornament {
    position: absolute;
    overflow: hidden;
    height: 100%;
    z-index: -1;
    top: 0;
    right: 0;
}

.footer-ornament img {
    animation: pulse 2s ease-in-out infinite;
    /* width: 70%; */
}


body {
    font-family: 'Josefin Sans', sans-serif;
    background-color: #f8f4ef;
    background-size: 300px;
    background-attachment: fixed;
    color: #555;
    transition: all 0.3s ease;
    position: relative;
    overflow-x: hidden;
}
@keyframes float {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(-100vh) translateX(50px) rotate(360deg); opacity: 0; }
}

.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-left {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-right {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Animasi yang akan di-trigger saat muncul di layar */
.animate-in {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Untuk elemen yang sudah terlihat */
.section-animate.animate-in,
.slide-left.animate-in,
.slide-right.animate-in {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Stagger animation untuk elemen yang berurutan */
.animate-in-delay-1 {
    transition-delay: 0.1s;
}

.animate-in-delay-2 {
    transition-delay: 0.2s;
}

.animate-in-delay-3 {
    transition-delay: 0.3s;
}

.hero-section {
    /* background: linear-gradient(135deg, rgb(255 156 156 / 11%), rgb(243 179 179 / 11%)); */
    background-blend-mode: overlay;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    animation: floatingHearts 30s linear infinite;
    opacity: 0.2;
    display: none;
}
@keyframes floatingHearts {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-50px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.princess-carriage {
    background-image: url('../assets/princess-carriage.png');
    /* background-image: url('../assets/bg-footer.jpeg'); */
    background-size: contain;
    background-position: left bottom;
    background-attachment: fixed;
}

.font-sacrramento {
    font-family: 'Sacramento', cursive;
}

.couple-name {
    font-family: 'Sacramento', cursive;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.couple-name-animate {
    transform: scale(0);
    opacity: 0;
}
.logo img {
    transform: scale(0);
    opacity: 0;
}

.count-down {
    transform: scale(0);
    opacity: 0;
}

.section-animate.animate-in .couple-name-animate, .section-animate.animate-in .logo img, .section-animate.animate-in .wedding-of h2 {
    animation: zoomInText 5s ease-in;
    transform: scale(1);
    opacity: 1;
}

.section-animate.animate-in .count-down {
    animation: zoomInText 5.5s ease-in;
    transform: scale(1);
    opacity: 1;
}

.gift-box {
    transition: all 0.3s ease;
}

.gift-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-primary {
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    background-color: #d0608e;
    box-shadow: 0 4px 15px rgba(208, 96, 142, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(208, 96, 142, 0.4);
    background-color: #c04b7c;
}
.text-pinky{
    color: #f09999;
}

.floating-hearts-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('../assets/sakura.png');
    background-size: contain;
    background-color: transparent;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: -1;
    animation: float-down 8s linear infinite;
}

.heart:nth-child(1) {
    left: 10%;
    top: 90%;
    animation-delay: 0s;
    animation-duration: 10s;
}

.heart:nth-child(2) {
    left: 25%;
    top: 80%;
    animation-delay: 2s;
    animation-duration: 12s;
}

.heart:nth-child(3) {
    left: 75%;
    top: 85%;
    animation-delay: 4s;
}

.heart:nth-child(4) {
    left: 50%;
    top: 95%;
    animation-delay: 1s;
    animation-duration: 15s;
}

.heart:nth-child(5) {
    left: 90%;
    top: 88%;
    animation-delay: 3s;
}

@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-600%) rotate(360deg);
        opacity: 0;
    }
}
@keyframes float-down {
    0% {
        transform: translateY(-1500%) rotate(360deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
}

/* Music Balloon */
.music-balloon {
    background-color: #d4a76a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.vinyl-record {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(90deg, #333 30%, #555 50%, #333 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.record-img {
    width: 50%;
    height: 50%;
    background-color: #d4a76a;
    border-radius: 50%;
    z-index: 2;
}

.music-balloon.playing .vinyl-record {
    animation: rotate 5s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-balloon:hover {
    transform: scale(1.1);
}

.music-toggle-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
}

.music-toggle-button svg {
    width: 50%; /* Ukuran ikon */
    height: 50%;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.popup {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 9999;
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
}

.close:hover {
  color: #ccc;
}

.petal-bg {
    background-image: linear-gradient(135deg, rgba(255, 182, 193, 0.20), rgba(255, 228, 225, 0.20));
    color: #5a4444;
}

.petal {
    /* position: absolute; */
    /* background-color: pink; */
    /* border-radius: 50%; */
    /* opacity: 0.8; */
    /* border-radius: 50% 10% 50% 10% / 50% 10% 50% 10%; Creates a petal-like shape */
    position: relative;
    /* transform: rotate(45deg); */
    background-position: center;
    background-size: cover;
    animation: fall linear infinite;
}
@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Butterfly Animation Styles */
.butterfly_wrapper {
    width: 20px;
    height: 20px;
    position: absolute;
}

.leftwings, .rightwings {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
}

.leftwings { left: 0; }
.rightwings { right: 0; }

.perspective {
    position: relative;
    width: 100%;
    height: 50%;
    perspective: 150px;
    perspective-origin: 50% 50%;
}

.upperwing, .lowerwing {
    background: radial-gradient(ellipse at center, rgb(250 210 174 / 84%) 0%0%, #ffc6a2 50%50%, #fd95cf 100%100%);
    animation-duration: 0.3s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}


.upperwing2, .lowerwing2 {
    background: radial-gradient(ellipse at center, rgb(250 210 174 / 84%) 0%0%, #e2eeff 50%50%, #fd95cf 100%100%);
    animation-duration: 0.3s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.upperwing {
    position: absolute;
    width: 100%;
    height: 100%;
}

.upperwing2 {
    position: absolute;
    width: 100%;
    height: 100%;
}

.upperwing_left {
    border-top-left-radius: 10%;
    border-top-right-radius: 80%;
    border-bottom-right-radius: 0%;
    border-bottom-left-radius: 30%;
    transform-origin: 100% 50%;
    animation-name: movewing_left;
}

.upperwing_right {
    border-top-left-radius: 80%;
    border-top-right-radius: 10%;
    border-bottom-right-radius: 30%;
    border-bottom-left-radius: 0%;
    transform-origin: 0% 50%;
    animation-name: movewing_right;
}

.lowerwing {
    position: absolute;
    top: 0;
    width: 80%;
    height: 80%;
}

.lowerwing2 {
    position: absolute;
    top: 0;
    width: 80%;
    height: 80%;
}

.lowerwing_left {
    right: 0;
    border-top-left-radius: 30%;
    border-top-right-radius: 0%;
    border-bottom-right-radius: 80%;
    border-bottom-left-radius: 10%;
    transform-origin: 100% 50%;
    animation-name: movewing_left;
}

.lowerwing_right {
    left: 0;
    border-top-left-radius: 0%;
    border-top-right-radius: 30%;
    border-bottom-right-radius: 10%;
    border-bottom-left-radius: 80%;
    transform-origin: 0% 50%;
    animation-name: movewing_right;
}

@keyframes movewing_left {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(65deg); }
}

@keyframes movewing_right {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(-65deg); }
}

.card-container{
    width:100%; 
    aspect-ratio: 85.60/53.98;
}
.card{
    width:82%; height:88%;
    position:relative;
    transform-style:preserve-3d;
    transition:transform .8s cubic-bezier(.22,.61,.36,1);
}
.card-container:hover .card{ transform:rotateY(180deg) }

.card-face{
    position:absolute; inset:0;
    border-radius:var(--radius);
    backface-visibility:hidden;
    overflow:hidden;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
}

/* Front */
.card-front{
    color:#fff;
    /*background: radial-gradient(120% 120% at 0% 0%, #4f86ff 0%, #2563eb 55%, #1e3a8a 100%);*/
    background: radial-gradient(circle at top left, #ffe9f0 -50%, #ffc1cc 30%, #ff9a9e 55%, #e36b6b 80%, #592b2b 120%);
    display:flex; flex-direction:column; gap:18px;
}
.bank-name{ font-weight:700; letter-spacing:.5px }
.chip{
    width:20%; aspect-ratio: 3/2; border-radius:8px;
    background:linear-gradient(135deg, #ffc5ae, #f99d76d1);
    box-shadow:inset 0 0 0 2px rgba(0,0,0,.15);
}
.card-number{
    margin-top:auto;
    letter-spacing:3px; font-weight:600;
}
.row{display:flex; justify-content:space-between; gap:12px; opacity:.95}

/* Back */
.card-back{
    color:#fff;
    /*background: linear-gradient(135deg,#0b1220,#1f2937 45%, #0b1220 100%);*/
    background: radial-gradient(circle at top left, #d0655cab -50%, #f47e7ee8 30%, #db6368d1 55%, #e17c7c 80%, #f58080 120%);
    transform:rotateY(180deg);
    padding:20px; display:flex; flex-direction:column;gap: 5px;
    position:relative;
}
.magnetic-strip{height:46px; background:#aa6468ba; border-radius:6px; margin:2px 0 8px}
.label{opacity:.65; letter-spacing:.6px; text-transform:uppercase}
.value{font-weight:600; letter-spacing:2px}

.owner-line{
    display:flex; justify-content:space-between; align-items:center; gap:12px;
}
.owner-name{ font-weight:600; letter-spacing:.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }

.copy-wrap{
    margin-top:auto;
    display:flex; justify-content:flex-end;
}
.copy-btn{
    appearance:none; border:0; cursor:pointer;
    padding:10px 14px; border-radius:12px;
    background:#ffffff; color:#111827; font-weight:600;
    box-shadow:0 6px 16px rgba(255,255,255,.15), inset 0 0 0 1px rgba(0,0,0,.06);
    transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.copy-btn:hover{ transform:translateY(-1px) }
.copy-btn:active{ transform:translateY(0) scale(.98) }

/* RSVP Swipe Styles */
.swipe-container {
    height: 180px;
    /* position: relative; */
    /* overflow: hidden; */
    /* border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); */
}

.rsvp-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    touch-action: none;
}

.rsvp-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.rsvp-card:active {
    transform: scale(0.98);
}

/* Parallax background effect */
.swipe-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 182, 193, 0.1) 0%, rgba(255, 228, 225, 0.1) 100%);
    z-index: -1;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.swipe-container.dragging::before {
    transform: translateX(-10px);
}

/* Swipe indicators */
.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.swipe-indicator.left {
    left: 20px;
}

.swipe-indicator.right {
    right: 20px;
}

.swipe-container:hover .swipe-indicator {
    opacity: 1;
}

.overflow-scroll::-webkit-scrollbar {
    display: none;
}