:root {
    /* LUXURY ROMANTIC PALETTE */
    --color-ivory: #F8F4EE;
    --color-champagne: #E8C87A;
    --color-gold: #B8905D;
    --color-gold-dark: #A68549;
    --color-sage: #7D9D8C;
    --color-mist: #DCE7E1;
    --color-dark: #2D2926;

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-lift: 0 10px 30px rgba(184, 144, 93, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* SCROLL SNAPPING: PROXIMITY */
html {
    scroll-behavior: smooth;
    overflow-x:hidden;
    scroll-snap-type: y proximity;
    height: 100%;

}

body {
    background-color: var(--color-ivory);
    color: var(--color-dark);
    font-family: var(--font-sans);
    line-height: 1.8;
    height: 100%;
    overflow-x: hidden;
}

.snap-section {

    height:100vh;
    height:100dvh;
    width:100%;

    scroll-snap-align:start;
    position:relative;
    overflow:hidden;
}

.serif {
    font-family: var(--font-serif);
}

.italic {
    font-style: italic;
}

.hidden {
    display: none !important;
}

/* --- Global film grain --- */
.film-grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
}

/* --- Loader --- */
.loader {
    position: fixed;
    inset: 0;
    background: var(--color-ivory);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar-loader {
    width: 200px;
    height: 1px;
    background: var(--color-mist);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.progress-bar-loader::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-gold);
    animation: loading 2s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* --- Golden Time Portal --- */
.portal-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease;
}

.portal-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--color-champagne);
    pointer-events: none;
}

.portal-symbol {
    margin-bottom: 20px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 2s ease 0.5s;
}

.portal-text {
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 2s ease 1s;
    letter-spacing: 2px;
}

.portal-overlay.active .portal-symbol,
.portal-overlay.active .portal-text {
    opacity: 0.6;
    transform: scale(1) translateY(0);
}

.portal-overlay.opening .portal-symbol,
.portal-overlay.opening .portal-text {
    opacity: 0;
    transition: opacity 1s ease;
}

.portal-circle {
    width: 0;
    height: 0;
    background: var(--color-ivory);
    border-radius: 50%;
    box-shadow: 0 0 100px var(--color-champagne), 0 0 200px var(--color-gold);
    transition: width 3s cubic-bezier(0.7, 0, 0.3, 1), height 3s cubic-bezier(0.7, 0, 0.3, 1);
}

.portal-overlay.expanding .portal-circle {
    width: 300vmax;
    height: 300vmax;
}

.portal-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.p-particle {
    position: absolute;
    background: var(--color-champagne);
    border-radius: 50%;
    opacity: 0;
    animation: pRise 4s infinite ease-out;
}

@keyframes pRise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

/* --- Ivory Veil --- */
.ivory-veil {
    position: fixed;
    inset: 0;
    background: var(--color-ivory);
    z-index: 4000;
    transform: translateY(100%);
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.ivory-veil.active {
    transform: translateY(0);
}

/* --- Hero --- */

 .hero-intro{

color:rgba(255,255,255,.92);

text-shadow:
0 2px 18px rgba(0,0,0,.65);

max-width:700px;

margin-inline:auto;
}

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: var(--color-ivory);
}


.hero-bg {
    position: absolute;
    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter:
        saturate(1.1)
        brightness(0.95);
    opacity: 0.88;

    z-index: 0;

    animation: bgBreathing 30s infinite alternate ease-in-out;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
    linear-gradient(
        rgba(15,15,15,.25),
        rgba(15,15,15,.25)
    );
    z-index: 1;
} 


.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
   width:70vw;
    height:70vw;

    background:
        radial-gradient(
            circle,
            rgba(255,240,220,.18),
            transparent 70%
        );

    filter:blur(50px);
    z-index: 0;
    pointer-events: none;
}



.hero-motif {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    color: var(--color-gold);
    z-index: 0;
    pointer-events: none;
}

/* .hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20vw;
    opacity: 0.02;
    color: var(--color-gold);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
} */

.hero-symbol{

font-size:1.5rem;

color:rgba(255,255,255,.8);

margin:12px 0;
}

