/* Stops "jumping" effect */
html {
    overflow-x: hidden;
    backface-visibility: hidden;
}

#scroll-content {
    will-change: transform;
}
}

/* ==========================================================================
   INERTIAL SCROLL RESETS
   ========================================================================== */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-y: scroll; }
* { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; box-sizing: border-box; }
body { line-height: 1.0; background-color: #000000; color: #D6DCDC; font-family: 'Geist', sans-serif; position: relative; }

#scroll-viewport { position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
#scroll-content { width: 100%; padding: 8rem 2rem 10rem 2rem; will-change: transform; }

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999999;
    
    /* Background Image method for the grain */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 350px;
    
    /* Animate background to create moving effect */
    animation: grain-animation 0.5s steps(3) infinite;
    
    /* Visibility settings */
    opacity: 0.09; 
    image-rendering: pixelated;
}

@keyframes grain-animation {
    0% { background-position: 0 0; }
    33% { background-position: -20px -20px; }
    66% { background-position: 20px 20px; }
    100% { background-position: 0 0; }
}





.top-marquee-banner {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 35px; /* Fixed height stops the doubling size issue */
    background: #aea597;
    color: #000;
    font-family: 'Geist Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 12px 0;
    text-align: center;
    z-index: 999;
    overflow: hidden; /* Keeps content inside */
}

#marquee-text {
    opacity: 1;
    transition: opacity 0.5s ease-in-out; 
}

.flash-out {
    opacity: 0 !important; /* Force hidden */
    pointer-events: none;  /* Ensure it doesn't block clicks */
}

/* Ensure the cursor doesn't have its own opacity transition */
#marquee-content .cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


/* Make Grain Overlay let clicks "pass through" to the button */
.grain-overlay {
    pointer-events: none !important;
    z-index: 999998;
}

/* Ensure scroll-viewport doesn't cover music button area */
#scroll-viewport {
    pointer-events: auto; /* Normal behavior */
    z-index: 1;
}

