:root {
    /* Color Palette - ULTRA PREMIUM KOREAN PASTEL */
    --primary-red: #A35061;      /* Dusty Rose/Ruby */
    --bg-color: #FDE8EE;         /* Hồng cánh sen nhạt */
    --text-dark: #3A3232;        /* Warm charcoal */
    --text-light: #FFFFFF;
    --text-muted: #8E7F7F;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Jost', sans-serif;
    --font-accent: 'Pinyon Script', cursive;
}

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

/* Xóa smooth mặc định của CSS vì đã dùng thư viện Lenis trong JS để mượt hơn 100 lần */
html {
    scroll-behavior: auto;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-color);
    overflow-x: hidden;
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance; /* Tránh rớt 1 chữ ở dòng cuối cho tiêu đề */
}

p, span, div {
    text-wrap: pretty; /* Tránh rớt 1 chữ ở dòng cuối cho đoạn văn */
}

/* BACKGROUND TEXTURE MỜ ẢO NHƯ GIẤY MỸ THUẬT */
.bg-texture {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 1;
}

/* HIỆU ỨNG TEXT VÀNG (GOLD FOIL) CAO CẤP + LẤP LÁNH */
.gold-text {
    background: linear-gradient(to right, #DFBA73, #FCF6BA, #C4984F, #FBF5B7, #AA771C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    animation: goldShimmer 4s infinite alternate ease-in-out;
}
@keyframes goldShimmer {
    0% { filter: brightness(1) drop-shadow(0 0 0px rgba(212, 175, 55, 0)); }
    100% { filter: brightness(1.25) drop-shadow(0 0 12px rgba(212, 175, 55, 0.45)); }
}

/* HIỆU ỨNG GLASSMORPHISM (KÍNH MỜ CHUYÊN NGHIỆP) */
.glass {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 40px 0 rgba(163, 80, 97, 0.06);
    position: relative;
    overflow: hidden;
}

.glass-border {
    border: 8px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 15px 40px rgba(163, 80, 97, 0.1);
    position: relative;
}

/* TẠO ĐỘ BÓNG BẢY (SHINE) LƯỚT QUA KÍNH */
.glass::before, .glass-border::before {
    content: "";
    position: absolute;
    top: 0; left: -150%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shineSweep 7s infinite cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10;
}
@keyframes shineSweep {
    0%, 60% { left: -150%; }
    100% { left: 200%; }
}

.container {
    max-width: 1250px; /* Tăng độ rộng tổng thể của trang web để mọi thứ to ra tự nhiên */
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.section { padding: 100px 0; }

/* Typography Classes */
.section-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    color: var(--primary-red);
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: 2px;
}

/* FLORAL DIVIDER (HỌA TIẾT THIỆP CƯỚI TRUYỀN THỐNG) */
.floral-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 auto 50px auto;
    width: 280px;
}
.floral-divider::before, .floral-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    opacity: 0.5;
}
.floral-divider i {
    font-size: 1.5rem;
    color: #D4AF37; /* Màu vàng Gold */
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 45px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(191, 149, 63, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.primary-btn {
    background-color: var(--primary-red);
    color: var(--text-light);
}

.secondary-btn {
    background: linear-gradient(45deg, #BF953F, #AA771C);
    color: var(--text-light);
}

/* Music Button */
.music-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: var(--primary-red);
    border: 1px solid rgba(163, 80, 97, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    z-index: 1000;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.4s;
}
.music-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-red);
    color: white;
}
.music-btn.playing { animation: spin 4s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }


/* =========================================
   ENVELOPE OVERLAY EFFECT
========================================= */
.envelope-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    pointer-events: auto;
}
.envelope-door {
    position: absolute;
    top: 0; width: 50%; height: 100%;
    background-color: var(--bg-color); /* Nền kem trắng */
    transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Thêm vân giấy mờ (paper texture) cho mặt thiệp */
.envelope-door::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
}

