@font-face {
    font-family: 'Willsyard';
    src: url('willsyard/Willsyard Demo.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Halima Sofira';
    src: url('halima_sofira/Halima Sofira.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Whitley Alt';
    src: url('whitley-alt-01-regular-1779590719-0/Whitley-Alt-01.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ==========================================================================
   Design Tokens & System Variables
   ========================================================================== */
:root {
    --color-bg-base: #FAF8F5;          /* Clean premium warm cream */
    --color-bg-card: rgba(255, 255, 255, 0.08); /* Translucent white glass for dark background */
    --color-bg-card-hover: rgba(255, 255, 255, 0.12); /* Brighter glass on hover */
    --color-text-primary: #FFFFFF;     /* White text over dark cardboard */
    --color-text-muted: #E5DEC9;       /* Muted light sand text */
    --color-accent-gold: #DFBA8C;      /* Brighter gold to stand out on dark background */
    --color-accent-gold-dark: #F3E5AB; /* Light gold */
    --color-white: #FFFFFF;
    
    --font-script: 'Willsyard', 'Halima Sofira', 'Whitley Alt', 'Alex Brush', 'Great Vibes', cursive;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', 'Montserrat', -apple-system, sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-premium: 0 15px 35px rgba(61, 51, 42, 0.08), 0 5px 15px rgba(0, 0, 0, 0.03);
    --shadow-inset: inset 0 2px 4px rgba(61, 51, 42, 0.04);
}

/* ==========================================================================
   Global Resets & Setup
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--color-text-primary);
    background: linear-gradient(rgba(61, 51, 42, 0.15), rgba(61, 51, 42, 0.15)), 
                url('kraft_background.png') repeat;
    background-size: 600px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==========================================================================
   Layout Structure (Split Layout)
   ========================================================================== */
.app-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100vh;
}

/* Left Column - Sticky Portrait Visual */
.visual-section {
    flex: 1.1;
    height: 100vh;
    position: sticky;
    top: 0;
    background-color: #ECE3D7; /* fallback */
    overflow: hidden;
    padding: 0;
    border-right: 1px solid rgba(197, 168, 128, 0.2);
}

/* Subtle background vignette/fade for the portrait column */
.visual-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(48, 66, 84, 0.05) 0%, rgba(48, 66, 84, 0.25) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Right Column - Scrollable Details & Form */
.info-section {
    flex: 0.9;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 60px 40px;
    scroll-behavior: smooth;
}

.scroll-container {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.couple-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    transition: transform 8s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
    animation: fadeInScale 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-section:hover .couple-photo {
    transform: scale(1.04);
}

/* ==========================================================================
   Typography & Headers
   ========================================================================== */
.intro-header {
    text-align: center;
    margin-top: 10px;
}

.sub-heading {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    animation: fadeInUp 0.8s ease forwards;
}

.couple-names {
    font-family: var(--font-script);
    font-size: 4.2rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 12px;
    color: var(--color-text-primary);
    display: inline-block;
    filter: drop-shadow(0 2px 2px rgba(48, 66, 84, 0.04));
    animation: fadeInUp 1s ease forwards;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 8px auto 18px auto;
    width: 60%;
    animation: fadeInUp 1.1s ease forwards;
}

.divider .line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent-gold), transparent);
}

.divider .heart {
    color: var(--color-accent-gold);
    font-size: 1rem;
    transform: scale(1);
    animation: heartBeat 2s infinite ease-in-out;
}

.wedding-date {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    animation: fadeInUp 1.2s ease forwards;
}

/* ==========================================================================
   Countdown Component
   ========================================================================== */
.countdown-card {
    background-color: var(--color-bg-card); /* Glassmorphic background */
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: var(--shadow-premium);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: fadeInUp 1.3s ease forwards;
}

.countdown-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.countdown-item:not(:last-child)::after {
    content: ':';
    position: absolute;
    right: -8px;
    top: 15%;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-accent-gold);
    opacity: 0.6;
}

.countdown-number {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.countdown-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

/* ==========================================================================
   RSVP Card & Interactive Form
   ========================================================================== */
.rsvp-card {
    background-color: var(--color-bg-card); /* Sand paper background */
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(197, 168, 128, 0.25);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1.4s ease forwards;
}

.rsvp-title {
    font-family: 'Halima Sofira', var(--font-script);
    font-size: 2.6rem;
    font-weight: 400;
    text-align: center;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.rsvp-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 30px;
}

/* Form Styling */
.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.form-label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
}

