:root {
    --sage-dark: #4a5a40;
    --sage-medium: #5d6b52;
    --sage-light: #6b7a5f;
    --cream: #f5f0e8;
    --cream-dark: #e8e0d4;
    --gold: #c4a962;
    --gold-dark: #a08840;
    --text-dark: #2a3425;
    --text-light: #f5f0e8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Account for fixed nav */
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}


/* ========== LANGUAGE SELECTOR OVERLAY ========== */
.language-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3d4a35 0%, #4a5a40 50%, #3d4a35 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.language-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.language-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(196, 169, 98, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(196, 169, 98, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.language-selector {
    text-align: center;
    position: relative;
    z-index: 1;
}

.language-selector-title {
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: #c4a962;
    margin-bottom: 10px;
}

.language-selector-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f5f0e8;
    margin-bottom: 50px;
    opacity: 0.8;
}

.language-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.language-btn {
    padding: 20px 50px;
    border: 2px solid #c4a962;
    background: transparent;
    color: #c4a962;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.language-btn:hover {
    background: #c4a962;
    color: #4a5a40;
}

.language-btn span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 5px;
    letter-spacing: 0.1em;
}

/* ========== LANGUAGE DROPDOWN (header) ========== */
.lang-dropdown {
    position: fixed;
    top: 30px; /* Half of 60px nav height */
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(74, 90, 64, 0.9);
    border: 1px solid rgba(196, 169, 98, 0.4);
    border-radius: 4px;
    color: #f5f0e8;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-dropdown-btn:hover {
    border-color: #c4a962;
    background: rgba(74, 90, 64, 0.95);
}

.lang-dropdown-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.lang-dropdown.open .lang-dropdown-btn svg {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(74, 90, 64, 0.95);
    border: 1px solid rgba(196, 169, 98, 0.4);
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #f5f0e8;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lang-option:hover {
    background: rgba(196, 169, 98, 0.2);
}

.lang-option.active {
    color: #c4a962;
}

/* Hide language dropdown during overlays */
body.envelope-active .lang-dropdown,
body.envelope-active .main-nav {
    opacity: 0;
    pointer-events: none;
}

