/* =========================================================
   CORE LUXURY DESIGN SYSTEM
   ========================================================= */
:root {
    --primary-gold: #f4c430;
    --rose-gold: #ff4d6d;
    --soft-pink: #ffb3c1;
    --luxury-cream: #fbfbf9;
    --lavender: #c77dff;
    --dark-aubergine: #f8f0f2;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 100, 120, 0.2);
    --card-shadow: 0 8px 40px rgba(255, 50, 100, 0.2);

    /* Text-on-light-surface ink (letters, gallery captions, card backs sitting on
       paper/white local backgrounds — --dark-aubergine above is near-white and only
       reads correctly over the dark cosmic backdrop, never over a light card). */
    --ink: #3a1220;
    --ink-soft: rgba(58, 18, 32, 0.72);

    /* Elevation + motion tokens shared across every component */
    --shadow-sm: 0 6px 18px rgba(20, 4, 10, 0.18);
    --shadow-md: 0 16px 40px rgba(20, 4, 10, 0.28), 0 2px 8px rgba(255, 77, 109, 0.12);
    --shadow-lg: 0 30px 70px -15px rgba(0, 0, 0, 0.5), 0 20px 45px -10px rgba(255, 77, 109, 0.25);
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --space-section: clamp(64px, 9vw, 130px);

    --font-heading: 'Playfair Display', serif;
    --font-handwritten: 'Dancing Script', cursive;
    --font-body: 'Outfit', sans-serif;
    --font-decorative: 'Great Vibes', cursive;
}

/* Reduced-motion: tone down elaborate effects, keep simple fades */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Shared focus ring for keyboard accessibility */
button:focus-visible,
.keypad-button:focus-visible,
.dot-nav-item:focus-visible {
    outline: 2px solid var(--soft-pink);
    outline-offset: 3px;
}

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

html,
body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-body);
    background: #0B192C;
    background-image: radial-gradient(circle at top right, #1A0B2E, #0B192C);
    color: var(--dark-aubergine);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Elegant scrollbar to match the rest of the theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0d0008;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ff4d6d, #c77dff);
    border-radius: 10px;
}

/* =========================================================
   SHARED ENTRANCE REVEAL ANIMATION
   ========================================================= */
.reveal-in {
    animation: revealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--reveal-delay, 0s);
}

@keyframes revealUp {
    0% {
        opacity: 0;
        transform: translateY(26px) scale(0.97);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   ROMANTIC HAND-DRAWN DOODLE SYSTEM
   Small inline SVGs (Cupid's bow & arrow, love-journey connectors,
   sketch-circles, flourish underlines) that "draw themselves in" on scroll.
   ========================================================= */
.doodle {
    position: absolute;
    pointer-events: none;
    overflow: visible;
}

.svg-draw {
    fill: none;
    stroke-dasharray: var(--path-len, 240);
    stroke-dashoffset: var(--path-len, 240);
    transition: stroke-dashoffset 1.6s var(--ease-premium);
}

.svg-draw.drawn {
    stroke-dashoffset: 0;
}

.doodle-bow-arrow {
    width: clamp(70px, 9vw, 110px);
    height: auto;
    top: 50%;
    left: calc(100% + 6px);
    transform: translateY(-50%);
    opacity: 0.85;
    animation: doodleFloat 5s ease-in-out infinite;
}

@keyframes doodleFloat {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-56%) translateX(4px); }
}

/* Flourish underline beneath section headings */
.heading-flourish {
    display: block;
    width: 92px;
    height: 16px;
    margin: 6px auto 0;
    opacity: 0.75;
}

/* Curved dashed "love journey" connector placed between two sections */
.love-connector {
    position: relative;
    width: 100%;
    max-width: 220px;
    height: 60px;
    margin: -40px auto 20px;
    opacity: 0.55;
    z-index: 1;
}

/* Sketch-circle used to loosely highlight important content (e.g. "19") */
.sketch-circle-wrap {
    position: relative;
    display: inline-block;
}

.sketch-circle {
    position: absolute;
    inset: -14px -20px;
    width: calc(100% + 40px);
    height: calc(100% + 28px);
    opacity: 0.8;
}

@media (max-width: 820px) {
    .doodle-bow-arrow { display: none; }
    .love-connector { display: none; }
}

/* =========================================================
   SCROLL PROGRESS INDICATOR
   ========================================================= */
.scroll-progress-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 200;
    background: rgba(255, 255, 255, 0.06);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.scroll-progress-track.visible {
    opacity: 1;
}

.scroll-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--rose-gold), var(--lavender), var(--primary-gold));
    box-shadow: 0 0 10px rgba(255, 77, 109, 0.6);
    transition: width 0.1s linear;
}

/* =========================================================
   CURSOR AMBIENT GLOW (desktop / hover-capable only)
   ========================================================= */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 143, 171, 0.16) 0%, rgba(199, 125, 255, 0.08) 45%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: transform;
}

.cursor-glow.active {
    opacity: 1;
}

@media (hover: none), (max-width: 820px) {
    .cursor-glow { display: none; }
}

/* =========================================================
   DESKTOP SECTION DOT-NAVIGATION RAIL
   ========================================================= */
.dot-nav {
    position: fixed;
    top: 50%;
    right: 22px;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 14px;
    z-index: 90;
}

.dot-nav.visible {
    display: flex;
}

.dot-nav-item {
    width: 18px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dot-nav-item span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: all 0.35s var(--ease-premium);
    display: block;
}

.dot-nav-item:hover span {
    background: rgba(255, 179, 193, 0.7);
    transform: scale(1.3);
}

