/* ==========================================
   V11 EMOTIONAL DESIGN MASTERPIECE
   Apple, Framer, Stripe, IDEO level cinematic flow.
   ========================================== */

:root {
    /* Day / Night Theme Engine Transitions */
    --transition-theme: background-color 1.2s var(--ease-cinematic), color 1.2s var(--ease-cinematic), border-color 1.2s var(--ease-cinematic), box-shadow 1.2s var(--ease-cinematic);
    
    /* Premium Glassmorphism */
    --glass-opacity: 0.6;
    --glass-blur: 40px;
    --border-radius: 12px;
}

/* 🌙 Night Mode (Default for Pihu Showcase) */
html.theme-dark, body.theme-dark {
    --text-primary: #F8F8F6;
    --text-secondary: #D7D7D2;
    --text-muted: #A9A9A4;
    --accent-color: #D4AF37;
    --heading-color: #F8F8F6;

    --theme-bg: #111A15; /* Dark Emerald */
    --theme-surface: rgba(30, 35, 30, 0.4);
    --theme-primary: var(--accent-color);
    --theme-secondary: #708238; /* Olive Green */
    --theme-text: var(--text-primary);
    --theme-muted: var(--text-muted);
    --theme-highlight: #E5D3B3; /* Champagne */
    --glass-border: rgba(212, 175, 55, 0.15);
}

/* ☀️ Morning Mode */
html.theme-light, body.theme-light {
    --text-primary: #1B1B1B;
    --text-secondary: #4A4A4A;
    --text-muted: #757575;
    --accent-color: #708238;
    --heading-color: #1B1B1B;

    --theme-bg: #FDFBF7; /* Warm Cream */
    --theme-surface: rgba(255, 255, 255, 0.6);
    --theme-primary: var(--accent-color); /* Olive Green */
    --theme-secondary: #D4AF37; /* Soft Gold */
    --theme-text: var(--text-primary);
    --theme-muted: var(--text-muted);
    --theme-highlight: #C6A87C;
    --glass-border: rgba(112, 130, 56, 0.15);
}

:root {
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-signature: 'Great Vibes', cursive;
    
    /* Cinematic Physics */
    --spring-soft: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-cinematic: cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Fluid Emotional Typography */
    --typo-heading-scale: 1;
    --typo-body-scale: 1;
    --typo-letter-spacing: -0.03em;
    --typo-line-height: 1.6;
    --typo-transform: none;

    /* Cinematic Spacing - "The Breath" */
    --space-sm: clamp(24px, 3vw, 40px);
    --space-md: clamp(48px, 6vw, 80px);
    --space-lg: clamp(80px, 12vw, 160px);
    --space-section: clamp(120px, 18vw, 240px); /* Massive negative space */
}

/* ==========================================
   RESET & FOUNDATION
   ========================================== */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body, .website-wrapper {
    font-family: var(--font-primary);
    color: var(--theme-text);
    background-color: var(--theme-bg);
    overflow-x: hidden;
    line-height: var(--typo-line-height);
    transition: var(--transition-theme);
}

body:not(.builder-mode) { scroll-behavior: smooth; }

/* ==========================================
   CINEMATIC BACKGROUND & LIGHTING
   ========================================== */
.bg-layer {
    position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background-size: 150% 150%;
    animation: auroraShift 30s var(--ease-cinematic) infinite alternate;
    will-change: background-position;
}
.builder-mode .bg-layer { position: absolute; }