/* ========== NAVIGATION ========== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(74, 90, 64, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-family: 'Pinyon Script', cursive;
    font-size: 1.5rem;
    color: var(--gold);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--gold);
    background: rgba(196, 169, 98, 0.1);
}

.nav-links .nav-rsvp {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    margin-left: 8px;
}

.nav-links .nav-rsvp:hover {
    background: var(--gold);
    color: var(--sage-dark);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cream);
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(74, 90, 64, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        gap: 5px;
        margin-right: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 0.85rem;
    }

    .nav-links .nav-rsvp {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 900px) and (min-width: 769px) {
    .nav-links {
        gap: 4px;
    }
    .nav-links a {
        padding: 8px 8px;
        font-size: 0.7rem;
    }
}

/* Hero Section */
.hero {
    background-color: var(--sage-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(196, 169, 98, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(196, 169, 98, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    animation: heroFadeIn 1s ease-out 0.3s both;
}

.names-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.name-filipa {
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(4rem, 12vw, 8rem);
    color: var(--gold);
    line-height: 0.9;
}

.name-filipa span {
    font-family: 'Bodoni Moda', serif;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.and-text {
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--gold);
    margin: -20px 0;
}

.name-patrick {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(3rem, 10vw, 6rem);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 400;
}

.name-patrick .script-p {
    font-family: 'Pinyon Script', cursive;
    text-transform: none;
    letter-spacing: 0;
    font-size: 1.3em;
    margin-right: -0.1em;
}

.decorative-branch {
    width: 120px;
    height: 150px;
    opacity: 0.7;
}

.celebration-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cream);
    margin: 30px 0 20px;
}

.wedding-details {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 20px 0 40px;
    flex-wrap: wrap;
}

.detail-item {
    text-align: center;
    color: var(--cream);
}

.detail-label {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.countdown {
    margin: 20px auto 30px;
    max-width: 620px;
    color: var(--cream);
    text-align: center;
}

.countdown-label {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 12px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.countdown-item {
    min-width: 90px;
    padding: 10px 12px;
    border: 1px solid rgba(196, 169, 98, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.countdown-value {
    display: block;
    font-size: 1.6rem;
    letter-spacing: 0.1em;
}

.countdown-unit {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
}

.countdown-message {
    margin-top: 15px;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
}

.rsvp-btn {
    display: inline-block;
    padding: 15px 50px;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

.rsvp-btn:hover {
    background: var(--gold);
    color: var(--sage-dark);
}

/* Photo Gallery */
.photo-gallery {
    background: var(--sage-dark);
    padding: 80px 20px 120px;
}

.gallery-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-photo {
    width: 280px;
    height: 360px;
    border-radius: 160px 160px 140px 140px;
    overflow: hidden;
    border: 3px solid var(--gold);
    position: relative;
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-photo .placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--sage-medium) 0%, var(--sage-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
}

/* Our Journey Section */
.our-journey {
    background: var(--cream);
    padding: 100px 20px;
    text-align: center;
}

.journey-decoration {
    font-size: 2rem;
    color: var(--sage-dark);
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--sage-dark);
    margin-bottom: 10px;
}

.section-title-script {
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    color: var(--sage-dark);
    margin-top: -20px;
    margin-bottom: 40px;
}

.journey-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    opacity: 0.9;
}

/* The Wedding Section */
.the-wedding {
    background: var(--sage-dark);
    padding: 80px 20px;
    position: relative;
}

.wedding-header {
    text-align: center;
    margin-bottom: 60px;
}

.wedding-title {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--cream);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 400;
}

.wedding-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.wedding-info {
    text-align: center;
    color: var(--cream);
}

.wedding-info h3 {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 400;
}

.wedding-info p {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.9;
}

.map-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-frame {
    width: 320px;
    height: 380px;
    border: 2px solid var(--gold);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-placeholder {
    width: 320px;
    height: 380px;
    border: 2px solid var(--gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.05);
}

/* Schedule Section */
.schedule {
    background: var(--cream);
    padding: 100px 20px;
}

.schedule-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.schedule-header {
    text-align: left;
}

.schedule-title {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sage-dark);
    font-weight: 400;
}

.schedule-title-script {
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--sage-dark);
    margin-left: 20px;
}

.schedule-date {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--sage-dark);
    margin-top: 30px;
}

.schedule-photo {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, var(--sage-medium) 0%, var(--sage-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 0.9rem;
}

.schedule-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline {
    margin-top: 40px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(74, 90, 64, 0.2);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.timeline-time {
    color: var(--sage-dark);
    font-weight: 500;
}

.timeline-event {
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Travel Section */
.travel {
    background: var(--cream-dark);
    padding: 100px 20px;
}

.travel-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.travel-title {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    letter-spacing: 0.2em;
    color: var(--sage-dark);
    margin-bottom: 20px;
    font-weight: 400;
}

.travel-intro {
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    opacity: 0.85;
}

.travel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.travel-card {
    padding: 30px;
    border: 1px solid rgba(74, 90, 64, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    text-align: left;
}

.travel-card h3 {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sage-dark);
    margin-bottom: 15px;
    font-weight: 500;
}

.travel-card p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-dark);
    opacity: 0.85;
}

/* FAQs Section */
.faqs {
    background: var(--cream);
    padding: 100px 20px;
}

.faqs-container {
    max-width: 800px;
    margin: 0 auto;
}

.faqs-title {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-align: center;
    letter-spacing: 0.2em;
    color: var(--sage-dark);
    margin-bottom: 60px;
    font-weight: 400;
}

.faq-item {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(74, 90, 64, 0.2);
    padding-bottom: 20px;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Bodoni Moda', serif;
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sage-dark);
    background: none;
    border: none;
    padding: 10px 0;
    cursor: pointer;
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--gold-dark);
    transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"]::after {
    content: '−';
}

.faq-answer {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    opacity: 0.85;
    padding-top: 10px;
}