.dot-nav-item.active span {
    background: linear-gradient(135deg, var(--rose-gold), var(--lavender));
    border-color: transparent;
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(255, 77, 109, 0.7);
}

@media (max-width: 960px) {
    .dot-nav { display: none !important; }
}

/* =========================================================
   ATMOSPHERIC LAYERS
   ========================================================= */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 20% 20%, #2a0015 0%, #0d0008 50%, #070012 100%);
}

.ambient-glow {
    position: fixed;
    top: 20%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 179, 193, 0.3) 0%, rgba(232, 219, 252, 0.2) 60%, transparent 100%);
    transform: translate(-50%, -50%);
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
    animation: slowGlow 20s infinite alternate ease-in-out;
}

@keyframes slowGlow {
    0% {
        transform: translate(-45%, -45%) scale(1);
    }

    100% {
        transform: translate(-55%, -55%) scale(1.15);
    }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 60%, rgba(46, 26, 34, 0.15) 100%);
    z-index: 2;
    pointer-events: none;
}

/* =========================================================
   FLOATING AUDIOS / CONTROLS
   ========================================================= */
.glass-control-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--dark-aubergine);
    font-weight: 500;
    font-size: 13px;
}

.glass-control-btn:hover {
    transform: scale(1.05) translateY(-2px);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 30px rgba(92, 40, 56, 0.1);
}

.glass-control-btn:active {
    transform: scale(0.98);
}

/* =========================================================
   UTILITIES
   ========================================================= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.card-glow-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(0, 0);
    transition: transform 0.5s ease-out;
}

/* =========================================================
   PAGE SECTIONS & LAYOUT TRANSITIONS
   ========================================================= */
.page-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: none;
    z-index: 10;
    overflow-x: hidden;
}

.page-container.active {
    display: flex;
}

/* =========================================================
   PAGE 1: LOGIN EXPERIENCE (SPLIT SCREEN)
   ========================================================= */
#login-experience {
    flex-wrap: wrap;
    align-items: stretch;
    overflow-x: hidden;
}

.login-left,
.login-right {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 40px;
    min-height: 50vh;
}

/* Radial ambient glow within left panel */
.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(255, 77, 109, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse at 70% 70%, rgba(199, 125, 255, 0.10) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.login-left>* {
    position: relative;
    z-index: 1;
}

/* Hero text block above polaroids */
.login-hero-text {
    text-align: center;
    margin-bottom: 32px;
}

.login-hero-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #f4c430;
    background: rgba(244, 196, 48, 0.08);
    border: 1px solid rgba(244, 196, 48, 0.3);
    border-radius: 100px;
    padding: 6px 20px;
    margin-bottom: 18px;
    animation: tagPulse 3s ease infinite;
}

@keyframes tagPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(244, 196, 48, 0);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(244, 196, 48, 0.08);
    }
}

.login-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 4.2vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.01em;
    background: linear-gradient(100deg, #ffffff 20%, #ffd7e0 55%, #ffb3c1 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 20px rgba(255, 77, 109, 0.35));
    line-height: 1.15;
}

.heart-glow {
    color: #4d4748;
    display: inline-block;
    /* text-shadow: 0 0 10px rgb(29, 1, 6), 0 0 20px rgba(71, 9, 20, 0.6); */
    /* animation: heartBeatGlow 2s ease infinite; */
}

@keyframes heartBeatGlow {

    0%,
    100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 77, 109, 0.8);
    }

    14% {
        transform: scale(1.25);
        text-shadow: 0 0 40px rgba(255, 77, 109, 1);
    }

    28% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 77, 109, 0.8);
    }

    42% {
        transform: scale(1.2);
        text-shadow: 0 0 40px rgba(255, 77, 109, 1);
    }

    70% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 77, 109, 0.8);
    }
}

.login-hero-sub {
    font-size: clamp(0.82rem, 1.5vw, 0.95rem);
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.5px;
    font-style: italic;
}

/* Neon vertical divider on right edge of left panel */
.login-divider {
    position: absolute;
    top: 10%;
    right: 0;
    width: 1px;
    height: 80%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(255, 77, 109, 0.6) 25%,
            rgba(199, 125, 255, 0.8) 50%,
            rgba(255, 77, 109, 0.6) 75%,
            transparent 100%);
    box-shadow: 0 0 12px rgba(255, 77, 109, 0.5), 0 0 24px rgba(199, 125, 255, 0.3);
}


/* Polaroids Styles styling */
.polaroid-wrapper-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    position: relative;
    animation: swayHanger 7s infinite ease-in-out;
    transform-origin: top center;
}

@keyframes swayHanger {
    0% {
        transform: rotate(-1.2deg) translateY(0px);
    }

    33% {
        transform: rotate(0.6deg) translateY(-6px);
    }

    66% {
        transform: rotate(-0.8deg) translateY(-2px);
    }

    100% {
        transform: rotate(-1.2deg) translateY(0px);
    }
}

/* Ultra-Luxury Alabaster Satin Polaroid Outer Border Architecture */
.small-polaroid {
    position: relative;
    background: linear-gradient(155deg, #ffffff 0%, #faf6f5 45%, #f2ebe6 100%);
    padding: 12px 12px 54px 12px;
    border-radius: 10px;
    width: clamp(155px, 17vw, 240px);
    height: clamp(175px, 19vw, 270px);
    border: 1px solid rgba(255, 225, 230, 0.85);
    box-shadow: 
        0 18px 45px -12px rgba(0, 0, 0, 0.45),
        0 25px 60px -18px rgba(255, 77, 109, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.5s ease, filter 0.5s ease;
    overflow: visible;
    cursor: pointer;
    perspective: 1200px;
    transform-style: preserve-3d;
    will-change: transform;
}

/* 1. Dynamic Soft Ambient Edge Glow Halo */
.small-polaroid::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.65), rgba(244, 196, 48, 0.55), rgba(199, 125, 255, 0.65), rgba(255, 179, 193, 0.65));
    background-size: 300% 300%;
    animation: borderGlowRotate 6s linear infinite;
    z-index: -1;
    filter: blur(7px);
    opacity: 0.65;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

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

