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

body {
    font-family: 'Montserrat', sans-serif;
    color: #2c2c2c;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f4f0e6;
    background-image: url('https://i.pinimg.com/originals/bd/eb/e4/bdebe4e6fc1a12e0adb831f28f6b8a08.png');
    /* background-image: url('https://i.pinimg.com/736x/90/b5/e3/90b5e34521ff274277fd48616a354e7c.jpg'); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#lang-btn {
    background: transparent;
    border: 1px solid #2c2c2c;
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#lang-btn:hover {
    background: #2c2c2c;
    color: #ffffff;
}

.back-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.back-toggle.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-btn {
    background: transparent;
    border: 1px solid #2c2c2c;
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#back-btn:hover {
    background: #2c2c2c;
    color: #ffffff;
}

section {
    padding: 80px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.name {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #1a1a1a;
}

.subtitle, .degree, .university {
    font-size: 1.1rem;
    color: #555;
    letter-spacing: 1px;
}

.degree {
    font-weight: 500;
}

.details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .details {
        flex-direction: row;
        justify-content: space-between;
    }
}

.card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 2px;
    box-shadow: 2px 4px 15px rgba(0,0,0,0.08);
    flex: 1;
    text-align: left;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

/* Scrapbook tape effect */
.card::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 100px;
    height: 30px;
    background: rgba(255, 255, 235, 0.6);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
    z-index: 2;
}

.card:nth-child(1) {
    transform: rotate(-1.5deg);
}

.card:nth-child(2) {
    transform: rotate(1.5deg);
}

.card:hover {
    transform: translateY(-10px) rotate(0deg) scale(1.02);
    box-shadow: 5px 15px 30px rgba(0,0,0,0.12);
    z-index: 10;
}

.card h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 25px;
    color: #1a1a1a;
    text-align: center;
}

.card p {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.map-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    overflow: hidden;
    padding: 15px 15px 60px 15px; /* Creates a Polaroid photo look */
    box-shadow: 3px 6px 20px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.map-container:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 5px 15px 30px rgba(0,0,0,0.15);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-scrapbook {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    background-color: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 20px 20px;
}

.hero-top-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    text-align: center;
    z-index: 10;
    margin-top: 40px;
    color: #1a1a1a;
    max-width: 600px;
}