.hero-dust {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* ===== FLOATING PETALS ===== */

.hero-petals {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.petal {
    position: absolute;

    width: 10px;
    height: 10px;

    background:
        rgba(255,220,220,.6);

    border-radius:
        60% 40%
        60% 40%;

    animation:
        petalFloat 14s linear infinite;
}

@keyframes petalFloat {

    0% {
        transform:
            translateY(-10vh)
            rotate(0deg);

        opacity: 0;
    }

    10% {
        opacity: .6;
    }

    90% {
        opacity: .6;
    }

    100% {

        transform:
            translateY(110vh)
            rotate(360deg);

        opacity: 0;
    }
}

.hero-container{
    position:relative;
    z-index:2;

    width:min(90%,900px);

    margin-top:28vh;

    text-align:center;

    padding:
        0
        max(24px,env(safe-area-inset-right))
        max(40px,env(safe-area-inset-bottom))
        max(24px,env(safe-area-inset-left));
}

.title{

font-size:clamp(2.8rem,8vw,4rem);

color:#FFF8F5;

font-weight:700;

line-height:1;

letter-spacing:-1px;

text-shadow:
0 4px 30px rgba(0,0,0,.45);

margin-top:18px;
margin-bottom:18px;
}

.subtitle{

font-size:.85rem;

letter-spacing:5px;

color:rgba(255,255,255,.92);

font-weight:600;

text-transform:uppercase;
}

.hero-watermark {
    opacity: 0.09;
    filter: blur(1px);
}

.hero-date{

color:rgba(255,255,255,.78);

font-size:.9rem;

letter-spacing:3px;

margin-top:12px;

text-transform:uppercase;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle at center,
            transparent 65%,
            rgba(184,138,74,0.03) 100%
        );
    z-index: 1;
}

.btn-primary {
     background:
        rgba(255,255,255,.1);
    background: transparent;
    box-shadow:
        0 0 30px rgba(184,144,93,.15);
    color: var(--color-gold-dark);
    border: 1px solid var(--color-gold);
    padding: 1.2rem 3.5rem;
    text-transform: uppercase;

    backdrop-filter: blur(6px);
    
    letter-spacing: 2px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.4s;
    box-shadow: var(--shadow-lift);
}

.btn-primary:active{

transform:scale(.97);
transition:.1s;
}
 /* .btn-primary{

background:
rgba(255,255,255,.14);

border:
1px solid rgba(255,255,255,.25);

color:#FFF8F5;

backdrop-filter:blur(12px);
} */

.btn-primary:hover {
    box-shadow:
       0 0 50px rgba(184,144,93,.35);
    background: var(--color-gold-dark);
    color: white;
    transform:  translateY(-3px)
        scale(1.02);
    box-shadow: 0 15px 35px rgba(184, 144, 93, 0.3);
}

/* --- Video Section --- */
.video-section {
    background-color: var(--color-ivory);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    border-radius: 4px;
}

video {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: contain;
}

.video-controls-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    padding: 25px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 10;
}

.video-player-wrapper:hover .video-controls-overlay,
.video-controls-overlay.active {
    opacity: 1;
}

.v-btn {
    background: none;
    border: none;
    cursor: pointer;
    fill: white;
    width:44px;
    height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    

    transition: 0.2s;
}

.progress-area {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
}

.progress-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    z-index: 5;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--color-champagne);
    width: 0%;
    border-radius: 3px;
    position: relative;
}

.video-overlay-screen {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(10px);
    color: white;
}

/* --- Memory Journey --- */
.journey-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
    padding-bottom: 90px;
    padding: 60px 5%;
}

.slide-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(60px) brightness(0.45);
    z-index: 1;
    transition: opacity 1.2s ease;
    animation: bgBreathing 25s infinite alternate ease-in-out;
}

@keyframes bgBreathing {
    from {
        transform: scale(1.05) translate(0, 0);
    }

    to {
        transform: scale(1.15) translate(-1%, -1%);
    }
}

.bg-fallback {
    background: linear-gradient(45deg, var(--color-mist), var(--color-ivory)) !important;
}

.memory-card {
    position: relative;
    z-index: 2;
    background: white;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 750px;
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: 3px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(40px) rotate(1deg);
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.snap-section.active .memory-card {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.layout-hero-memory .memory-card{

max-width:min(92vw,950px);

padding:20px;
}

.layout-hero-memory .memory-image-container{

height:min(72vh,900px);

display:flex;
align-items:center;
justify-content:center;
}

.layout-hero-memory img{

width:100%;
height:100%;

object-fit:contain;
}

.layout-hero-memory img{

width:100%;
height:auto;
object-fit:contain;
}

.memory-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.memory-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-mist);
    color: var(--color-gold);
    font-family: var(--font-serif);
    font-style: italic;
}

.memory-info {
    position: relative;
    z-index: 2;
    max-width:  650px;
    padding: 0 20px;
    opacity: 0;
    transition: opacity 1.2s ease 0.6s;
}

.memory-info h2 {
    color: #ffffff;

    text-shadow:
        0 4px 20px rgba(0,0,0,.5);

    font-size: clamp(2rem,4vw,3rem);
}

.memory-message {
     line-height: 2;
    margin-bottom: 30px;
    color: rgba(255,255,255,.96);

    text-shadow:
        0 2px 10px rgba(0,0,0,.45);
}

.snap-section.active .memory-info {
    opacity: 1;
}

.gold-divider {
    width: 60px;
    height: 1px;
    background: var(--color-gold);
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    font-size: 0.8rem;
}