/* 2. Frosted Washi Tape Accent with Micro Drop Shadow */
.small-polaroid::after {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    width: 52px;
    height: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 240, 245, 0.5));
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.45), rgba(255,255,255,0.45) 4px, rgba(255,255,255,0.18) 4px, rgba(255,255,255,0.18) 8px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 2px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.65);
    pointer-events: none;
    z-index: 5;
}

/* 3. Mouse-tracked Specular Light Sheen */
.polaroid-light-sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.55) 0%, transparent 65%);
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.small-polaroid:hover .polaroid-light-sheen {
    opacity: 1;
}

.small-polaroid:hover {
    box-shadow:
        0 30px 70px -15px rgba(0, 0, 0, 0.55),
        0 35px 80px -20px rgba(255, 77, 109, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 1);
    z-index: 20;
}

.small-polaroid:hover::before {
    opacity: 0.95;
    filter: blur(10px);
}

/* 4. Recessed Inner Photo Frame Socket */
.small-polaroid .polaroid-img-container {
    position: relative;
    width: 100%;
    height: calc(100% - 38px);
    overflow: hidden;
    background: #11080d;
    border-radius: 4px;
    box-shadow: 
        inset 0 3px 8px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(0, 0, 0, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.8);
}

.small-polaroid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    filter: contrast(1.05) saturate(1.08);
}

.small-polaroid:hover img {
    transform: scale(1.07);
    filter: contrast(1.08) saturate(1.12);
}

/* 5. Gold Foil Monogram Stamp Seal */
.polaroid-gold-seal {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-family: var(--font-body);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #d4af37 0%, #fff3b0 50%, #aa7c11 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    opacity: 0.9;
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

/* 6. Romantic Handwritten Bottom Caption Label */
.polaroid-heart-label {
    position: absolute;
    bottom: 10px;
    left: 12px;
    font-family: var(--font-handwritten);
    font-size: 1.15rem;
    font-weight: 700;
    color: #4a202d;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
    z-index: 3;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.polaroid-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
    animation: polaroidShimmerEffect 5s infinite ease-in-out;
    border-radius: inherit;
    pointer-events: none;
}

@keyframes polaroidShimmerEffect {
    0% {
        transform: translateX(-130%) skewX(-15deg);
    }

    100% {
        transform: translateX(230%) skewX(-15deg);
    }
}

.polaroid-caption {
    font-family: var(--font-handwritten);
    font-size: clamp(19px, 2.6vw, 28px);
    color: #fff;
    text-align: center;
    margin-top: 8px;
    max-width: 380px;
    line-height: 1.4;
    text-shadow:
        0 0 20px rgba(255, 77, 109, 0.9),
        0 0 50px rgba(199, 125, 255, 0.6),
        0 3px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
    position: relative;
}

.polaroid-caption::after {
    content: '✦';
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin: 12px auto 0;
}

/* =========================================================
   LOGIN FLOATING BACKGROUND ELEMENTS (hearts, flowers, sparks)
   ========================================================= */
.login-floaters {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.login-floater {
    position: absolute;
    bottom: -80px;
    font-size: 1.4rem;
    opacity: 0;
    animation: floatLoginUp linear infinite;
    will-change: transform, opacity;
    user-select: none;
}

@keyframes floatLoginUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    8% {
        opacity: 0.85;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-110vh) rotate(360deg) scale(1.1);
        opacity: 0;
    }
}

/* Spark twinkle variant */
.login-floater.spark {
    font-size: 1rem;
    animation-name: sparkTwinkle;
}

@keyframes sparkTwinkle {
    0% {
        transform: translateY(0) scale(0.6);
        opacity: 0;
    }

    15% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
    }

    50% {
        opacity: 0.6;
        transform: translateY(-55vh) scale(0.9);
    }

    100% {
        transform: translateY(-110vh) scale(0.5);
        opacity: 0;
    }
}

/* PIN Card Right */
.login-right {
    perspective: 1200px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 44px 36px;
    text-align: center;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(13, 0, 8, 0.7) 40%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 180, 200, 0.28);
    border-radius: 30px;
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 1px 0 rgba(255, 255, 255, 0.18) inset;
    transition: transform 0.25s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.card-content {
    position: relative;
    z-index: 1;
}

.login-card-kicker {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 14px;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(100deg, #ffffff 20%, #ffd7e0 60%, #ffb3c1 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    font-style: italic;
}

.login-card-hint {
    margin-top: 26px;
    font-size: 12px;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.38);
    font-style: italic;
}

/* Indicators */
.pin-indicator-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent;
}

.pin-dot.filled {
    background: linear-gradient(135deg, #ff4d6d, #c77dff);
    border-color: transparent;
    transform: scale(1.25);
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.6);
}

.pin-dot.error {
    background: #ff4d6d;
    border-color: #ff4d6d;
    box-shadow: 0 0 15px #ff4d6d;
    animation: dotShake 0.4s ease;
}

