:root {
    --bg: #ffffff;
    --text: #0a0a0a;
    --muted: #444444;
    --card-bg: #ffffff;
    --card-border: #000000;
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    min-width: 80%;
    margin: 0px auto;
    padding: 0 20px;
    /* padding-bottom: 20px;
    margin-bottom: 20px; */
}

.site-logo {
    min-width: 500px;
    /* padding: 100px; */
    /* margin-top: 10%; */
}

.site-header {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 20px;
}

.site-title {
    font-size: 1.6rem;
    margin: 0 0 18px;
    color: var(--text);
}

.site-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 20px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: start;
    justify-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.card {
    width: 160px;
    aspect-ratio: 2 / 3.1; /* tall playing card proportion */
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transform-origin: center center;
    transition:
        transform 200ms cubic-bezier(0.2, 0.9, 0.2, 1),
        box-shadow 200ms ease;
    display: flex;
    flex-direction: column;
    user-select: none;
    border: 1px solid var(--card-border);
    position: relative;
}

.card:focus {
    outline: 3px solid rgba(0, 0, 0, 0.08);
    outline-offset: 4px;
}
.card:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.14);
    outline-offset: 4px;
}

.card-media {
    height: 56%;
    background: linear-gradient(180deg, #ffffff, #ffffff);
    display: block;
    border-bottom: 1px solid var(--card-border);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}

.card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}
.card-title {
    margin: 0 0 8px;
    font-size: 1.02rem;
    color: var(--text);
    font-weight: 600;
}
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Hover/interactive effect: lift and slight tilt to feel like a card */
.card:hover, /* this is for the middle card! */
.card:active {
    transform: translateY(-10px) scale(1.04) rotate(0deg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* here this tilts the card left */
.card.card-left:hover,
.card.card-left:active {
    transform: translateY(-10px) scale(1.04) rotate(-2deg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* this tilts our cards right */
.card.card-right:hover,
.card.card-right:active {
    transform: translateY(-10px) scale(1.04) rotate(2deg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.card::after {
    /* subtle paper highlight */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
}
.card:hover::after {
    opacity: 0.04;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.02),
        rgba(0, 0, 0, 0)
    );
}

@media (max-width: 520px) {
    .cards {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 18px;
    }
    .card {
        width: 140px;
    }
}

/* reduce motion preference respect */
@media (prefers-reduced-motion: reduce) {
    .card,
    .card::after {
        transition: none;
    }
}

/* Footer / RSVP styles */
.site-footer {
    /* margin-top: -60px; */
    padding: 18px 0;
    background: transparent;
    margin-bottom: 80px;
}

.site-footer .footer-content {
    display: flex;
    align-items: center;
    justify-content: center; /* center horizontally */
    /* gap: 12px; */
    /* padding: 0 20px; */
    margin-bottom: 0;
}

#rsvp-count {
    /* margin-bottom: 1%; */
    font-size: 1.15rem; /* larger than body text */
    font-weight: 700;
    color: var(--text);
    background: rgba(0,0,0,0.02);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    text-align: center;
    min-width: 200px;
}

/* Center the RSVP element vertically and horizontally in the viewport */
#rsvp-count {
    /* position: absolute; */
    /* left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); */
    z-index: 9999;
    background: transparent; /* temporary; button styles applied below */
}

@media (max-width: 420px) {
    /* On very small screens, fall back to footer-centered placement */
    #rsvp-count {
        position: static;
        transform: none;
        margin: 12px auto;
        display: block;
    }
}

/* Button appearance for centered RSVP on larger screens */
#rsvp-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #000000;
    border-radius: 999px;
    border: 1px solid #000000;
    min-width: 220px;
}

/* Shift main content down so centered RSVP doesn't overlap cards on desktop */
/* @media (min-width: 520px) {
    .container {
        margin-top: 120px; 
    }
} */

@media (max-width: 520px) {
    #rsvp-count {
        font-size: 1rem;
        min-width: 160px;
        /* padding: 6px 10px; */
    }
}

/* @media (max-width: 520px) {
    #rsvp-count {
        font-size: 1rem;
        min-width: 160px;
        padding: 6px 10px;
    }
} */

.modal { /* this hides the modal while its not active! */
    display: none; 
    position: fixed;
    z-index: 100000; 
    left: 0;
    top: 0;
    width: 0%; 
    height: 0%;
    overflow: auto;
    /* background-color: rgb(0,0,0);  */
    background-color: rgba(0,0,0,0.4); 
}

.modal.active { /* if it's active make it visible and apply necessary classes */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    pointer-events: auto;
    width: 100%;
    height: 100%;
}

.modal-content { /* for our content*/
    background-color: #FFFFFF;
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    width: 50%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0,0,0, 0.3)
}

.button-modal {
    background-color: #d3d3d3;
    color: black;
    border: transparent;
    border-radius: 5px;
    padding: .8rem;
    margin: .5rem;
    transition: transform 0.4s ease;
    cursor: pointer;
}