/* Progress Indicator */
.journey-indicator {
    position: fixed;
    bottom:
    max(
    40px,
    calc(env(safe-area-inset-bottom) + 16px)
    );
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: var(--color-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.journey-indicator.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Editorial Layouts */
.layout-standard {
    flex-direction: column;
}

.layout-left {
    flex-direction: row;
    text-align: left;
}

.layout-right {
    flex-direction: row-reverse;
    text-align: right;
}

/* MEMORY 7 SPECIAL FRAME */

.layout-hero-memory .memory-card {

    position: relative;

    background: white;

    padding: 18px;

    border: 1px solid rgba(184,144,93,.25);
}

.layout-hero-memory .memory-card::before {

    content: "";

    position: absolute;

    inset: 8px;

    border: 2px solid rgba(184,144,93,.45);

    pointer-events: none;
}

.layout-hero-memory .memory-card::after {

    content: "✦ Cherished Memory ✦";

    position: absolute;

    top: -14px;

    left: 50%;

    transform: translateX(-50%);

    background: white;

    padding: 0 14px;

    font-size: .75rem;

    letter-spacing: 3px;

    color: #B8905D;
}

/* MEMORY 10 LETTER FRAME */
.layout-letter{

height:100dvh;
height:100vh;

min-height:100vh;

overflow-y:auto;

-webkit-overflow-scrolling:touch;

padding-top:
max(40px,env(safe-area-inset-top));

padding-bottom:
max(40px,env(safe-area-inset-bottom));
}

.layout-letter .memory-card{
    position:relative;
    padding:24px;
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.98),
            rgba(248,243,235,.98)
        );

    border:1px solid rgba(184,144,93,.25);

    box-shadow:
        0 20px 60px rgba(0,0,0,.15);
}

.layout-letter .memory-card::before{
    content:"";
    position:absolute;
    inset:10px;
    border:2px solid rgba(184,144,93,.35);
    pointer-events:none;
}

.layout-letter .memory-card::after{
    content:"For You❤️\A my home 🏠";

    white-space: pre;

    position:absolute;
    top:-26px;
    left:50%;
    transform:translateX(-50%);

    background:white;
    padding:4px 18px;

    font-family:var(--font-serif);
    font-style:italic;

    color:#B8905D;

    letter-spacing:2px;

    text-align:center;

    line-height:1.4;
}

/* .layout-letter .memory-card .letter-seal{
    position:absolute;

    bottom:20px;
    right:20px;

    width:72px;
    height:72px;

    border-radius:50%;

    background:
        radial-gradient(
            circle at 30% 30%,
            #d48a8a,
            #9c2e2e
        );

    box-shadow:
        0 8px 20px rgba(0,0,0,.25);

    display:flex;
    align-items:center;
    justify-content:center;

    color:#fff;

    font-family:var(--font-serif);

    font-size:1.2rem;

    font-weight:bold;

    opacity:.92;
} */
.layout-letter .letter-seal{

width:56px;
height:56px;

font-size:.95rem;

bottom:14px;
right:14px;
}

.layout-letter .memory-card{

max-width:900px;
}

.layout-letter .memory-card{

max-width:min(95vw,950px);

padding:24px;
}

.layout-letter .memory-image-container{

height:min(78vh,1000px);

display:flex;
align-items:center;
justify-content:center;
}

.layout-letter img{

width:100%;
height:100%;

object-fit:contain;
}

/* Final Ending */
.ending-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--color-ivory);
}

.ending-buttons {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.btn-primary-small {
    background: transparent;
    color: var(--color-gold-dark);
    border: 1px solid var(--color-gold);
    padding: 0.8rem 2.2rem;
    font-size: 0.75rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Dust Animation */
.dust-particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: dustFloat 10s infinite linear;
}

@keyframes dustFloat {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    20% {
        opacity: 0.2;
    }

    80% {
        opacity: 0.2;
    }

    100% {
        transform: translate(100px, -100px);
        opacity: 0;
    }
}

@media (max-width: 1024px) {

    .layout-left,
    .layout-right {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .v-time-display {
        display: none;
    }

    .memory-image-container {
        height: 50vh;
    }
}

@media (max-width:768px){

.hero-container{
margin-top:30vh;
}

.title{

font-size:3rem;

line-height:1.05;
}

.subtitle{

font-size:.72rem;

letter-spacing:3px;
}

.hero-intro{

font-size:1rem;

max-width:90%;
margin:auto;
}

.hero-date{
font-size:.75rem;
}

.btn-primary{

padding:1rem 2.2rem;
font-size:.75rem;
}
}

.hero-container{

padding-left:max(24px,env(safe-area-inset-left));
padding-right:max(24px,env(safe-area-inset-right));
}

.memory-image-container img{

opacity:0;

transition:
opacity 1.2s ease;
}

.memory-image-container img.loaded{

opacity:1;
}