@keyframes dotShake {

    0%,
    100% {
        transform: scale(1.25) translateX(0);
    }

    25% {
        transform: scale(1.25) translateX(-3px);
    }

    75% {
        transform: scale(1.25) translateX(3px);
    }
}

.pin-error-message {
    height: 24px;
    font-family: var(--font-body);
    font-size: 13px;
    color: #ff4d6d;
    font-weight: 600;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease;
}

.pin-error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Keypad Grid layout */
.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
    justify-items: center;
    max-width: 320px;
    margin: 0 auto;
}

.keypad-button {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fdf3f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.keypad-button:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 77, 109, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(255, 77, 109, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.keypad-button:active {
    transform: scale(0.92) translateY(0);
    background: rgba(255, 77, 109, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.keypad-button .num {
    font-weight: 500;
    font-size: 22px;
    line-height: 1;
}

.keypad-button .letters {
    font-size: 8px;
    letter-spacing: 1px;
    margin-top: 3px;
    opacity: 0.5;
    text-transform: uppercase;
}

.keypad-button.heart-btn {
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.22), rgba(199, 125, 255, 0.18));
    border-color: rgba(255, 77, 109, 0.4);
}

.keypad-button.heart-btn .num {
    font-size: 18px;
}

.keypad-button.backspace-btn .num {
    font-size: 16px;
}

/* Animations locks shake */
.shake-ani {
    animation: cardShake 0.4s ease-in-out;
}

@keyframes cardShake {

    0%,
    100% {
        transform: translateX(0);
    }

    15%,
    45%,
    75% {
        transform: translateX(-10px);
    }

    30%,
    60%,
    90% {
        transform: translateX(10px);
    }
}

.unlock-fadeout {
    animation: unlockScaleFade 0.75s forwards cubic-bezier(0.64, 0, 0.78, 0);
}

@keyframes unlockScaleFade {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: scale(1.15);
        filter: blur(15px);
        pointer-events: none;
    }
}

/* =========================================================
   PAGE 2: THE SURPRISE SCREEN
   ========================================================= */
#surprise-experience {
    padding: 80px 24px;
    align-items: center;
    justify-content: center;
    background: transparent;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

#surprise-experience.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.surprise-content {
    width: 100%;
    max-width: 900px;
    z-index: 5;
    position: relative;
}

.surprise-hero-sec {
    width: 100%;
    margin-bottom: 80px;
}

.header-card {
    padding: 60px 40px;
    text-align: center;
}

.birthday-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(183, 110, 121, 0.1);
    color: var(--rose-gold);
    border: 1px solid rgba(183, 110, 121, 0.2);
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* Character Animated Heading */
.animated-heading {
    font-family: var(--font-heading);
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    color: var(--dark-aubergine);
    margin-bottom: 24px;
    line-height: 1.2;
}

/* Below 480px, script.js lets the name wrap onto two lines instead of forcing
   a non-breaking space — this just tightens size/padding so it sits well. */
@media (max-width: 480px) {
    .animated-heading {
        font-size: 9vw;
    }

    .header-card {
        padding: 44px 18px;
    }
}

.ruby-gold {
    background: linear-gradient(135deg, var(--rose-gold) 30%, #e0a35e 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(183, 110, 121, 0.15));
}

.heading-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letterReveal 0.8s forwards;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typewriter Message */
.typewrite-container {
    min-height: 180px;
    margin: 0 auto;
    max-width: 680px;
}

.love-quote-typed {
    font-family: var(--font-heading);
    font-size: clamp(16px, 2.5vw, 19px);
    line-height: 1.8;
    color: var(--dark-aubergine);
    font-weight: 400;
    white-space: pre-line;
    display: inline-block;
}

/* Cursor character for typing */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--rose-gold);
    margin-left: 3px;
    animation: blinkCursor 0.8s infinite;
    vertical-align: middle;
}

@keyframes blinkCursor {
    50% {
        opacity: 0;
    }
}

/* Scroll Hint */
.scroll-down-hint {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--rose-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    opacity: 0.8;
}

.hint-arrow-doodle {
    width: 20px;
    height: auto;
    animation: bounceDown 1.8s infinite ease-in-out;
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* =========================================================
   SCROLL REVEALS
   ========================================================= */
.scroll-animate-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.scroll-animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   SECTIONS HEADER & CONTAINER
   ========================================================= */
.surprise-section {
    width: 100%;
    margin-bottom: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    width: 100%;
}

.heart-divider {
    font-size: 20px;
    display: block;
    margin-bottom: 12px;
    animation: pulseHeart 1.5s infinite alternate ease-in-out;
}

@keyframes pulseHeart {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.2);
    }
}

.story-heading {
    font-family: var(--font-heading);
    font-size: clamp(24px, 3.6vw, 32px);
    font-weight: 700;
    color: var(--dark-aubergine);
    text-align: center;
    margin-bottom: 6px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    color: var(--dark-aubergine);
    margin-bottom: 8px;
}

.section-header p {
    font-size: 14px;
    color: var(--rose-gold);
    font-style: italic;
}

/* =========================================================
   PHOTO GALLERY
   ========================================================= */
.polaroid-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    width: 100%;
}

