/* Wedding Invitation Styles */

@import url('https://fonts.googleapis.com/css2?family=Allura&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
    --color-text: #000000;
    --color-accent: #9daf89;
    --color-gray: #a8a8a8;
    --color-white: #ffffff;
}

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

html {
    overflow-y: scroll;
}

body {
    font-family: 'Lora', serif;
    color: var(--color-text);
    line-height: 1.6;
    background-image: url('images/background.webp');
    background-repeat: repeat;
    background-size: auto;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/background.webp');
    background-repeat: repeat;
    background-size: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

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

#loading-screen img {
    width: 400px;
    height: auto;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Allura', cursive;
    font-weight: normal;
}

/* Title Header */
#title {
    text-align: center;
    padding: 0;
    margin: 0;
    margin-top: 1.5rem;
}

#title h1 {
    display: inline-block;
    font-size: 1.8rem;
    color: white;
    background-image: url('images/btn-bg.webp');
    background-size: 100% 200%;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0.8rem 4rem;
    margin: 0;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* Cards Section */
#cards {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#cards h2 {
    font-size: 1.8rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.divider {
    width: 100vw;
    max-width: none;
    height: auto;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    margin-left: calc(-50vw + 50%);
}

.cards-hand {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 350px;
}

.card {
    position: absolute;
    width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    filter: grayscale(100%);
    opacity: 0;
}

.cards-ready .card {
    animation: cardFadeIn 0.6s ease forwards;
}

.cards-ready .card-1 {
    animation: cardFan1 0.6s ease forwards;
    animation-delay: 0.1s;
}

.cards-ready .card-2 {
    animation: cardFan2 0.6s ease forwards;
    animation-delay: 0.2s;
}

.cards-ready .card-3 {
    animation: cardFan3 0.6s ease forwards;
    animation-delay: 0.3s;
}

@keyframes cardFan1 {
    from {
        opacity: 0;
        transform: translateY(50px) rotate(0deg);
    }
    to {
        opacity: 1;
        transform: rotate(-15deg) translateX(-110px);
    }
}

@keyframes cardFan2 {
    from {
        opacity: 0;
        transform: translateY(50px) rotate(0deg);
    }
    to {
        opacity: 1;
        transform: rotate(0deg);
    }
}

@keyframes cardFan3 {
    from {
        opacity: 0;
        transform: translateY(50px) rotate(0deg);
    }
    to {
        opacity: 1;
        transform: rotate(15deg) translateX(110px);
    }
}

.card-1 {
    z-index: 1;
}

.card-2 {
    z-index: 2;
}

.card-3 {
    z-index: 1;
}

@media (min-width: 768px) {
    .cards-hand {
        height: 260px;
        width: 600px;
    }

    .card {
        width: 200px;
    }

    @keyframes cardFan1 {
        from {
            opacity: 0;
            transform: translateY(50px) rotate(0deg);
        }
        to {
            opacity: 1;
            transform: rotate(-15deg) translateX(-160px);
        }
    }

    @keyframes cardFan3 {
        from {
            opacity: 0;
            transform: translateY(50px) rotate(0deg);
        }
        to {
            opacity: 1;
            transform: rotate(15deg) translateX(160px);
        }
    }
}

section {
}

/* Hero Section */
#hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.hero-photo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    width: 180px;
    height: auto;
    filter: grayscale(100%);
    margin-right: -15px;
    position: relative;
    z-index: 1;
}

.hero-overlay {
    width: 180px;
    height: auto;
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .hero-bg {
        width: 280px;
        margin-right: -25px;
    }

    .hero-overlay {
        width: 280px;
    }
}

/* Hero Framed Section */
#hero-framed {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

#hero-framed h2 {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.framed-wrapper {
    background-image: url('images/rsvp-bg.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    padding: 1.5rem;
    text-align: center;
}

.framed-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 1rem;
    position: relative;
}

.framed-photo .hero-bg {
    position: relative;
}

.tape {
    position: absolute;
    top: -40px;
    left: 25%;
    transform: translateX(-50%);
    width: 80px;
    height: auto;
    z-index: 10;
}

