/* =========================================
   1. GLOBAL & TYPOGRAPHY
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fdfbf7; /* Soft cream background */
    font-family: 'Poppins', sans-serif;
    color: #4a4a4a;
    overflow-x: hidden;
}

.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1, h2, h3, .couple-names, .envelope-names {
    font-family: 'Playfair Display', serif;
}

/* Paste the animation CSS here */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    transform: translateY(0);
}

.envelope-overlay.open {
    transform: translateY(-100vh);
}

/* --- Exact Video Opening Styling --- */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #faf7f2; /* Soft cream/beige from the video */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease-in-out;
}

.envelope-overlay.slide-up {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

/* The thin vertical line dropping from the top */
.envelope-top-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 45vh; /* Adjusts how far down the line goes */
    background-color: #bfa59d; /* Soft muted brown/pink */
}

.envelope-content {
    margin-top: 30vh; /* Pushes the text and seal below the line */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.invite-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 26px;
    color: #4a3b38; /* Dark brown elegant text */
    margin-bottom: 40px;
}

/* The circular heart seal button */
.seal-button {
    width: 70px;
    height: 70px;
    background-color: #eebbaf; /* Blush pink color matching the video */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    animation: pulse-seal 2s infinite;
}

.seal-button span {
    font-size: 24px;
    margin-top: 2px; /* slight adjustment to center the emoji vertically */
}

@keyframes pulse-seal {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
    50% { transform: scale(1.1); box-shadow: 0 4px 20px rgba(238, 187, 175, 0.4); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
}

/* =========================================
   3. MAIN INVITATION LAYOUT
   ========================================= */
.invitation-container {
    max-width: 480px; /* Mobile-first width constraint */
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.section-title {
    color: #8b0000;
    font-size: 26px;
    margin-bottom: 20px;
}

section {
    padding: 60px 20px;
}

/* --- Hero Section --- */
.hero-section {
    /* Make sure you have a stars-bg.jpg in your images folder, or it will just show the burgundy color */
    background: linear-gradient(rgba(100, 10, 20, 0.8), rgba(100, 10, 20, 0.9)), url('../images/stars-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 20px 50px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.couple-names {
    font-size: 52px;
    font-style: italic;
    color: #d4af37;
    margin: 20px 0;
    line-height: 1.2;
}

.subtitle {
    color: #d4af37;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 14px;
}

.scroll-indicator {
    margin-top: 40px;
    color: #d4af37;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* --- Scratch Card Section --- */
.scratch-card-container {
    position: relative;
    width: 300px;
    height: 150px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.hidden-date-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #8b0000;
}

#scratchCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: crosshair;
}

/* --- Countdown Timer --- */
.timer-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.time-box {
    background: #f4ede1;
    padding: 15px 10px;
    border-radius: 8px;
    min-width: 70px;
}

.time-box span {
    font-size: 24px;
    font-weight: bold;
    color: #8b0000;
}

.time-box p {
    font-size: 10px;
    letter-spacing: 1px;
    margin-top: 5px;
    color: #4a4a4a;
}

/* --- Timeline & Utilities --- */
.timeline-container {
    max-width: 350px;
    margin: 0 auto;
}

.timeline-event {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-time {
    font-weight: bold;
    color: #8b0000;
}

.btn-primary {
    display: inline-block;
    background: #8b0000;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 20px;
    font-weight: 500;
}