.gallery-polaroid {
    background: linear-gradient(155deg, #ffffff 0%, #faf6f5 45%, #f2ebe6 100%);
    padding: 12px 12px 42px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 225, 230, 0.85);
    box-shadow: 
        0 18px 45px -12px rgba(0, 0, 0, 0.45),
        0 25px 60px -18px rgba(255, 77, 109, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.5s ease, opacity 0.7s var(--ease-premium);
    position: relative;
    overflow: visible;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.gallery-polaroid::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.65), rgba(244, 196, 48, 0.55), rgba(199, 125, 255, 0.65), rgba(255, 179, 193, 0.65));
    background-size: 300% 300%;
    animation: borderGlowRotate 6s linear infinite;
    z-index: -1;
    filter: blur(7px);
    opacity: 0.65;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.gallery-polaroid::after {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    width: 52px;
    height: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 240, 245, 0.5));
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.45), rgba(255,255,255,0.45) 4px, rgba(255,255,255,0.18) 4px, rgba(255,255,255,0.18) 8px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 2px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.65);
    pointer-events: none;
    z-index: 5;
}

.gallery-polaroid:hover {
    transform: scale(1.06) translateY(-12px) rotate(1deg);
    box-shadow: 
        0 30px 70px -15px rgba(0, 0, 0, 0.55),
        0 35px 80px -20px rgba(255, 77, 109, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 1);
    z-index: 10;
}

.gallery-polaroid:hover::before {
    opacity: 0.95;
    filter: blur(10px);
}

.gallery-caption {
    font-family: var(--font-handwritten);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin-top: 10px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.gallery-polaroid:hover {
    transform: scale(1.04) translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(92, 40, 56, 0.15);
    z-index: 10;
}

.gallery-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
    border-radius: 1px;
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-polaroid:hover .gallery-img-wrap img {
    transform: scale(1.05);
}

.gallery-video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rose-gold);
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.gallery-caption {
    font-family: var(--font-handwritten);
    font-size: 20px;
    text-align: center;
    color: var(--ink);
    margin-top: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   TIMELINE CARD ANIMATION
   ========================================================= */
.timeline-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0 auto;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: repeating-linear-gradient(to bottom,
        var(--soft-pink) 0, var(--soft-pink) 8px,
        var(--lavender) 8px, var(--lavender) 16px);
    transform: translateX(-50%);
    filter: url(#pencilWobble);
    opacity: 0.85;
    z-index: 1;
}

/* Alternating slide-in direction so the timeline feels like a hand-turned page,
   not a generic fade — reset to a plain vertical rise on narrow screens below. */
.timeline-item.left-item.scroll-animate-in {
    transform: translateX(-46px) translateY(10px);
}

.timeline-item.right-item.scroll-animate-in {
    transform: translateX(46px) translateY(10px);
}

.timeline-item.scroll-animate-in.visible {
    transform: translateX(0) translateY(0);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    position: relative;
    width: 50%;
    padding: 0 30px 40px 30px;
    z-index: 2;
}

.timeline-item.right-item {
    left: 50%;
    justify-content: flex-start;
}

.timeline-dot {
    position: absolute;
    top: 10px;
    left: 100%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--rose-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    font-size: 10px;
    box-shadow: 0 0 10px rgba(183, 110, 121, 0.3);
}

.timeline-item.right-item .timeline-dot {
    left: 0;
}

.timeline-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 26px 24px;
    border-radius: 18px;
    width: 100%;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rose-gold), var(--lavender), var(--primary-gold));
    opacity: 0.7;
}

.timeline-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.timeline-card-header {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-aubergine);
    margin-bottom: 4px;
}

.timeline-card-date {
    font-size: 12px;
    color: var(--rose-gold);
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.timeline-card-body {
    font-size: 13px;
    line-height: 1.5;
    color: var(--dark-aubergine);
}

/* =========================================================
   LOVE COUNTER
   ========================================================= */
.counter-card {
    width: 100%;
    padding: 40px;
    text-align: center;
}

.counter-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--dark-aubergine);
}

.live-counter-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.counter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 16px 20px;
    border-radius: 16px;
    min-width: 90px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.counter-number {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--rose-gold);
}

.counter-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    color: var(--ink-soft);
    opacity: 0.85;
}

.counter-divider {
    font-size: 28px;
    font-weight: 700;
    color: rgba(183, 110, 121, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-description {
    font-size: 13px;
    font-style: italic;
    color: var(--rose-gold);
}

/* =========================================================
   REASONS CARDS PERSPECTIVE FLIP
   ========================================================= */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    width: 100%;
}

.reason-card-container {
    perspective: 1000px;
    height: 180px;
    cursor: pointer;
}

.reason-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reason-card-container:hover .reason-card {
    transform: rotateY(180deg);
}

.reason-front,
.reason-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    transition: box-shadow 0.4s var(--ease-premium), border-color 0.4s var(--ease-premium);
}

.reason-front {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.reason-card-container:hover .reason-front,
.reason-card-container:hover .reason-back {
    border-color: rgba(255, 143, 171, 0.55);
    box-shadow: var(--shadow-md);
}

.reason-icon {
    font-size: 28px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 14px;
    background: radial-gradient(circle, rgba(255, 143, 171, 0.22), rgba(199, 125, 255, 0.1) 70%, transparent);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    animation: floatReasonIcon 3s infinite ease-in-out;
}

@keyframes floatReasonIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.reason-front h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--dark-aubergine);
}

.reason-back {
    background: linear-gradient(135deg, #fff 0%, #ffe5ec 100%);
    box-shadow: var(--card-shadow);
    transform: rotateY(180deg);
    text-align: center;
}

.reason-back p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
}

/* =========================================================
   LOVE LETTER (LUXURIOUS ENVELOPE)
   ========================================================= */
.envelope-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 80px 0;
}

.envelope {
    position: relative;
    width: 320px;
    height: 220px;
    background: #f7d2d7;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.envelope:hover {
    transform: translateY(-8px);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
    border-top: 110px solid #e5adbc;
    transform-origin: top;
    transition: all 0.4s ease 0.2s;
    z-index: 10;
}