/* Aurora Gradients - softer, richer, blended */
.bg-pastel { background: radial-gradient(circle at 0% 0%, #fff0f5 0%, transparent 60%), radial-gradient(circle at 100% 100%, #e0f7fa 0%, transparent 60%); background-color: #fafafa; }
.bg-sunset { background: radial-gradient(circle at 20% 0%, #ffecd2 0%, transparent 70%), radial-gradient(circle at 80% 100%, #fcb69f 0%, transparent 70%); background-color: #fffaf0; }
.bg-ocean { background: radial-gradient(circle at 0% 20%, #e0c3fc 0%, transparent 60%), radial-gradient(circle at 100% 80%, #8ec5fc 0%, transparent 60%); background-color: #f8fbff; }
.bg-dark { background: radial-gradient(circle at 10% 10%, #141e30 0%, transparent 70%), radial-gradient(circle at 90% 90%, #243b55 0%, transparent 70%); background-color: #050505; }

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

/* Noise Overlay - Soft tactile film grain */
.bg-noise {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    opacity: 0.25; mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
.builder-mode .bg-noise { position: absolute; }

/* Persistent Cinematic Particles (Lightweight) */
.particles-container {
    position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.particle {
    position: absolute; background: var(--theme-primary); border-radius: 50%; opacity: 0;
    animation: drift 15s linear infinite; filter: blur(2px);
}
@keyframes drift {
    0% { transform: translateY(110vh) scale(0.5); opacity: 0; }
    20% { opacity: 0.15; }
    80% { opacity: 0.15; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .particle { animation: none; display: none; } }

/* ==========================================
   EMOTIONAL TYPOGRAPHY (Whisper, Shout, Breathe)
   ========================================== */
.cinematic-shout {
    font-family: var(--font-heading);
    font-size: calc(clamp(4rem, 12vw, 9rem) * var(--typo-heading-scale));
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: var(--typo-letter-spacing);
    text-transform: var(--typo-transform);
    margin: 0; padding: 0;
}
.cinematic-subshout {
    font-family: var(--font-heading);
    font-size: calc(clamp(2rem, 5vw, 4rem) * var(--typo-heading-scale));
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.cinematic-whisper {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.5;
    margin-bottom: var(--space-sm);
    display: block;
}
.cinematic-prose {
    font-family: var(--font-primary);
    font-size: calc(clamp(1.1rem, 2vw, 1.5rem) * var(--typo-body-scale));
    line-height: 1.8;
    max-width: 60ch;
    opacity: 0.85;
}

/* Gradient Text Injection */
.text-gradient {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-text));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ==========================================
   CINEMATIC SECTIONS (No Hard Cuts)
   ========================================== */
.cinematic-section {
    position: relative;
    padding: var(--space-section) 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    /* Soft vertical blending via mask-image (only applied on desktop to avoid clipping) */
}
@media (min-width: 768px) {
    .cinematic-section {
        margin: -5vh 0; /* Creates structural overlap */
        padding: calc(var(--space-section) + 5vh) 0;
        mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    }
}

.container {
    width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 var(--space-sm);
    position: relative; z-index: 2;
}

/* Ambient Section Lighting */
.ambient-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: clamp(300px, 60vw, 800px); height: clamp(300px, 60vw, 800px);
    background: radial-gradient(circle, var(--theme-primary) 0%, transparent 60%);
    opacity: 0.15; filter: blur(100px); z-index: 0; pointer-events: none;
}

/* ==========================================
   GLASSMORPHISM 2.0 (Framer Precision)
   ========================================== */
.glass-panel {
    background: rgba(255, 255, 255, calc(var(--glass-opacity) - 0.2));
    backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative; overflow: hidden;
}
.bg-dark .glass-panel {
    background: rgba(0, 0, 0, calc(var(--glass-opacity) - 0.2));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   MAGNETIC CRAFTED BUTTON
   ========================================== */
.premium-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    padding: clamp(16px, 2vw, 24px) clamp(32px, 4vw, 56px);
    font-size: calc(clamp(1rem, 1.2vw, 1.15rem) * var(--typo-body-scale));
    font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
    border-radius: 99px; text-decoration: none; overflow: hidden;
    transition: all 0.5s var(--spring-soft); cursor: pointer;
}
:root[data-btn-style="filled"] .premium-btn, :root[data-btn-style="gradient"] .premium-btn {
    background: var(--theme-primary); color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), inset 0 1px 1px rgba(255,255,255,0.4); border: none;
}
:root[data-btn-style="glass"] .premium-btn, :root[data-btn-style="outline"] .premium-btn {
    background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3); color: var(--theme-text);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.premium-btn:hover { transform: translateY(-4px) scale(1.03); filter: brightness(1.1); }

/* ==========================================
   PHYSICS REVEAL ENGINE
   ========================================== */
.reveal {
    opacity: 0; transform: translateY(60px) scale(0.97);
    transition: opacity 1.2s var(--ease-cinematic), transform 1.2s var(--spring-soft);
    will-change: opacity, transform;
}
.reveal.active { opacity: 1; transform: translateY(0) scale(1); }
.stagger-1 { transition-delay: 0.1s; } .stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; } .stagger-4 { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: opacity 0.6s ease; transform: none; } }

/* ==========================================
   COMPONENT: HERO (The Emotion)
   ========================================== */
.hero-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.hero-content { display: flex; flex-direction: column; align-items: center; z-index: 2; padding: var(--space-md); }
.hero-countdown { display: flex; gap: var(--space-sm); margin-top: var(--space-lg); }
.time-box { display: flex; flex-direction: column; align-items: center; padding: var(--space-sm) var(--space-md); }
.time-box span:first-child { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 300; font-family: var(--font-heading); color: var(--theme-primary); }
.time-box .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.6; margin-top: 5px; }

/* ==========================================
   COMPONENT: MESSAGE (The Journey)
   ========================================== */
.message-composition { text-align: center; max-width: 1000px; margin: 0 auto; position: relative; }
.quote-shout { font-size: calc(clamp(2rem, 5vw, 4rem) * var(--typo-body-scale)); font-weight: 300; font-style: italic; line-height: 1.3; }
.sub-quotes-masonry { column-count: 1; gap: var(--space-md); margin-top: var(--space-lg); }
@media (min-width: 768px) { .sub-quotes-masonry { column-count: 2; } }
.sub-quote { break-inside: avoid; margin-bottom: var(--space-md); padding: var(--space-md); text-align: left; font-size: 1.25rem; font-style: italic; border-left: 2px solid var(--theme-primary); }

/* ==========================================
   COMPONENT: GALLERY (The Memories)
   ========================================== */
.memory-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.memory-card {
    position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 3/4; cursor: pointer;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    -webkit-box-reflect: below 5px linear-gradient(transparent 80%, rgba(255,255,255,0.2));
}
.memory-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.5s var(--ease-cinematic), filter 1s var(--ease-cinematic); }
.memory-stack:hover .memory-card:not(:hover) img { filter: grayscale(60%) brightness(0.6); transform: scale(0.95); }
.memory-stack .memory-card:hover img { transform: scale(1.1); }
@media (max-width: 768px) { .memory-card { -webkit-box-reflect: none; /* Disable reflection on mobile to save space */ } }

/* ==========================================
   COMPONENT: LETTERS (The Connection)
   ========================================== */
.letters-spread { display: flex; flex-wrap: wrap; gap: var(--space-md); justify-content: center; position: relative; }
.physical-letter {
    width: 100%; max-width: 400px; background: #fff; padding: var(--space-lg); border-radius: 2px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.08);
    transition: transform 0.8s var(--spring-soft); position: relative;
}
.bg-dark .physical-letter { background: #111; box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 20px 40px rgba(0,0,0,0.8); }
.physical-letter::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 50%); pointer-events: none; }
.physical-letter:hover { transform: translateY(-15px) rotate(2deg) scale(1.02); z-index: 10; }

/* ==========================================
   COMPONENT: CHECKLIST (The Details - Minimal SVG)
   ========================================== */
.minimal-checklist { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-sm); position: relative; }
.minimal-item { display: flex; align-items: center; gap: 24px; padding: var(--space-sm); border-bottom: 1px solid rgba(0,0,0,0.05); transition: transform 0.5s var(--spring-soft); }
.bg-dark .minimal-item { border-bottom: 1px solid rgba(255,255,255,0.05); }
.minimal-item:hover { transform: translateX(10px); }
.minimal-icon { width: 32px; height: 32px; flex-shrink: 0; color: var(--theme-primary); }
/* SVG Line Art Animation */
.minimal-icon path { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.5s var(--ease-cinematic); }
.reveal.active .minimal-icon path { stroke-dashoffset: 0; }
.minimal-text { font-size: 1.25rem; font-weight: 300; }

/* ==========================================
   COMPONENT: WISHES
   ========================================== */
.wishes-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md); }
.wish-note {
    width: 280px; min-height: 280px; display: flex; align-items: center; justify-content: center; text-align: center;
    padding: var(--space-md); font-size: 1.5rem; font-style: italic; border-radius: 50%;
    transition: transform 0.8s var(--spring-soft);
}
.wish-note:hover { transform: scale(1.1) rotate(5deg); }

/* ==========================================
   COMPONENT: CTA (The Celebration)
   ========================================== */
.cta-celebration { text-align: center; padding: var(--space-section) 0; position: relative; }
.cta-celebration .cinematic-shout { margin-bottom: var(--space-lg); }

/* Utilities */
.hidden { display: none !important; }
.section-block { display: block; }

/* V10 Experience Overrides */
.loading-screen { position: fixed; inset: 0; background: #fff; z-index: 10000; display: flex; justify-content: center; align-items: center; transition: opacity 1s var(--ease-cinematic), visibility 1s; }
.bg-dark .loading-screen { background: #000; }
.loading-screen.hidden { opacity: 0; visibility: hidden; }
.loading-logo { font-family: var(--font-heading); font-size: 2rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--theme-primary); animation: pulseLogo 2s infinite alternate; }
@keyframes pulseLogo { 0% { opacity: 0.5; } 100% { opacity: 1; } }
.scroll-progress-bar { position: fixed; top: 0; left: 0; height: 2px; background: var(--theme-primary); z-index: 9998; width: 0%; transition: width 0.1s linear; }

@media (min-width: 768px) {
    body:not(.builder-mode) { cursor: none; }
    .premium-cursor {
        position: fixed; top: 0; left: 0; width: 8px; height: 8px; background: var(--theme-text); border-radius: 50%;
        pointer-events: none; z-index: 9999; transform: translate(-50%, -50%);
        transition: width 0.3s var(--ease-cinematic), height 0.3s var(--ease-cinematic), background 0.3s;
    }
    .premium-cursor.hovering { width: 80px; height: 80px; background: rgba(255,255,255,0.05); border: 1px solid rgba(150,150,150,0.5); backdrop-filter: blur(2px); mix-blend-mode: exclusion; }
}

/* Mobile Simplification (Safety Rule 5) */
@media (max-width: 768px) {
    .cinematic-shout { font-size: calc(clamp(3rem, 10vw, 4rem) * var(--typo-heading-scale)); }
    .ambient-glow { display: none; /* Perf optimization */ }
    .memory-card { aspect-ratio: 1/1; }
    .physical-letter { padding: var(--space-md); }
}

/* ==========================================
   V12: PIHU EDITION COMPONENTS
   ========================================== */

/* Theme Toggle Button */
.theme-toggle {
    position: fixed; top: 32px; right: 32px; z-index: 1000;
    display: flex; align-items: center; gap: 8px;
    background: var(--theme-surface); backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); border-radius: 30px;
    padding: 8px 16px; cursor: pointer; transition: all 0.3s var(--ease-cinematic);
    color: var(--theme-text);
}
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--theme-primary); }
.theme-toggle .icon { font-size: 1.2rem; }
.theme-toggle .label { font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

/* Signature Typography */
.signature-text {
    font-family: var(--font-signature);
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--theme-highlight);
    line-height: 0.8;
    transform: rotate(-5deg);
    display: inline-block;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

/* Feature Grid (Why You Are Special) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}
.feature-box {
    background: var(--theme-surface);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: var(--space-md) var(--space-sm);
    text-align: center;
    transition: transform 0.5s var(--spring-soft), border-color 0.5s;
}
.feature-box:hover {
    transform: translateY(-10px);
    border-color: var(--theme-primary);
}
.feature-icon {
    font-size: 2.5rem;
    color: var(--theme-primary);
    margin-bottom: 16px;
}
.feature-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.feature-desc {
    font-size: 0.9rem;
    color: var(--theme-muted);
}

/* About Section */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}
.about-text {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--theme-text);
}
.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    transform: rotate(2deg);
    border: 10px solid var(--theme-bg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
@media (max-width: 768px) {
    .about-layout { grid-template-columns: 1fr; }
    .about-image { transform: rotate(0); }
}

/* Little Things Grid */
.little-things-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}
.little-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.little-icon {
    width: 32px;
    height: 32px;
    color: var(--theme-primary);
}
.little-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--theme-muted);
}
.little-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}