.envelope-left { 
    left: 0; 
    transform-origin: left center; 
    border-right: 1px solid rgba(212, 175, 55, 0.4); 
}
.envelope-right { 
    right: 0; 
    transform-origin: right center; 
    border-left: 1px solid rgba(212, 175, 55, 0.4); 
}

/* Hình ảnh đưa vào trong khung viền vàng trang trí */
.envelope-left::after {
    content: "";
    position: absolute;
    top: 30px; bottom: 30px; left: 30px; right: 15px;
    border: 2px solid rgba(212, 175, 55, 0.8);
    background-image: url('assets/images/door-left.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    pointer-events: none;
}
.envelope-right::after {
    content: "";
    position: absolute;
    top: 30px; bottom: 30px; left: 15px; right: 30px;
    border: 2px solid rgba(212, 175, 55, 0.8);
    background-image: url('assets/images/door-right.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    pointer-events: none;
}

.envelope-overlay.open .envelope-left { transform: translateX(-100%); }
.envelope-overlay.open .envelope-right { transform: translateX(100%); }

.envelope-content {
    position: relative;
    z-index: 2;
    text-align: center;
    background: rgba(253, 249, 248, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 35px 50px; /* Thu nhỏ padding để khung gọn lại */
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.77, 0, 0.175, 1);
    max-width: 90%;
}
.envelope-overlay.open .envelope-content {
    opacity: 0;
    transform: scale(1.2);
}
.envelope-content .monogram {
    font-size: 3rem; /* Thu nhỏ chữ T&T */
    margin-bottom: 10px;
}
.envelope-title {
    font-family: var(--font-heading);
    font-size: 1.8rem; /* Thu nhỏ tên */
    margin: 10px 0;
    color: var(--text-dark); /* Màu chữ tối để nổi trên nền kem */
}
.envelope-date {
    font-family: var(--font-body);
    font-size: 1.1rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: var(--text-muted); /* Màu chữ tối để nổi trên nền kem */
}
@media (max-width: 768px) {
    .envelope-content { padding: 40px 30px; }
    .envelope-title { font-size: 2rem; }
    .envelope-date { font-size: 1rem; }
}

/* =========================================
   HERO SECTION (KOREAN EDITORIAL ZOOM)
========================================= */
.hero-wrapper {
    height: 180vh; 
    position: relative;
    z-index: 1;
}

.hero-sticky {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; 
    z-index: -2;
    transform-origin: center center;
    will-change: transform; 
}

.hero-overlay-gradient {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    z-index: -1;
}

/* TYPOGRAPHY IN HERO */
.hero-typography {
    padding: 0 30px 80px 30px;
    position: relative;
    z-index: 2;
    text-align: left;
}

.title-group {
    position: relative;
    margin-bottom: 20px;
}

.script-text {
    font-family: var(--font-accent);
    font-size: 8rem;
    position: absolute;
    top: -50px;
    left: -10px;
    z-index: 3;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    opacity: 0.9;
}

.serif-text {
    font-family: var(--font-heading);
    font-size: 6rem;
    line-height: 0.9;
    color: #F8EDD1; 
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    text-shadow: 0px 5px 20px rgba(0,0,0,0.6);
}

.hero-bottom-info {
    margin-top: 30px;
    padding-left: 5px;
}

.couple-names-small {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--text-light);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 400;
}

.wedding-date-small {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-light);
    letter-spacing: 3px;
    opacity: 0.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 2rem;
    animation: bounce 2s infinite;
    opacity: 0.8;
    z-index: 2;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-15px) translateX(-50%); }
    60% { transform: translateY(-7px) translateX(-50%); }
}

/* PHẦN NỘI DUNG CHÍNH (Đè lên Hero khi cuộn) */
.main-content {
    position: relative;
    z-index: 10;
    background-color: var(--bg-color);
    box-shadow: 0 -20px 50px rgba(0,0,0,0.1);
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    padding-top: 40px;
}