.envelope.open .envelope-flap {
    transform: rotateX(180deg);
    transition: all 0.4s ease;
    z-index: 1;
}

.wax-seal {
    position: absolute;
    left: 50%;
    top: 78px;
    width: 42px;
    height: 42px;
    transform: translate(-50%, 0) rotate(-4deg);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff8fab, #b76e79 75%);
    color: #fff5f7;
    font-family: var(--font-decorative);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.4);
    z-index: 11;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.envelope.open .wax-seal {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.8) rotate(-4deg);
}

.envelope-pocket {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 160px solid #fae0e5;
    border-right: 160px solid #fae0e5;
    border-bottom: 110px solid #f2bdc6;
    border-top: 110px solid transparent;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 8;
}

.paper-letter {
    position: absolute;
    left: 15px;
    bottom: 5px;
    width: 290px;
    height: 200px;
    background: #fbf9f4;
    padding: 24px 20px;
    border-radius: 4px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.03), 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    transform: translateY(0);
    z-index: 6;
    overflow: hidden;
}

.envelope.open .paper-letter {
    transform: translateY(-160px);
    height: 340px;
    transition: all 0.4s ease 0.3s;
    z-index: 9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.letter-scrollable {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-right: 6px;
}

.letter-scrollable::-webkit-scrollbar {
    width: 4px;
}

.letter-scrollable::-webkit-scrollbar-thumb {
    background: #e2d1ca;
    border-radius: 2px;
}

.letter-title {
    font-family: var(--font-decorative);
    font-size: 28px;
    color: var(--ink);
    margin-bottom: 16px;
    line-height: 1.1;
}

.letter-p {
    font-family: var(--font-handwritten);
    font-size: 20px;
    line-height: 1.5;
    color: var(--ink-soft);
    margin-bottom: 14px;
    white-space: normal;
}

.letter-signature {
    font-family: var(--font-handwritten);
    font-size: 22px;
    color: var(--rose-gold);
    text-align: right;
    margin-top: 24px;
    font-weight: bold;
}

/* =========================================================
   WISHES BALLOON POPPING ARENA
   ========================================================= */
.balloon-pop-arena {
    width: 100%;
    height: 380px;
    background: radial-gradient(ellipse at 50% 100%, rgba(255, 179, 193, 0.1), rgba(255, 255, 255, 0.05) 60%, transparent);
    border: 1px dashed rgba(183, 110, 121, 0.25);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.drifting-balloon {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: ascendDrift 10s infinite linear;
    transform: translateZ(0);
}

@keyframes ascendDrift {
    0% {
        transform: translateY(420px) translateX(0) rotate(0deg);
    }

    50% {
        transform: translateY(200px) translateX(15px) rotate(4deg);
    }

    100% {
        transform: translateY(-100px) translateX(-15px) rotate(-4deg);
    }
}

.balloon-body {
    width: 42px;
    height: 52px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    position: relative;
    box-shadow: inset -4px -4px 8px rgba(0, 0, 0, 0.15), 0 8px 15px rgba(0, 0, 0, 0.08);
}

.balloon-body::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 22%;
    width: 32%;
    height: 22%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    filter: blur(1px);
}

.balloon-body::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid inherit;
}

.balloon-string {
    width: 1px;
    height: 40px;
    background: rgba(183, 110, 121, 0.35);
    margin-top: 4px;
}

.balloon-wish-hint {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 4px;
    font-weight: 600;
    color: var(--dark-aubergine);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.drifting-balloon.popped {
    animation: none;
    transform: scale(0);
    opacity: 0;
    transition: all 0.15s ease-out;
}

/* Toast Message */
.pop-wish-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(46, 26, 34, 0.9);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 16px 28px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    text-align: center;
    max-width: 90%;
}

.pop-wish-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-marker {
    font-size: 18px;
}

/* =========================================================
   FINAL SURPRISE - TREASURE BOX AREA
   ========================================================= */
.final-card {
    width: 100%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.treasure-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Premium Button style */
/* Shared ripple-on-click bubble spawned by script.js for every primary CTA */
.click-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    pointer-events: none;
    animation: rippleExpand 0.7s var(--ease-premium) forwards;
}

@keyframes rippleExpand {
    to {
        transform: scale(2.6);
        opacity: 0;
    }
}

.lux-glow-btn {
    position: relative;
    padding: 20px 40px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-gold) 0%, #e0a35e 100%);
    border: none;
    border-radius: 99px;
    cursor: pointer;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.1) inset, inset 0 2px 2px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.lux-glow-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(183, 110, 121, 0.45), 0 0 25px rgba(224, 163, 94, 0.25);
}

.lux-glow-btn:active {
    transform: scale(0.98) translateY(-1px);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: goldShine 3s infinite linear;
}

@keyframes goldShine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Chest Layout */
.treasure-chest-container {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    position: relative;
    width: 280px;
}

.treasure-chest-container.visible {
    display: flex;
}

.chest-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(224, 163, 94, 0.6) 0%, transparent 70%);
    filter: blur(15px);
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
}

.treasure-chest {
    width: 180px;
    height: 140px;
    position: relative;
    cursor: pointer;
    perspective: 800px;
    transform-style: preserve-3d;
}

.treasure-chest.shake {
    animation: boxShake 0.4s ease-in-out;
}

@keyframes boxShake {

    0%,
    100% {
        transform: rotate(0);
    }

    20%,
    60% {
        transform: rotate(-5deg);
    }

    40%,
    80% {
        transform: rotate(5deg);
    }
}

