* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #fcfaf9; 
    font-family: sans-serif;
    overflow-x: hidden;
}

/* --- HIDE SCROLLBARS FOR A CLEAN APP-LIKE FEEL --- */
body::-webkit-scrollbar,
html::-webkit-scrollbar,
.visual-gallary-modal::-webkit-scrollbar,
.visual-gallary-modal-content::-webkit-scrollbar { /* <-- Added this line */
    display: none;
}

body, 
html, 
.visual-gallary-modal,
.visual-gallary-modal-content { /* <-- Added this line */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

body, 
html, 
.visual-gallary-modal {
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

/* --- Ambient Light Background --- */
.visual-gallary-ambient-backgrounds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.visual-gallary-ambient-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%; 
    height: 120%;
    object-fit: cover;
    filter: blur(90px) saturate(120%) brightness(1.2); 
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.visual-gallary-ambient-bg.active {
    opacity: 0.5; 
}

/* --- WebGL & Scroll Setup --- */
#visual-gallary-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none; 
}

.visual-gallary-container {
    position: relative;
    z-index: 2;
    padding: 20vh 0; 
    display: flex;
    flex-direction: column;
    gap: 60vh;
    margin-bottom: 300px;
}

/* --- Image Layout & Sizing --- */
.visual-gallary-item {
    position: relative; 
    width: 45vw; 
    max-width: 650px; 
    aspect-ratio: 1 / 1.1; 
    border-radius: 40px; 
}

.visual-gallary-item:nth-child(odd) {
    align-self: flex-start;
    margin-left: 10vw; 
}

.visual-gallary-item:nth-child(even) {
    align-self: flex-end;
    margin-right: 10vw; 
}

.visual-gallary-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.visual-gallary-item:nth-of-type(1) {
    margin-top: -300px; /* --- gap between title and image --- */
}

/* --- THE MAIN TITLE & SUBTITLE --- */
.visual-gallary-title {
    text-align: center;
    font-weight: 300; 
    font-size: 5vw; 
    margin-top: 21vh;
    margin-bottom: 10vh;
/*	letter-spacing:2vw;*/
    padding-left: 2vw;
}
/* --- THE FIX: Elegant Spacing for Isolated Blocks --- */
/* 1. Large, airy spacing exclusively for the Main Title */
.visual-gallary-title .gsap-scatter-wrapper {
    margin-right: 0.8vw; 
}

/* 2. Tighter, readable spacing exclusively for the Subtitles */
.visual-gallary-subtitle .gsap-scatter-wrapper {
    margin-right: 0.2vw; 
}

.visual-gallary-subtitle {
	font-size: 4vw; 
    margin: 2vh 0 0 0;
	letter-spacing:0.6vw;
	opacity: 0.8; /* Bumped opacity up slightly for better resting readability */
transition: all 0.5s ease;}
	
	.visual-gallary-item:nth-child(odd) .visual-gallary-subtitle { text-align: right; padding-right: 1vw;}
.visual-gallary-item:nth-child(even) .visual-gallary-subtitle { text-align: left; padding-left: 1vw;}

.visual-gallary-item:hover .visual-gallary-subtitle {
    opacity: 0.5; 
text-shadow: 0 1.6px 5px rgba(0, 210, 255, 0.4);
}

/* =========================================
   STAGE 5: AUTOMATED 3D CSS DISPLACEMENT WAVE
========================================= */
.aero-3d-char {
    display: inline-block;
	
/* PREMIUM RAMP: Champagne Gold -> Rose -> Soft Lavender -> Deep Blue */
    background: linear-gradient(
        to right, 
		#B98FFF 0%,    /* Bright Warm Yellow */
        #FEE0FA 50%,   /* Vibrant Lime / Yellow-Green */
        #BBE7FC 100%   /* Fresh Green */
    );
    background-size: 7ch 50%; 
    background-position: calc(var(--char-index) * -1ch) center;
	
	/* Clips the gradient exclusively to the text */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
	
	animation: aero-3d-wave 8s infinite;
    animation-delay: calc(var(--char-index) * 0.04s); 
    will-change: transform, color, text-shadow;
    
    /* The 7-second loop you requested */
    animation: aero-3d-wave 7s infinite;
    
    /* The Magic: Multiplies the letter's index by 0.08s to create the sweeping stagger */
    animation-delay: calc(var(--char-index) * 0.08s);
    
    will-change: transform, color, text-shadow;
}

/* THE MATH: 15% of 15 seconds is 2.25 seconds. 
  The letter rises and falls within that window, then rests completely for the remaining ~12.5 seconds.
  Coupled with the staggered start delays, the entire visual wave finishes in about 4.5 seconds!
*/
@keyframes aero-3d-wave {
    0%, 20%, 100% {
        transform: translateZ(0px) translateY(0px) scale(1.25);
		filter: brightness(1); /* Rests at normal gradient colors */
       /* PREMIUM SHADOW: Removes muddy black, adds a subtle frosted edge */
        text-shadow: 
            0 1px 2px rgba(0, 0, 0, 0.08), /* Barely-there ambient depth */
            -0.2px -0.2px 0px rgba(255, 255, 255, 0.4); /* Crisp top-left highlight (embossed glass effect) */
    }
    6.5% {
        /* The peak of the 3D displacement wave */
        transform: translateZ(60px) translateY(-10px) scale(1.15);
/* Instead of changing the text color, we make the gradient glow brighter at the peak! */
        filter: brightness(1.2);
        text-shadow: 
            0 2px 5px rgba(255, 255, 255, 0.5),
            0 0 4px rgba(255, 255, 255, 0.3);
    }
}

/* --- THE HYBRID GLASS OVERLAY --- */
.visual-gallary-glass-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 40px; 
    pointer-events: auto; 
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.0) 100%);
    box-shadow: 0 24px 40px -10px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* =========================================
   STAGE 2: FLOATING MODAL STYLES