/* Countdown Glassmorphism */
.countdown-section { padding: 60px 0; }
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.countdown-item {
    border-radius: 20px;
    padding: 25px 15px;
    width: 100px;
    transition: transform 0.4s ease;
}

.countdown-item:hover {
    transform: translateY(-8px);
}

.countdown-item span {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary-red);
    display: block;
    margin-bottom: 5px;
}

.countdown-item p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* SPLIT LAYOUT PARALLAX */
.split-layout {
    display: flex;
    align-items: center;
    gap: 70px;
    text-align: left;
}
.split-layout.reverse {
    flex-direction: row-reverse;
}
/* Hỗ trợ chữ nổi chạy dọc theo ảnh */
.split-layout.sticky-mode {
    align-items: flex-start;
}
.sticky-content {
    position: sticky;
    top: 120px;
}
.split-image { flex: 1.2; } /* Khôi phục lại độ cân bằng, ảnh chỉ nhỉnh hơn chữ một chút */
.split-content { flex: 1; }

/* HIỆU ỨNG ZOOM MƯỢT MÀ KHI HOVER HÌNH ẢNH */
.arch-frame-small {
    border-radius: 250px 250px 15px 15px;
    height: 600px;
    max-width: 450px;
    margin: 0 auto;
    overflow: hidden;
    border: 12px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 50px rgba(163, 80, 97, 0.15);
}
.soft-frame {
    border-radius: 20px; 
    width: 100%;
    height: auto;
    /* Giảm kích thước ảnh xuống một chút cho vừa vặn, không bị quá dài do là ảnh dọc */
    max-width: 420px; 
    margin: 0 auto;
    overflow: hidden;
    border: 12px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 50px rgba(163, 80, 97, 0.15);
}
.gallery-item {
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(163, 80, 97, 0.15);
    border: 12px solid rgba(255, 255, 255, 0.85); /* Khung viền dày hơn tạo cảm giác ảnh rửa */
}

.arch-frame-small img, .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; /* Đảm bảo hình luôn căn giữa */
}

/* Riêng soft-frame hiển thị trọn vẹn 100% hình ảnh thật không bị crop */
.soft-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.arch-frame-small img, .soft-frame img, .gallery-item img {
    transform: scale(1.02); /* Scale to >1 to prevent border edge artifacts */
    transform-origin: center center;
    /* Sử dụng cubic-bezier đẳng cấp để tạo chuyển động vô cùng mềm mại */
    transition: transform 1.5s cubic-bezier(0.165, 0.84, 0.44, 1), filter 1.5s ease;
}

.gallery-item:hover img, .arch-frame-small:hover img, .soft-frame:hover img {
    transform: scale(1.08); /* Hover zoom sâu hơn một chút */
    filter: brightness(1.1);
}

/* Lời dẫn truyện lãng mạn trên từng khung ảnh */
.gallery-caption {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 60px 20px 25px; /* Gradient lan tỏa êm dịu */
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    text-align: center;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.4;
    letter-spacing: 0.5px;
    z-index: 2;
    pointer-events: none;
    /* Ẩn hoàn toàn khi bình thường, để không che mất ảnh */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-item:hover .gallery-caption {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* KẾT THÚC GALLERY */


/* QUOTE SECTION */
.quote-icon {
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: block;
}
.quote-text {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 300;
}

/* EVENT SECTION */
.event-card {
    padding: 50px 40px;
    border-radius: 25px;
}
.event-icon {
    font-size: 2.2rem;
    margin-bottom: 25px;
}
.event-card h3 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 400;
}
.event-time, .event-location {
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-weight: 300;
}

/* Timeline in Event */
.timeline {
    margin: 40px 0;
    padding: 0;
    list-style: none;
    text-align: left;
    border-left: 1px solid rgba(191, 149, 63, 0.4);
    margin-left: 10px;
}
.timeline-item {
    position: relative;
    padding-left: 35px;
    margin-bottom: 35px;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 8px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid var(--primary-red);
    box-shadow: 0 0 10px rgba(163, 80, 97, 0.4);
}
.timeline-item .time {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary-red);
    display: inline-block;
    width: 80px;
}
.timeline-item .desc {
    color: var(--text-dark);
    font-weight: 300;
    font-size: 1.05rem;
}