/* Chest Lid Elements */
.chest-lid {
    position: absolute;
    top: 0;
    left: 0;
    width: 180px;
    height: 60px;
    background: linear-gradient(to bottom, #8a5a36 0%, #613e25 100%);
    border-radius: 90px 90px 4px 4px / 60px 60px 4px 4px;
    border: 3px solid #4a2f1b;
    transform-origin: bottom;
    transition: transform 1.2s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    z-index: 15;
    box-shadow: inset 0 6px 12px rgba(255, 255, 255, 0.15);
}

.chest-lid-accent {
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 24px;
    height: 12px;
    background: #d4af37;
    border-radius: 4px 4px 0 0;
    border: 1px solid #aa8c2c;
}

.chest-lock {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #aa8c2c;
    border-radius: 4px;
    border: 2px solid #5a4b18;
    z-index: 20;
    transition: all 0.5s ease;
}

.chest-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 180px;
    height: 80px;
    background: #613e25;
    border-radius: 0 0 12px 12px;
    border: 3px solid #4a2f1b;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 -6px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.chest-body-accent {
    position: absolute;
    top: 5px;
    left: 20px;
    right: 20px;
    bottom: 5px;
    border: 2px solid #563720;
    border-radius: 6px;
}

/* Chest Opened States */
.treasure-chest.open .chest-lid {
    transform: rotateX(-120deg) translateY(-25px);
}

.treasure-chest.open .chest-lock {
    opacity: 0;
    transform: translateX(-50%) translateY(15px);
}

.treasure-chest.open .chest-glow {
    opacity: 1;
}

/* Reveal Box */
.treasure-reveal-box {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    text-align: center;
    margin-top: 36px;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.treasure-reveal-box.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.treasure-reveal-box h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--dark-aubergine);
    margin-bottom: 8px;
}

.treasure-reveal-box p {
    font-size: 13px;
    color: var(--rose-gold);
    margin-bottom: 24px;
    max-width: 240px;
}

/* Premium Reveal Chapters Button */
.lux-chapters-btn {
    position: relative;
    padding: 16px 36px;
    border: none;
    background: linear-gradient(135deg, #2e1a22 0%, #683042 100%);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(46, 26, 34, 0.35);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lux-chapters-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(46, 26, 34, 0.5);
    background: linear-gradient(135deg, #3f2530 0%, #853f57 100%);
}

.lux-chapters-btn:active {
    transform: scale(0.97);
}

/* Sparkles Chest Animation */
.chest-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 12;
    animation: riseFade 1.2s forwards ease-out;
}

@keyframes riseFade {
    0% {
        transform: translateY(0) scale(0.2);
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-70px) translateX(var(--drift, 0px)) scale(1.5);
        opacity: 0;
    }
}

/* =========================================================
   CLOSING SIGNATURE FOOTER
   ========================================================= */
.surprise-footer {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding-top: 44px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-flourish {
    display: block;
    margin: 0 auto 16px;
    width: 140px;
    height: auto;
    opacity: 0.55;
}

.surprise-footer-title {
    font-family: var(--font-decorative);
    font-size: clamp(24px, 3.4vw, 32px);
    color: var(--dark-aubergine);
    margin-bottom: 6px;
}

.surprise-footer-sub {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

/* =========================================================
   LIGHTBOX MODAL SCREEN OVERLAYS
   ========================================================= */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(20, 10, 14, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.open {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    z-index: 100;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--soft-pink);
}

.arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    z-index: 100;
    transition: all 0.3s;
}

.arrow-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.arrow-left {
    left: 40px;
}

.arrow-right {
    right: 40px;
}

.modal-content-wrapper {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Hand-drawn viewfinder corner brackets framing the lightbox media */
.modal-content-wrapper::before,
.modal-content-wrapper::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 1.5px dashed rgba(255, 143, 171, 0.5);
    pointer-events: none;
}

.modal-content-wrapper::before {
    top: -12px;
    left: -12px;
    border-right: none;
    border-bottom: none;
    border-radius: 10px 0 0 0;
}

.modal-content-wrapper::after {
    bottom: -12px;
    right: -12px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 10px 0;
}

.modal-counter {
    margin-top: 8px;
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.modal-img,
.modal-video {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 4px;
    box-shadow: 0 10px 45px rgba(0, 0, 0, 0.5);
    display: block;
    object-fit: contain;
}

.modal-caption {
    font-family: var(--font-handwritten);
    font-size: 24px;
    color: #fff;
    margin-top: 20px;
    text-align: center;
}

/* =========================================================
   RESPONSIVENESS (MOBILE/TABLETS)
   ========================================================= */
@media (max-width: 820px) {
    #login-experience {
        flex-direction: column;
        overflow-y: auto;
    }

    .login-left,
    .login-right {
        flex: none;
        width: 100%;
        min-height: auto;
    }

    .login-left {
        padding: 80px 20px 20px;
        order: 1;
    }

    .login-right {
        padding: 20px 20px 60px;
        order: 2;
    }

    .polaroid-wrapper-grid {
        gap: 12px;
    }

    .small-polaroid {
        width: clamp(130px, 40vw, 175px);
        height: clamp(150px, 44vw, 200px);
    }

    .polaroid-caption {
        font-size: clamp(18px, 5vw, 26px);
        margin-top: 20px;
    }

    .login-card {
        max-width: 360px;
        padding: 32px 20px;
    }

    .keypad-grid {
        gap: 12px 16px;
    }

    .keypad-button {
        width: 62px;
        height: 62px;
    }

    /* Center lines on mobile */
    .timeline-line {
        left: 24px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        justify-content: flex-start;
        padding-left: 54px;
        padding-right: 0;
    }

    .timeline-dot {
        left: 24px !important;
    }

    .timeline-item.left-item.scroll-animate-in,
    .timeline-item.right-item.scroll-animate-in {
        transform: translateY(30px);
    }

    .arrow-left {
        left: 16px;
    }

    .arrow-right {
        right: 16px;
    }

    .arrow-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 400px) {
    .small-polaroid {
        width: clamp(110px, 42vw, 150px);
        height: clamp(130px, 46vw, 175px);
    }

    .keypad-button {
        width: 54px;
        height: 54px;
    }

    .keypad-button .num {
        font-size: 18px;
    }
}

/* =========================================================
   TIMELINE CHAPTER BADGE
   ========================================================= */
.timeline-card-chapter {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
    padding: 3px 12px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.15), rgba(199, 125, 255, 0.15));
    color: var(--rose-gold);
    border: 1px solid rgba(255, 77, 109, 0.25);
}

