:root {
    --salmon: #BF897F;
    --sandstone: #DAC2B2;
    --pearl: #F7F2E0;
    --olive: #707B6D;
    --pewter: #3A3D3A;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--pewter);
    color: var(--pearl);
    font-family: var(--font-sans);
    overflow-x: hidden;
}

main { display: block; width: 100%; }

.sector {
    min-height: 100vh;
    padding: 100px 0;
    display: flex;
    flex-direction: column; /* Forces content to stack vertically */
    justify-content: center; /* Centers vertically */
    align-items: center;     /* Centers horizontally */
    width: 100%;
    text-align: center;      /* Ensures text doesn't lean right */
}

.container {
    max-width: 1100px;
    margin-left: auto;       /* Equalizes space on the left */
    margin-right: auto;      /* Equalizes space on the right */
    padding: 0 5%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;     /* Centers the grid/content inside */
}

/* --- GRID ADJUSTMENT --- */
.split-layout, .gallery-compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    text-align: left; /* Keeps text within the grid natural, but the grid itself stays centered */
}

/* MOBILE RESET */
@media (max-width: 800px) {
    .split-layout, .gallery-compact-grid {
        grid-template-columns: 1fr;
        text-align: center; /* Centers text on mobile for better flow */
    }
}

/* BACKGROUND FLOW */
#chronos {
    position: relative;
    /* We use a 50% dark overlay to make sure the Pearl text "pops" */
    background: linear-gradient(rgba(26, 28, 44, 0.5), rgba(26, 28, 44, 0.5)), url('us.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* The photo stays still while text moves */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#genesis { background-color: var(--olive); }
#journey { background-color: var(--sandstone); color: var(--pewter); }
#vows    { background-color: var(--pewter); color: var(--pearl); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; width: 100%; }

/* TITLES */
.hero-main-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 12vw, 7rem);
    line-height: 0.9;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.sector-heading { font-family: var(--font-serif); font-size: 3rem; margin-bottom: 20px; }
.italic { font-style: italic; font-family: var(--font-serif); }

/* LAYOUTS */
.split-layout, .gallery-compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; width: 100%; }

/* ELEMENTS */
.constrained-img { width: 100%; max-height: 500px; object-fit: cover; border: 1px solid var(--pearl); }
.video-wrapper { position: relative; cursor: pointer; background: #000; line-height: 0; }
#main-film { width: 100%; max-height: 60vh; }

/* TIMER & SEAL */
.timer-display {
    font-family: var(--font-sans);
    font-size: clamp(1.2rem, 5vw, 2rem); /* Responsive size */
    letter-spacing: 8px;
    margin: 40px auto;
    padding: 20px 40px;
    color: #ffd700; /* Gold numbers to match the finale */
    font-weight: 200;
    
    /* The Glass Box */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(247, 242, 224, 0.2);
    display: inline-block;
    border-radius: 2px;
}
.wax-seal { width: 100px; height: 100px; background: var(--salmon); border-radius: 50%; margin: 0 auto; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.letter-reveal-box { display: none; margin-top: 40px; }
.letter-open .letter-reveal-box { display: block; }

/* ANIMATIONS */
.scroll-reveal { opacity: 0; transform: translateY(40px); transition: 1.2s ease; }
.scroll-reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 800px) { .split-layout, .gallery-compact-grid { grid-template-columns: 1fr; text-align: center; } }


/* --- THE FINALE: MIDNIGHT SECTOR --- */
#vows {
    background: radial-gradient(circle at center, #1a1c2c 0%, #0d0e15 100%);
    color: var(--pearl);
    transition: filter 0.8s ease;
}

/* --- THE GOLDEN MEDALLION --- */
.medallion-lock {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 30% 30%, #ffd700 0%, #b8860b 50%, #8b6508 100%);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid rgba(247, 242, 224, 0.2);
    box-shadow: 0 0 40px rgba(184, 134, 11, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.medallion-lock:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.6);
}

.initials {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 4px;
    font-weight: 300;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ffd700;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* --- THE UNLOCK INTERFACE --- */
.hidden-panel {
    max-height: 0;
    overflow: hidden;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    margin-top: 40px;
    padding: 0 20px;
}

.panel-active {
    max-height: 500px;
    opacity: 1;
}

.instruction {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--sandstone);
    margin-bottom: 25px;
    letter-spacing: 2px;
}

/* THE GLASS INPUT */
#anniversary-input {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid #ffd700;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 200;
    text-align: center;
    letter-spacing: 15px;
    padding: 15px;
    width: 360px;
    outline: none;
    border-radius: 4px;
    transition: all 0.4s ease;
}