/* Horizontal Polaroids (Override for Memory Stack) */
.memory-stack-horizontal {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding: var(--space-md) 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}
.memory-stack-horizontal::-webkit-scrollbar { display: none; }
.polaroid-card {
    flex: 0 0 280px;
    background: #FDFBF7; /* Always off-white for authentic polaroid look */
    padding: 16px 16px 60px 16px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    scroll-snap-align: center;
    transform: rotate(-2deg);
    transition: transform 0.5s var(--spring-soft);
    position: relative;
}
.polaroid-card:nth-child(even) { transform: rotate(3deg) translateY(10px); }
.polaroid-card:hover { transform: scale(1.05) rotate(0); z-index: 10; }
.polaroid-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center;
    border-radius: 2px;
    display: block;
}
.polaroid-caption {
    position: absolute;
    bottom: 20px;
    left: 0; right: 0;
    text-align: center;
    font-family: var(--font-signature);
    color: var(--text-primary);
    font-size: 1.2rem;
}
@media (max-width: 768px) {
    .theme-toggle { top: 16px; right: 16px; padding: 6px 12px; }
    .theme-toggle .label { display: none; }
    .about-layout { padding-top: 80px !important; }
}

@keyframes floatSlow1 {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}
@keyframes floatSlow2 {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-20px) rotate(-1deg); }
}
.float-anim-1 { animation: floatSlow1 8s ease-in-out infinite; }
.float-anim-2 { animation: floatSlow2 10s ease-in-out infinite; }

