/* ============================================================
   style.css — Fiora & Noviyan Wedding Invitation
   ULTIMATE iOS PERFORMANCE EDITION
   Features: Hardware Accelerated (VRAM Safe), Liquid Glass, 
   1-Line Title, Magnetic Scroll (Fixed), & Subbrand.
   ============================================================ */

/* --- ROOT VARIABLES --- */
:root {
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --bg-dark: #111111;
    --text-light: #ffffff;
    --text-muted: #cccccc;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    --card-radius: 20px;
    --transition-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-slow: 0.8s;
}

img,
video {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

/* --- AMBIENT GOLD GLOW --- */
@keyframes ambientGlow {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 rgba(212, 175, 55, 0);
    }

    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.08);
    }
}

.section-title {
    animation: ambientTitleGlow 4s ease-in-out infinite;
}

@keyframes ambientTitleGlow {

    0%,
    100% {
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    }

    50% {
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.3);
    }
}

/* --- RESET & SAFARI OPTIMIZATION --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: contain;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    overscroll-behavior-y: contain;
    /* scroll-behavior: smooth; dihapus karena bentrok dengan momentum scroll-snap iOS/Android */
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

button,
a,
input,
textarea,
.btn-elegant,
.btn-outline,
.music-btn {
    touch-action: manipulation;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font-body);
    color: var(--text-light);
    background-color: var(--bg-dark);
}

.locked-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100dvh;
    /* touch-action: none; dihapus karena menyebabkan scroll macet total (tidak merespon touch) di beberapa device mobile */
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.container {
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
    z-index: 3;
    position: relative;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.align-left {
    justify-content: flex-start;
}

.align-right {
    justify-content: flex-end;
}

.section-title {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 2.5rem;
    font-style: italic;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* --- LIQUID GLASS BACKGROUND (VRAM Optimized) --- */
.liquid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    -webkit-filter: blur(60px);
    animation: floatLiquid 20s infinite alternate ease-in-out;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Pengganti will-change yang aman untuk iOS */
}

.orb-1 {
    width: 50vw;
    height: 50vw;
    background: rgba(255, 255, 255, 0.06);
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 45vw;
    height: 45vw;
    background: rgba(212, 175, 55, 0.1);
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes floatLiquid {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    33% {
        transform: translate3d(5vw, 8vh, 0) scale(1.15);
    }

    66% {
        transform: translate3d(-8vw, 4vh, 0) scale(0.9);
    }

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

/* =============================================================
   APPLE LIQUID GLASS (iOS VRAM SAFE)
   ============================================================= */
.glass-effect {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 40%, rgba(0, 0, 0, 0.15) 100%);
    -webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);
    backdrop-filter: blur(16px) saturate(180%) brightness(1.05);

    /* VRAM SAFE GPU ACCELERATION */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    transition: background 0.5s ease, opacity 0.5s ease, transform 0.5s var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top: 1px solid rgba(255, 255, 255, 0.32);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.20), inset 0 -1px 0 rgba(0, 0, 0, 0.30), inset 1px 0 0 rgba(255, 255, 255, 0.08);
    -webkit-tap-highlight-color: transparent;
}

/* --- BRIDE/GROOM PORTRAIT --- */
.person-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 5dvh 0;
    width: 100%;
}

.photo-full-width {
    height: 42dvh;
    max-height: 400px;
    aspect-ratio: 3 / 4;
    width: auto;
    max-width: 85vw;
    margin: 2vh auto;
}

.squircle-drop {
    padding: 8px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: portraitMorph 8s ease-in-out infinite alternate;
}

@keyframes portraitMorph {
    0% {
        border-radius: 40% 60% 45% 55% / 30% 30% 40% 40%;
    }

    33% {
        border-radius: 55% 45% 55% 45% / 40% 35% 35% 40%;
    }

    66% {
        border-radius: 45% 55% 40% 60% / 35% 40% 40% 35%;
    }

    100% {
        border-radius: 40% 60% 45% 55% / 30% 30% 40% 40%;
    }
}

.photo-fix img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* --- 3D COVERFLOW FOTO (VRAM Optimized) --- */
.coverflow-container {
    position: relative;
    width: 100%;
    height: 45dvh;
    max-height: 450px;
    margin: 2vh auto;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
}

