@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Montserrat:wght@300;400;500&family=Playball&display=swap');

/* --- CUSTOM FONTS --- */
@font-face {
    font-family: 'Amsterdam Four';
    src: url('assets/fonts/Amsterdam-Four.woff2') format('woff2'),
         url('assets/fonts/Amsterdam-Four.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --c-maroon: #5c1015;
    --c-maroon-dark: #3a080c;
    --c-cream: #f6f4ed;
    --c-text-main: #333333;
    --c-text-light: #ffffff;
    --c-gold: #b59b74;

    --f-serif: 'Cormorant Garamond', serif;
    --f-sans: 'Montserrat', sans-serif;
    --f-cursive: 'Playball', cursive;
}

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

body, html {
    width: 100%; height: 100%;
    background-color: #000;
    font-family: var(--f-serif);
    -webkit-font-smoothing: antialiased;
    color: var(--c-text-main);
    overflow: hidden; 
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, p { font-weight: 400; }
.font-cursive { font-family: var(--f-cursive); line-height: 1.2; }
.font-serif { font-family: var(--f-serif); }
.font-sans { font-family: var(--f-sans); }

/* FIX 2: Scaled down headers down by 8px (~0.5rem) */
.title-hero { font-size: 3.5rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.title-section { font-size: 3rem; }
.title-cream { color: var(--c-maroon); font-size: 3rem; }

.subtitle-sans { font-family: var(--f-sans); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #fff; }
.subtitle-serif { font-family: var(--f-serif); font-size: 14px; letter-spacing: 3px; color: #fff; }

.text-body { font-size: 1.15rem; line-height: 1.6; }
.text-small { font-size: 0.95rem; line-height: 1.5; }
.text-italic { font-style: italic; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-maroon { color: var(--c-maroon); }
.text-white { color: #fff; }
.opacity-80 { opacity: 0.8; }

/* Utilities */
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-4 { margin-bottom: 40px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.w-100 { width: 100%; }

/* --- MAIN LAYOUT --- */
.split-layout { display: flex; width: 100vw; height: 100dvh; }

.left-pane {
    flex: 1.2; position: relative; background: #111;
    display: flex; flex-direction: column; padding: 40px;
}
.left-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: 0.85; z-index: 1;
}
.left-gradient {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(135deg, rgba(92,16,21,0.7) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.4) 100%);
}
.left-content { position: relative; z-index: 3; }

/* Vinyl Icon Styling */
.vinyl-icon { width: 20px; height: 20px; transition: 0.3s; }
.spin-anim { animation: spinVinyl 3s linear infinite; }
@keyframes spinVinyl { 100% { transform: rotate(360deg); } }

/* Global Language Toggle (Top Right) */
.lang-box-btn {
    position: fixed; top: 30px; right: 30px; z-index: 1000;
    background: var(--c-gold); color: #fff; border: none;
    padding: 8px 12px; border-radius: 4px; font-family: var(--f-serif);
    font-size: 1rem; cursor: pointer; display: flex; align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: background 0.3s;
}
.lang-box-btn:hover { background: #9a825e; }

/* Music Control for Desktop (inside left-pane) */
.floating-controls {
    position: absolute; bottom: 30px; left: 30px; z-index: 100;
    display: flex; gap: 12px;
}
.control-btn {
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.2); color: #fff;
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    backdrop-filter: blur(5px); transition: background 0.3s;
}
.control-btn:hover { background: rgba(255,255,255,0.4); }

/* Music Control for Mobile (beside language toggle) */
.music-control-btn {
    position: fixed; top: 28px; right: 110px; z-index: 1000;
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: var(--c-gold); color: #fff;
    display: none; /* Hidden by default, shown on mobile */
    justify-content: center; align-items: center; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: background 0.3s, opacity 0.3s;
}
.music-control-btn:hover { background: #9a825e; }

/* Hamburger Menu Button */
.hamburger-btn {
    position: fixed; top: 30px; left: 30px; z-index: 1000;
    width: 40px; height: 40px; background: transparent; border: none;
    display: none; /* Hidden by default on desktop */
    flex-direction: column; justify-content: space-around;
    padding: 8px 0; cursor: pointer; transition: all 0.3s ease;
}
.hamburger-btn:focus { outline: none; }
.hamburger-line {
    width: 100%; height: 2px; background: var(--c-maroon);
    border-radius: 2px; transition: all 0.3s ease;
}
.hamburger-btn.is-active .hamburger-line:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger-btn.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active .hamburger-line:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Show hamburger menu only on mobile */
@media (max-width: 1024px) {
    .hamburger-btn {
        display: flex;
    }
}

/* Navigation Menu Overlay */
.nav-menu-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 999999 !important;
    display: flex !important; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}
.nav-menu-overlay.is-active {
    opacity: 1; visibility: visible; pointer-events: auto;
}

.nav-menu-content {
    background: var(--c-cream); padding: 40px; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-align: center;
    transform: scale(0.8) translateY(20px); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease;
    position: relative; width: 90%; max-width: 400px;
}
.nav-menu-overlay.is-active .nav-menu-content {
    transform: scale(1) translateY(0); opacity: 1;
}

.nav-close-btn {
    position: absolute; top: 15px; right: 20px; background: transparent; border: none;
    font-size: 2.5rem; color: var(--c-maroon); cursor: pointer; transition: opacity 0.3s ease;
    line-height: 1;
}
.nav-close-btn:hover { opacity: 0.7; }

.nav-links {
    display: flex; flex-direction: column; gap: 15px; margin-top: 20px;
}
.nav-link {
    font-family: var(--f-serif); font-size: 1.6rem; color: var(--c-maroon);
    text-decoration: none; transition: color 0.3s ease;
}
.nav-link:hover { color: var(--c-gold); }

.right-pane {
    flex: 0 0 500px; max-width: 100vw; height: 100dvh; position: relative; z-index: 10;
    background: var(--c-cream); box-shadow: -10px 0 30px rgba(0,0,0,0.5); overflow: hidden;
}

@media (max-width: 1024px) {
    .left-pane { display: none; }
    .right-pane { flex: 0 0 100%; box-shadow: none; }
    .music-control-btn { display: flex; } /* Show mobile music control */
}

/* --- SCROLL SNAPPING --- */
.scroll-content {
    width: 100%; height: 100%; 
    overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth;
    -ms-overflow-style: none; scrollbar-width: none;
    scroll-snap-type: y mandatory; 
}
.scroll-content::-webkit-scrollbar { display: none; }
.scroll-content.locked { overflow: hidden; }

.snap-page {
    scroll-snap-align: start; 
    min-height: 100dvh; width: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 60px 30px; position: relative;
}

/* --- COVER SCREEN & VIDEO BG --- */
.cover-screen {
    position: absolute; inset: 0; z-index: 100; background: #0c0c0c;
    display: flex; flex-direction: column; justify-content: space-between; align-items: center;
    padding: 60px 20px; transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    overflow: hidden; 
}
.cover-screen.is-open { transform: translateY(-100%); }
.cover-video-wrapper { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cover-video-wrapper video { width: 100%; height: 100%; object-fit: cover; }
.cover-video-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.cover-screen > div:not(.cover-video-wrapper) { position: relative; z-index: 2; }


/* --- ENVELOPE --- */
.envelope-wrapper {
    position: relative;
    width: 90%;
    max-width: 420px;
    margin: 80px auto 20px auto;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.envelope {
    position: relative;
    width: 100%;
    display: block;
}

/* 1. Envelope Front Pocket (This dictates the base height) */
.env-img-front { 
    width: 100%; 
    height: auto; 
    display: block; 
    position: relative; 
    z-index: 4; 
}

/* 2. Envelope Back (Lifted up) */
.env-img-back { 
    position: absolute;
    bottom: 25%; 
    left: 0;
    width: 100%; 
    height: auto; 
    z-index: 1; 
}

/* 3. Photos (Polaroids) */
.env-polaroids {
    position: absolute;
    width: 100%;
    height: 100%; 
    bottom: 0;
    left: 0;
    z-index: 2; /* Behind the front pocket and flowers */
}
.env-polaroid {
    position: absolute;
    background: #fff;
    padding: 6px 6px 18px 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    border-radius: 2px;
    opacity: 0;
}
.env-polaroid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1px;
}

.p1 {
    width: 45%;
    height: auto;
    aspect-ratio: 3/4;
    bottom: 48%; /* LIFTED HIGHER */
    left: 5%;
    animation: popLeft 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 1.2s;
}
.p2 {
    width: 50%;
    height: auto;
    aspect-ratio: 3/4;
    bottom: 36%; /* LOWERED BEHIND LEFT IMAGE */
    right: 5%;
    animation: popRight 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 1.4s;
}

/* 4. Flowers (Behind env-2) */
.env-flowers {
    position: absolute;
    left: -40px; /* MOVED FURTHER LEFT */
    bottom: 50%; /* LIFTED UP */
    z-index: 3; /* Placed exactly behind the front pocket */
    width: 150px; 
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.8s;
    pointer-events: none;
}
.flowers-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* 5. Seal & Text (Stacked) */
.env-front-content {
    position: absolute;
    bottom: 12%; 
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5; 
}

.env-seal-pop {
    transform: scale(0);
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; 
    animation-delay: 2.2s;
    margin-bottom: 5px;
}

.env-wax-seal {
    width: 110px; 
    height: 110px; 
    cursor: pointer;
    transition: transform 0.3s;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
    pointer-events: auto;
}
.env-wax-seal:hover { transform: scale(1.1); }

.env-couple-name {
    text-align: center;
    font-family: 'Amsterdam Four', cursive !important; 
    font-size: 2.8rem; /* Slightly smaller to fit on one line */
    white-space: nowrap; /* FORCES TEXT ONTO ONE LINE */
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 2.5s;
}
.env-couple-name .name-1, 
.env-couple-name .name-2 { 
    display: inline-block; /* CHANGED FROM BLOCK TO INLINE-BLOCK */
    margin: 0 4px; /* Adds a tiny bit of breathing room between names */
}

/* Animations */
@keyframes popLeft {
    from { transform: translate(0, 40px) rotate(0deg); opacity: 0; }
    to { transform: translate(-10px, -10px) rotate(-10deg); opacity: 1; }
}
@keyframes popRight {
    from { transform: translate(0, 40px) rotate(0deg); opacity: 0; }
    to { transform: translate(10px, -15px) rotate(8deg); opacity: 1; }
}
@keyframes zoomIn { 
    from { transform: scale(0); } 
    to { transform: scale(1); } 
}
@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* --- SECTION STYLES --- */
.section-cream { background: var(--c-cream); color: var(--c-text-main); }
.section-maroon { background-color: var(--c-maroon); color: #fff; position: relative; }
.section-maroon::before {
    content: ""; position: absolute; inset: 0; opacity: 0.4; mix-blend-mode: overlay; pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)"/%3E%3C/svg%3E');
}
.content-wrapper { position: relative; z-index: 2; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; }

/* --- TITLE BACKGROUND ICONS --- */
.title-wrap {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 2;
}

.title-wrap h2 {
    position: relative;
    z-index: 2;
    margin: 0 !important;
}

.title-bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 110px;
    width: auto;
    z-index: 1;
    pointer-events: none;
}

.icon-dark {
    opacity: 1;
}

.icon-light {
    filter: invert(1);
    opacity: 1;
}

/* Countdown */
.countdown-box { display: flex; justify-content: center; gap: 10px; margin-top: 15px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; width: 55px; }
.cd-unit span { font-size: 2rem; line-height: 1; }
.cd-unit label { font-size: 0.8rem; font-style: italic; opacity: 0.8; margin-top: 5px; }
.cd-sep { font-size: 1.8rem; opacity: 0.7; margin-top: -3px; }

/* Full Bleed Portraits */
.portrait-panel { padding: 0; }
.portrait-panel img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: 1; }
.portrait-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 80px 30px 40px 30px; z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}
.portrait-name { font-size: 2.5rem; font-family: var(--f-serif); line-height: 1.2; font-weight: 500; margin-bottom: 5px; }

/* Mixed Portrait & Landscape Gallery */
.horizontal-gallery {
    display: flex; overflow-x: auto; gap: 15px; width: 100%; padding: 10px 0 20px 0;
    scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none;
}
.horizontal-gallery::-webkit-scrollbar { display: none; }
.gal-col {
    flex: 0 0 85%; height: 55vh; scroll-snap-align: center;
    display: flex; flex-direction: column; gap: 15px; border-radius: 4px;
}
.gal-portrait { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.gal-landscape { width: 100%; height: calc(50% - 7.5px); object-fit: cover; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Forms & Inputs (RSVP / Wishes) */
.rsvp-form-container { width: 100%; background: #fff; padding: 25px; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; font-size: 0.95rem; margin-bottom: 5px; opacity: 0.9; color: var(--c-maroon); font-weight: 500;}
.form-input {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(92,16,21,0.3);
    color: var(--c-text-main); padding: 8px 0; font-family: var(--f-serif); font-size: 1.1rem; outline: none; transition: 0.3s;
}
.form-input::placeholder { opacity: 0.5; font-style: italic; }
.form-input:focus { border-bottom-color: var(--c-maroon); }
.form-input[readonly] { opacity: 0.7; cursor: not-allowed; border-bottom-color: rgba(92,16,21,0.1); }

/* Radio Buttons */
.radio-group { display: flex; gap: 10px; margin-top: 5px; }
.radio-label {
    flex: 1; text-align: center; padding: 10px; border: 1px solid rgba(92,16,21,0.3);
    border-radius: 4px; cursor: pointer; transition: 0.3s; font-size: 0.95rem; color: var(--c-maroon);
}
.radio-label input { display: none; }
.radio-label:has(input:checked) { background: var(--c-maroon); color: #fff; border-color: var(--c-maroon); }

/* Buttons & Links */
.btn-box {
    display: inline-block; padding: 12px 30px; background-color: var(--c-maroon); color: #fff;
    border: 1px solid var(--c-maroon); border-radius: 4px; font-family: var(--f-sans); font-size: 0.9rem;
    letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all 0.3s ease;
}
.btn-box:hover { background-color: transparent; color: var(--c-maroon); }
.btn-box:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-minimal {
    background: transparent; border: none; border-bottom: 1px solid; color: inherit;
    font-family: var(--f-serif); font-size: 1.1rem; padding-bottom: 2px; cursor: pointer; transition: 0.3s;
}
.btn-minimal:hover { opacity: 0.7; }

.btn-maps {
    display: inline-block; padding: 8px 20px; background-color: transparent; color: #fff;
    border: 1px solid rgba(255,255,255,0.5); border-radius: 30px; text-decoration: none;
    font-family: var(--f-sans); font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; transition: all 0.3s ease;
}
.btn-maps:hover { background-color: #fff; color: var(--c-maroon); }

.link-ig { color: #ffffff; text-decoration: none; transition: opacity 0.3s ease; }
.link-ig:hover { opacity: 1 !important; }

/* Bank Boxes */
.border-box { border: 1px solid rgba(255,255,255,0.3); padding: 25px 20px; margin-bottom: 20px; text-align: center; width: 100%; }
.copy-icon { cursor: pointer; margin-left: 5px; font-size: 0.9rem; opacity: 0.7; }
.copy-icon:hover { opacity: 1; }

/* --- WISHES SECTION LAYOUT LOCK --- */
#wishes .content-wrapper {
    height: 75vh; /* Locks the overall height of the section */
    max-height: 650px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

/* Wishes List */
.wishes-list { 
    flex: 1; /* Takes up all space exactly between the title and pagination */
    width: 100%; 
    text-align: right; 
    margin-top: 15px;
    margin-bottom: 20px;
    overflow-y: auto; /* Allows scrolling inside the list if 5 long messages exceed height */
    padding-right: 15px;
}

/* Custom Scrollbar for the wishes list */
.wishes-list::-webkit-scrollbar { width: 4px; }
.wishes-list::-webkit-scrollbar-thumb { background: rgba(92,16,21,0.2); border-radius: 4px;}

.wish-item { margin-bottom: 15px; }
.w-name { color: var(--c-maroon); font-size: 1.1rem; font-weight: 500; font-family: var(--f-serif); }
.w-msg { color: var(--c-text-main); font-size: 1rem; margin-top: 5px; font-style: italic; word-wrap: break-word;}
.w-divider { width: 30px; height: 1px; background: rgba(92,16,21,0.2); margin: 10px 0 0 auto; }

/* Scroll Animations */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 1s ease-out, transform 1s ease-out; }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; } .delay-2 { transition-delay: 0.4s; }

@keyframes fadeInUpLoad { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.anim-load { animation: fadeInUpLoad 1s ease forwards; opacity: 0; }

/* Pagination Controls */
.pagination-controls { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    margin-top: auto; /* Pushes the pagination strictly to the bottom edge */
    width: 100%;
    padding-bottom: 10px;
}
.page-btn {
    background: transparent; 
    border: 1px solid rgba(92, 16, 21, 0.3); 
    color: var(--c-maroon);
    padding: 6px 12px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-family: var(--f-sans); 
    font-size: 0.9rem; 
    transition: all 0.3s ease;
}
.page-btn:hover:not(.disabled) { 
    background: var(--c-maroon); 
    color: #fff; 
}
.page-btn.active { 
    background: var(--c-maroon); 
    color: #fff; 
    border-color: var(--c-maroon); 
}
.page-btn.disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
}
.page-dots { 
    color: var(--c-maroon); 
    opacity: 0.7; 
    font-weight: 500;
}

a[href^="tel"] {
    color: inherit !important;
    text-decoration: none !important;
}