/* GALLERY SECTION - EDITORIAL MASONRY KOREAN STYLE (GIANT SIZES) */
.gallery-section .container {
    max-width: 1300px; /* Mở rộng không gian hiển thị ảnh */
}
.gallery-subtitle {
    margin-bottom: 50px;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: start;
    padding: 0 10px 120px 10px; 
}

/* Các khung hình đồng nhất, thanh lịch */
.gallery-item {
    height: 60vh; /* Chiều cao đồng đều, to rõ */
    border-radius: 20px; /* Bo góc nhẹ nhàng, gọn gàng */
    margin-top: 0 !important; /* Xóa bỏ so le lộn xộn */
}
/* Chỉ đẩy nhẹ cột ở giữa xuống 1 chút để tạo điểm nhấn sang trọng */
.gallery-item:nth-child(2), .gallery-item:nth-child(5) {
    transform: translateY(50px); 
}

/* RSVP SECTION */
.rsvp-subtitle {
    margin-bottom: 40px;
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-muted);
}
.rsvp-form {
    max-width: 650px;
    margin: 0 auto;
    padding: 60px 50px;
    border-radius: 25px;
}
.form-group { margin-bottom: 28px; }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
    width: 100%;
    padding: 18px 25px; /* Khung to và rộng hơn */
    margin-bottom: 25px;
    border: 1px solid rgba(163, 80, 97, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9); /* Nền trắng hơn để dễ nhìn chữ */
    font-family: var(--font-body);
    font-size: 1.15rem; /* Chữ to rõ ràng hơn */
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

.rsvp-form input::placeholder, .rsvp-form textarea::placeholder {
    color: #7A6F6F; /* Màu chữ gợi ý đậm hơn để dễ đọc */
    font-weight: 400;
}

.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus {
    outline: none;
    border-color: rgba(191, 149, 63, 0.5);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(191, 149, 63, 0.1);
}

