*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #FBE18D;
    --gold-soft: #F9E5A2;
    --rose: #E8B4B8;
    --violet: #A294C6;
    --midnight: #05050A;
    --deep: #020104;
    --star: #e2d9f3;
    --teal: #88d4c5;
    --glow: rgba(251, 225, 141, 0.2);
}

html,
body {
    width: 100%;
    height: 100%;
    background: var(--deep);
    overflow: hidden;
    font-family: 'Cormorant Garamond', serif;
    color: white;
    cursor: none;
}

/* CUSTOM CURSOR */
#cursor {
    position: fixed;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, var(--gold), var(--rose));
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: screen;
    box-shadow: 0 0 20px var(--gold), 0 0 40px var(--rose);
}

#cursor-trail {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(251, 225, 141, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease;
}

/* CANVAS BACKGROUND */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* SCENES */
.scene {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease, transform 1s ease, filter 1s ease;
    transform: scale(0.95);
    filter: blur(10px);
}

.scene.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    filter: blur(0px);
}

/* SCENE 1 ENTRY */
#s1 {
    background: transparent;
}

.entry-line {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 300;
    font-style: italic;
    color: transparent;
    background: linear-gradient(90deg, var(--violet), var(--gold), var(--rose));
    -webkit-background-clip: text;
    background-clip: text;
    text-align: center;
    opacity: 0;
    letter-spacing: 0.08em;
    line-height: 1.8;
    max-width: 800px;
    padding: 0 2rem;
    text-shadow: none;
    filter: drop-shadow(0 0 15px rgba(162, 148, 198, 0.3));
}

#enter-btn, .next-btn {
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    letter-spacing: 0.2em;
    cursor: none;
    border-radius: 50px;
    opacity: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,255,255,0.05);
    text-transform: uppercase;
}

#enter-btn {
    margin-top: 3.5rem;
}

.next-btn {
    position: absolute;
    bottom: 3rem;
    z-index: 20;
}

#enter-btn:hover, .next-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 15px 40px rgba(251, 225, 141, 0.2), inset 0 0 25px rgba(251, 225, 141, 0.1);
    transform: translateY(-5px);
    border-color: rgba(251, 225, 141, 0.3);
}

/* SCENE 2 STRANGERS */
#s2-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.scene-text {
    position: relative;
    z-index: 5;
    text-align: center;
    pointer-events: none;
}

.title-lg {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--star) 0%, var(--violet) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    letter-spacing: 0.05em;
    filter: drop-shadow(0 0 20px rgba(162, 148, 198, 0.4));
}

.sub-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    font-style: italic;
    color: rgba(226, 217, 243, 0.9);
    opacity: 0;
    margin-top: 1.5rem;
    letter-spacing: 0.08em;
}

/* SCENE 3 CONNECTION */
#s3-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.orbit-text {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 700px;
}

.orbit-line {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-style: italic;
    color: var(--gold-soft);
    opacity: 0;
    margin: 0.8rem 0;
    letter-spacing: 0.05em;
    filter: drop-shadow(0 0 10px rgba(249, 229, 162, 0.3));
}

.orbit-line.big {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    font-style: normal;
    color: var(--violet);
    margin-top: 2rem;
    filter: drop-shadow(0 0 20px rgba(162, 148, 198, 0.5));
}

/* SCENE 4 TRIO */
#s4-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.trio-main {
    position: relative;
    z-index: 5;
    text-align: center;
}

.trio-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    background: linear-gradient(90deg, var(--rose), var(--gold), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    filter: drop-shadow(0 0 30px rgba(232, 180, 184, 0.4));
}

.float-tag {
    position: absolute;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: white;
    opacity: 0;
    white-space: nowrap;
    animation: floatTag 6s ease-in-out infinite;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes floatTag {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

/* SCENE 5 MEMORIES */
#s5 {
    flex-direction: column;
    gap: 1.5rem;
}

.memory-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-style: italic;
    background: linear-gradient(90deg, var(--rose), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(232, 180, 184, 0.4));
}

.cubes-wrap {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    perspective: 1200px;
    max-width: 960px;
    padding: 1rem;
}

.memory-cube {
    /* 4:5 portrait ratio — looks great for photos */
    width: clamp(160px, 22vw, 240px);
    aspect-ratio: 4 / 5;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: none;
    opacity: 0;
    flex-shrink: 0;
}

.memory-cube:hover {
    transform: rotateY(12deg) rotateX(-8deg) scale(1.06);
}

