:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-mid: #666666;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Envelope Animation */
.envelope-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    /*z-index: 10000;*/
    cursor: pointer;
}

.envelope {
    position: relative;
    width: 400px;
    height: 280px;
    max-width: 90vw;
    transition: transform 0.6s ease;
}

.envelope:hover {
    transform: scale(1.05);
}

.envelope-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 280px;
    background: var(--white);
    border: 3px solid var(--black);
}

.envelope-flap {
    position: absolute;
    top: 3px;
    left: 0;
    width: 100%;
    height: 280px;
    clip-path: polygon(0 0, 50% 40%, 100% 0);
    transform-origin: top center;
    transition: transform 0.8s ease;
    z-index: 2;
    background-color: var(--black);
}

.envelope-flap-inner {
    width: 98%;
    height: 274px;
    background-color: var(--white);
    position: absolute;
    top: 0;
    left: 4px;
    clip-path: polygon(0 0, 50% 40%, 100% 0);
}

.envelope-container.opening .envelope-flap {
    transform: rotateX(180deg);
    top:0;
}

.envelope-letter {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.envelope-letter p {
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.envelope-container.opening {
    animation: fadeOut 1s ease 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* Main Content */
.invitation-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Music Control */
.music-control {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--black);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1000;
}

.music-control:hover {
    background: var(--black);
    transform: scale(1.1);
}

.music-control:hover .music-icon {
    stroke: var(--white);
}

.music-icon {
    width: 24px;
    height: 24px;
    stroke: var(--black);
    transition: var(--transition);
}

.music-control.playing .music-icon {
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
}

.silhouette-container {
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards;
}

.couple-silhouette {
    width: 400px;
    height: 400px;
    max-width: 90vw;
    overflow: unset;
}

.groom {
    animation: slideInLeft 1s ease-out 0.5s forwards;
    opacity: 0;
}

.bride {
    animation: slideInRight 1s ease-out 0.5s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        transform: translate(30px, 80px);
        opacity: 0;
    }
    to {
        transform: translate(100px, 80px);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translate(310px, 80px);
        opacity: 0;
    }
    to {
        transform: translate(40px, 80px);
        opacity: 1;
    }
}

.hero-content {
    text-align: center;
    /*opacity: 0;*/
    /*animation: fadeInUp 1s ease-out 1s forwards;*/
    animation-delay: 1s;
}

.names-wrapper {
    margin-bottom: 30px;
}

.couple-name {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.ampersand {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 20px 0;
    opacity: 0.6;
}

.tagline {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-mid);
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}
.fadeInUp {
    opacity: 0;
    transform: translateY(30px);
}
.fadeInUp.active {
   animation: fadeInUp 0.8s ease-out forwards;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Details Section */
.details-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    padding: 100px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-item {
    text-align: center;
    /*opacity: 0;*/
    /*animation: fadeInUp 1s ease-out forwards;*/
}

.detail-item:nth-child(1) {
    animation-delay: 0.2s;
}

.detail-item:nth-child(2) {
    animation-delay: 0.4s;
}

.detail-item:nth-child(3) {
    animation-delay: 0.6s;
}

.detail-item:nth-child(4) {
    justify-self: center;
    grid-column: 1 / -1;   /* span the full row */
    animation-delay: 0.8s;
}

.detail-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--black);
    border-radius: 50%;
}

.detail-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--black);
}

.detail-item h3 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.detail-item p {
    font-size: 1rem;
    color: var(--gray-mid);
    line-height: 1.8;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.location-link {
    color: var(--gray-mid);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.location-link:hover {
    color: var(--black);
    text-decoration: underline;
}

/* Timeline Section */
.timeline-section {
    padding: 80px 0;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-section h2 {
    text-align: center;
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 80px;
}

.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--black);
    transform: translateX(-50%);
}

.timeline-event {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
    /*opacity: 0;*/
    /*animation: fadeInUp 1s ease-out forwards;*/
}

.timeline-event:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-event:nth-child(3) {
    animation-delay: 0.4s;
}

.timeline-event:nth-child(4) {
    animation-delay: 0.6s;
}

.timeline-time {
    flex: 1;
    text-align: right;
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    color: var(--black);
    min-width: 100px;
}

.timeline-dot {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    background: var(--black);
    border: 3px solid var(--white);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 2px var(--black);
}

.timeline-label {
    flex: 1;
    text-align: left;
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    line-height: 1.6;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    min-width: 300px;
}

.timeline-link {
    color: var(--black);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.timeline-link:hover {
    text-decoration: underline;
}

.timeline-sublabel {
    font-size: 0.9rem;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

.timeline-section h3 {
    text-align: center;
    margin-top: 80px;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

/* RSVP Section */
.rsvp-section {
    text-align: center;
    padding: 80px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);

}

.rsvp-section h2 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.rsvp-date {
    font-size: 1.1rem;
    color: var(--gray-mid);
    margin-bottom: 40px;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.rsvp-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 50px;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    transition: var(--transition);
    border: 2px solid var(--black);
}

.rsvp-button:hover {
    background: var(--white);
    color: var(--black);
}

.rsvp-button svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.rsvp-button:hover svg {
    transform: translateX(5px);
}

/* Footer */
.footer-section {
    padding: 60px 0 40px;
    text-align: center;
}

.divider {
    width: 100px;
    height: 1px;
    background: var(--black);
    margin: 0 auto 30px;
}

.hashtag {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.footer-note {
    font-size: 0.9rem;
    color: var(--gray-mid);
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .couple-name {
        font-size: 2.5rem;
    }
    .bride{

    }
    @keyframes slideInRight {
        from {
            transform: translate(310px, 80px);
            opacity: 0;
        }
        to {
            transform: translate(-60px, 80px);
            opacity: 1;
        }
    }
    
    .ampersand {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .details-section {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 0;
    }
    
    .timeline-section h2,
    .rsvp-section h2 {
        font-size: 2rem;
    }

    .timeline-section h2{
        margin-bottom:0;
    }
    
    .timeline-event {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .timeline-time,
    .timeline-label {
        text-align: center;
        min-width: auto;
    }
    
    .timeline-line {
        display: none;
    }
    
    .rsvp-button {
        padding: 15px 35px;
        font-size: 1rem;
    }
}