/* =========================================================
   BIRTHDAY SPOTLIGHT — TURNING 20
   ========================================================= */
.spotlight-stage {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 32px 50px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 40%, rgba(255, 77, 109, 0.08) 0%, transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 32px;
    overflow: hidden;
}

.spotlight-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255, 77, 109, 0.3), rgba(199, 125, 255, 0.3), rgba(244, 196, 48, 0.3), rgba(255, 77, 109, 0.3));
    filter: blur(60px);
    animation: spotlightSpin 8s linear infinite;
    pointer-events: none;
}

@keyframes spotlightSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.spotlight-inner {
    position: relative;
    z-index: 2;
}

.spotlight-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #f4c430;
    background: rgba(244, 196, 48, 0.1);
    border: 1px solid rgba(244, 196, 48, 0.3);
    border-radius: 100px;
    padding: 8px 24px;
    margin-bottom: 32px;
    animation: tagPulse 3s ease infinite;
}

.spotlight-age-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.age-prefix {
    font-family: var(--font-handwritten);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.age-number-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.age-number {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700 0%, #ff8fab 40%, #c77dff 70%, #ff4d6d 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ageGradientShift 4s ease infinite;
    filter: drop-shadow(0 4px 30px rgba(255, 77, 109, 0.5));
    line-height: 1;
}

@keyframes ageGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.age-sparkle-ring {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 2px dashed rgba(244, 196, 48, 0.3);
    animation: sparkleRingSpin 12s linear infinite;
    pointer-events: none;
}

@keyframes sparkleRingSpin {
    to { transform: rotate(360deg); }
}

.spotlight-quote {
    font-family: var(--font-handwritten);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 24px;
    font-style: italic;
}

.spotlight-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.spotlight-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

@keyframes confettiFall {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotate(0deg) scale(0.5);
    }
    15% {
        opacity: 1;
        transform: translateY(10px) rotate(72deg) scale(1);
    }
    85% {
        opacity: 0.8;
        transform: translateY(calc(100% - 40px)) rotate(280deg) scale(0.9);
    }
    100% {
        opacity: 0;
        transform: translateY(100%) rotate(360deg) scale(0.4);
    }
}

/* =========================================================
   CONSTELLATION OF US
   ========================================================= */
.constellation-stage {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 400px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #0a0018 0%, #060010 60%, #020008 100%);
    border: 1px solid rgba(255, 143, 171, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(255, 77, 109, 0.04);
}

.constellation-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.constellation-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 24px;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 10, 0.85) 0%, transparent 100%);
    pointer-events: none;
}

.constellation-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.const-name {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
}

.const-heart {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #ff4d6d;
    animation: heartBeatGlow 2s ease infinite;
    text-shadow: 0 0 20px rgba(255, 77, 109, 0.8);
}

.constellation-tagline {
    font-family: var(--font-handwritten);
    font-size: 1rem;
    color: rgba(255, 179, 193, 0.6);
    font-style: italic;
}

@media (max-width: 600px) {
    .constellation-stage {
        height: 300px;
    }
}

/* =========================================================
   BIRTHDAY PROMISES — FLIP CARDS
   ========================================================= */
.promises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 12px 0;
}

@media (max-width: 820px) {
    .promises-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 540px) {
    .promises-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 340px;
    }
}

.promise-card-wrap {
    height: 210px;
    cursor: pointer;
    perspective: 1000px;
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--ease-premium), z-index 0.4s ease;
}

.promise-card-wrap:hover,
.promise-card-wrap.flipped {
    z-index: 10;
}

.promise-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
}

.promise-card-wrap.flipped .promise-card {
    transform: rotateY(180deg);
}

.promise-front,
.promise-back {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    text-align: center;
}

.promise-front {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 77, 109, 0.08) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promise-front .promise-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(255, 77, 109, 0.4));
}

.promise-front h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

.promise-back {
    background: linear-gradient(145deg, rgba(255, 77, 109, 0.15) 0%, rgba(199, 125, 255, 0.12) 100%);
    border: 1px solid rgba(255, 77, 109, 0.25);
    backdrop-filter: blur(16px);
    transform: rotateY(180deg);
    box-shadow: 0 8px 32px rgba(255, 77, 109, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promise-back p {
    font-family: var(--font-handwritten);
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.promise-card-wrap:hover .promise-front {
    box-shadow: 0 12px 40px rgba(255, 77, 109, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 77, 109, 0.3);
}

/* Promise card entrance animation */
.promise-card-wrap.scroll-animate-in {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s var(--ease-premium);
}

.promise-card-wrap.scroll-animate-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}