========================================= */
/* 1. Strip the giant title letter-spacing away from the description text ONLY */
.visual-gallary-modal-text .gsap-scatter-wrapper {
    margin-right: 0 !important; 
}

/* 2. Change the paragraph from 'justify' to 'left' so the words flow naturally */
.visual-gallary-modal-text {
    text-align: justify !important;
}


/* =========================================
   INLINE MODAL IMAGES (Editorial Layout)
========================================= */
.visual-gallary-modal-text .inline-modal-img {
    /* --- THE MAGAZINE FLOAT EFFECT --- */
    width: 45%; /* Shrinks the image to leave room for text */
    float: right; /* Pushes it to the right edge so text wraps around it */
    margin: 0 0 40px 4vw; /* Perfect spacing: Top, Right, Bottom, Left */
    
    /* --- EXISTING STYLES --- */
    height: auto;
    border-radius: 8px; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35), 0 5px 15px rgba(0, 0, 0, 0.2); 
    opacity: 0;
    animation: inlineImageFade 8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 3s; 
}
/* The CSS keyframe for the smooth entrance for showing picture Important!!!!!!!! */
@keyframes inlineImageFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   INDEPENDENT EDITORIAL GLASS FRAME (Full Width)
========================================= */

/* 1. The Outer Container */
.visual-gallary-modal-text .editorial-glass-frame {
    position: relative;
    width: 100%; 
    margin: 40px 0;
    padding: 10px; 
    border-radius: 13px;
    display: block;
    cursor: zoom-in; 
    
    opacity: 0;
    animation: inlineImageFade 4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
    
    background-size: 110%;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 1px 1px 2px rgba(255, 255, 255, 0.9), 0 30px 60px rgba(0,0,0,0.6);   
}

/* 2. The Frosted Glare */
.visual-gallary-modal-text .editorial-glass-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 1; 
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.25) 49%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.2) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* 3. The Inner Image */
.visual-gallary-modal-text .editorial-glass-frame img {
    position: relative;
    z-index: 2; 
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; 
    box-shadow: 0 1px 0 1px rgba(0,0,0,0.3), 0 0 0 2px rgba(255,255,255,0.6), 0 10px 25px rgba(0,0,0,0.4); 
}

/* Mobile Reset (Put inside your @media max-width: 768px block) */
@media (max-width: 768px) {
    .visual-gallary-modal-text .editorial-glass-frame {
        padding: 6px; 
        border-radius: 8px;
    }
}




