/* =========================================================
   365 • THE STORY OF US
   VERSION 2.0
   PART 2A
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ======================
   RESET
====================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    font-family:'Poppins',sans-serif;

    background:#090909;

    color:#fff;

    overflow-x:hidden;

}

/* ======================
   VARIABLES
====================== */

:root{

    --gold:#d4af37;

    --pink:#ff5d8f;

    --rose:#ff8fab;

    --white:#ffffff;

    --glass:rgba(255,255,255,.08);

    --border:rgba(255,255,255,.12);

    --shadow:0 15px 40px rgba(0,0,0,.35);

}

/* ======================
   BACKGROUND
====================== */

#background{

    position:fixed;

    inset:0;

    overflow:hidden;

    z-index:-2;

    background:

    radial-gradient(circle at top,#1b1b2d,#090909 70%);

}

/* Stars */

.star{

    position:absolute;

    width:2px;

    height:2px;

    background:#fff;

    border-radius:50%;

    animation:twinkle 3s infinite;

}

.star.small{

    width:2px;

    height:2px;

}

.star.medium{

    width:3px;

    height:3px;

}

.star.large{

    width:4px;

    height:4px;

}

/* Floating Hearts */

.heart{

    position:absolute;

    bottom:-40px;

    color:rgba(255,255,255,.15);

    font-size:18px;

    animation:floatHeart linear infinite;

}

/* Fireflies */

.firefly{

    position:absolute;

    width:6px;

    height:6px;

    border-radius:50%;

    background:#ffe066;

    box-shadow:0 0 12px #ffe066;

    animation:fireflyMove linear infinite;

}

/* Shooting Star */

.shooting-star{

    position:absolute;

    width:160px;

    height:2px;

    background:linear-gradient(to right,#fff,transparent);

    transform:rotate(-35deg);

    animation:shoot 4s linear forwards;

}

/* Cursor */

.cursor-glow{

    width:240px;

    height:240px;

    border-radius:50%;

    position:fixed;

    pointer-events:none;

    transform:translate(-50%,-50%);

    background:radial-gradient(circle,
        rgba(255,255,255,.12),
        transparent 70%);

    z-index:999;

}

/* ======================
   PROGRESS BAR
====================== */

#progress{

    position:fixed;

    top:0;

    left:0;

    width:100%;

    height:4px;

    background:rgba(255,255,255,.08);

    z-index:1000;

}

#progressBar{

    width:0;

    height:100%;

    background:linear-gradient(90deg,var(--gold),var(--pink));

}

/* ======================
   LOADER
====================== */

#loader{

    position:fixed;

    inset:0;

    background:#090909;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:20px;

    z-index:9999;

}

.loader-heart{

    font-size:70px;

    animation:pulse 1.5s infinite;

}

#loader p{

    font-size:18px;

    letter-spacing:2px;

}

/* ======================
   MUSIC BUTTON
====================== */

#musicButton{

    position:fixed;

    right:25px;

    bottom:25px;

    width:60px;

    height:60px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    background:rgba(255,255,255,.1);

    backdrop-filter:blur(12px);

    color:#fff;

    font-size:24px;

    z-index:1000;

    transition:.3s;

}

#musicButton:hover{

    transform:scale(1.1);

    background:var(--gold);

    color:#111;

}

/* ======================
   HERO
====================== */

#hero{

    min-height:100vh;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    padding:30px;

}

#hero h1{

    font-family:'Great Vibes',cursive;

    font-size:90px;

    color:var(--gold);

    margin-bottom:20px;

}

#hero h2{

    font-size:34px;

    font-weight:500;

    margin-bottom:18px;

}

#hero p{

    max-width:700px;

    color:#d8d8d8;

    line-height:1.8;

    margin-bottom:40px;

}

#beginButton{

    padding:18px 45px;

    border:none;

    border-radius:50px;

    cursor:pointer;

    font-size:17px;

    font-weight:600;

    background:linear-gradient(
        135deg,
        var(--gold),
        var(--pink)
    );

    color:#fff;

    transition:.35s;

}

#beginButton:hover{

    transform:translateY(-4px);

    box-shadow:0 20px 45px rgba(255,93,143,.35);

}

/* ======================
   ANIMATIONS
====================== */

@keyframes pulse{

0%,100%{

transform:scale(1);

}

50%{

transform:scale(1.15);

}

}

@keyframes twinkle{

0%,100%{

opacity:.2;

}

50%{

opacity:1;

}

}