.cube-face {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(251, 225, 141, 0.4);
    border-radius: 16px;
    background: #000;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.1);
    /* no flex on the face itself — let image fill and use absolute caption */
}

.cube-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.9;
    transition: opacity 0.4s ease, transform 0.8s ease;
    display: block;
}

.memory-cube:hover .cube-img {
    opacity: 1;
    transform: scale(1.08);
}

/* shimmer gloss on top-left corner */
.cube-face::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 45%);
    border-radius: 16px;
    z-index: 2;
    pointer-events: none;
}

/* dark gradient so caption text is always readable */
.cube-face::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    z-index: 2;
    border-radius: 0 0 16px 16px;
    pointer-events: none;
}

.cube-cap {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(249, 229, 162, 0.95);
    text-align: center;
    padding: 0 0.8rem 0.8rem;
    line-height: 1.4;
    /* sits above both ::before and ::after */
    z-index: 3;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ── @keyframes pulse (used by gift box 'tap to open' text) ── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* SCENE 6 SPOTLIGHT */
#s6 {
    background: rgba(5, 5, 10, 0.8);
    /* make scene a normal column so photo + text stack naturally */
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding-top: 0;
}

.spotlight-ring {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: 1px solid rgba(251, 225, 141, 0.2);
    animation: ringPulse 4s ease-in-out infinite;
    opacity: 0;
}

.spotlight-ring:nth-child(2) {
    width: 500px;
    height: 500px;
    animation-delay: 0.8s;
}

.spotlight-ring:nth-child(3) {
    width: 700px;
    height: 700px;
    animation-delay: 1.6s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.1; transform: scale(1.1); }
}

.spotlight-text {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    background: rgba(0,0,0,0.2);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
}

.spotlight-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(135deg, var(--gold), var(--rose), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    filter: drop-shadow(0 0 30px rgba(251, 225, 141, 0.4));
    animation: nameGlow 4s ease-in-out infinite;
}

@keyframes nameGlow {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(251, 225, 141, 0.4)); }
    50% { filter: drop-shadow(0 0 60px rgba(232, 180, 184, 0.6)); }
}

.spotlight-sub {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-style: italic;
    font-weight: 300;
    color: var(--star);
    opacity: 0;
    margin-top: 1.5rem;
    line-height: 1.9;
    letter-spacing: 0.04em;
}

/* SCENE 7 FROM SAI & BHAVANI */
#s7 {
    background: rgba(5, 5, 10, 0.6);
}

.handwritten-wrap {
    text-align: center;
    max-width: 850px;
    padding: 3rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.03), transparent);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.hw-from {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--gold);
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(251, 225, 141, 0.4));
    margin-bottom: 1rem;
}

.hw-line {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    color: rgba(226, 217, 243, 0.95);
    opacity: 0;
    margin-top: 1rem;
    line-height: 1.8;
}

/* SCENE 8 ROAST */
#s8 {
    background: rgba(5, 5, 10, 0.6);
}

.roast-wrap {
    text-align: center;
    max-width: 700px;
}

.roast-honest {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-style: italic;
    color: var(--teal);
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(136, 212, 197, 0.4));
    margin-bottom: 1rem;
}

.roast-line {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    font-style: italic;
    color: rgba(249, 229, 162, 0.85);
    opacity: 0;
    margin: 0.6rem 0;
    letter-spacing: 0.04em;
}

.roast-but {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--rose);
    opacity: 0;
    margin-top: 2rem;
    filter: drop-shadow(0 0 20px rgba(232, 180, 184, 0.5));
}

/* SCENE 9 BIRTHDAY CORE */
#s9 {
    background: rgba(5, 5, 10, 0.4);
}

.core-wrap {
    text-align: center;
    max-width: 900px;
    padding: 3rem;
    background: radial-gradient(circle, rgba(251,225,141,0.05), transparent 70%);
}

.core-date {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    letter-spacing: 0.5em;
    color: var(--gold);
    opacity: 0;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    filter: drop-shadow(0 0 15px rgba(251, 225, 141, 0.4));
}

.core-main {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    font-style: italic;
    background: linear-gradient(135deg, var(--star), var(--violet), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    line-height: 1.4;
    filter: drop-shadow(0 0 30px rgba(162, 148, 198, 0.4));
}

.core-wish {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-style: italic;
    color: rgba(226, 217, 243, 0.9);
    opacity: 0;
    margin-top: 2rem;
    line-height: 1.9;
}

/* SCENE 10 FINAL */
#s10 {
    background: rgba(2, 1, 4, 0.7);
    overflow: hidden;
}

#confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.final-wrap {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 3rem;
    background: radial-gradient(circle, rgba(0,0,0,0.6), transparent);
    border-radius: 50%;
}

.final-hb {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    background: linear-gradient(90deg, var(--gold), var(--rose), var(--violet), var(--teal), var(--gold));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    animation: shimmer 5s linear infinite;
    filter: drop-shadow(0 0 50px rgba(251, 225, 141, 0.5));
    line-height: 1.1;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.final-from {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 3.5vw, 2.2rem);
    font-style: italic;
    opacity: 0;
    margin-top: 1rem;
    color: rgba(226, 217, 243, 0.85);
    letter-spacing: 0.08em;
}

.final-trio {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 700;
    opacity: 0;
    margin-top: 2rem;
    background: linear-gradient(90deg, #F9E5A2, #E8B4B8, #A294C6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 30px rgba(232, 180, 184, 0.5));
}

.final-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-style: italic;
    color: var(--gold-soft);
    opacity: 0;
    margin-top: 1.5rem;
    letter-spacing: 0.06em;
    filter: drop-shadow(0 0 20px rgba(249, 229, 162, 0.3));
}

/* NAV DOTS */
#nav-dots {
    position: fixed;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(251, 225, 141, 0.5);
    cursor: none;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: transparent;
}

.dot.active {
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold);
    transform: scale(1.5);
}

/* PARTICLES */
.particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
}

/* REVEAL ANIM */
@keyframes revealUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* GLASS MORPHISM OVERLAY */
.glass-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(2, 1, 4, 0.5) 100%);
    z-index: 5;
    pointer-events: none;
}

/* STARS LAYER */
#stars {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ===================== GIFT BOX ===================== */
.gift-box-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    cursor: none;
    margin: 0 auto;
    transition: transform 0.3s ease;
}
.gift-box-wrap:hover {
    transform: scale(1.05) rotate(2deg);
}
.gift-lid {
    position: absolute;
    top: 0;
    left: -10px;
    width: 170px;
    height: 40px;
    background: linear-gradient(135deg, var(--rose), #ff8a96);
    border-radius: 5px;
    z-index: 5;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.gift-body {
    position: absolute;
    top: 35px;
    left: 0;
    width: 150px;
    height: 115px;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    border-radius: 0 0 5px 5px;
    box-shadow: inset 0 -10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}
.gift-ribbon-v {
    position: absolute;
    top: 0;
    left: 60px;
    width: 30px;
    height: 100%;
    background: linear-gradient(135deg, var(--gold), #ffb74d);
}
.gift-ribbon-h {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, var(--gold), #ffb74d);
}
.gift-box-wrap.open .gift-lid {
    transform: translateY(-80px) rotate(-15deg);
    opacity: 0;
}
.gift-box-wrap.open {
    pointer-events: none;
    animation: fadeOut 1s ease forwards 0.5s;
}
@keyframes fadeOut { to { opacity: 0; display: none; } }

/* ===================== CAKE ===================== */
.birthday-cake {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}
.cake-layer {
    position: absolute;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: 10px;
    box-shadow: inset 0 -5px 15px rgba(0,0,0,0.1);
}
.cake-layer.bottom {
    bottom: 0;
    left: 0;
    width: 200px;
    height: 80px;
    border-bottom: 5px solid #ffcc80;
}
.cake-layer.top {
    bottom: 80px;
    left: 25px;
    width: 150px;
    height: 70px;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
}
.candle {
    position: absolute;
    bottom: 150px;
    left: 90px;
    width: 20px;
    height: 50px;
    background: repeating-linear-gradient(45deg, white, white 5px, #f44336 5px, #f44336 10px);
    border-radius: 3px;
    cursor: none;
    z-index: 10;
}
.flame {
    position: absolute;
    top: -25px;
    left: 2px;
    width: 16px;
    height: 25px;
    background: #ffeb3b;
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 20px #ffeb3b, 0 0 40px #ff9800;
    animation: flicker 0.1s infinite alternate;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.flame.out {
    opacity: 0;
    transform: scale(0);
}
@keyframes flicker {
    0% { transform: scale(1) rotate(-1deg); opacity: 1; }
    100% { transform: scale(1.1) rotate(1deg); opacity: 0.8; }
}