.coverflow-item {
    position: absolute;
    width: auto;
    height: 100%;
    aspect-ratio: 2 / 3;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease, box-shadow 0.8s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Anti-Crash Safari */
    border-radius: 20px;
    cursor: pointer;
    padding: 3px;
    background: rgba(255, 255, 255, 0.05);
    /* backdrop-filter DIHAPUS — tidak terlihat di balik foto object-fit:cover,
       tapi makan VRAM besar saat dikombinasi dengan perspective + preserve-3d */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.4);
    border-left-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.coverflow-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 17px;
}

.coverflow-text {
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

.coverflow-text h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.coverflow-text p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.coverflow-item.active .coverflow-text {
    opacity: 1;
}

.coverflow-item.active {
    transform: translateX(0) translateZ(0) rotateY(0deg);
    z-index: 3;
    opacity: 1;
    animation: floatIdle 4s ease-in-out infinite 0.6s;
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.1), 0 0 25px var(--gold-glow);
}

@keyframes floatIdle {

    0%,
    100% {
        translate: 0 0;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.1);
    }

    50% {
        translate: 0 -8px;
        box-shadow: 0 25px 50px rgba(212, 175, 55, 0.15), inset 0 0 25px rgba(255, 255, 255, 0.2);
    }
}

.coverflow-item.prev {
    transform: translateX(-45%) translateZ(-150px) rotateY(35deg);
    z-index: 2;
    opacity: 0.5;
}

.coverflow-item.next {
    transform: translateX(45%) translateZ(-150px) rotateY(-35deg);
    z-index: 2;
    opacity: 0.5;
}

.coverflow-item.far-prev,
.coverflow-item.far-next {
    transform: translateX(-90%) translateZ(-300px);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.coverflow-item.far-next {
    transform: translateX(90%) translateZ(-300px);
}

.coverflow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    z-index: 10;
    min-width: 44px;
    min-height: 44px;
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, transform 0.3s;
}

.coverflow-nav:hover {
    color: var(--gold);
    transform: translateY(-50%) scale(1.2);
}

.coverflow-nav.left {
    left: -10px;
}

.coverflow-nav.right {
    right: -10px;
}

.name {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 5.2vw, 2.5rem);
    margin-bottom: 5px;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.parents {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.ig-btn.glass-effect {
    padding: 12px 25px;
    border-radius: 30px;
    color: var(--gold-light);
    font-weight: 500;
    letter-spacing: 1px;
    display: inline-block;
    margin-top: 1vh;
    border: 1px solid rgba(212, 175, 55, 0.3);
    text-decoration: none;
}

.ig-btn.glass-effect:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

/* --- ANIMASI IOS SPRING BOUNCE (VRAM Safe) --- */
.ios-anim {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: transform var(--transition-slow) cubic-bezier(0.34, 1.56, 0.64, 1), opacity var(--transition-slow) ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.ios-anim.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
}

.slide-left-anim {
    opacity: 0;
    transform: translateX(-60px) scale(0.95);
    transition: transform var(--transition-slow) cubic-bezier(0.34, 1.56, 0.64, 1), opacity var(--transition-slow) ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.slide-left-anim.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1) translateZ(0);
}

.slide-right-anim {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
    transition: transform var(--transition-slow) cubic-bezier(0.34, 1.56, 0.64, 1), opacity var(--transition-slow) ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.slide-right-anim.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1) translateZ(0);
}

.loaded .cover-anim-1 {
    animation: popUpIos 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
    opacity: 0;
}

.loaded .cover-anim-2 {
    animation: popUpIos 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
    opacity: 0;
}

.loaded .cover-anim-3 {
    animation: popUpIos 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s forwards;
    opacity: 0;
}

.loaded .cover-anim-4 {
    animation: popUpIos 1s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards;
    opacity: 0;
}

