/* Base Styles & Typography */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Roboto:wght@300;400;500&display=swap');

:root {
    --primary-green: #596a4d;
    --primary-green-hover: #45543b;
    --text-dark: #2c2c2c;
    --bg-light: #fdfdfc;
    --border-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #e5e5e5;
    display: flex;
    justify-content: center;
}

/* Mobile Device Container */
.mobile-container {
    width: 100%;
    max-width: 414px;
    background-color: var(--bg-light);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow-x: hidden;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
}

.header-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.6);
}

.header-rsvp {
    background: #fff;
    color: var(--text-dark);
    text-decoration: none; /* Removes the underline from the link */
    display: inline-block; /* Helps it maintain its button shape */
    border: none;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-rsvp:active {
    transform: scale(0.95);
}

/* Hero Image with Fades */
.hero-image {
    width: 100%;
    height: 500px; /* Taller to allow the fade effect to work gracefully */
    background-color: var(--bg-light);
    position: relative;
    animation: fadeIn 1s ease-out forwards;
}

/* Dark gradient overlay at the TOP so the header text pops */
.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Light gradient overlay at the BOTTOM to blend seamlessly into the website */
.hero-image::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to top, var(--bg-light) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Main Content */
main {
    padding: 0 25px 20px;
    position: relative;
    z-index: 2; /* Ensures the form and card stay above the image fade */
    text-align: center;
    opacity: 0;
    animation: slideUp 0.8s ease-out 0.2s forwards;
}

/* --- Elegant Invitation Card --- */
.invitation-card {
    background-color: #ffffff;
    padding: 40px 25px;
    margin: -100px auto 40px auto; /* Pulls the card heavily up over the faded image */
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08); /* Soft, premium shadow */
    position: relative;
    z-index: 10;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
}

/* --- Event Details --- */
.event-details {
    margin: 10px 0;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.location-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(89, 106, 77, 0.4);
    padding-bottom: 2px;
    transition: all 0.2s ease;
}

.location-link:hover {
    color: var(--primary-green-hover);
    border-bottom-color: var(--primary-green-hover);
    opacity: 0.8;
}

.script-text {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.body-text {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.fancy-divider {
    width: 40px;
    height: 1px;
    background-color: var(--primary-green);
    margin: 25px auto;
    opacity: 0.4;
}

.highlight-dark {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: #111;
    display: block;
    margin-top: 5px;
}

.small-text {
    font-size: 13px;
    line-height: 1.6;
    color: #777;
}

/* Beautiful box for the payment methods */
.fund-box {
    background-color: #fcfcfc;
    border: 1px solid #eaeaea;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    color: #333;
    font-size: 14px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

.fund-box p {
    margin: 6px 0;
}

.fund-box strong {
    color: var(--primary-green);
    font-weight: 600;
}

.italic-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-top: 25px;
}

/* Form Layout */
h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 26px;
    color: var(--text-dark);
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.form-section {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.form-image {
    flex: 0 0 38%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.form-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rsvp-form {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    background-color: #f9faf9;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-color: var(--primary-green);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(89, 106, 77, 0.1);
}

/* Toggle Buttons (Yes/No) */
.toggle-group {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    background: #f9faf9;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background-color: var(--primary-green);
    color: #fff;
    border-color: var(--primary-green);
    box-shadow: 0 4px 8px rgba(89, 106, 77, 0.2);
}

.toggle-group input[type="radio"] {
    display: none;
}

.submit-btn {
    background-color: var(--primary-green);
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(89, 106, 77, 0.3);
}

.submit-btn:hover {
    background-color: var(--primary-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(89, 106, 77, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}



/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* --- Custom Success Message --- */
.success-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #fcfcfc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    animation: fadeIn 0.6s ease-out;
}

.success-message h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-green);
    font-size: 26px;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.success-message p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}