/* =========================================
   1. GLOBAL RESET
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    background-color: #1a1a1a;
    color: #333;
    overflow: hidden;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* =========================================
   2. SPLASH SCREEN
   ========================================= */
.splash-screen {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
    background: linear-gradient(rgba(128, 0, 32, 0.4), rgba(128, 0, 32, 0.4)), url('img_splash-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 1.5s ease-in-out;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-names {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 10vw, 6rem);
    color: #d4af37;
    font-weight: 400;
    white-space: nowrap;
    text-shadow: none !important;
}

.splash-error {
    margin-top: 20px;
    font-family: 'Great Vibes', cursive;
    color: #d4af37;
    font-size: 1.2rem;
    min-height: 1.5rem;
    font-weight: 400;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* =========================================
   3. BACKGROUND & CAROUSEL
   ========================================= */
.background-collage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('img_main-bg.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
}

.carousel-container {
    display: none;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    width: 100vw;
    height: 100svh;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    align-items: center;
    padding: 0 calc(50vw - min(42.5vw, 225px));
    gap: 40px;
}

.carousel-container,
.scroll-mode {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar,
.scroll-mode::-webkit-scrollbar {
    display: none;
}

/* =========================================
   4. THE CARD
   ========================================= */
.card {
    flex: 0 0 auto;
    width: 85vw;
    max-width: 450px;
    height: 75vh;
    scroll-snap-align: center;
    position: relative;

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.05) 100%),
        url('img_card-bg-3.png');
    background-size: cover;
    /*cover also looks nice*/
    background-repeat: no-repeat;

    border-radius: 15px;

    padding: 8vh 10vw;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);

    border: 1px solid rgba(0, 0, 0, 0.2);

    container-type: inline-size;
    overflow: hidden;

    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease, filter 0.5s ease;
    transform: scale(0.9);
    filter: blur(4px);
    opacity: 8;
}

.card.active-card {
    transform: scale(1);
    filter: blur(0);

    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.4),
        0 10px 20px rgba(0, 0, 0, 0.3),
        0 30px 70px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

@media (min-width: 768px) {
    .card {
        padding: 8vh 50px;
    }
}

.card-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    padding: 0;
}

/* =========================================
   5. THE 3 SUB-WINDOWS
   ========================================= */
.intro-top,
h3 {
    flex: 0 0 auto;
    width: 100%;
    margin-bottom: 5px;
}

.intro-middle {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    /* This pushes the 3 groups apart as the card grows */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    overflow: hidden;
    padding: 1vh 0;
}

.intro-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* This keeps the parents and text close together */
    gap: 0.8vh;
    width: 100%;
}

.event-middle {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    gap: 5px;
    width: 100%;
    overflow: hidden;
}

.event-bottom,
.desc,
.intro-bottom {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 5px;
}

/* =========================================
   6. TYPOGRAPHY
   ========================================= */
.intro-card .ornament {
    font-size: min(1.1rem, 4.5vw, 2vh);
    color: #d4af37;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    width: 100%;
}

h3 {
    font-family: 'Cinzel', serif;
    color: #800020;
    font-size: clamp(1.2rem, 3.2vh, 2rem);
    text-transform: uppercase;
}

.kankotri-couple {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    color: #d4af37;
    font-size: clamp(2rem, 6vh, 4rem);
    line-height: 1.2;
    margin: 0;
    padding: 0.5vh 0;
    filter: 
        drop-shadow(0.5px 0.5px 0px rgba(255, 255, 255, 0.6))
        drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5))
        drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.3));
    display: inline-block;
}

.kankotri-parents {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 700;
    color: #800020;
    white-space: nowrap;
    font-size: clamp(1rem, 7cqw, 1.8rem);
    line-height: 1.2;
    margin: 0 !important;
    padding: 0;
    text-align: center;
}

.card .date {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.2vh, 1.3rem);
    color: #800020;
    margin: 0 !important;
    padding: 0;
}

.kankotri-text,
.card .time,
.card .location,
.card .desc {
    font-size: clamp(0.7rem, 1.8vh, 0.95rem);
    color: #444;
    line-height: 1.1;
    margin: 0;
    padding: 0.2vh 0;
}

/* =========================================
   7. FUNCTIONAL COMPONENTS
   ========================================= */