@keyframes popUpIos {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

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

/* --- LOADING SCREEN --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    color: var(--text-light);
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-subtitle {
    font-size: 0.8rem;
    letter-spacing: 4px;
    margin-bottom: 25px;
    font-family: var(--font-body);
}

.loading-image-container {
    width: 220px;
    height: 220px;
    margin-bottom: 25px;
    border: none !important;
    aspect-ratio: 1/1;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.loading-video-fill {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

@media screen and (max-height: 600px) {
    .loading-image-container {
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -110px;
        margin-left: -110px;
        z-index: 0;
        opacity: 0.4;
    }

    .loading-subtitle,
    .loading-title,
    .loading-quote,
    .loading-text {
        position: relative;
        z-index: 1;
        text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.9);
    }
}

.loading-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    letter-spacing: 3px;
    margin-bottom: 40px;
    text-align: center;
}

.loading-quote {
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 50px;
    line-height: 1.6;
    color: var(--text-muted);
    padding: 0 20px;
}

.loading-text {
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-family: var(--font-body);
}

.cover-camera-btn {
    position: fixed;
    top: 24px;
    top: calc(24px + env(safe-area-inset-top)); /* Safe positioning from iOS notch */
    right: 24px;
    z-index: 2000; /* Stays above sections, but below loading screen */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    text-decoration: none;
    animation: cameraButtonPulse 2.5s infinite ease-in-out;
}

/* Tooltip text bubble beside the camera FAB */
.camera-btn-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 40%, rgba(0, 0, 0, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(14px) saturate(180%) brightness(1.05);
    color: var(--gold-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-body);
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeInOut 8s ease-in-out forwards;
    animation-delay: 2s; /* Shows up 2s after cover loads */
    z-index: 2001;
}

@keyframes tooltipFadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(10px);
    }
    6%, 92% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(-10px);
        visibility: hidden;
    }
}

@keyframes cameraButtonPulse {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    70% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.cover-camera-btn:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--gold);
    color: var(--text-light);
    background: var(--gold-glow);
}

.cover-camera-btn svg {
    width: 24px;
    height: 24px;
}

/* Camera Transition Ripple Effect */
.camera-transition-overlay {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    z-index: 100000;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), 
                backdrop-filter 0.8s cubic-bezier(0.77, 0, 0.175, 1),
                background-color 0.8s ease-in-out;
    pointer-events: none;
    will-change: transform, backdrop-filter, background-color;
    
    /* Glass blur effect */
    -webkit-backdrop-filter: blur(0px) saturate(100%);
    backdrop-filter: blur(0px) saturate(100%);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
}
.camera-transition-overlay.active {
    transform: translate(-50%, -50%) scale(100);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    backdrop-filter: blur(25px) saturate(180%);
    background-color: rgba(7, 7, 7, 0.98); /* Tetap hitam */
}