/* ==========================================
   V13 LUXURY MOTION & PREMIUM FINISH
   ========================================== */

/* 1. Luxury Loader */
#luxury-loader {
    position: fixed; inset: 0; z-index: 9999;
    background: #050505; display: flex; align-items: center; justify-content: center;
    transition: opacity 1s var(--ease-cinematic), visibility 1s;
}
.loader-logo {
    font-family: var(--font-signature); font-size: 4rem; color: #D4AF37;
    animation: loaderPulse 1.5s ease-in-out infinite alternate;
}
@keyframes loaderPulse { 0% { opacity: 0.5; filter: blur(2px); } 100% { opacity: 1; filter: blur(0); text-shadow: 0 0 20px rgba(212,175,55,0.5); } }
.loader-fade-out { opacity: 0; visibility: hidden; pointer-events: none; }

/* 2. Photo Experience */
.photo-alive {
    animation: slowFloatPhoto 12s ease-in-out infinite alternate;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4); transition: transform 0.8s var(--spring-soft), box-shadow 0.8s var(--ease-cinematic);
    will-change: transform;
}
.photo-alive:nth-child(even) { animation-duration: 15s; animation-direction: alternate-reverse; }
.photo-alive:hover {
    transform: scale(1.03) translateY(-10px) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 30px rgba(212,175,55,0.2);
    animation-play-state: paused;
}
@keyframes slowFloatPhoto {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(1.5deg); }
}