.framed-photo .hero-bg {
    width: 150px;
    margin-right: 0;
}

.framed-photo .hero-overlay {
    width: 150px;
    margin-top: -30px;
}

.accept-btn {
    display: inline-block;
    margin: 1rem auto 0;
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: white;
    background-color: var(--color-accent);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.accept-btn:hover {
    background-color: #7a9a6a;
}

/* RSVP Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem 3rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    margin: 1rem;
    animation: popIn 0.3s ease;
}

.modal-content h2 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1rem;
}

.modal-hearts {
    font-size: 2rem;
    color: var(--color-accent);
    animation: pulse 1s infinite;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (min-width: 768px) {
    .framed-wrapper {
        padding: 2rem;
    }

    .framed-photo {
        padding: 1.5rem;
    }

    .framed-photo .hero-bg {
        width: 250px;
        margin-right: 0;
    }

    .framed-photo .hero-overlay {
        width: 250px;
        margin-top: -40px;
    }
}

/* Attire Section - Mobile First */
#attire {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-x: clip;
}

.attire-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#attire h2 {
    font-size: 1.8rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

#attire h2::after {
    content: url('images/flourish.webp');
    position: absolute;
    left: 50%;
    top: -30%;
    transform: translateX(-50%) scale(0.8);
    transform-origin: center top;
}

.attire-content {
}

.attire-subtitle {
    font-family: 'Allura', cursive;
    font-size: 2.5rem;
    font-style: normal;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    line-height: 0.9;
}

.attire-content p {
    font-style: italic;
    margin-bottom: 0;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.color-swatches {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brush-stroke {
    width: 110px;
    height: 30px;
}

.brush-stroke:nth-child(1) {
    transform: rotate(-1deg);
}

.brush-stroke:nth-child(2) {
    transform: rotate(2deg);
}

.brush-stroke:nth-child(3) {
    transform: rotate(-2deg);
}

.attire-closing {
    font-style: italic;
}

.attire-image {
    margin-top: 0;
}

.attire-image img {
    max-width: 250px;
    height: auto;
}

.attire-examples {
    display: grid;
    grid-template-columns: 1fr 1fr 0.5fr;
    gap: 0.5rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.attire-examples img {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.attire-examples img:hover {
    transform: scale(1.05);
}

.attire-examples .couple-illustration {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%) rotate(-10deg);
    width: 200px;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.attire-examples .couple-illustration:hover {
    transform: translateY(-50%) rotate(-10deg);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
}

.image-placeholder {
    width: 200px;
    height: 300px;
    background-color: #d0d0d0;
}

/* RSVP Section */
#rsvp {
    text-align: center;
    background-image: url('images/rsvp-bg.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    padding: 3rem 1rem;
}

#rsvp h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.rsvp-btn {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: white;
    background-color: var(--color-accent);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rsvp-btn:hover {
    background-color: #7a9a6a;
}

/* Registry Section */
#registry {
    text-align: center;
}

#registry h2 {
    font-size: 2.5rem;
    color: var(--color-accent);
}

.registry-image-wrapper {
    position: relative;
    display: inline-block;
    margin: 1rem 0;
}

.registry-image {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.registry-couple {
    position: absolute;
    width: 35%;
    aspect-ratio: 1/1;
    object-fit: cover;
    top: 25%;
    right: 11%;
    transform: rotate(6deg);
}

.registry-text {
    font-family: 'Lora', serif;
    font-style: italic;
    margin: 1rem 0;
}

.registry-btn {
    display: inline-block;
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: white;
    background-color: var(--color-accent);
    text-decoration: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.registry-btn:hover {
    background-color: #7a9a6a;
}

/* Desktop Styles */
@media (min-width: 768px) {
    main {
        padding: 2rem 0;
    }

    .attire-main {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

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

    .attire-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .color-swatches {
        justify-content: center;
    }

    .attire-image {
        order: 2;
        margin-top: 0;
    }

    .attire-image img {
        max-width: 350px;
    }

    #attire h2 {
        font-size: 2.2rem;
    }
}