@keyframes floatHeart{

0%{

transform:translateY(0);

opacity:0;

}

10%{

opacity:1;

}

100%{

transform:translateY(-110vh);

opacity:0;

}

}

@keyframes fireflyMove{

0%{

transform:translate(0,0);

}

50%{

transform:translate(60px,-40px);

}

100%{

transform:translate(0,0);

}

}

@keyframes shoot{

0%{

transform:translateX(-200px) rotate(-35deg);

opacity:1;

}

100%{

transform:translateX(140vw) rotate(-35deg);

opacity:0;

}

}

/* ======================
   SECTION DEFAULT
====================== */

section{

    padding:110px 8%;

}

h2{

    text-align:center;

    font-size:42px;

    margin-bottom:50px;

    color:var(--gold);

}

/* =========================================================
   PART 2B
   ENVELOPE & LETTER
========================================================= */

/* ======================
   ENVELOPE SECTION
====================== */

#envelopeSection{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    text-align:center;

    min-height:100vh;

}

#envelopeSection h2{

    margin-bottom:70px;

}

/* ======================
   ENVELOPE
====================== */

#envelope{

    position:relative;

    width:340px;

    height:220px;

    cursor:pointer;

    transition:.6s;

}

#envelope:hover{

    transform:translateY(-10px);

}

/* Body */

#envelope::before{

    content:"";

    position:absolute;

    inset:0;

    background:linear-gradient(
        145deg,
        #f7d79b,
        #d4af37
    );

    border-radius:10px;

    box-shadow:
        0 20px 45px rgba(0,0,0,.35);

}

/* Flap */

.flap{

    position:absolute;

    top:0;

    left:0;

    width:100%;

    height:110px;

    background:linear-gradient(
        145deg,
        #e7c16c,
        #c89a26
    );

    clip-path:polygon(
        0 0,
        100% 0,
        50% 100%
    );

    transform-origin:top;

    transition:.8s;

    z-index:4;

}

/* Letter */

.paper{

    position:absolute;

    left:50%;

    top:30px;

    transform:translateX(-50%);

    width:88%;

    height:170px;

    background:white;

    border-radius:8px;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:45px;

    transition:1s;

    z-index:2;

}

/* Envelope Open */

#envelope.opened .flap{

    transform:rotateX(180deg);

}

#envelope.opened .paper{

    transform:
        translateX(-50%)
        translateY(-130px);

}

/* ======================
   LETTER SECTION
====================== */

#letterSection{

    display:flex;

    justify-content:center;

    align-items:center;

    min-height:100vh;

}

/* Paper */

#letter{

    display:none;

    width:90%;

    max-width:850px;

    background:white;

    color:#222;

    border-radius:18px;

    padding:60px;

    box-shadow:
        0 30px 60px rgba(0,0,0,.35);

    position:relative;

    opacity:0;

    transform:translateY(50px);

    transition:.8s;

}

#letter.show{

    opacity:1;

    transform:translateY(0);

}

/* Decorative Top */

#letter::before{

    content:"";

    position:absolute;

    top:0;

    left:0;

    width:100%;

    height:8px;

    background:linear-gradient(
        90deg,
        var(--gold),
        var(--pink)
    );

    border-radius:18px 18px 0 0;

}

/* Letter Text */

#typedLetter{

    font-size:18px;

    line-height:2;

    white-space:pre-line;

    min-height:320px;

}

/* Continue */

#continueMemories{

    margin-top:40px;

    padding:16px 40px;

    border:none;

    border-radius:40px;

    cursor:pointer;

    background:linear-gradient(
        135deg,
        var(--gold),
        var(--pink)
    );

    color:white;

    font-size:16px;

    font-weight:600;

    transition:.3s;

}

#continueMemories:hover{

    transform:translateY(-4px);

}

/* ======================
   TYPEWRITER CURSOR
====================== */

#typedLetter::after{

    content:"|";

    animation:blink .8s infinite;

}

@keyframes blink{

    50%{

        opacity:0;

    }

}

/* ======================
   MOBILE
====================== */

@media(max-width:768px){

#envelope{

width:270px;

height:180px;

}

.paper{

height:140px;

font-size:36px;

}

#letter{

padding:35px 25px;

}

#typedLetter{

font-size:16px;

line-height:1.8;

min-height:250px;

}

}


/* =========================================================
   PART 2C
   GALLERY • TIMELINE • LOVE • FUTURE • ENDING
========================================================= */

/* ===========================
   GALLERY
=========================== */

#gallerySection{

    min-height:100vh;

}