/* The Blurred Backdrop */
.visual-gallary-modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px); 
    z-index: 9996;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.visual-gallary-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* The Glass Modal Container */
.visual-gallary-modal {
    position: fixed;
    top: 5vh;
    left: 10vw;
    width: 80vw;
    height: 90vh;
    z-index: 9997;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 40px 80px rgba(0,0,0,0.15);
    backdrop-filter: blur(25px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Modal Inner Content (Scrollable) */
.visual-gallary-modal-content {
	padding: 24vh 12vw; 
    height: 100%;
    overflow-y: auto;
}

/* --- THE LEFT/RIGHT ANIMATION LOGIC --- */
.visual-gallary-modal.start-left { transform: translateX(-150px) scale(0.95); }
.visual-gallary-modal.start-right { transform: translateX(150px) scale(0.95); }
.visual-gallary-modal.active { opacity: 1; transform: translateX(0) scale(1); pointer-events: auto; }

/* Modal Close Button */
.visual-gallary-modal-close {
    position: absolute;
    top: 30px; right: 40px;
    background: none; border: none;
    color: #E6CFCF;
    font-size: 50px; 
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.4s ease;
    z-index: 102;
}

.visual-gallary-modal-close:hover {
    transform: rotate(90deg) scale(1.1);
}

#visual-gallary-modal-title {
    font-weight: 300; 
    color: #E6CFCF; 
    font-size: 3vw; 
    margin: 0 0 30px 0;   
}
    .gsap-scatter-wrapper {
    /* This acts as your true letter-spacing for the 3D blocks */
    margin-right: 1.25vw; 
}

.visual-gallary-modal-text {
    color: #3b3b4f; 
    font-size: clamp(1.125rem, 1.5vw, 1.5rem); 
    line-height: 2; 
    font-weight: 300; 
    letter-spacing: 0.5px;
    
    /* 1. Matches the exact width of the image frame above it */
    width: 100%; 
    max-width: none; /* Removes the 800px limit from before */
    margin: 50px 0 0 0; 
    
    /* 2. Forces the text to stretch to both the left and right edges evenly */
    text-align: justify; 
}

/* =========================================
   STAGE 4: TRUE VISTA AERO GLASS PHYSICS
========================================= */

.visual-gallary-aero-frame {
    position: relative; 
    /* Slightly thicker padding to give the glass more physical weight */
    padding: 10px; 
    border-radius: 13px; /* Tighter outer corners like genuine Vista */
    cursor: zoom-in; 
    transition: transform 0.3s ease;
    margin-bottom: 30px;
    display: inline-block;
    width: 100%;
    
    /* SPECULAR OUTER HIGHLIGHTS & DEEP SHADOW */
    /* 1. Soft white outer glow */
    /* 2. Sharp white top-left edge highlight */
    /* 3. Massive drop shadow for depth */
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 1px 1px 2px rgba(255, 255, 255, 0.9), 
        0 30px 60px rgba(0,0,0,0.6);               
}

/* The Glass Body (Blur & Glare) */
.visual-gallary-aero-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 1; /* Sits over the injected background image */
    
    /* THE VISTA HORIZON GLARE */
    /* A sharp split gradient at 50% simulating a reflected room/horizon */
    background: linear-gradient(
        to bottom, 
        rgba(255, 255, 255, 0.65) 0%, 
        rgba(255, 255, 255, 0.25) 49%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.2) 100%
    );
    
    /* Blurs the background image (the internal reflection) */
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.visual-gallary-aero-frame:hover {
    transform: scale(1.0005); 
}

/* The Image inside the frame */
#visual-gallary-modal-image {
    position: relative;
    z-index: 2; /* Pushes image above the glass layer */
    width: 100%; 
    display: block;
    border-radius: 4px; /* Sharp inner corners */
    
    /* THE LCD GAP & INNER SPECULAR HIGHLIGHT */
    /* 1. Sharp dark 1px line touching the image (LCD gap) */
    /* 2. Sharp white 2px line outside the dark line (Bezel reflection) */
    /* 3. Soft drop shadow onto the glass */
    box-shadow: 
        0 1px 0 1px rgba(0,0,0,0.3), 
        0 0 0 2px rgba(255,255,255,0.6),
        0 10px 25px rgba(0,0,0,0.4); 
    
    pointer-events: none; 
}