.hero-center-space {
    min-height: 40vh;
    width: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-bottom-text {
    position: absolute;
    top: calc(45% + 65px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    gap: 1px;
}

.hero-date {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-top: 15px;
}

.hero-time {
    font-weight: 700;
    font-size: 1.2rem;
    color: #777;
}

.hero-location {
    font-size: 1.2rem;
    color: #1a1a1a;
}

.hero-invite {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 1.1rem;
    margin-top: 10px;
    color: #1a1a1a;
}

.invite-top {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.invite-line {
    display: inline-block;
    min-width: 150px;
    border-bottom: 1px solid #2c2c2c;
    text-align: center;
    white-space: nowrap;
    padding: 0 5px;
}

.hero-dresscode {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #1a1a1a;
}


.scrap {
    position: absolute;
    z-index: 5;
    animation: scrapBounce 2s infinite;
}

.scrap-letters-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.scrap-letters-container .scrap {
    pointer-events: auto;
}

#hidden-content {
    display: none;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s ease-in-out, transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#hidden-content.show {
    opacity: 1;
    transform: translateY(0);
}

.G {
    top: 33%;
    left: 12%;
    width: 100px;
    --rot: -5deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.1s;
}

.R {
    top: 33%;
    left: 25%;
    width: 85px;
    --rot: 5deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.2s;
}

.A {
    top: 32%;
    left: 35%;
    width: 60px;
    --rot: -5deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.3s;
}
.D {
    top: 33%;
    left: 45%;
    width: 75px;
    --rot: 8deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.4s;
}

.U {
    top: 32%;
    left: 55%;
    width: 50px;
    --rot: -3deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.5s;
}

.A2 {
    top: 33%;
    left: 65%;
    width: 65px;
    --rot: 12deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.6s;
}

.T {
    top: 32%;
    left: 75%;
    width: 50px;
    --rot: -7deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.7s;
}

.I {
    top: 34%;
    left: 83%;
    width: 40px;
    --rot: 5deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.8s;
}

.O {
    top: 33%;
    left: 90%;
    width: 75px;
    --rot: -10deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 0.9s;
}

.N {
    top: 34%;
    left: 97%;
    width: 85px;
    --rot: 6deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.0s;
}

/* CEREMONY letters */
.C {
    top: 43%;
    left: 26%;
    width: 45px;
    --rot: -6deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.1s;
}

.E {
    top: 43%;
    left: 33%;
    width: 45px;
    --rot: 4deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.2s;
}

.R2 {
    top: 42%;
    left: 40%;
    width: 55px;
    --rot: -3deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.3s;
}

.E2 {
    top: 43%;
    left: 47%;
    width: 45px;
    --rot: 8deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.4s;
}

.M {
    top: 43%;
    left: 54%;
    width: 60px;
    --rot: -5deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.5s;
}

.O2 {
    top: 43%;
    left: 62%;
    width: 50px;
    --rot: 6deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.6s;
}

.N2 {
    top: 43%;
    left: 68%;
    width: 55px;
    --rot: -4deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.7s;
}

.Y {
    top: 43%;
    left: 75%;
    width: 50px;
    --rot: 7deg;
    transform: translateX(-50%) rotate(var(--rot));
    animation-delay: 1.8s;
}

.scrap-hand {
    top: 15%;
    right: -5%;
    width: 150px;
    --rot: -15deg;
    transform: rotate(var(--rot));
    z-index: 6;
    animation: swingInRight 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, scrapBounce2 2.5s infinite 1.9s;
}

.scrap-speaker {
    bottom: -2%;
    right: -5%;
    width: 200px;
    transform: rotate(15deg);
    animation: none;
}

.scrap-pin {
    top: -3%;
    right: 7%;
    width: 50px;
    --rot: -50deg;
    transform: rotate(var(--rot));
    animation: swingInRight 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, scrapBounce2 2.5s infinite 2.1s;
}

.scrap-speaker2 {
    bottom: -25%;
    left: -5%;
    width: 300px;
    --rot: 0deg;
    transform: rotate(var(--rot));
    animation: swingInLeft 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, scrapBounce2 2.5s infinite 2.0s;
}

body.content-revealed .scrap-hand,
body.content-revealed .scrap-pin {
    animation: swingOutRight 0.8s ease-in forwards !important;
}

body.content-revealed .scrap-speaker2 {
    animation: swingOutLeft 0.8s ease-in forwards !important;
}

@media (max-width: 768px) {
    section {
        padding: 60px 15px;
    }
    .hero-bottom-text {
        top: calc(38% + 50px);
        gap: 0;
    }
    .hero-date {
        font-size: 1rem;
        margin-top: 10px;
    }
    .hero-time, .hero-location, .hero-invite {
        font-size: 0.9rem;
    }
    .invite-line {
        min-width: 100px;
    }
    .name {
        font-size: 0.8rem; /* <-- MANUAL FONT SIZE ADJUSTMENT FOR MOBILE (e.g., 0.8rem, 1rem) */
    }
    .thank-you-section .name {
        font-size: 1.8rem;
    }
    .subtitle, .degree, .university {
        font-size: 0.4rem; /* <-- MANUAL FONT SIZE ADJUSTMENT FOR MOBILE (e.g., 0.5rem, 0.6rem) */
    }
    .thank-you-section .subtitle {
        font-size: 0.9rem;
    }
    
    /* Adjustments for the hidden rest pages in mobile */
    .card h2 {
        font-size: 1.3rem; /* <-- MANUAL ADJUST H2 ON MOBILE */
        margin-bottom: 15px;
    }
    .card p {
        font-size: 0.85rem; /* <-- MANUAL ADJUST P ON MOBILE */
    }
    .action-btn {
        font-size: 0.85rem; /* <-- MANUAL ADJUST BUTTON ON MOBILE */
        padding: 8px 18px;
    }

    /* Scale scrapbook letters appropriately for mobile using viewport width (vw) */
    .G { width: 11vw; left: 10%; top: 33%; }
    .R { width: 9.5vw; left: 19%; top: 33%; }
    .A { width: 7vw; left: 28%; top: 32%; }
    .D { width: 8.5vw; left: 36%; top: 33%; }
    .U { width: 7vw; left: 45%; top: 32%; }
    .A2 { width: 6vw; left: 54%; top: 33%; }
    .T { width: 7vw; left: 63%; top: 32%; }
    .I { width: 4.5vw; left: 71%; top: 34%; }
    .O { width: 7.5vw; left: 78%; top: 33%; }
    .N { width: 8.5vw; left: 87%; top: 34%; }

    /* Scale CEREMONY scrapbook letters for mobile */
    .C { width: 6vw; left: 24%; top: 41%; }
    .E { width: 5.5vw; left: 31%; top: 41%; }
    .R2 { width: 7vw; left: 39%; top: 40%; }
    .E2 { width: 5.5vw; left: 46%; top: 41%; }
    .M { width: 7.5vw; left: 54%; top: 41%; }
    .O2 { width: 6.5vw; left: 61%; top: 41%; }
    .N2 { width: 7vw; left: 69%; top: 41%; }
    .Y { width: 6vw; left: 76%; top: 41%; }

    .scrap-hand { 
        width: 100px; 
        /* top: -10%;  */
    }
    .scrap-speaker { 
        width: 120px; 
        /* right: -5%;  */
        /* bottom: 25%;  */
    }
    .scrap-speaker2 {
        width: 150px;
        bottom: 1%;
    }
    .scrap-pin {
        width: 40px;
        right: 15%;
    }
}

.action-btn {
    display: block;
    width: fit-content;
    margin: 15px auto 0;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 10px 24px;
    background-color: #2c2c2c;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #555555;
    transform: translateY(-2px);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-20deg); }
    50% { transform: translateY(-15px) rotate(-15deg); }
}

