/* --- CSS RESET & VARIABLES --- */
:root {
    --bg-dark: #000000;
    --bg-darker: rgba(10, 10, 10, 0.55);
    --bg-card: rgba(20, 20, 20, 0.85);
    --text-main: #f5f5f5;
    --text-muted: #aaaaaa;
    --border-color: rgba(255, 255, 255, 0.15);
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --font-cursive: 'Pinyon Script', cursive;
}

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

body, html {
    width: 100%; height: 100%;
    background-color: var(--bg-dark); color: var(--text-main);
    font-family: var(--font-sans); -webkit-font-smoothing: antialiased;
    overflow: hidden; 
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, .title { font-family: var(--font-serif); font-weight: 400; color: #ffffff; }
.title.large { font-size: 2.56rem; line-height: 1.1; }
.title.huge { font-size: 4.5rem; line-height: 1; }
.subtitle { font-family: var(--font-sans); font-size: 10px; letter-spacing: 5px; text-transform: uppercase; font-weight: 500; color: var(--text-muted); }
.body-text { font-family: var(--font-sans); font-size: 13px; line-height: 1.8; color: var(--text-muted); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.cursive-quote { font-family: var(--font-cursive); font-size: 2.5rem; line-height: 1.2; color: #fff; }

/* --- NAVIGATION / HAMBURGER MENU --- */
.hamburger-btn {
    position: fixed; top: 25px; right: 25px; width: 45px; height: 45px;
    z-index: 10003; cursor: pointer; display: flex; flex-direction: column;
    justify-content: center; align-items: center; gap: 5px;
    background: rgba(10,10,10,0.6); backdrop-filter: blur(5px);
    border-radius: 50%; border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}
.hamburger-btn span { width: 18px; height: 2px; background: #fff; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.hamburger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- LANGUAGE TOGGLE BUTTON --- */
.lang-toggle-btn {
    position: fixed; top: 25px; right: 85px; width: 45px; height: 45px;
    z-index: 10003; cursor: pointer; display: flex; justify-content: center; align-items: center;
    background: rgba(10,10,10,0.6); backdrop-filter: blur(5px);
    border-radius: 50%; border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s; padding: 0;
    font-family: var(--font-sans); font-size: 11px; font-weight: 600;
    color: #fff; letter-spacing: 1px;
}
.lang-toggle-btn:hover { background: rgba(10,10,10,0.8); border-color: rgba(255,255,255,0.3); }
.lang-indicator { display: inline-block; }

.nav-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 10002; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }
.nav-links { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 25px; }
.nav-links li a {
    font-family: var(--font-serif); font-size: 2.2rem; color: #fff;
    text-decoration: none; opacity: 0.6; transition: opacity 0.3s, transform 0.3s; display: block;
}
.nav-links li a:hover, .nav-links li a:active { opacity: 1; transform: scale(1.1); }

/* --- VINYL MUSIC CONTROL --- */
.music-control {
    position: fixed; bottom: 25px; right: 25px; width: 45px; height: 45px;
    border-radius: 50%; background: #111; z-index: 10000; cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8); border: 2px solid #333; padding: 3px;
    transition: transform 0.3s ease;
}
.music-control:hover { transform: scale(1.05); }
.vinyl-record { width: 100%; height: 100%; border-radius: 50%; background: repeating-radial-gradient(#111, #111 2px, #222 3px, #222 4px); display: flex; justify-content: center; align-items: center; animation: spin 3s linear infinite; animation-play-state: paused; }
.music-control.playing .vinyl-record { animation-play-state: running; }
.vinyl-center { width: 14px; height: 14px; background-color: #8b0000; border-radius: 50%; border: 1px solid #000; position: relative; }
.vinyl-center::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 4px; height: 4px; background-color: #fff; border-radius: 50%; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- LAYOUT: SPLIT SCREEN (DESKTOP) --- */
.app-container { display: flex; width: 100vw; height: 100dvh; background: #000; }
.media-pane { flex: 1; height: 100dvh; position: relative; overflow: hidden; background: #000; }
.media-background { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.85); }
.media-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.2); z-index: 1; }
.desktop-logo { position: absolute; top: 50%; right: 10%; transform: translateY(-50%); text-align: right; color: #fff; z-index: 2; }
.media-pane::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 20vw; background: linear-gradient(to right, transparent, #000); z-index: 5; pointer-events: none; }
.desktop-only { display: block; }
.mobile-only { display: none; }

/* RIGHT: CONTENT WRAPPER */
.content-wrapper { flex: 0 0 56.25vh; min-width: 380px; max-width: 100vw; height: 100dvh; position: relative; background: #000; z-index: 10; overflow: hidden; }
.bg-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.video-overlay { position: absolute; inset: 0; background: linear-gradient(to right, #000 0%, rgba(10,10,10,0.15) 30%, rgba(10,10,10,0.15) 100%); z-index: 1; }

/* SCROLLING CONTENT PANE */
.content-pane {
    position: absolute; inset: 0; overflow-y: scroll; overflow-x: hidden; z-index: 10;
    scroll-snap-type: y mandatory; scroll-behavior: smooth; overscroll-behavior-y: none;
    -ms-overflow-style: none; scrollbar-width: none;  
}
.content-pane::-webkit-scrollbar { display: none; }

/* --- SECTIONS (PANELS) --- */
.panel {
    height: 100dvh; width: 100%; padding: 60px 35px; display: flex; flex-direction: column;
    background: transparent; scroll-snap-align: start; scroll-snap-stop: always; position: relative;
}
.flex-center { justify-content: center; align-items: center; text-align: center; }
.dark-panel { background-color: var(--bg-darker); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.content-box { width: 100%; max-width: 440px; margin: 0 auto; }

/* Couple Names & Ampersand */
.couple-names { display: flex; flex-direction: column; align-items: center; line-height: 0.8; margin: 25px 0; }
.ampersand-cover, .ampersand-small { font-family: var(--font-cursive); font-size: 3.5rem; color: #fff; font-weight: 300; line-height: 1; margin: 5px 0; text-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.name-wrapper { position: relative; display: inline-block; }
.cursive-bg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: var(--font-cursive); font-size: 5.5rem; color: rgba(255, 255, 255, 0.08); z-index: 0; pointer-events: none; white-space: nowrap; }
.name-wrapper .title { position: relative; z-index: 1; }

/* Intro / Hero */
.hero-panel { background: transparent; }
.hero-panel .date { font-family: var(--font-sans); font-size: 11px; letter-spacing: 3px; margin-top: 25px; }
.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--font-sans); font-size: 9px; letter-spacing: 3px; color: var(--text-muted); }
.scroll-indicator .line { width: 1px; height: 40px; background-color: var(--text-muted); animation: scrollLine 2.5s infinite ease-in-out; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 50.1% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Profiles */
.profile-panel { background-size: cover; background-position: center; justify-content: flex-end; padding-bottom: 80px; }
.profile-info { position: relative; padding-left: 25px; border-left: 1px solid rgba(255,255,255,0.3); text-align: left; }
.vertical-text { position: absolute; left: -25px; top: 0; transform: rotate(-90deg) translateX(-100%); transform-origin: top left; font-family: var(--font-sans); font-size: 9px; letter-spacing: 5px; color: var(--text-muted); }
.profile-info .title { line-height: 0.85; margin-bottom: 5px; }
.profile-info .full-name { font-family: var(--font-sans); font-weight: 600; font-size: 15px; margin-bottom: 6px; letter-spacing: 1px; }
.profile-info .parents { font-family: var(--font-sans); font-size: 11px; color: var(--text-muted); margin-bottom: 25px; line-height: 1.6; }
.ig-btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); background: rgba(255,255,255,0.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 10px 20px; border-radius: 40px; font-size: 10px; font-weight: 500; color: #fff; text-decoration: none; letter-spacing: 1.5px; border: 1px solid rgba(255,255,255,0.25); transition: background 0.3s; }
.ig-btn:hover { background: rgba(255,255,255,0.25); }
.ig-icon { font-size: 14px; opacity: 0.8; }

/* Artistic Gallery */
.gallery-panel { padding: 60px 0; justify-content: center; overflow: hidden; }
.gallery-header { padding: 0 35px; margin-bottom: 20px; position: relative; z-index: 2;}

/* 1. Added overflow-y: hidden to strictly prevent up/down scrolling */
/* 2. Increased bottom padding from 30px to 90px to enlarge the track */
.gallery-track { 
    display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; 
    gap: 15px; width: 100%; padding: 10px 35px 90px 35px; 
    -ms-overflow-style: none; scrollbar-width: none; 
}
.gallery-track::-webkit-scrollbar { display: none; }

.gallery-slide { flex: 0 0 85%; scroll-snap-align: center; display: flex; gap: 8px; height: 320px; position: relative; }
.g-main { flex: 1.5; border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.g-main img { width: 100%; height: 100%; object-fit: cover; }
.g-stack { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.g-stack img { width: 100%; height: calc(50% - 4px); object-fit: cover; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); }

/* Changed from top: 70% to bottom: 15px so it fits perfectly in the new bottom space */
.g-cursive-overlay { 
    position: absolute; bottom: 15px; top: auto; left: 15%; 
    font-family: var(--font-cursive); font-size: 3.2rem; line-height: 1; 
    text-align: left; color: #fff; z-index: 5; 
    text-shadow: 0px 5px 20px rgba(0,0,0,0.9); 
    transform: rotate(-3deg); pointer-events: none; 
}

/* Story Section */
.story-panel { justify-content: center; }
.story-header { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.story-img-wrap { width: 45%; aspect-ratio: 4/5; overflow: hidden; border-radius: 4px; border: 1px solid rgba(255,255,255,0.2); }
.story-img-wrap img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(30%); }
.story-title { width: 55%; text-align: left; }
.story-subtitle { font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 8px; color: #fff; }
.story-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; width: 100%; padding-bottom: 10px; -ms-overflow-style: none; scrollbar-width: none; }
.story-track::-webkit-scrollbar { display: none; }
.story-slide { flex: 0 0 85%; scroll-snap-align: start; padding-right: 10px; }
.line-with-arrow { display: flex; align-items: center; gap: 10px; font-size: 9px; letter-spacing: 2px; color: var(--text-muted); margin-top: 15px; text-transform: uppercase; font-style: italic; }
.line-arrow-bar { flex: 1; height: 1px; background: rgba(255,255,255,0.3); position: relative; }
.line-arrow-bar::after { content: '→'; position: absolute; right: -2px; top: -7px; font-style: normal; font-size: 12px; }

/* Events & Countdown */
.countdown-grid { display: flex; justify-content: center; gap: 20px; margin-top: 35px; }
.cd-item { display: flex; flex-direction: column; align-items: center; width: 60px; }
.cd-item span { font-family: var(--font-serif); font-size: 2.8rem; font-weight: 300; }
.cd-item label { font-family: var(--font-sans); font-size: 8px; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; margin-top: 8px; }
.event-block { text-align: center; width: 100%; }
.event-date-display { display: flex; flex-direction: column; align-items: center; margin-bottom: 25px; width: 100%; }
.month-top, .year-bottom { font-family: var(--font-sans); font-size: 10px; letter-spacing: 4px; text-transform: uppercase; }
.date-middle-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; margin: 5px 0;}
.side-item { display: flex; align-items: center; font-family: var(--font-sans); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; }
.side-item.left-side { justify-content: flex-end; padding-right: 20px; }
.side-item.right-side { justify-content: flex-start; padding-left: 20px; }
.event-line { width: 30px; height: 1px; background-color: var(--border-color); }
.left-side .event-line { margin-right: 15px; }
.right-side .event-line { margin-left: 15px; }
.big-num { font-family: var(--font-serif); font-size: 4rem; line-height: 1; font-weight: 400; }
.verse { font-family: var(--font-sans); font-size: 12px; color: var(--text-muted); line-height: 1.8; font-style: italic; margin-bottom: 30px; text-align: center; max-width: 90%; margin-left: auto; margin-right: auto; opacity: 1; }
.event-block .venue { font-family: var(--font-sans); font-size: 12px; color: var(--text-muted); margin-bottom: 25px; line-height: 1.8; }

/* Forms & Inputs */
.line-full { width: 100%; height: 1px; background: var(--border-color); margin: 15px 0 25px 0; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-family: var(--font-sans); font-size: 9px; letter-spacing: 2px; margin-bottom: 10px; color: var(--text-muted); }
input[type="text"], textarea, select { width: 100%; background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); color: #fff; padding: 15px; font-family: var(--font-sans); font-size: 13px; border-radius: 4px; outline: none; transition: border 0.3s; }
input[type="text"]:focus, textarea:focus, select:focus { border-color: #666; }
select option { background: #111; color: #fff; }
.radio-group { display: flex; gap: 15px; }
.radio-btn { flex: 1; border: 1px solid var(--border-color); padding: 15px; text-align: center; font-family: var(--font-sans); font-size: 10px; letter-spacing: 2px; cursor: pointer; border-radius: 4px; transition: all 0.3s; }
.radio-btn input { display: none; }
.radio-btn input:checked + span { color: #fff; font-weight: 600; }
.radio-btn:has(input:checked) { background: rgba(255,255,255,0.08); border-color: #888; }
#guest-count-group { transition: opacity 0.4s, height 0.4s; overflow: hidden; }
.hidden-group { opacity: 0; height: 0; margin-bottom: 0 !important; pointer-events: none; }

/* Lock the guest name field */
input[readonly] { opacity: 0.6; cursor: not-allowed; background: rgba(255,255,255,0.08); font-weight: 600; letter-spacing: 1px; }

/* RSVP Success Message Container */
#rsvp-success-msg { display: none; padding: 30px; text-align: center; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; background: rgba(255,255,255,0.05); }

/* Buttons */
.btn-solid, .btn-outline { font-family: var(--font-sans); font-size: 10px; letter-spacing: 3px; text-transform: uppercase; cursor: pointer; transition: all 0.4s ease; border-radius: 4px; text-decoration: none; display: inline-block; }
.btn-solid { width: 100%; padding: 18px; background: #fff; color: #000; border: none; font-weight: 600; }
.btn-solid:hover { background: #ddd; }
.btn-outline { padding: 14px 28px; background: transparent; border: 1px solid rgba(255,255,255,0.4); color: #fff; }
.btn-outline.small { padding: 10px 18px; font-size: 8px; }
.btn-outline:hover { background: #fff; color: #000; }

/* Wishes System */
.wish-list-container { flex: 1; max-height: 45vh; overflow-y: auto; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); margin: 15px 0; padding: 15px 0; -ms-overflow-style: none; scrollbar-width: none; }
.wish-list-container::-webkit-scrollbar { display: none; }
.loading-wishes { text-align: center; font-size: 12px; color: var(--text-muted); font-family: var(--font-sans); margin-top: 20px;}
.wish-item { padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.03); text-align: left; animation: fadeIn 0.8s ease; }
.wish-item:last-child { border-bottom: none; }
.w-name { font-family: var(--font-sans); font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #fff; }
.w-msg { font-family: var(--font-sans); font-size: 13px; color: var(--text-muted); font-style: italic; line-height: 1.6; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; font-family: var(--font-sans); }
.pagination button:disabled { opacity: 0.2; cursor: not-allowed; }

/* Bank Cards & Footer */
.bank-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.bank-info { display: flex; align-items: center; gap: 15px; }
.bank-img-container { width: 45px; height: 45px; background: #fff; display: flex; align-items: center; justify-content: center; border-radius: 4px; padding: 4px; }
.bank-logo-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.b-name { font-family: var(--font-sans); font-weight: 600; font-size: 14px; }
.b-num { font-family: monospace; font-size: 13px; color: var(--text-muted); margin-top: 2px; pointer-events: none; user-select: text; }
.b-num a { color: var(--text-muted); text-decoration: none; pointer-events: none; }
.copy-btn { background: rgba(255,255,255,0.05); border: none; color: #fff; width: 35px; height: 35px; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background 0.3s; }
.copy-btn:hover { background: rgba(255,255,255,0.2); }
.footer { text-align: center; }

/* --- FULL PAGE COVER OVERLAY --- */
.cover-overlay { position: fixed; inset: 0; width: 100vw; height: 100dvh; background-color: #000; z-index: 10005; display: flex; justify-content: center; align-items: center; transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1); }
.cover-video, .cover-bg-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; filter: brightness(0.7); }
.cover-bg-image { background-size: cover; background-position: center; width: 100%; height: 100%; }
.cover-overlay-darken { position: absolute; inset: 0; background: rgba(0,0,0,0.6); z-index: 1; }
.cover-overlay.open { transform: translateY(-100%); }
.cover-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; max-width: 90%; z-index: 2; }
.guest-info { font-family: var(--font-sans); margin: 20px 0; padding: 25px 40px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);}
.guest-greeting { font-size: 11px; margin-bottom: 8px; color: var(--text-muted); }
.guest-name { font-size: 16px; font-weight: 600; letter-spacing: 3px; color: #fff;}
.guest-apology { font-size: 9px; opacity: 0.6; margin-top: 12px; font-style: italic;}

/* --- DYNAMIC SCROLL ANIMATIONS --- */
.animate-on-scroll { 
    opacity: 0; 
    transform: translateY(50px) scale(0.92); 
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.35, 1), transform 1.2s cubic-bezier(0.25, 1, 0.35, 1); 
}
.animate-on-scroll.is-visible { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
}
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }
.fade-up { animation: fadeUpAnim 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; opacity: 0; }
@keyframes fadeUpAnim { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- RESPONSIVE LOGIC --- */
@media (max-width: 1024px) {
    .app-container { flex-direction: column; }
    .media-pane { display: none; } 
    .content-wrapper { flex: 0 0 100%; max-width: 100vw; box-shadow: none; }
    .video-overlay { background: rgba(10, 10, 10, 0.65); }
    .mobile-only { display: block; }
    .desktop-only { display: none !important; }
}