/* --- COVER SECTION --- */
.cover-section {
    position: relative;
    height: 100dvh;
    background: url('../Galeri/foto-cover.webp') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.cover-section.slide-up-out {
    transform: translateY(-100dvh);
    -webkit-transform: translateY(-100dvh);
    pointer-events: none;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.cover-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 20px;
}

.cover-content .subtitle {
    font-size: 1.1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* FIX 1 Baris Judul Cover */
.cover-content .title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 10vw, 3.5rem);
    white-space: nowrap;
    font-weight: 300;
    color: var(--gold);
    margin: 15px 0;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.cover-content .title span {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-style: italic;
    color: var(--gold-light);
    display: inline-block;
    vertical-align: middle;
    margin: 0 10px;
}

/* --- SHIMMER TEXT & ORNAMENTS --- */
.shimmer-text {
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 25%, #fff 50%, var(--gold-light) 75%, var(--gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerGold 4s linear infinite;
}

@keyframes shimmerGold {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.ornament-flourish {
    display: block;
    margin: 8px auto;
    opacity: 0.8;
}

.scroll-indicator {
    margin-top: 30px;
    animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(8px);
        opacity: 0.8;
    }
}

.cover-content .date {
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.btn-elegant {
    background: rgba(0, 0, 0, 0.3);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 12px 35px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 3px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 15px;
    min-height: 44px;
}

.btn-elegant:hover {
    background: var(--gold);
    color: var(--bg-dark);
    transform: scale(1.05);
}

.btn-elegant:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* --- VIDEO BACKGROUND --- */
.bg-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../Galeri/foto-bg-fallback.webp') center/cover no-repeat;
    z-index: -1;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

@media screen and (orientation: landscape) {
    .bg-fallback {
        background-position: center 30%;
    }
}

.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.video-bg.is-loaded {
    opacity: 1;
}

.dark-overlay-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

/* --- SNAP SCROLLING (MAGNETIC iOS SAFE FIX) --- */
.snap-container {
    height: 100dvh;
    width: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    -webkit-scroll-snap-type: y mandatory;
    /* scroll-behavior: smooth; dihapus karena memaksa engine browser menimpa animasi snap native, membuatnya "sticky" dan patah-patah */
    position: relative;
    z-index: 10;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.snap-container::-webkit-scrollbar {
    display: none;
}

.snap-section {
    width: 100%;
    height: 100dvh;
    scroll-snap-align: start;
    -webkit-scroll-snap-align: start;
    scroll-snap-stop: always;
    /* 'always' membatasi scroll maksimal 1 section per usapan (flick) */
    -webkit-scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.snap-section-auto {
    width: 100%;
    min-height: 100dvh;
    height: auto;
    padding: 60px 0;
    /* MAGNETIC ROUTING FIX: Tetap snap tapi tidak memaksa berhenti mendadak (normal) */
    scroll-snap-align: start;
    -webkit-scroll-snap-align: start;
    scroll-snap-stop: always;
    -webkit-scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* --- MUSIC PANEL & TOAST --- */
.music-control-panel {
    position: fixed;
    bottom: calc(15px + env(safe-area-inset-bottom));
    right: 12px;
    border-radius: 30px;
    padding: 2px 6px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 99999;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-control-panel.visible {
    display: flex;
}

.music-control-panel.scrolled {
    transform: scale(0.85);
    opacity: 0.75;
}

.music-btn {
    background: transparent;
    border: none;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    padding: 2px;
    outline: none;
    min-width: 32px;
    min-height: 32px;
}

.music-btn svg {
    width: 18px !important;
    height: 18px !important;
}

.music-btn:hover {
    transform: scale(1.2);
    color: #ffffff;
}

.music-btn.playing {
    animation: pulseMusic 2s infinite;
    color: var(--gold);
}

@keyframes pulseMusic {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

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

.music-toast {
    position: fixed;
    top: calc(15px + env(safe-area-inset-top));
    left: 50%;
    transform: translate(-50%, -50px) scale(0.7);
    background: #090909;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s ease, 
                border-radius 0.4s ease, 
                padding 0.4s ease, 
                visibility 0.4s ease;
    z-index: 9999999;
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 10px rgba(212, 175, 55, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.music-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
    border-radius: 30px;
}

.btn-scroll-top {
    position: fixed;
    bottom: calc(65px + env(safe-area-inset-bottom));
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--gold-light);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    transform: translateY(15px);
    border: none;
}

.btn-scroll-top svg {
    width: 18px !important;
    height: 18px !important;
}

.btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-scroll-top:hover {
    color: #fff;
    transform: translateY(-5px);
    border-color: #fff !important;
}

/* --- EVENT & COUNTDOWN --- */
.event-block {
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 15px;
    width: 100%;
}

.event-block h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 10px;
}

.event-date,
.event-time {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.event-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 10px 0;
    line-height: 1.5;
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 8px 20px;
    border-radius: 20px;
    margin-top: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-body);
    min-height: 44px;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

.gold-line-small {
    width: 40px;
    height: 1px;
    background-color: var(--gold);
    opacity: 0.5;
}

.countdown-timer {
    display: flex;
    gap: 15px;
}

.time-box span {
    font-family: var(--font-heading);
    font-size: 2rem;
    display: block;
    color: var(--gold-light);
    animation: countdownPulse 2s ease-in-out infinite;
}

@keyframes countdownPulse {

    0%,
    100% {
        text-shadow: none;
    }

    50% {
        text-shadow: 0 0 12px var(--gold-glow);
    }
}

.time-box p {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* --- OUR LOVE STORY --- */
.story-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    position: relative;
    padding-left: 15px;
    padding-right: 15px;
}

.story-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
    opacity: 0.3;
    transform: translateX(-50%);
}

.story-card {
    position: relative;
    padding: 20px;
    border-radius: var(--card-radius);
    width: 42%;
}

.story-card::after {
    content: '';
    position: absolute;
    top: 25px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-dark);
    box-shadow: 0 0 8px var(--gold-glow);
    z-index: 2;
}

.story-card.left::after {
    right: -28px;
}

.story-card.right::after {
    left: -28px;
}

.story-card.left {
    text-align: left;
    align-self: flex-start;
}

.story-card.right {
    text-align: right;
    align-self: flex-end;
}

.story-year {
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.story-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.story-gallery {
    margin-top: 15px;
    display: grid;
    gap: 8px;
    width: 100%;
}

.story-card-img {
    position: relative;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
    transform: translateZ(0);
}

.story-card-img:hover {
    transform: scale(1.03);
    z-index: 10;
    filter: brightness(1.15);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--gold-light);
}

.cards-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cards-2 .story-card-img {
    height: 160px;
}

.cards-5 {
    grid-template-columns: repeat(6, 1fr);
}

.cards-5 .story-card-img:nth-child(1),
.cards-5 .story-card-img:nth-child(2) {
    grid-column: span 3;
    height: 140px;
}

.cards-5 .story-card-img:nth-child(3),
.cards-5 .story-card-img:nth-child(4),
.cards-5 .story-card-img:nth-child(5) {
    grid-column: span 2;
    height: 100px;
}

.cards-6 {
    grid-template-columns: repeat(3, 1fr);
}

.cards-6 .story-card-img {
    height: 110px;
}

/* --- CUSTOM VIDEO PLAYER --- */
.custom-video-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
}

.custom-video {
    width: 100%;
    max-height: 300px;
    display: block;
    object-fit: cover;
    transition: filter 0.3s;
    pointer-events: none;
}

.custom-video:fullscreen,
.custom-video:-webkit-full-screen,
.custom-video:-ms-fullscreen {
    object-fit: contain !important;
    background: #000;
    pointer-events: auto;
}

video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-internal-media-controls-overlay-cast-button,
video::-internal-media-controls-overflow-button,
video::-webkit-media-controls-overflow-button,
video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0;
}

.hidden-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.custom-video-container.is-playing .hidden-video {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.custom-video-container.is-playing #gallery-canvas {
    opacity: 0;
}

.video-ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s;
    z-index: 3;
    pointer-events: none;
}

.video-bottom-play {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

.custom-video-container:hover .video-bottom-play {
    transform: scale(1.1);
    border-color: #fff;
    background: rgba(212, 175, 55, 0.8);
}

.custom-video-container.is-playing .video-ui-layer {
    opacity: 0;
    pointer-events: none;
}

.video-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 4;
}

.video-progress-filled {
    width: 0%;
    height: 100%;
    background: var(--gold);
    transition: width 0.1s linear;
}

/* --- GALERI FOTO SCROLL --- */
.gallery-viewport {
    width: 100%;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-row-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
    /* FIX UNTUK iPHONE: Prioritaskan scroll horizontal */
    z-index: 5;
}

.gallery-row-viewport::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    width: max-content;
    gap: 15px;
}