/* --- THE LIGHTBOX AERO FRAME (Overrides for fullscreen) --- */
#visual-gallary-lightbox-frame {
    position: relative;
    width: auto; 
    max-width: 90vw;
    max-height: 90vh;
    margin-bottom: 0; 
    cursor: zoom-out; 
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: inline-flex; 
}

/* --- RESTORED: THE FULL-WINDOW LIGHTBOX CONTAINER --- */
.visual-gallary-lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    
    /* Beautiful frosted glass backdrop for the fullscreen view */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(25px);
    
    z-index: 9999; 
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: zoom-out; 
}

/* Pops up when Javascript triggers it */
.visual-gallary-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.visual-gallary-lightbox.active #visual-gallary-lightbox-frame {
    transform: scale(0.95);
}

#visual-gallary-lightbox-img {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: calc(90vh - 40px); /* Adjusts for the new 20px padding */
    border-radius: 4px;
    
    /* Same LCD Gap physics for the fullscreen view */
    box-shadow: 
       0 1px 0 1px rgba(0,0,0,0.3), /* Changed from 0.8 opacity to 0.3 */
        0 0 0 2px rgba(255,255,255,0.6),
        0 15px 35px rgba(0,0,0,0.5); /* Keeps the slightly larger drop shadow for fullscreen */
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .visual-gallary-container {
        padding: 10vh 0; 
        gap: 25vh; 
    }

    .visual-gallary-item {
        width: 60vw; 
        max-width: none;
        aspect-ratio: 9 / 18; 
        border-radius: 20px; 
    }
	
    .visual-gallary-item:nth-of-type(1) {
        margin-top: 25px;
    }

    .visual-gallary-item:nth-child(odd) {
        align-self: flex-start;
        margin-left: 5vw; 
    }

    .visual-gallary-item:nth-child(even) {
        align-self: flex-end;
        margin-right: 5vw; 
    }
	
    .visual-gallary-title {
        font-size: 15vw; 
        margin-top: 15vh;
        margin-bottom: -4vh;
		padding-left:5vh;
		padding-right:5vh;
/*        line-height: 1.2;*/
    }
    
    .visual-gallary-title .gsap-scatter-wrapper {
        margin-right: 1.8vw; /* Wider spacing for the big mobile title */
    }
    
    /* --- SUBTITLES (Mobile) --- */
    .visual-gallary-subtitle {
        font-size: 5vw; 
    }

    .visual-gallary-subtitle .gsap-scatter-wrapper {
        margin-right: 0.5vw; /* Much tighter spacing so the subtitles fit under the images */
    }
    
    .visual-gallary-item:nth-of-type(odd) .visual-gallary-subtitle,
    .visual-gallary-item:nth-of-type(even) .visual-gallary-subtitle {
        text-align: center;
        width: 100%;
        left: 0;
        padding: 0; 
    }
	
	/* === NEW: Thin out the glass border for mobile === */
    .visual-gallary-aero-frame {
        /* CHANGING FROM 20px (Desktop) TO 10px (Mobile) */
        padding: 6px; 
        
        /* Optional refinement: Tighter radius matches thinner padding */
        border-radius: 5px; 
    }

    .visual-gallary-modal {
        top: 2.5vh; left: 2.5vw; width: 95vw; height: 95vh;
        border-radius: 30px;
    }
    .visual-gallary-modal-content {
        padding: 30px 5vw; /* Tightens the padding back up for small screens */
    }
    #visual-gallary-modal-title {
        font-size: 8vw;
        margin-top: 10vh;
    }
    
    .gsap-scatter-wrapper {
    /* This acts as your true letter-spacing for the 3D blocks */
    margin-right: 1.5vw; 
}

    .visual-gallary-modal-close {
        top: 15px; right: 20px; font-size: 40px;
    }
    
    /* Reset the editorial image back to full width for phones */
    .visual-gallary-modal-text .inline-modal-img {
        width: 100%;
        float: none;
        margin: 30px 0;
    }
    
    
}