/* 3. Golden Aura */
.golden-aura {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 120%; height: 120%; border-radius: 50%; z-index: 1;
    background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 70%);
    animation: auraBreathe 8s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes auraBreathe { 0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; } 100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } }

/* 4. Glassmorphism 3.0 Upgrades */
.time-box, .little-item, .polaroid-card {
    backdrop-filter: blur(40px) !important; -webkit-backdrop-filter: blur(40px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1), inset 0 0 20px rgba(212,175,55,0.05) !important;
    transition: transform 0.6s var(--spring-soft), box-shadow 0.6s var(--ease-cinematic) !important;
}
.time-box:hover, .little-item:hover, .polaroid-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 20px rgba(212,175,55,0.2) !important;
}

/* 5. Premium Cursor (Desktop Only) */
.premium-cursor {
    position: fixed; top: 0; left: 0; width: 12px; height: 12px;
    background: #D4AF37; border-radius: 50%; pointer-events: none; z-index: 10000;
    mix-blend-mode: difference; transition: transform 0.2s ease-out, width 0.3s var(--spring-soft), height 0.3s var(--spring-soft);
    transform: translate(-50%, -50%);
}
.premium-cursor.magnetic {
    width: 40px; height: 40px; background: transparent; border: 1px solid #D4AF37; mix-blend-mode: normal;
}
@media (pointer: coarse) { .premium-cursor { display: none !important; } }