/* Layout-safe adaption of box-Bounce2 for letter items */
@keyframes scrapBounce {
    from, 50% { transform: translateX(-50%) translateY(0) scale(1, 1) rotate(var(--rot, 0deg)); }
    62.5% { animation-timing-function: ease-in; transform: translateX(-50%) translateY(35%) scale(1.14, 0.95) rotate(var(--rot, 0deg)); }
    68.75% { animation-timing-function: ease-out; transform: translateX(-50%) translateY(-15%) scale(1.05, 1.03) rotate(calc(var(--rot, 0deg) + 15deg)); }
    75% { animation-timing-function: ease-out; transform: translateX(-50%) translateY(-50%) scale(0.96, 1.1) rotate(calc(var(--rot, 0deg) + 5deg)); }
    87.5% { transform: translateX(-50%) translateY(20%) scale(1.12, 0.93) rotate(calc(var(--rot, 0deg) - 3deg)); }
    to { transform: translateX(-50%) translateY(0) scale(1) rotate(var(--rot, 0deg)); }
}

@keyframes scrapBounce2 {
    from, 50% { transform: translateY(0) scale(1, 1) rotate(var(--rot, 0deg)); }
    62.5% { animation-timing-function: ease-in; transform: translateY(35%) scale(1.14, 0.95) rotate(var(--rot, 0deg)); }
    68.75% { animation-timing-function: ease-out; transform: translateY(-15%) scale(1.05, 1.03) rotate(calc(var(--rot, 0deg) + 15deg)); }
    75% { animation-timing-function: ease-out; transform: translateY(-50%) scale(0.96, 1.1) rotate(calc(var(--rot, 0deg) + 5deg)); }
    87.5% { transform: translateY(20%) scale(1.12, 0.93) rotate(calc(var(--rot, 0deg) - 3deg)); }
    to { transform: translateY(0) scale(1) rotate(var(--rot, 0deg)); }
}