/* GIFTS SECTION */
.qr-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.qr-card {
    padding: 50px 40px;
    border-radius: 25px;
    text-align: center;
    width: 320px;
    transition: transform 0.4s ease;
}
.qr-card:hover {
    transform: translateY(-10px);
}
.qr-card h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-red);
    font-weight: 400;
}
.qr-img-wrapper {
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    /* Mở rộng chiều ngang để ảnh thẻ nhìn to rõ nhất, đặc biệt trên điện thoại */
    width: 100%;
    max-width: 350px;
    display: block;
    margin: 0 auto 25px auto;
    border: 1px solid rgba(0,0,0,0.03);
}
.qr-img-wrapper img {
    width: 100%;
    height: auto; /* Ảnh tự điều chỉnh chiều cao theo tỷ lệ gốc */
    display: block;
}
.qr-card p {
    font-size: 1rem;
    line-height: 2;
    color: var(--text-muted);
    font-weight: 300;
}
.qr-card strong {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* FOOTER */
footer {
    padding: 100px 0;
}
.monogram {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: 5px;
}
.couple-names-footer {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 300;
}
.footer-date {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-top: 15px;
    letter-spacing: 4px;
}

/* =========================================
   HỆ THỐNG ANIMATION XUẤT HIỆN TỪ NHIỀU PHÍA
========================================= */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-up.active, 
.reveal-left.active, 
.reveal-right.active, 
.reveal-scale.active {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* =========================================
   HỆ THỐNG ÁNH SÁNG LÃNG MẠN (ROMANTIC BOKEH ORBS) - OPTIMIZED GPU
========================================= */
.romantic-orbs {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: floatOrb 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
/* Dùng radial-gradient thay vì filter: blur() để web không bị giật lag */
.orb-1 { width: 45vw; height: 45vw; background: radial-gradient(circle, rgba(255, 209, 209, 0.8) 0%, transparent 70%); top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 40vw; height: 40vw; background: radial-gradient(circle, rgba(255, 228, 225, 0.8) 0%, transparent 70%); bottom: 10%; right: -10%; animation-delay: -7s; }
.orb-3 { width: 55vw; height: 55vw; background: radial-gradient(circle, rgba(255, 240, 245, 0.8) 0%, transparent 70%); top: 30%; left: 20%; animation-delay: -14s; }
.orb-4 { width: 35vw; height: 35vw; background: radial-gradient(circle, rgba(255, 223, 211, 0.8) 0%, transparent 70%); top: 60%; right: 20%; animation-delay: -4s; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(60px, 120px) scale(1.15) rotate(15deg); }
}

/* FALLING EFFECT (Magical Dust + Leaves) */
#petals-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999; overflow: hidden;
}
.falling-item {
    position: absolute;
    animation: fall linear infinite;
    user-select: none;
    filter: drop-shadow(0 2px 5px rgba(191, 149, 63, 0.4));
}

/* HIỆU ỨNG ĐOM ĐÓM/BỤI TIÊN (FIREFLIES) LẤP LÁNH CỰC ĐẸP */
.firefly-particle {
    width: 6px;
    height: 6px;
    background: #FFF8D6;
    border-radius: 50%;
    box-shadow: 0 0 15px 4px rgba(255, 235, 150, 0.9), 0 0 25px 8px rgba(255, 235, 150, 0.4);
    animation: fall linear infinite, pulseGlow 2s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 1; }
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 0.9; }
    100% { transform: translateY(110vh) rotate(360deg) translateX(80px); opacity: 0; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .split-layout, .split-layout.reverse, .split-layout.sticky-mode {
        flex-direction: column; text-align: center;
        align-items: center; /* Ghi đè lại flex-start của sticky-mode */
    }
    .sticky-content {
        position: relative; /* Hủy hiệu ứng trượt nổi trên mobile tránh che khuất nội dung */
        top: 0;
    }
    .text-center-mobile { text-align: center !important; }
    .timeline {
        text-align: left; margin-left: auto; margin-right: auto; width: fit-content;
    }
}
@media (max-width: 768px) {
    .script-text { font-size: 6rem; top: -35px; }
    .serif-text { font-size: 4.5rem; }
    .hero-typography { padding: 0 20px 60px 20px; text-align: center; }
    .title-group { display: inline-block; text-align: left; }
    .couple-names-footer { font-size: 2.8rem; }
    
    .countdown-item { width: 75px; padding: 15px 5px; }
    .countdown-item span { font-size: 1.8rem; }
    .section-title { font-size: 2.4rem; }
    .qr-container { flex-direction: column; align-items: center; }
    .section { padding: 70px 0; }
    .rsvp-form { padding: 40px 25px; }
    .soft-frame { max-width: 85%; } /* Tự động thu nhỏ thêm trên màn hình điện thoại */
    
    /* Giảm nhẹ độ di chuyển trên mobile cho mượt */
    .reveal-left { transform: translateX(-40px); }
    .reveal-right { transform: translateX(40px); }

    /* Gallery Mobile Masonry - Khổng lồ hơn */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding-bottom: 60px;
    }
    .gallery-item { height: 45vh; transform: translateY(0) !important; }
    .gallery-item:nth-child(2), .gallery-item:nth-child(4), .gallery-item:nth-child(6) {
        transform: translateY(40px) !important;
    }
    
    /* Trên điện thoại không có chuột để hover, nên sẽ luôn hiện chữ nhưng mỏng nhẹ */
    .gallery-caption {
        opacity: 0.9;
        visibility: visible;
        transform: translateY(0);
        font-size: 1.1rem;
        padding: 40px 15px 15px;
    }
}