.gallery-viewport:hover .gallery-track {
    animation-play-state: paused;
}

.gallery-set {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.gallery-item {
    flex: 0 0 auto;
    height: 180px;
    width: auto;
    aspect-ratio: 3/4;
    border-radius: 15px;
    object-fit: cover;
    padding: 3px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s, border-color 0.3s;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Akselerasi Hardware iOS */
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 98%, transparent 100%), linear-gradient(to right, black 0%, black 98%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 98%, transparent 100%), linear-gradient(to right, black 0%, black 98%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    pointer-events: auto;
    /* Pastikan bisa disentuh */
}

.gallery-item.large {
    aspect-ratio: 1/1;
    height: 180px;
}

@media screen and (max-width: 768px) {
    .gallery-item {
        height: 140px;
    }

    .gallery-item.large {
        height: 140px;
    }

    .gallery-viewport {
        gap: 10px;
    }
}

.gallery-item:hover {
    transform: scale(1.05) translateZ(0);
    border-color: var(--gold);
    z-index: 10;
}

.zoomable {
    cursor: pointer;
}

/* --- LIGHTBOX --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 10, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.lightbox-main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 85%;
    gap: 20px;
}

.lightbox-content {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 20px;
    object-fit: contain;
    padding: 8px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-thumbnails {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding: 15px 20px;
    border-radius: 15px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    /* Soften the glass-effect borders specifically for lightbox thumbnails */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.lightbox-thumbnails::-webkit-scrollbar {
    display: none;
}

.lightbox-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
    opacity: 0.5;
    scroll-snap-align: center;
}

.lightbox-thumb.active {
    border-color: var(--gold);
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-content.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    transition: 0.3s;
    z-index: 2;
    backdrop-filter: blur(8px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.1);
}

.lightbox-nav {
    display: none !important;
}

.lightbox-nav:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

/* --- WEDDING GIFT --- */
.gift-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
    width: 100%;
}

.gift-card {
    padding: 25px;
    border-radius: 20px;
}