.site-wrapper { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; max-width: 1100px; margin: 0 auto; width: 100%; }
.site-main { width: 100%; }
.site-main > .inner > * { margin-top: 1rem; margin-bottom: 1rem; }
.text-component.instance-badge { text-transform: uppercase; color: #030030; font-family: 'Geist', sans-serif; font-size: 0.65rem; line-height: 1; font-weight: 700; position: relative; max-width: max-content; border: 1px solid #444444; padding: 5px 12px; border-radius: 999px; background: #aea597; letter-spacing: 0.08em; }

.text-component.instance-massive-title { font-family: 'Funnel Display', sans-serif; width: 100%; color: #FFFFFF; text-transform: uppercase; margin-top: 0.8rem !important; display: flex; flex-direction: column; gap: 0.6rem; }
.instance-massive-title .title-line { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.instance-massive-title .line-1 { font-size: clamp(2rem, 7.85vw, 6.45rem); font-weight: 500; }
.instance-massive-title .line-2 { font-size: clamp(1.2rem, 4.35vw, 3.58rem); font-weight: 400; color: #aea597; }

.hero-graphic-banner-container { width: 100%; margin-top: 3rem !important; margin-bottom: 3rem !important; }
.banner-frame { width: 100%; height: 16rem; background-color: #0d0d0d; border: 1px solid #1a1a1a; display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; }
.banner-frame img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; filter: grayscale(20%); }
.banner-placeholder-text { font-family: 'Geist Mono', monospace; font-size: 0.72rem; color: #333333; letter-spacing: 0.1em; z-index: 1; }

.stats-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; width: 100%; margin-top: 4rem !important; margin-bottom: 4rem !important; border-top: 1px dashed #222; border-bottom: 1px dashed #222; padding: 2.5rem 0; }
@media (max-width: 600px) { .stats-container { grid-template-columns: 1fr; gap: 2rem; } }
.stat-box { display: flex; flex-direction: column; align-items: flex-start; }
.stat-number { font-family: 'Funnel Display', sans-serif; color: #888888; font-size: 6rem; font-weight: 300; line-height: 1; }
.stat-label { font-family: 'Geist Mono', monospace; color: #555555; font-size: 0.7rem; font-weight: 700; margin-top: 0.5rem; letter-spacing: 0.05em; }

.linktree-navigation { margin-top: 1rem !important; margin-bottom: 4rem !important; display: flex; flex-direction: column; gap: 1.2rem; width: 100%; }
.link-group { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-family: 'Geist Mono', monospace; font-size: 0.8rem; }
.group-label { color: #555555; font-weight: 700; margin-right: 0.5rem; }
.link-group a { color: #aea597; text-decoration: none; border-bottom: 1px dashed #444444; padding-bottom: 2px; transition: color 0.2s ease, border-color 0.2s ease; }
.link-group a:hover { color: #FFFFFF; border-bottom: 1px solid #FFFFFF; }

.scroll-reveal { 
    opacity: 0; 
    transform: translate3d(0, 45px, 0); 
    will-change: transform, opacity; 
    /* The transition property ensures it animates both IN and OUT */
    transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1), transform 0.85s cubic-bezier(0.25, 1, 0.5, 1); 
     
}

.scroll-reveal.visible { 
    opacity: 1; 
    transform: translate3d(0, 0, 0);  
}
/* 1. TITLE ANIMATION */
.fade-in-letter { opacity: 0; display: inline-block; transform: translateY(5px); }
.scroll-reveal.visible .fade-in-letter { animation: fadeInLetter 0.6s forwards; animation-delay: calc(var(--i) * 0.08s); }
@keyframes fadeInLetter { to { opacity: 1; transform: translateY(0); } }

/* 2. GALLERY LAYOUT */
.gallery-section { display: grid; grid-template-columns: 1fr; gap: 1.8rem; width: 100%; margin-top: 1.5rem !important; }
@media (min-width: 600px) { .gallery-section { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (min-width: 900px) { .gallery-section { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; } }

.gallery-item { display: flex; flex-direction: column; background: #090909; border: 1px solid #161616; padding: 0.8rem; transition: border-color 0.3s ease; }
.gallery-item:hover { border-color: #444444; }

/* 3. IMAGE FRAME & CURSOR */
.image-frame { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background-color: #111111; }
.image-frame img { 
    width: 100%; height: 100%; object-fit: cover; 
    filter: grayscale(35%); transition: filter 0.4s ease; 
    cursor: pointer !important; 
}
.gallery-item:hover .image-frame img { filter: grayscale(0%); }

/* 4. META TEXT */
.item-meta { margin-top: 1rem; }
.text-component.instance-serif-label { text-transform: uppercase; color: #A0A5A5; font-family: 'Instrument Serif', serif; font-size: 1.7rem; line-height: 1; font-weight: 400; margin-bottom: 0.4rem; }
.text-component.style-mono-body { color: #666666; font-family: 'Geist Mono', monospace; font-size: 0.75rem; line-height: 1.4; font-weight: 200; }

/* 5. LIGHTBOX */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none; /* Changed from hidden to none */
    justify-content: center;
    align-items: center;
    z-index: 999999; /* High index to sit above everything */
    cursor: pointer;
}

#lightbox.active {
    display: flex;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
#lightbox.active img { transform: scale(1); }


/* Layout for the 2-column description */
.description-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stacked by default on mobile */
    gap: 3rem;
    align-items: center;
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

/* Tablet and desktop layout */
@media (min-width: 768px) {
    .description-grid {
        grid-template-columns: 0.8fr 1.2fr; /* Two unequal columns */ gap: 4rem;
    }
}

.desc-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.desc-image .image-frame {
    aspect-ratio: 1.896 / 1; 
    border: 1px solid #161616;
    background-color: #000; /* Optional: adds a black border if needed */
}

.desc-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* "Contain" for no crop GIF */ 
    filter: grayscale(15%);
    transition: filter 0.4s ease;
}

.desc-image:hover img {
    filter: grayscale(0%);
}


.text-component.style-mono-sub {
    font-family: 'Geist Mono', monospace; 
    font-size: 0.8rem; 
    font-weight: 200;
    color: #888888; 
    line-height: 1.3;
    letter-spacing: 0.05em;
    text-align: justify;           /* Enables full justification */
    text-transform: uppercase;
    text-justify: inter-word;      /* Ensures space is distributed between words */
    hyphens: none;                 /* Prevents broken words at the end of lines */
    -webkit-font-smoothing: antialiased;
}

/* COLOR FOR Second M (index 7) IN MUSHROOMALICE TITLE */
.fade-in-letter[style*="--i:7"] {
    color: #fa82a5 !important;
}

/* Fixes all poem text color and visibility */
.item-meta .text-component.style-mono-body p {
    color: #cccccc !important; /* Brighter grey */
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
}

/* For sub-title/description text in the gallery ONLY */
.gallery-item .text-component.style-mono-body {
    color: #b0b0b0 !important; /* Brighter grey */
    opacity: 1 !important;     /* Ensure it's not transparent */
}

/* For all Entry Titles */
.instance-serif-label {
    color: #e0e0e0 !important; /* Near-white for high contrast */

}

.text-component.style-mono-footer {
    color: #666666;
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* FOOTER MUMA and NARRATIVE ARCHIVE COLOR */
.footer-brand {
    color: #D6DCDC; 
}

/* FOOTER ALL REALITIES RESERVED BRIGHT COLOR */
.footer-reserved {
    color: #fa82a5 !important;
}

/* FOR SECOND DESCRIPTION BOX IMAGE LEFT TEXT RIGHT */
.description-grid-reverse {
    display: grid;
    grid-template-columns: 1fr; /* Stacked on mobile */
    gap: 3rem;
    align-items: center;
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

@media (min-width: 768px) {
    .description-grid-reverse {
        grid-template-columns: 1.2fr 0.8fr; /* Image (left) 1.2fr, Text (right) 0.8fr */
        gap: 4rem;
  
}

/* Update the container for the new section */
.description-grid-reverse .desc-image .image-frame {
    aspect-ratio: auto; /* Change 'contain' to 'cover' to fill the space, or 'none' for original size */
    border: none; /* Remove border if it's unwanted */
}

.description-grid-reverse .desc-image img {
    object-fit: cover; /* 'cover' might crop edges */
    width: 100%;
    height: auto;
}
}


/* MUSIC BUTTON RULE */
.music-btn {
    position: fixed !important;
    bottom: 2rem !important;
    left: 2rem !important;
    z-index: 9999999 !important; /* Forces button to the top */
    pointer-events: auto !important; /* Forces button to catch clicks */
    background: transparent;
    color: #666;
    border: 1px solid #333;
    padding: 0.5rem 1rem;
    cursor: pointer !important;
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
}

.music-btn.playing { 
    color: #fa82a5 !important; 
    border-color: #fa82a5 !important; 
}