.form-label-inline {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: #304254; /* Dark slate text for legibility inside input */
    background-color: rgba(255, 255, 255, 0.95); /* Keep input background white */
    border: 1px solid rgba(197, 168, 128, 0.4);
    border-radius: 8px;
    box-shadow: var(--shadow-inset);
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent-gold-dark);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.15), var(--shadow-inset);
}

/* Elegant Custom Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text-primary);
    padding-left: 32px;
    user-select: none;
}

.radio-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: var(--color-white);
    border: 1px solid rgba(197, 168, 128, 0.5);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.radio-label:hover .radio-input ~ .radio-custom {
    border-color: var(--color-accent-gold-dark);
    background-color: var(--color-bg-base);
}

.radio-input:checked ~ .radio-custom {
    border-color: var(--color-text-primary);
    background-color: var(--color-white);
}

.radio-custom::after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #304254; /* Selected dot color */
}

.radio-input:checked ~ .radio-custom::after {
    display: block;
}

/* Form Animation Toggle Helper */
#hotel-group {
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

#hotel-group.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: -15px;
    pointer-events: none;
}

/* Submit Button with Loading Spinner */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-white);
    background-color: #304254; /* Dark slate navy background, highly visible */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(48, 66, 84, 0.15);
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.submit-btn:hover {
    background-color: #1F2C3A; /* Darker slate navy */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 66, 84, 0.2);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Button Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-white);
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading .spinner {
    display: block;
}

.rsvp-success-message {
    display: none; /* Controlled by JS class active */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4A3C31; /* Solid dark cardboard brown to cover form */
    z-index: 5;
    padding: 40px;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.rsvp-success-message.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.success-heart {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: heartPulse 1.2s infinite alternate ease-in-out;
}

.success-title {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.success-text {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.2); }
    28% { transform: scale(1); }
    42% { transform: scale(1.2); }
    70% { transform: scale(1); }
}

@keyframes heartPulse {
    from { transform: scale(0.95); filter: drop-shadow(0 2px 2px rgba(61, 51, 42, 0.05)); }
    to { transform: scale(1.08); filter: drop-shadow(0 5px 8px rgba(61, 51, 42, 0.15)); }
}

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */

/* Desktop & Laptop layout overrides */
@media (min-width: 1400px) {
    .scroll-container {
        max-width: 580px;
    }
    .couple-names {
        font-size: 5rem;
    }
}

/* Tablet & Mobile Breakdown */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .visual-section {
        height: 50vh;
        position: relative;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid rgba(197, 168, 128, 0.25);
    }
    
    .info-section {
        height: auto;
        overflow-y: visible;
        padding: 50px 24px;
    }
    
    .scroll-container {
        max-width: 100%;
        gap: 35px;
    }
    
    .couple-names {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .visual-section {
        height: 48vh;
    }
    
    .couple-names {
        font-size: 2.8rem;
    }
    
    .wedding-date {
        font-size: 1.3rem;
    }
    
    .countdown-card {
        padding: 20px 12px;
    }
    
    .countdown-number {
        font-size: 1.8rem;
    }
    
    .countdown-item:not(:last-child)::after {
        right: -6px;
        font-size: 1.6rem;
    }
    
    .rsvp-card {
        padding: 30px 20px;
    }
    
    .rsvp-title {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   Footer & Modal Styles
   ========================================================================== */
.site-footer {
    text-align: center;
    padding: 10px 0;
    margin-top: 10px;
    border-top: 1px solid rgba(197, 168, 128, 0.15);
}

.site-footer p {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.footer-link:hover {
    color: var(--color-accent-gold-dark);
    border-bottom-color: var(--color-accent-gold-dark);
}

/* Modal Styling */
.modal-overlay {
    display: none; /* Controlled by JS active class */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(48, 66, 84, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background-color: var(--color-bg-base);
    border-radius: 16px;
    padding: 35px 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(48, 66, 84, 0.15);
    border: 1px solid var(--color-accent-gold);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    color: var(--color-accent-gold-dark);
}

.modal-heading {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
    padding-bottom: 10px;
}

.modal-body-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.modal-section-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-gold-dark);
    margin-bottom: -10px;
}

.modal-text {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-primary);
}

.modal-disclaimer {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--color-text-muted);
    margin-top: 10px;
    border-top: 1px dashed rgba(197, 168, 128, 0.15);
    padding-top: 12px;
}