/* 6. Subtle Sparkles */
.cinematic-shout::after, .cinematic-subshout::after {
    content: "?"; position: absolute; font-size: 0.4em; opacity: 0;
    animation: sparkleTwinkle 6s ease-in-out infinite; margin-left: 10px; color: #D4AF37;
}
@keyframes sparkleTwinkle { 0%, 100% { opacity: 0; transform: scale(0); } 50% { opacity: 0.8; transform: scale(1); } }

/* ==========================================
   V14 CINEMATIC LUXURY POLISH
   ========================================== */

/* 1. CLS & Content Visibility */
.section-block { content-visibility: auto; contain-intrinsic-size: 1000px; }

/* 2. Premium Glass Card Upgrade (Little Things & Polaroids) */
.premium-glass-card {
    backdrop-filter: blur(40px) !important; -webkit-backdrop-filter: blur(40px) !important;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212,175,55,0.2) !important;
    border-radius: 28px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.1) !important;
    transition: transform 0.6s var(--spring-soft), box-shadow 0.6s var(--ease-cinematic) !important;
}
.theme-dark .premium-glass-card { background: rgba(30,35,30,0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05) !important; }
.premium-glass-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 30px rgba(212,175,55,0.15) !important;
}

/* 3. Luxury Photo 3D Experience */
.photo-alive {
    transition: transform 0.8s var(--spring-soft), box-shadow 0.8s var(--ease-cinematic), filter 0.8s var(--ease-cinematic);
}
.photo-alive:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) scale(1.03) translateY(-10px) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(212,175,55,0.25) !important;
    filter: contrast(1.05) brightness(1.05);
}

/* 4. Glossy Reflection */
.photo-alive::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg); transition: 0.8s; pointer-events: none; z-index: 5;
}
.photo-alive:hover::after { left: 150%; transition: 1.2s ease-in-out; }

/* 5. Golden Fireflies / Dust */
.firefly {
    position: fixed; width: 4px; height: 4px; background: #D4AF37; border-radius: 50%;
    pointer-events: none; z-index: 9999;
    box-shadow: 0 0 10px 2px rgba(212,175,55,0.4);
    animation: fireflyFloat 15s linear infinite, fireflyFade 4s ease-in-out infinite alternate;
}
@keyframes fireflyFloat { 0% { transform: translate(0, 100vh); } 100% { transform: translate(0, -10vh); } }
@keyframes fireflyFade { 0% { opacity: 0; } 50% { opacity: 0.8; } 100% { opacity: 0; } }

/* 6. Confetti Canvas */
#confetti-canvas {
    position: fixed; inset: 0; pointer-events: none; z-index: 100000;
}


/* ==========================================
   V1.0 PRODUCTION READINESS (A11Y & MOTION)
   ========================================== */

/* 1. Keyboard Focus Management */
:focus-visible {
    outline: 2px solid var(--theme-primary) !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 4px rgba(212,175,55,0.2) !important;
    border-radius: 4px;
}
.theme-toggle:focus-visible, .premium-btn:focus-visible {
    border-radius: 50%;
}
.premium-btn:focus-visible { border-radius: 30px; }

/* 2. Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .photo-alive:hover { transform: none !important; box-shadow: none !important; filter: none !important; }
    .firefly { display: none !important; }
    .premium-glass-card:hover { transform: none !important; box-shadow: none !important; }
}

/* ==========================================
   PHOTO MEMORIES GALLERY HOTFIX
   ========================================== */

.photo-memories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 32px;
    max-width: 900px;
    width: 100%;
    margin: 40px auto 0;
    align-items: stretch;
}
@media (max-width: 700px) {
    .photo-memories-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

.memory-photo-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: 28px;
    display: block;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212,175,55,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 20px rgba(212,175,55,0.05);
    transition: transform 0.6s var(--ease-cinematic), box-shadow 0.6s var(--ease-cinematic);
}
.theme-dark .memory-photo-card {
    background: rgba(30,35,30,0.4);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 0 20px rgba(212,175,55,0.1);
}

.memory-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.8s var(--ease-cinematic);
}

/* Hover Effects (Desktop Only) */
@media (hover: hover) and (pointer: fine) {
    .memory-photo-card:hover {
        box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 40px rgba(212,175,55,0.2), inset 0 0 20px rgba(212,175,55,0.15);
        transform: translateY(-8px) perspective(1000px) rotateX(2deg) rotateY(-2deg) !important;
        z-index: 10;
    }
    .memory-photo-card:hover img {
        transform: scale(1.05);
    }
}