.bank-name {
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.account-number {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 3px;
    margin-bottom: 5px;
    color: var(--text-light);
}

.account-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.btn-copy {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-body);
    min-height: 44px;
}

.btn-copy:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

/* --- WISHES FORM --- */
.wishes-subtitle {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

#wishes-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

#wishes-form input,
#wishes-form textarea {
    font-size: 16px;
    padding: 12px;
    color: var(--text-light);
    border-radius: 15px;
    font-family: var(--font-body);
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
}

#wishes-form input:focus,
#wishes-form textarea:focus {
    outline: 2px solid rgba(212, 175, 55, 0.5);
    outline-offset: 2px;
}

#wishes-form input::placeholder,
#wishes-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-elegant-solid {
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-body);
    min-height: 44px;
}

.btn-elegant-solid:hover {
    background: var(--gold-light);
}

.btn-elegant-solid:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--gold);
}

.wishes-scroll-container {
    width: 100%;
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
    border-radius: 20px;
    padding: 15px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wishes-scroll-container::-webkit-scrollbar {
    display: none;
}

.wish-item {
    background: transparent;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 0;
    padding: 20px 10px;
    text-align: center;
    animation: wishReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transition: transform 0.3s ease, background 0.3s ease;
}

.wish-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: scale(1.02);
}

@keyframes wishReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.wish-item h4 {
    color: var(--gold);
    margin-bottom: 5px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.wish-item p {
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--text-muted);
    position: relative;
    padding: 0 10px;
}

/* --- PARTICLES --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999;
    overflow: hidden;
    display: none;
}

#particles-container.active {
    display: block;
}

.floating-particle {
    position: absolute;
    bottom: -50px;
    background: rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    animation: floatUp linear infinite;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.sparkle-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--gold-light);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px var(--gold);
    animation: sparkleFade 1s forwards;
    z-index: 9999999;
}

@keyframes sparkleFade {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    100% {
        opacity: 0;
        transform: scale(0) translateY(-30px);
    }
}

/* --- FOOTER & BRANDING --- */
.footer-container {
    margin-top: 60px;
    width: 100%;
    z-index: 2;
    position: relative;
    padding-bottom: 30px;
}

.footer-closing-quote {
    margin-bottom: 25px;
    padding: 0 20px;
}

.footer-verse {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--gold-light);
    margin: 10px 0 5px;
    line-height: 1.5;
}

.footer-verse-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-credit {
    margin-top: 30px;
}

.footer-credit-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* FIX Subbrand Layout */
.brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--gold);
}

.subbrand {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-light);
    margin-top: -8px;
    letter-spacing: 2px;
}

.footer-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.4));
}

/* --- UTILITY CLASSES --- */
.loading-video-fill {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: inherit;
}

.glass-card-padded {
    padding: 30px;
    border-radius: 20px;
}

.guest-info-box {
    padding: 25px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 40%, rgba(0, 0, 0, 0.4) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.calendar-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gold-line-separator {
    margin: 30px auto;
}

.gift-note {
    margin-top: 35px;
    padding: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.gift-note-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-style: italic;
}

.video-hint-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

.quote-card {
    position: relative;
    overflow: visible;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.quote-mark {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--gold);
    opacity: 0.25;
    line-height: 1;
    display: block;
}

.quote-mark-open {
    text-align: left;
    margin-bottom: -5px;
}

.quote-mark-close {
    text-align: right;
    margin-top: -5px;
}

.quote-ornament-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 12px auto;
    opacity: 0.5;
}

.quote-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--text-light);
    font-style: italic;
}

.quote-source {
    font-size: 0.85rem;
    color: var(--gold);
    margin-top: 10px;
    letter-spacing: 2px;
    font-weight: 500;
}

.textarea-wrapper {
    position: relative;
    width: 100%;
}

.textarea-wrapper textarea {
    width: 100%;
}

.char-counter {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
    pointer-events: none;
    transition: color 0.3s;
}

.char-counter.near-limit {
    color: #e8a040;
    opacity: 1;
}

.char-counter.at-limit {
    color: #e85050;
    opacity: 1;
}

.success-toast {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translate(-50%, 20px);
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gold-light);
    background: rgba(15, 15, 15, 0.95) !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.15);
    z-index: 9999999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Responsive wrapping & alignment */
    text-align: center;
    max-width: 90vw;
    width: max-content;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.success-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.btn-copy.copied {
    background: var(--gold);
    color: var(--bg-dark);
    border-color: var(--gold);
}