/* Requested keyframes block */
@keyframes bTape { from, 50% { transform: translateY(0) rotate(0); } 62.5% { transform: translateY(75%) rotate(0); } 68.75% { transform: translateY(-37.5%) rotate(15deg); } 75% { transform: translateY(-150%) rotate(5deg); } 87.5% { transform: translateY(65%) rotate(-3deg); } to { transform: translateY(0) rotate(0); } }
@keyframes bLeft { from, 50% { transform: rotate(35deg); } 62.5% { transform: rotate(45deg); } 75% { transform: rotate(30deg); } 87.5% { transform: rotate(45deg); } to { transform: rotate(35deg); } }
@keyframes bRight { from, 50% { transform: rotate(-35deg); } 62.5% { transform: rotate(-45deg); } 75% { transform: rotate(-35deg); } 87.5% { transform: rotate(-45deg); } to { transform: rotate(-35deg); } }
@keyframes box-Bounce { from, 50% { transform: translateY(0) scale(1, 1); } 62.5% { transform: translateY(4%) scale(1.12, 0.89); } 75% { transform: translateY(-11%) scale(0.92, 1.1); } 87.5% { transform: translateY(0) scale(1.05, 0.9); } to { transform: translateY(0) scale(1, 1); } }
@keyframes box-Bounce2 { from, 50% { transform: translateY(0) scale(1, 1) rotate(0); } 62.5% { animation-timing-function: ease-in; transform: translateY(45%) scale(1.14, 0.95) rotate(0); } 68.75% { animation-timing-function: ease-out; transform: translateY(-22.5%) scale(1.05, 1.03) rotate(15deg); } 75% { animation-timing-function: ease-out; transform: translateY(-90%) scale(0.96, 1.1) rotate(5deg); } 87.5% { transform: translateY(30%) scale(1.12, 0.93) rotate(-3deg); } to { transform: translateY(0) scale(1) rotate(0); } }
@keyframes boxShadowBounce { from, 50% { transform: translateY(0) scale(1, 1) rotate(0); } 62.5% { animation-timing-function: ease-in; transform: translateY(10%) scale(1.14, 0.95) rotate(0); } 68.75% { animation-timing-function: ease-out; transform: translateY(-10%) scale(1.05, 1.03) rotate(15deg); } 75% { animation-timing-function: ease-out; transform: translateY(-30%) scale(0.96, 1.1) rotate(5deg); } 87.5% { transform: translateY(10%) scale(1.12, 0.93) rotate(-3deg); } to { transform: translateY(0) scale(1.1) rotate(0); } }
@keyframes starRotate1 { from { transform: scale(0) rotate(0); } 25% { transform: scale(1) rotate(0.25turn); } 50%, 100% { transform: scale(0) rotate(0.5turn); } }
@keyframes starRotate2 { from { transform: scale(0) rotate(0); } 25% { transform: scale(1) rotate(-0.25turn); } 50%, 100% { transform: scale(0) rotate(-0.5turn); } }
@keyframes flyUp { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(-14em) rotate(-10deg); } }
@keyframes flyDown { 0% { transform: translateY(-14em) rotate(-10deg); } 100% { transform: translateY(0) rotate(0); } }
@keyframes letterUp { 0% { bottom: 0; opacity: 0; z-index: 1; } 50% { bottom: 30em; opacity: 1; z-index: 5; } 51% { z-index: 25; } 100% { bottom: 2em; opacity: 1; z-index: 25; } }
@keyframes letterDown { 0% { bottom: 2em; opacity: 1; z-index: 25; } 40% { bottom: 15em; opacity: 1; z-index: 25; } 41% { z-index: 5; } 100% { bottom: -20em; opacity: 0; z-index: 5; } }

/* Swing Animations */
@keyframes swingInRight {
    0% { transform: translateX(100vw) rotate(calc(var(--rot) + 60deg)); opacity: 0; }
    100% { transform: translateX(0) rotate(var(--rot)); opacity: 1; }
}

@keyframes swingInLeft {
    0% { transform: translateX(-100vw) rotate(calc(var(--rot) - 60deg)); opacity: 0; }
    100% { transform: translateX(0) rotate(var(--rot)); opacity: 1; }
}

@keyframes swingOutRight {
    to { transform: translateX(100vw) rotate(calc(var(--rot) + 60deg)); opacity: 0; }
}

@keyframes swingOutLeft {
    to { transform: translateX(-100vw) rotate(calc(var(--rot) - 60deg)); opacity: 0; }
}

/* RSVP Modal Styles */
.modal {
    visibility: hidden;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: #f4f0e6;
    padding: 40px 10px 10px 10px;
    border-radius: 8px;
    width: 90%;
    max-width: 680px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-content iframe {
    display: block;
    width: 1px;
    min-width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    color: #2c2c2c;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #555555;
}