#galleryGrid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));

    gap:30px;

}

.memory-card{

    background:rgba(255,255,255,.08);

    backdrop-filter:blur(12px);

    border:1px solid rgba(255,255,255,.08);

    border-radius:18px;

    overflow:hidden;

    transition:.35s;

}

.memory-card:hover{

    transform:translateY(-10px);

    box-shadow:0 20px 40px rgba(0,0,0,.35);

}

.memory-card img{

    width:100%;

    height:300px;

    object-fit:cover;

    transition:.4s;

}

.memory-card:hover img{

    transform:scale(1.05);

}

.memory-card h3{

    color:var(--gold);

    padding:20px 20px 10px;

}

.memory-card p{

    padding:0 20px 25px;

    color:#ddd;

    line-height:1.7;

}

/* ===========================
   TIMELINE
=========================== */

#timeline{

    position:relative;

    max-width:900px;

    margin:auto;

}

#timeline::before{

    content:"";

    position:absolute;

    left:50%;

    top:0;

    width:4px;

    height:100%;

    background:var(--gold);

    transform:translateX(-50%);

}

.timeline-item{

    width:45%;

    padding:25px;

    margin:40px 0;

    border-radius:18px;

    background:rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

    position:relative;

}

.timeline-item:nth-child(even){

    margin-left:auto;

}

.timeline-item h3{

    color:var(--gold);

    margin-bottom:10px;

}

/* ===========================
   LOVE CARDS
=========================== */

#loveCards{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

    gap:25px;

}

.love-card{

    padding:35px;

    text-align:center;

    border-radius:18px;

    background:rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

    transition:.35s;

}

.love-card:hover{

    transform:translateY(-8px);

}

.love-card .icon{

    font-size:42px;

    margin-bottom:20px;

}

.love-card h3{

    color:var(--gold);

    margin-bottom:15px;

}

/* ===========================
   FUTURE
=========================== */

.future-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));

    gap:25px;

}

.future-card{

    text-align:center;

    padding:45px 25px;

    border-radius:20px;

    background:rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

    transition:.35s;

}

.future-card:hover{

    transform:translateY(-10px);

}

.future-card{

    font-size:55px;

}

.future-card h3{

    margin-top:20px;

    color:var(--gold);

}

/* ===========================
   ENDING
=========================== */

#endingSection{

    min-height:100vh;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

}

#endingSection h1{

    font-family:'Great Vibes',cursive;

    font-size:70px;

    color:var(--gold);

    margin-bottom:20px;

}

#endingSection p{

    max-width:700px;

    color:#ddd;

    margin-bottom:50px;

}

#counter{

    display:flex;

    flex-wrap:wrap;

    justify-content:center;

    gap:20px;

    margin-bottom:60px;

}

.counter-card{

    width:140px;

    padding:25px;

    border-radius:18px;

    background:rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

}

.counter-number{

    font-size:40px;

    font-weight:700;

    color:var(--gold);

}

.counter-label{

    margin-top:10px;

    color:#ddd;

}

.final-quote{

    font-family:'Great Vibes',cursive;

    font-size:40px;

    max-width:900px;

    margin-bottom:50px;

}

#restart{

    padding:18px 45px;

    border:none;

    border-radius:40px;

    background:linear-gradient(
        135deg,
        var(--gold),
        var(--pink)
    );

    color:white;

    font-size:16px;

    cursor:pointer;

    transition:.3s;

}

#restart:hover{

    transform:translateY(-5px);

}

/* ===========================
   SECRET HEART
=========================== */

#secretHeart{

    position:fixed;

    left:20px;

    bottom:20px;

    font-size:24px;

    cursor:pointer;

    opacity:.35;

    transition:.3s;

}

#secretHeart:hover{

    opacity:1;

    transform:scale(1.2);

}

/* ===========================
   RESPONSIVE
=========================== */

@media(max-width:768px){

section{

padding:80px 20px;

}

#hero h1{

font-size:60px;

}

#hero h2{

font-size:28px;

}

#timeline::before{

left:15px;

}

.timeline-item{

width:100%;

margin-left:35px !important;

}

#counter{

gap:12px;

}

.counter-card{

width:110px;

}

.counter-number{

font-size:28px;

}

.final-quote{

font-size:28px;

}

}

@media(max-width:480px){

#hero h1{

font-size:48px;

}

h2{

font-size:30px;

}

.memory-card img{

height:220px;

}

.future-card{

padding:30px 20px;

}

#musicButton{

width:50px;

height:50px;

font-size:20px;

}

}