button.calendar-btn {
    background: none;
    border: none;
    border-bottom: 1px solid #d4af37;
    cursor: pointer;
    padding: 5px 0;
    margin-top: 5px;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.scroll-mode {
    display: block !important;
    overflow-y: auto !important;
}

/* =========================================
   8. UTILITIES
   ========================================= */
@keyframes fadeOutSplash {

    0%,
    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes fadeInContent {

    0%,
    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.gold-foil {
    /* Solid gold base with a bright center that isn't white */
    background: linear-gradient(
        to right, 
        #bf953f 0%, 
        #fcf6ba 45%, 
        #b38728 50%, 
        #fcf6ba 55%, 
        #aa771c 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;

    animation: goldShine 4s linear infinite;
    
    text-shadow: none !important;
}

@keyframes goldShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

#landscape-warning {
    display: none;
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    #landscape-warning {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: #800020;
        color: #d4af37;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .carousel-container,
    .background-collage,
    .splash-screen {
        display: none !important;
    }
}

/* =========================================
   7. RSVP COMPONENTS
   ========================================= */
#rsvp-loading,
#rsvp-error {
    margin: auto;
    text-align: center;
    width: 100%;
    color: #800020;
}

#rsvp-success {
    height: 100%;
    width: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeInContent 0.8s ease;
}

.rsvp-thanks-title {
    font-family: 'Great Vibes', cursive;
    color: #800020;
    font-size: 3.5rem;
    margin: 10px 0;
    font-weight: normal;
    line-height: 1;
}

.rsvp-thanks-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: #444;
    font-style: italic;
    margin: 5px 0;
}

.rsvp-deadline-message {
    text-align: center;
    margin-bottom: 12px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: #444;
    line-height: 1.3;
}

.deadline-date {
    display: block;
    font-weight: bold;
    color: #800020;
    font-size: 0.85rem;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.rsvp-divider {
    height: 1px;
    background-color: rgba(128, 0, 32, 0.2);
    width: 100%;
    margin-top: 5px;
    margin-bottom: 25px;
    border: none;
}

#rsvp-form {
    width: 100%;
    max-width: 320px;
    margin: 10px auto 0 auto;
    text-align: center;
}

.rsvp-btn {
    display: block;
    margin: 30px auto 0 auto;
    padding: 12px 30px;
    background-color: #800020;
    color: white;
    border: none;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
}

.rsvp-btn:hover {
    background-color: #5a0016;
}

.rsvp-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(128, 0, 32, 0.2);
    padding-bottom: 15px;
}

.rsvp-section h4 {
    text-align: center;
    color: #800020;
    margin-bottom: 15px;
}

.rsvp-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 220px;
    margin: 5px auto;
}

.rsvp-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #800020;
    border-radius: 4px;
    margin-right: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsvp-row input[type="checkbox"]:checked::after {
    content: '✔';
    color: #800020;
    font-size: 18px;
    font-weight: bold;
}

.rsvp-row span {
    text-align: left;
    margin-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rsvp-section:last-child {
    border-bottom: none;
}

.flex-center {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
    text-align: center !important;
}

/* =========================================
   8. PRIVACY COMPONENTS
   ========================================= */
#gatekeeper {
    position: fixed;
    inset: 0;
    background-color: #800020;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    transition: opacity 1.5s ease-in-out;
    color: #d4af37;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
}

.dot-spinner {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #d4af37;
    border-radius: 50%;
    animation: dot-pulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-pulse {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.3;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.gate-error-text {
    color: #d4af37 !important;
    font-weight: bold;
    text-align: center;
}

/* =========================================
   9. VERTICAL SLOT
   ========================================= */
.vertical-slot {
    flex: 0 0 auto;
    width: 85vw;
    max-width: 450px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    scroll-snap-align: center;
}

.vertical-slot .card {
    scroll-snap-align: center;
    margin: 12.5vh 0;
    /* Keeps the cards centered */
    flex-shrink: 0;
}

/* THE HINT: Positioned in the margin space */
.vertical-hint {
    height: 0;
    /* Doesn't take up layout space */
    position: relative;
    top: -10vh;
    /* Pulls it up into the gap below the Intro card */
    text-align: center;
    color: #d4af37;
    /* Gold matches your names better than the red */
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    animation: bounce 2s infinite;
    z-index: 5;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

/* =========================================
   10. GUEST GUIDE ACCORDION
   ========================================= */
.accordion-wrapper {
    width: 100%;
    margin-top: 10px;
}

.acc-btn {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(128, 0, 32, 0.2);
    padding: 15px 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    /* Centers the content group */
    align-items: center;
    gap: 10px;
    /* Space between text and icon */
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #800020;
    transition: background 0.3s ease;
}

.acc-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    display: inline-block;
    line-height: 1;
}

/* When open: Rotate icon and remove bottom border for seamless look */
.acc-btn.active {
    border-bottom: none;
}

.acc-btn.active .acc-icon {
    transform: rotate(45deg);
    /* Turns + into x */
}

/* THE ROLL-OUT CONTENT */
.acc-content {
    max-height: 0;
    /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(128, 0, 32, 0.03);
    /* Subtle tint when open */
    border-bottom: 1px solid rgba(128, 0, 32, 0.2);
}

.acc-inner {
    padding: 15px 10px;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #444;
}

.acc-inner p {
    margin-bottom: 10px;
}