*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
    scroll-snap-type:y mandatory;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:#fff8f8;
    color:#333;
    overflow-x:hidden;
}

.bg-video{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    object-fit:cover;
    z-index:-2;
}

body::after{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.3);
    z-index:-1;
    pointer-events:none;
}

.panel{
    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    padding:30px;

    scroll-snap-align:center;
    scroll-snap-stop:always;
}

/* Reveal animates the inner .content, NOT the .panel. The panel is the
   scroll-snap target; transforming it fought scroll-snap (the browser snaps
   the transformed box), so the section overshot upward and then re-centered.
   Keeping the panel's box static makes the snap land centered immediately. */
.content{
    text-align:center;
    background:rgba(255,255,255,0.65);
    padding:30px 40px;
    border-radius:16px;
    backdrop-filter:blur(4px);

    /* .content is the flex item of .panel. Without this it keeps the default
       min-width:auto, so the gallery's max-content .gallery-track (even though
       clipped by .gallery overflow:hidden) floors the item's width and pushes
       it past the viewport on phones. min-width:0 lets it shrink to fit. */
    min-width:0;

    opacity:0;
    transform:translateY(30px);
    transition:opacity 0.7s ease, transform 0.7s ease;
}

.panel.show .content{
    opacity:1;
    transform:none;
}

.hero .content{
    background:rgba(0,0,0,0.25);
    padding:40px 70px;
    border-radius:20px;
    border:1px solid rgba(255,255,255,0.3);
    backdrop-filter:blur(2px);
}

h1{
    font-family:"Dancing Script", cursive;
    font-size:6rem;
    color:#fff;
    font-weight:400;
    line-height:1.2;
    text-shadow:0 2px 12px rgba(0,0,0,0.35);
}

h2{
    font-size:2rem;
    margin-bottom:20px;
    color:#c4a7ab;
}

.content.dark-frame{
    background:rgba(0,0,0,0.25);
    padding:40px 70px;
    border-radius:20px;
    border:1px solid rgba(255,255,255,0.3);
    backdrop-filter:blur(2px);
    color:#fff;
}

.invite{
    max-width:600px;
    font-family:"Quicksand", sans-serif;
    font-weight:300;
    letter-spacing:0.02em;
    line-height:1.8;
    color:#5a4a52;
}

.invite-photo{
    width:100%;
    max-width:380px;
    height:auto;
    border-radius:16px;
    box-shadow:0 8px 24px rgba(0,0,0,0.2);
    margin-bottom:25px;
}

.invite p{
    margin-bottom:16px;
}

.invite p:last-child{
    margin-bottom:0;
}

.map-link{
    display:inline-block;
    margin-top:20px;
    font-size:1.2rem;
    font-weight:700;
    color:#fff;
    text-decoration:underline;
    text-underline-offset:4px;
    line-height:1.5;
    transition:opacity 0.3s;
}

.map-link:hover{
    opacity:0.8;
}

.gallery{
    margin-top:30px;
    width:100%;
    overflow:hidden;
}

.gallery-track{
    display:flex;
    width:max-content;
    animation:scroll-left 35s linear infinite;
}

.gallery-track img{
    height:200px;
    width:auto;
    margin-right:16px;
    border-radius:12px;
    box-shadow:0 6px 16px rgba(0,0,0,0.25);
}

.gallery:hover .gallery-track{
    animation-play-state:paused;
}

@keyframes scroll-left{
    from{ transform:translateX(0); }
    to{ transform:translateX(-50%); }
}

.countdown-box{
    max-width:600px;
    width:100%;
}

.countdown-box h2{
    font-family:"Dancing Script", cursive;
}

.countdown{
    display:flex;
    flex-wrap:nowrap;
    gap:8px;
    justify-content:center;
    font-family:"Quicksand", sans-serif;
}

.cd-unit{
    display:flex;
    flex-direction:column;
    align-items:center;
    flex:1 1 0;
    min-width:0;
}

.cd-num{
    font-size:clamp(1.6rem, 6vw, 4rem);
    font-weight:700;
    color:#fff;
    line-height:1;
    font-variant-numeric:tabular-nums;
}

.cd-label{
    margin-top:10px;
    font-size:clamp(0.6rem, 1.6vw, 0.85rem);
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:#c4a7ab;
    white-space:nowrap;
}

@media(prefers-reduced-motion:reduce){
    .gallery-track{ animation:none; }
    .gallery{ overflow-x:auto; }
    .content{ opacity:1; transform:none; transition:none; }
}

p{
    font-size:1.2rem;
    line-height:1.6;
}

.calendar{
    font-family:"Quicksand", sans-serif;
    font-weight:300;
    letter-spacing:0.02em;
    color:#5a4a52;
    max-width:600px;
    width:100%;
}

.calendar h2{
    color:#fff;
    font-family:"Quicksand", sans-serif;
    font-weight:300;
}

.cal-grid{
    display:grid;
    grid-template-columns:repeat(7, 1fr);
    gap:6px;
    max-width:360px;
    margin:0 auto;
}

.cal-name{
    font-weight:400;
    color:#fff;
    padding-bottom:8px;
    font-size:0.95rem;
}

.cal-day{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    aspect-ratio:1;
    font-size:1.05rem;
    font-weight:700;
    color:#fff;
}

.cal-day.empty{
    visibility:hidden;
}

.heart-svg{
    position:absolute;
    width:118%;
    height:118%;
    fill:#c4a7ab;
    filter:drop-shadow(0 3px 6px rgba(196,167,171,0.5));
}

.heart-num{
    position:relative;
    z-index:1;
    color:#fff;
    font-weight:700;
}

@media(min-width:768px){

    h1{
        font-size:9rem;
    }

    h2{
        font-size:3rem;
    }

    p{
        font-size:1.4rem;
    }

}