.map-preview {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
    height: 150px;
    position: relative;
    cursor: pointer;
}

.map-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
}

.map-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(0.3) contrast(1.1);
    transition: filter 0.3s;
}

.map-preview:hover iframe {
    filter: grayscale(0) contrast(1);
}

.snap-section,
.snap-section-auto {
    transition: opacity 0.6s ease;
}

.section-parallax-content {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.snap-section.parallax-out .section-parallax-content,
.snap-section-auto.parallax-out .section-parallax-content {
    transform: translateY(-20px);
    opacity: 0.3;
}

.lightbox-swipe-hint {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    white-space: nowrap;
}

.lightbox.is-active .lightbox-swipe-hint {
    opacity: 1;
    animation: swipeHintFade 3s forwards;
}

@keyframes swipeHintFade {
    0% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* --- CUSTOM VIDEO FULLSCREEN UI --- */
.css-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    z-index: 9999999 !important;
    background: #000 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
}

@media screen and (orientation: portrait) {
    .css-fullscreen {
        transform: rotate(90deg);
        transform-origin: center center;
        width: 100dvh !important;
        height: 100vw !important;
        top: calc((100dvh - 100vw) / 2) !important;
        left: calc((100vw - 100dvh) / 2) !important;
    }
}

.css-fullscreen .custom-video {
    object-fit: contain !important;
    max-height: none !important;
    height: 100% !important;
}

.video-custom-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.css-fullscreen .video-custom-ui {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.css-fullscreen.ui-idle .video-custom-ui {
    opacity: 0;
}

.css-fullscreen.ui-idle {
    cursor: none;
}

.css-fullscreen .video-ui-layer,
.css-fullscreen .video-progress-bar {
    display: none;
}

.ctrl-close-btn {
    align-self: flex-end;
    margin: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    pointer-events: auto;
    transition: background 0.3s;
}

.ctrl-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ctrl-close-btn svg {
    width: 24px;
    height: 24px;
}

.ctrl-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    pointer-events: auto;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s, transform 0.2s;
}

.ctrl-center-play svg {
    width: 40px;
    height: 40px;
    margin-left: 5px;
}

.ctrl-center-play.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1.2);
}

.ctrl-bottom-bar {
    margin: 20px;
    background: rgba(20, 20, 20, 0.85);
    border-radius: 12px;
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    gap: 12px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
    min-width: 44px;
    min-height: 44px;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ctrl-time {
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    color: #eee;
    min-width: 40px;
    text-align: center;
}

.ctrl-progress-container {
    flex-grow: 1;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.ctrl-progress-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    top: 8px;
}

.ctrl-progress-filled {
    position: absolute;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
    top: 8px;
    left: 0;
    width: 0%;
    transition: width 0.1s linear;
}

.ctrl-progress-filled::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (min-width: 768px) {
    .container {
        max-width: 750px;
    }

    .section-title {
        font-size: 3.5rem;
    }

    .cover-content .title {
        font-size: 5.5rem;
    }

    .photo-full-width {
        max-width: 500px;
    }

    #event-countdown .container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #event-countdown .section-title,
    #event-countdown .text-center {
        width: 100%;
    }

    .event-block {
        width: 48%;
    }

    .gold-line-small {
        display: none;
    }

    .story-card {
        width: 45%;
    }

    .gift-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .gift-card {
        width: 48%;
    }

    .gallery-item {
        height: 230px;
    }
}

@media (max-width: 500px) {
    .story-card {
        width: 75%;
    }

    .story-card.left::after {
        right: -20px;
    }

    .story-card.right::after {
        left: -20px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .snap-section {
        height: auto;
        min-height: 100dvh;
        padding: 60px 0;
    }

    .photo-full-width {
        max-width: 250px;
    }

    .cover-content .title {
        font-size: 3rem;
        margin: 5px 0;
    }

    .gallery-item {
        height: 160px;
    }
}

/* --- ACCESSIBILITY: REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .shimmer-text {
        animation: none;
        -webkit-text-fill-color: var(--gold);
    }

    .scroll-indicator {
        animation: none;
        opacity: 0.6;
    }

    .orb {
        animation: none;
    }

    .squircle-drop {
        animation: none;
        border-radius: 30%;
    }

    .coverflow-item.active {
        animation: none;
    }
}