#anniversary-input:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.seal-hint {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 5px;
    color: var(--sandstone);
    /* Increase this value from 30px to 60px or 80px */
    margin-top: 60px; 
    opacity: 0.5;
    text-align: center;
}

.error-hint { 
    color: #ff4d4d; 
    font-size: 0.8rem; 
    margin-top: 20px; 
    letter-spacing: 2px;
    font-weight: 400;
}
/* --- THE REVEALED LETTER STYLING --- */
.letter-reveal-box {
    display: none; /* Hidden by default */
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.5s ease;
}

.letter-open .letter-reveal-box {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.letter-body {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px;
    background: rgba(247, 242, 224, 0.03); /* Extremely subtle paper tint */
    border: 1px solid rgba(255, 215, 0, 0.2); /* Gold border trace */
    backdrop-filter: blur(15px);
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    text-align: center;
}

.letter-body .sector-heading {
    color: #ffd700; /* Gold heading for the vows */
    margin-bottom: 40px;
}

.letter-body p {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    line-height: 1.6;
    color: var(--pearl);
    font-style: italic;
}

.letter-body .handwriting {
    margin-top: 50px;
    font-size: 2.2rem;
    color: var(--sandstone);
}
.error-hint {
    display: block;
    height: 20px;
    margin-top: 20px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
/* --- PHASE 2: VIDEO OVERLAY POLISH --- */
.video-ui-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 14, 21, 0.6); /* Deep tint to match the new finale theme */
    backdrop-filter: blur(8px); /* Blurs the video preview for mystery */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(247, 242, 224, 0.1);
}

.play-hint {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 8px;
    color: var(--pearl);
    border: 1px solid var(--pearl);
    padding: 15px 30px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.video-ui-overlay:hover .play-hint {
    background: var(--pearl);
    color: var(--pewter);
    letter-spacing: 10px;
}

/* Hide overlay when video is playing */
.video-playing .video-ui-overlay {
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(0px);
}

/* --- VIDEO STATUS TAG --- */
.video-status {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 3px;
    margin-top: 20px;
    color: var(--salmon);
    opacity: 0.7;
    text-transform: uppercase;
}
#firsts {
    background-color: var(--sandstone);
    color: var(--pewter);
    padding: 120px 0;
    width: 100%;
}

.firsts-grid {
    display: grid;
    /* This ensures columns stay equal regardless of content */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    margin-top: 60px;
    width: 100%;
}

.first-card {
    position: relative;
    /* Aspect ratio 4:5 is the gold standard for portrait gallery photos */
    aspect-ratio: 4 / 5; 
    overflow: hidden;
    border-radius: 4px; /* Subtle rounding for a softer look */
    background: var(--pewter); /* Fallback color */
}

.first-img {
    width: 100%;
    height: 100%;
    /* This is the key: it forces the image to cover the box without stretching */
    object-fit: cover; 
    display: block;
    transition: transform 1.2s ease;
}

.first-overlay {
    position: absolute;
    inset: 0; /* Cover the whole card */
    /* Stronger gradient at the bottom for text readability */
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push text to bottom */
    padding: 25px;
    color: var(--pearl);
    text-align: left;
}

.first-overlay h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.first-overlay p {
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: var(--font-sans);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* RESPONSIVE FIXES */
@media (max-width: 900px) {
    .firsts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .firsts-grid { grid-template-columns: 1fr; }
}
/* --- LIGHTBOX STYLES --- */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* Above everything else */
    inset: 0;
    background-color: rgba(13, 14, 21, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border: 2px solid var(--pearl);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 50px;
    color: var(--pearl);
    font-size: 3rem;
    cursor: pointer;
}

#lightbox-caption {
    margin-top: 20px;
    font-family: var(--font-serif);
    color: var(--sandstone);
    font-size: 1.5rem;
    letter-spacing: 2px;
}
.lightbox-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
}

#lightbox-img {
    max-height: 75vh;
    border: 1px solid var(--pearl);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#lightbox-description {
    margin-top: 20px;
    color: var(--pearl);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    letter-spacing: 1px;
    text-align: center;
    /* This makes the text fade in slightly after the photo pops */
    animation: fadeIn 0.8s ease; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Hide only the description on the main grid */
