:root {
    --sage-bg: #dfe8e1;
    --sage-overlay: rgba(223, 232, 225, 0.35);
    --sage-card: rgba(255, 255, 255, 0.95);
    --sage-text: #2f3e34;
}


body {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* Envelope Screen */
#envelopeScreen {
    position: fixed;
    inset: 0;
    background: #f5f0e8;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden; /* prevent scroll on mobile */
}

/* FULLSCREEN ENVELOPE */
.envelope-center {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Text container */
@keyframes gentlePulse {

    0%,
    100% {
        opacity: 0.75;
    }

    50% {
        opacity: 1;
    }
}

.envelope-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    animation: gentlePulse 2.5s ease-in-out infinite;
    text-align: center;
}

/* Names in elegant script */
.envelope-text .names {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    font-weight: 400;
    color: #00ab6c;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
    margin: 0;
    line-height: 1;
}

/* Tap to Open */
.envelope-text .tap {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #045e3b;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.envelope-text .rsvp-success {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #5e0404;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#envelope.open {
    transform: scale(1.05);
    opacity: 0;
}

/* Main Site */
.hidden {
    display: none;
}

.cover {
    height: 100vh;
    position: relative;
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.2));
    /* subtle darkening */
    color: white;
    display: flex;
    justify-content: flex-start;
    /* left align */
    align-items: center;
    flex-direction: column;
    padding-left: 60px;
    /* spacing from left */
    text-align: left;
}

.overlay h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 5rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.overlay p {
    font-family: 'Arial', sans-serif;
    /* or another elegant serif */
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .overlay {
        padding-left: 30px;
    }

    .overlay h1 {
        font-size: 3rem;
    }

    .overlay p {
        font-size: 1.2rem;
    }
}


#envelope {
    width: 100%;
    height: 100%;
    max-width: 600px;  /* limits on large screens */
    max-height: 90vh;  /* prevent exceeding viewport height */
    object-fit: contain; /* scales without cropping */
    cursor: pointer;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

#envelope.open {
    transform: scale(1.1);
    opacity: 0;
}

section {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
}

/* General section-inner tweaks for background image */
.section-inner {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    padding: 60px 40px;
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 1px 0 rgba(255,255,255,0.6) inset;
    text-align: center;
    color: #24332a;
    overflow: hidden;

    /* NEW: same width for all cards */
    width: 100%;
    max-width: 900px;  /* adjust for desktop */
    margin: 0 auto;    /* center horizontally */
    box-sizing: border-box; /* ensure padding doesn’t break width */
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .section-inner {
        padding: 40px 20px;
        max-width: 95%; /* smaller margin on mobile */
    }
}

/* Add specific backgrounds for each card */
.card-vows {
    background-image: url('images/vows-icon.png');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 80px auto;
}

.card-celebration {
    background-image: url('images/celebration-icon.png');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 80px auto;
}

.card-gift {
    background-image: url('images/gift-icon.jpg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 80px auto;
}

.card-rsvp {
    background-image: url('images/rsvp-icon.jpg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 80px auto;
}

.card-vows::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    background: url('images/vows-icon.png') no-repeat center/contain;
    opacity: 0.25;
}

.card-sponsors {
    background-image: url('images/sponsors-icon.png');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 80px auto;
}

.card-sponsors::before {
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;
    width: 80px;
    height: 80px;
    background: url('images/sponsors-icon.png') no-repeat center / contain;
    opacity: 0.22;
    pointer-events: none;
}


/* Icon style */
.section-inner h2 .icon {
    font-size: 2.2rem;
    /* slightly bigger than text */
    margin-right: 12px;
    /* spacing from heading text */
    vertical-align: middle;
}


.content-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sage-overlay);
    pointer-events: none;
    /* This is correct */
}

.section-inner::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: #a8b8aa;
    margin: 40px auto 0;
}

.soft-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.alt-bg {
    background: transparent;
}


.highlight {
    font-size: 1.3rem;
    margin: 20px 0;
}

.map-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    border-radius: 30px;
    border: 1px solid #000;
    text-decoration: none;
    color: black;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 30px;
    font-size: 1rem;
}

.rsvp-form button,
.map-link {
    background: #1f2b23;
    color: #ffffff;
    border: none;
}

.rsvp-form button:hover {
    background: #2f3e34;
}

.content-bg {
    position: relative;
    z-index: 1;
    background: url("content-bg.jpg") center / cover no-repeat;
    background-color: var(--sage-bg);
}

.content-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(223, 232, 225, 0); /* lighter overlay */
}

h1,
h2 {
    color: #1f2b23;
}

p,
.soft-text {
    color: #344a3e;
    line-height: 1.8;
}

.small-text {
    color: #4f6a5a;
}


.soft-text {
    color: #445a4c;
}

.rsvp-form button {
    background: linear-gradient(135deg, #a8b8aa, #e3f0e6);
    /* soft sage gradient */
    color: #1f2b23;
    /* dark text for readability */
    font-weight: bold;
    border: none;
    border-radius: 50px;
    /* pill shape */
    padding: 15px 40px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    /* subtle depth */
    transition: all 0.3s ease;
}

.rsvp-form button:hover {
    transform: translateY(-2px);
    /* subtle lift */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #c0d0c6, #f0f8f2);
    /* slightly lighter on hover */
}

.rsvp-success,
.rsvp-error {
    margin-bottom: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
}

.rsvp-success {
    background: #d0f0e0;
    color: #1f2b23;
}

.rsvp-error {
    background: #f8d0d0;
    color: #a83232;
}

/* Import elegant fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400;500&display=swap');

.wedding-section {
    padding: 80px 20px;
    /* soft sage tint */
}

.section-inner {
    max-width: 960px;
    margin: auto;
    text-align: center;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.3rem;
    font-weight: 600;
    color: #2f3e34;
    margin-bottom: 8px;
}

.section-subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    color: #6b7b6f;
    margin-bottom: 50px;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 80px;
    row-gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}


.sponsor {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2f3e34;
    line-height: 1.7;
}

.sponsor span {
    display: block;
    font-weight: 300;
    color: #4f5f54;
}


/* Single names */
.sponsor.single {
    font-weight: 500;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    #envelope {
        width: 90vw;      /* fills most of mobile width */
        height: auto;     /* keeps aspect ratio */
        max-height: 80vh; /* leaves a little space for browser chrome */
    }

    .envelope-text .names {
        font-size: 2.2rem;
    }

    .envelope-text .tap {
        font-size: 0.95rem;
    }
}

/* Desktop tweaks */
@media (min-width: 1024px) {
    #envelope {
        max-width: 600px;
        max-height: 90vh;
    }

    .envelope-text .names {
        font-size: 2.5rem;
    }

    .envelope-text .tap {
        font-size: 1.2rem;
    }
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: contain; /* <-- changed from cover to contain */
    background-color: #000; /* optional: black bars if aspect ratio differs */
}


.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-prenup {
    background-image: url('images/prenup-icon.jpg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 80px auto;
}

.card-prenup::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    background: url('images/prenup-icon.png') no-repeat center/contain;
    opacity: 0.25;
}