/* Contact Section */
.contact {
    background: var(--sage-dark);
    padding: 100px 20px;
    position: relative;
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-title {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 40px;
    font-weight: 400;
    grid-column: 1 / -1;
}

.contact-person {
    color: var(--cream);
}

.contact-person h3 {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 400;
    color: var(--gold);
}

.contact-person p {
    font-size: 0.95rem;
    line-height: 2;
    opacity: 0.9;
}

.contact-decoration {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.plant-illustration {
    width: 150px;
    height: 200px;
    opacity: 0.6;
}

.plant-placeholder {
    width: 150px;
    height: 200px;
    border: 2px dashed var(--gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 0.8rem;
    text-align: center;
    padding: 10px;
    opacity: 0.5;
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: rgba(74, 90, 64, 0.95);
    color: var(--cream);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Footer */
footer {
    background: var(--sage-dark);
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid rgba(196, 169, 98, 0.2);
}

footer p {
    color: var(--cream);
    opacity: 0.7;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

/* Responsive Design */
@media (max-width: 900px) {
    .wedding-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .map-container {
        order: -1;
    }

    .schedule-container {
        grid-template-columns: 1fr;
    }

    .schedule-header {
        text-align: center;
    }

    .contact-container {
        grid-template-columns: 1fr 1fr;
    }

    .contact-decoration {
        display: none;
    }

    .travel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .gallery-photo {
        width: 220px;
        height: 290px;
    }

    .gallery-container {
        gap: 30px;
    }

    .photo-gallery {
        padding: 60px 20px 80px;
    }

    .wedding-details {
        gap: 30px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .names-container {
        flex-direction: column;
        gap: 0;
    }

    .decorative-branch {
        display: none;
    }

    .countdown-timer {
        gap: 12px;
    }
}

/* ========== SCROLL ANIMATIONS ========== */
/* Base state for all animated elements - hidden */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Visible state when in viewport */
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for gallery photos */
.gallery-photo.scroll-reveal {
    transition-delay: 0s;
}
.gallery-photo.scroll-reveal:nth-child(2) {
    transition-delay: 0.15s;
}
.gallery-photo.scroll-reveal:nth-child(3) {
    transition-delay: 0.3s;
}

/* Stagger delays for timeline items */
.timeline-item.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.timeline-item.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.timeline-item.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.timeline-item.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

/* Stagger delays for FAQ items */
.faq-item.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.faq-item.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.faq-item.scroll-reveal:nth-child(3) { transition-delay: 0.3s; }

/* Stagger delays for wedding content columns */
.wedding-info.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.map-container.scroll-reveal { transition-delay: 0.15s; }
.wedding-info.scroll-reveal:nth-child(3) { transition-delay: 0.3s; }

/* Stagger for contact persons */
.contact-person.scroll-reveal:nth-child(2) { transition-delay: 0s; }
.contact-person.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }

/* Fade in from left/right variations */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal-left.visible,
.scroll-reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up variation */
.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right,
    .scroll-reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-content {
        animation: none;
    }
}

/* ========== ENVELOPE OVERLAY ========== */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3d4a35 0%, #4a5a40 50%, #3d4a35 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.envelope-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(196, 169, 98, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(196, 169, 98, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.envelope-container {
    position: relative;
    perspective: 1000px;
}

.envelope {
    width: 380px;
    height: 260px;
    position: relative;
    transform-style: preserve-3d;
}

/* Envelope Body */
.envelope-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--cream) 0%, var(--cream-dark) 100%);
    border-radius: 8px;
    position: absolute;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.envelope-body::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.03) 0%, transparent 100%);
}

/* Inner card peek */
.envelope-card {
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 180px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transform: translateY(0);
    transition: transform 0.6s ease;
    z-index: 15;
}

.envelope.open .envelope-card {
    transform: translateY(-120px);
}

.card-names {
    font-family: 'Pinyon Script', cursive;
    font-size: 2.2rem;
    color: var(--sage-dark);
    margin-bottom: 5px;
}

.card-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sage-medium);
}

.card-invitation {
    font-family: 'Bodoni Moda', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 15px;
}

/* Envelope Flap */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top center;
    transition: transform 0.6s ease;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.envelope-flap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, transparent 40%, rgba(0,0,0,0.05) 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
}

.envelope.open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

/* Wax Seal */
.wax-seal {
    position: absolute;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #d4a853 0%, var(--gold) 40%, var(--gold-dark) 100%);
    border-radius: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 15px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.envelope.open .wax-seal {
    transform: translateX(-50%) scale(0);
    opacity: 0;
}

.seal-text {
    font-family: 'Pinyon Script', cursive;
    font-size: 1.6rem;
    color: var(--cream);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Password Form */
.password-form {
    margin-top: 50px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.password-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cream);
    margin-bottom: 20px;
    display: block;
    opacity: 0.9;
}

.password-input-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.password-input {
    padding: 15px 25px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    border: 2px solid rgba(196, 169, 98, 0.4);
    background: rgba(255, 255, 255, 0.08);
    color: var(--cream);
    border-radius: 4px;
    width: 220px;
    text-align: center;
    transition: all 0.3s ease;
}

.password-input::placeholder {
    color: rgba(245, 240, 232, 0.4);
}

.password-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(196, 169, 98, 0.2);
}

.password-submit {
    padding: 15px 35px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--gold);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-submit:hover {
    background: var(--gold);
    color: var(--sage-dark);
}

.password-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-error {
    color: #e8a0a0;
    font-size: 0.9rem;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-error.show {
    opacity: 1;
}

.password-hint {
    color: var(--cream);
    font-size: 0.85rem;
    margin-top: 25px;
    opacity: 0.5;
    font-style: italic;
}

/* Hide scrolling when envelope is showing */
body.envelope-active {
    overflow: hidden;
}

@media (max-width: 500px) {
    .envelope {
        width: 300px;
        height: 210px;
    }

    .envelope-flap {
        height: 115px;
    }

    .wax-seal {
        top: 65px;
        width: 50px;
        height: 50px;
    }

    .seal-text {
        font-size: 1.3rem;
    }

    .envelope-card {
        top: 15px;
        left: 20px;
        right: 20px;
        height: 150px;
    }

    .card-names {
        font-size: 1.8rem;
    }

    .password-input {
        width: 180px;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}