.first-overlay p {
    display: none;
}

/* Ensure the title stays visible */
.first-overlay h3 {
    display: block;
    opacity: 1;
}
/* Section Header Styling */
.vows-header {
    text-align: center;
    margin-bottom: 50px;
}

.chapter-number {
    display: block;
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 1.2rem;
    letter-spacing: 10px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.heading-line {
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 20px auto;
    opacity: 0.5;
}

/* Medallion & Hint */
.medallion-lock {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.medallion-lock:hover {
    transform: scale(1.05);
}

.seal-hint {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--sandstone);
    margin-top: 25px;
    opacity: 0.5;
    text-align: center;
}

/* Input Styling */
#anniversary-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--gold);
    color: var(--pearl);
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 8px;
    padding: 10px;
    margin-top: 20px;
    outline: none;
    width: 200px;
}

/* Letter Reveal Styling */
.letter-reveal-box {
    display: none; /* Hidden until unlocked */
    max-width: 600px;
    margin-top: 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
}

.vow-text {
    font-style: italic;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--pearl);
}
#odyssey-path {
    padding: 100px 0;
    background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, 0.02));
    overflow: hidden;
}

.path-header {
    text-align: center;
    margin-bottom: 60px;
}

.path-subtext {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--sandstone);
    margin-top: 10px;
}

/* The Infinite Loop */
#odyssey-path {
    padding: 120px 0;
    background: #0d0e15; /* Dark background to match the theme */
    overflow: hidden;
    position: relative;
}

.infinite-gallery {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    /* This adds a soft fade on the left and right edges */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.photo-track {
    display: flex;
    width: calc(300px * 12); /* 300px width per card * 12 total cards */
    animation: seamlessLoop 40s linear infinite;
}

.path-card {
    flex: 0 0 270px; /* Actual width of the photo */
    height: 380px;
    margin: 0 15px; /* Total card width = 270 + 30 = 300px */
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
}

.path-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: all 0.5s ease;
}

.path-card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
}

.path-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* THE SEAMLESS LOOP MATH */
@keyframes seamlessLoop {
    0% {
        transform: translateX(0);
    }
    100% {
        /* This moves exactly 6 cards' distance, then resets */
        transform: translateX(calc(-300px * 6)); 
    }
}

/* Future Note Styling */
.future-note {
    text-align: center;
    margin-top: 80px;
}

.future-note p {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--pearl);
    font-style: italic;
    letter-spacing: 1px;
}

.loading-dots {
    margin-top: 15px;
}

.loading-dots span {
    color: var(--gold);
    font-size: 2rem;
    display: inline-block;
    animation: dotFade 1.5s infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotFade {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}
:root {
    --salmon: #BF897F;
    --sandstone: #DAC2B2;
    --pearl: #F7F2E0;
    --olive: #707B6D;
    --pewter: #3A3D3A;
    --gold: #d4af37;           /* ADD THIS */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
}
/* =========================
   CHAPTER V — LOVE JARS
========================= */

#love-jars {
    background: radial-gradient(circle at top, #1a1c2c 0%, #0d0e15 55%, #050609 100%);
    color: var(--pearl);
}

.jars-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.jars-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* Jar cards (the containers that are clickable) */
.jar-card {
    width: 260px;
    cursor: pointer;
    text-align: center;
    padding: 26px 16px 32px;
    border-radius: 18px;
    background: rgba(247, 242, 224, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.12);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.jar-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.jar-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

.jar-card:hover::before {
    opacity: 1;
}

/* Small press animation for tap/click */
.jar-card:active {
    transform: translateY(-4px) scale(0.97);
    box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}

/* =========================
   REALISTIC GLASS JAR SHAPE
========================= */

/* =========================
   CHAPTER V — LOVE JARS
========================= */

#love-jars {
    /* Warm dusk tone: hints of salmon & sandstone over a soft dark base */
    background:
        radial-gradient(circle at 0% 0%, rgba(191, 137, 127, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(218, 194, 178, 0.22) 0%, transparent 60%),
        linear-gradient(180deg, #191a22 0%, #2c2d33 50%, #151317 100%);
    color: var(--pearl);
}

.jars-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.jars-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* The jar itself */
.jar-card {
    width: 220px;
    height: 260px;
    background: rgba(212, 175, 55, 0.05);        /* soft gold tint */
    border: 2px solid var(--gold);
    border-radius: 20px 20px 40px 40px;          /* top smaller, bottom rounder */
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 24px 22px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 0 15px rgba(212, 175, 55, 0.1);
    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                background 0.3s ease,
                border-color 0.3s ease;
}

.jar-card:hover {
    transform: translateY(-6px);
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 26px 80px rgba(0,0,0,0.7);
    border-color: #ffd700;
}

.jar-card:active {
    transform: translateY(-3px) scale(0.98);
    box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}

/* Lid on top */
.jar-lid {
    width: 120px;
    height: 20px;
    background: var(--gold);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
    box-shadow:
        0 8px 12px rgba(0,0,0,0.25),
        inset 0 0 3px rgba(255,255,255,0.5);
}

/* Jar text */
.jar-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--sandstone);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 12px;
}

.jar-hint {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(247, 242, 224, 0.85);
    text-align: center;
}

/* Message panel */
.jar-message-panel {
    max-width: 650px;
    margin: 60px auto 0;
    padding: 35px 35px 40px;
    background: rgba(247, 242, 224, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-left: 3px solid var(--gold);
    border-radius: 12px;
    backdrop-filter: blur(14px);
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.7);
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.jar-message-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.jar-message-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--sandstone);
    margin-bottom: 10px;
}