/* Floating Animations */
@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes floatRotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(1.5deg); }
}
@keyframes floatLeftRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}
@keyframes floatScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.float-anim-a { animation: floatUpDown 12s ease-in-out infinite; }
.float-anim-b { animation: floatRotate 15s ease-in-out infinite; }
.float-anim-c { animation: floatLeftRight 14s ease-in-out infinite; }
.float-anim-d { animation: floatScale 10s ease-in-out infinite; }

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .float-anim-a, .float-anim-b, .float-anim-c, .float-anim-d {
        animation: none !important;
    }
    .memory-photo-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    .memory-photo-card:hover img {
        transform: none !important;
    }
}

/* ==========================================
   V1.1.0 PREMIUM UI ELEMENTS
   ========================================== */

/* 1. Premium Toast System */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100000;
    pointer-events: none;
}
.premium-toast {
    background: rgba(25, 25, 25, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease-cinematic), transform 0.4s var(--ease-cinematic);
}
.premium-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.theme-light .premium-toast {
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 2. Floating Buttons */
.floating-btn {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--theme-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s var(--ease-cinematic);
    outline: none;
}
.theme-light .floating-btn {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.floating-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}
.floating-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.5);
}
#share-btn {
    bottom: 24px;
    left: 24px;
}
#scroll-to-top {
    bottom: 24px;
    right: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}
#scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* 3. Section Navigation */
#section-nav {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 9998;
}
.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(150, 150, 150, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s var(--ease-cinematic);
}
.nav-dot.active {
    background: #D4AF37;
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
.nav-dot:hover:not(.active) {
    background: rgba(150, 150, 150, 0.8);
    transform: scale(1.2);
}
@media (max-width: 1024px) {
    #section-nav { display: none; }
}

/* 4. Modals (QR & Easter Egg shared base) */
.premium-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-cinematic);
}
.premium-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--theme-surface);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s var(--ease-cinematic);
    max-width: 90vw;
    width: 400px;
    text-align: center;
}
.premium-modal.show .modal-content {
    transform: scale(1) translateY(0);
}
.qr-content h3 {
    margin-bottom: 24px;
}
#qr-code-wrapper {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 24px;
}
.share-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.close-modal-btn {
    width: 100%;
    background: transparent;
    color: var(--theme-text);
    border: 1px solid var(--theme-text);
    opacity: 0.7;
}
.close-modal-btn:hover {
    opacity: 1;
}

/* 5. Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 110000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    user-select: none;
}
.lightbox-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
#lightbox-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none; /* Required for custom pan/zoom gestures */
}
#lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.3s ease;
    will-change: transform;
    transform-origin: center center;
}
.lightbox-overlay button {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 2;
}
.lightbox-overlay button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}
#lightbox-close {
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
}
#lightbox-prev, #lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}
#lightbox-prev:hover, #lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}
#lightbox-prev { left: 24px; }
#lightbox-next { right: 24px; }
.lightbox-counter {
    position: absolute;
    top: 24px;
    left: 24px;
    color: rgba(255,255,255,0.7);
    font-family: var(--font-primary);
    font-size: 1.2rem;
    letter-spacing: 2px;
}
@media (max-width: 768px) {
    #lightbox-prev, #lightbox-next { display: none; /* Use swipe on mobile */ }
    #lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; }
    .lightbox-counter { top: 16px; left: 16px; font-size: 1rem; }
}

/* 6. Footer Layout */
.premium-footer {
    padding: 60px 0;
    position: relative;
    z-index: 2;
}
.luxury-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    margin-bottom: 40px;
}
.footer-text {
    font-size: 0.9rem;
    color: var(--theme-secondary);
    font-family: var(--font-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.footer-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--theme-text);
    margin-bottom: 0;
}
.footer-link {
    color: #D4AF37;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: opacity 0.3s;
}
.footer-link:hover {
    opacity: 0.7;
}
@media (prefers-reduced-motion: reduce) {
    .premium-toast, .floating-btn, .nav-dot, .premium-modal, .lightbox-overlay, #lightbox-img {
        transition: none !important;
        animation: none !important;
    }
}