.jar-message-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--pearl);
    font-style: italic;
}

/* Subtle emphasis effect when message changes */
.jar-message-panel.breathe {
    animation: jarBreathe 0.9s ease;
}

@keyframes jarBreathe {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-4px) scale(1.01); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Tablet tweaks */
@media (max-width: 700px) {
    .jar-card {
        width: 210px;
        height: 250px;
    }
    .jar-message-text {
        font-size: 1.3rem;
    }
}

/* Phone layout: jars in a horizontal strip you can swipe */
@media (max-width: 600px) {
    .jars-grid {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px;
        padding: 10px 20px 10px;
        margin: 0 -20px;
        -webkit-overflow-scrolling: touch;
    }

    .jar-card {
        flex: 0 0 80%;
        max-width: 80%;
        width: auto;
    }
}
.romantic-quote {
    font-family: var(--font-serif);
    font-size: 1.6rem;        /* a bit smaller */
    line-height: 1.7;
    font-style: italic;
    color: var(--pearl);
    position: relative;
    padding-left: 28px;       /* smaller indent */
    margin-top: 18px;
    margin-bottom: 18px;
    max-width: 30rem;
}

.romantic-quote::before {
    content: "“";
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 2.6rem;        /* smaller quote mark */
    line-height: 1;
    color: rgba(0, 0, 0, 0.18);  /* lighter */
}

.romantic-note {
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(247, 242, 224, 0.75);
    max-width: 32rem;
    margin-bottom: 18px;
}
/* Styled text beside the video, similar feel to Chapter II */
.journey-quote {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.7;
    font-style: italic;
    color: rgba(58, 61, 58, 0.9); /* soft pewter on sandstone */
    position: relative;
    padding-left: 28px;
    margin-top: 16px;
    margin-bottom: 18px;
    max-width: 30rem;
}

.journey-quote::before {
    content: "“";
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 2.6rem;
    line-height: 1;
    color: rgba(58, 61, 58, 0.18); /* faint decorative quote */
}
.letter-close-btn {
    margin-top: 30px;
    padding: 10px 28px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: transparent;
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.7);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.letter-close-btn:hover {
    background: #ffd700;
    color: var(--pewter);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
/* =========================
   CHAPTER VI — EVOLUTION
========================= */

#evolution {
    background: linear-gradient(180deg, #17181f 0%, #212327 50%, #17181f 100%);
    color: var(--pearl);
}

.evolution-wrapper {
    max-width: 1000px;
    text-align: left;
}

.evolution-intro {
    margin-top: 10px;
    margin-bottom: 40px;
    font-size: 1rem;
    color: rgba(247, 242, 224, 0.8);
}

.evolution-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.evo-card {
    background: rgba(247, 242, 224, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 0, 0.18);
    padding: 22px 22px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.evo-card h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #ffd700;
}

.evo-card p {
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(247, 242, 224, 0.85);
}

.evo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 80px rgba(0,0,0,0.75);
    border-color: rgba(255, 215, 0, 0.45);
}

@media (max-width: 900px) {
    .evolution-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .evolution-grid {
        grid-template-columns: 1fr;
    }
}

/* Make evolution cards interactive */
.evo-card {
    cursor: pointer;
    position: relative;
}

/* Body text initially hidden */
.evo-card p {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
    transition:
        max-height 0.45s ease,
        opacity 0.45s ease,
        margin-top 0.45s ease;
}

/* When card is open, reveal text */
.evo-card.open p {
    max-height: 260px;   /* large enough for full paragraph */
    opacity: 1;
    margin-top: 8px;
}

/* Little hint text */
.evo-hint {
    margin-top: 14px;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(247, 242, 224, 0.55);
    transition: color 0.3s ease;
}

.evo-card.open .evo-hint {
    color: #ffd700;
}
/* =========================
   CHAPTER VII — FUTURE
========================= */

#future {
    background:
        radial-gradient(circle at 0% 0%, rgba(191, 137, 127, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(218, 194, 178, 0.24) 0%, transparent 60%),
        linear-gradient(180deg, #151317 0%, #1f2025 55%, #101017 100%);
    color: var(--pearl);
}

.future-wrapper {
    max-width: 900px;
    text-align: center;
}

.future-intro {
    margin-top: 12px;
    margin-bottom: 32px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(247, 242, 224, 0.85);
}

/* Little future "vows" as pills */
.future-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin-bottom: 40px;
}

.future-pill {
    max-width: 260px;
    padding: 16px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    background: rgba(247, 242, 224, 0.03);
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(247, 242, 224, 0.9);
    text-align: left;
    box-shadow: 0 16px 50px rgba(0,0,0,0.6);
}

/* The main future "letter" */
.future-letter {
    margin-top: 10px;
    padding: 38px 40px 42px;
    background: rgba(247, 242, 224, 0.04);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    text-align: left;
}

.future-letter p {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(247, 242, 224, 0.88);
    margin-bottom: 18px;
}

.future-letter p:last-of-type {
    margin-bottom: 24px;
}

.future-signoff {
    text-align: right;
    font-size: 1.4rem;
    color: var(--sandstone);
}

/* Responsive tweaks */
@media (max-width: 700px) {
    .future-letter {
        padding: 28px 22px 32px;
    }

    .future-letter p {
        font-size: 1rem;
    }

    .future-pills {
        gap: 14px;
    }

    .future-pill {
        max-width: 100%;
    }
}
/* Reveal button */
.future-btn {
    margin-top: 10px;
    margin-bottom: 30px;
    padding: 10px 28px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: transparent;
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.7);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.future-btn:hover:not(:disabled) {
    background: #ffd700;
    color: var(--pewter);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.future-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Future letter starts hidden, then unfolds */
.future-letter {
    margin-top: 10px;
    padding: 0 40px;              /* no vertical padding while hidden */
    background: rgba(247, 242, 224, 0.04);
    border-radius: 16px;
    border: 0 solid rgba(255, 215, 0, 0.3);
    box-shadow: none;
    text-align: left;

    opacity: 0;
    transform: translateY(20px);
    max-height: 0;
    overflow: hidden;

    transition:
        opacity 0.6s ease,
        transform 0.6s ease,
        max-height 0.9s ease,
        padding 0.5s ease,
        border-width 0.5s ease,
        box-shadow 0.5s ease;
}

.future-letter.visible {
    opacity: 1;
    transform: translateY(0);
    max-height: 900px;            /* large enough for all text */
    padding: 38px 40px 42px;
    border-width: 1px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
/* =========================
   CHAPTER VIII — FINALE
========================= */

#epilogue {
    background:
        radial-gradient(circle at 0% 0%, rgba(191, 137, 127, 0.4) 0%, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(212, 175, 55, 0.28) 0%, transparent 60%),
        linear-gradient(180deg, #0b0c12 0%, #15161e 50%, #050509 100%);
    color: var(--pearl);
}

.epilogue-wrapper {
    max-width: 900px;
    text-align: center;
}

.epilogue-intro {
    margin-top: 12px;
    margin-bottom: 36px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(247, 242, 224, 0.85);
}

/* Envelope */

.final-envelope {
    position: relative;
    width: 320px;
    max-width: 90%;
    margin: 40px auto 0;
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.5s ease;
}

.final-envelope-body {
    position: relative;
    padding: 60px 32px 30px;
    border-radius: 18px;
    background: radial-gradient(circle at bottom,
                rgba(247, 242, 224, 0.4) 0%,
                rgba(247, 242, 224, 0.12) 45%,
                rgba(247, 242, 224, 0.03) 100%);
    border: 1px solid rgba(255, 215, 0, 0.55);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.8),
        inset 0 0 18px rgba(255, 255, 255, 0.14);
}

.final-envelope-flap {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
    border-bottom: 80px solid var(--gold);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.envelope-label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--pewter);
    padding: 10px 18px;
    background: rgba(247, 242, 224, 0.95);
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.final-envelope:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 90px rgba(0,0,0,0.9);
}

.final-envelope.opened {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    pointer-events: none;
}

/* Final letter */

.final-letter {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    margin-top: 10px;

    padding: 0 40px;          /* 0 vertical padding while hidden */
    background: rgba(247, 242, 224, 0.04);
    border-radius: 16px;
    border: 0 solid rgba(255, 215, 0, 0.35);
    box-shadow: none;
    text-align: left;

    opacity: 0;
    transform: translateY(20px);
    max-height: 0;
    overflow: hidden;

    transition:
        opacity 0.7s ease,
        transform 0.7s ease,
        max-height 1s ease,
        padding 0.6s ease,
        border-width 0.6s ease,
        box-shadow 0.6s ease;
}

.final-letter.visible {
    opacity: 1;
    transform: translateY(0);
    max-height: 900px;
    padding: 40px 40px 34px;
    border-width: 1px;
    box-shadow: 0 30px 90px rgba(0,0,0,0.75);
}

.final-text {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(247, 242, 224, 0.9);
    margin-bottom: 18px;
}

.final-question {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 1.8;
    margin-top: 10px;
    margin-bottom: 24px;
    color: #ffd700;
}

.final-question span {
    font-style: italic;
}

/* Buttons */

.final-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.final-btn {
    padding: 9px 22px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.8);
    background: transparent;
    color: #ffd700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.final-btn:hover:not(:disabled) {
    background: #ffd700;
    color: var(--pewter);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.final-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Final thank-you line */

.final-thankyou {
    margin-top: 6px;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(247, 242, 224, 0.9);
    text-align: center;
}

/* Hearts animation */

.hearts-container {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
}

.finale-heart {
    position: absolute;
    bottom: 0;
    font-size: 1.2rem;
    color: #ffd2dc;
    opacity: 0;
    animation: floatHeart 3s ease-out forwards;
}

@keyframes floatHeart {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(-160px) translateX(var(--x-offset)) scale(1.2);
        opacity: 0;
    }
}

@media (max-width: 700px) {
    .final-letter.visible {
        padding: 30px 22px 26px;
    }

    .final-text {
        font-size: 1rem;
    }

    .final-question {
        font-size: 1.15rem;
    }
}
/* =========================
   INTRO GATE
========================= */

#intro-gate {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.8s ease;
}

/* Blurred background photo */
#intro-gate::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(5, 6, 15, 0.75), rgba(5, 6, 15, 0.9)),
        url('us1.jpg') center center / cover no-repeat;
    filter: blur(6px);
    transform: scale(1.08); /* avoid blur edges */
    z-index: -1;
}

/* Glass card in the middle */
.intro-inner {
    position: relative;
    max-width: 600px;
    width: 90%;
    padding: 40px 26px 32px;
    text-align: center;
    background: rgba(9, 10, 18, 0.7);
    border-radius: 18px;
    border: 1px solid rgba(247, 242, 224, 0.35);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
}

.intro-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: rgba(247, 242, 224, 0.7);
    margin-bottom: 10px;
}

.intro-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    letter-spacing: 2px;
    margin-bottom: 14px;
    color: var(--pearl);
}

.intro-sub {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
    color: rgba(247, 242, 224, 0.9);
    margin-bottom: 18px;
}

.intro-countdown {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.9);
    margin-bottom: 22px;
}

#intro-count {
    font-weight: 400;
}

/* Skip button */
.intro-skip {
    padding: 8px 22px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: transparent;
    color: #ffd700;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.75);
    cursor: pointer;
    transition: all 0.3s ease;
}

.intro-skip:hover {
    background: #ffd700;
    color: var(--pewter);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

/* Hide state */
#intro-gate.intro-hide {
    opacity: 0;
    pointer-events: none;
}