/* ==========================================================================
   1. GHIBLI COLOR VARIABLES & CORE SETUP
   ========================================================================== */
:root {
    --ghibli-dark: #0c1410;       
    --ghibli-moss: #1a2e23;       
    --ghibli-light: #fcf7ea;      
    --spirit-blue: #8be9fd;       
    --firefly-gold: #ffb86c;      
    --sakura-pink: #ff79c6;       
    
    --glass-bg: rgba(26, 46, 35, 0.4);
    --glass-border: rgba(252, 247, 234, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);

    --font-sans: 'Satoshi', sans-serif;
    --font-display: 'Cabinet Grotesk', sans-serif;
    --font-serif: 'Switzer', serif; 
    
    --ease-ghibli: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-slow: cubic-bezier(0.4, 0, 0, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    background-color: var(--ghibli-dark);
}

body.custom-cursor-active,
body.custom-cursor-active * {
    cursor: auto !important; /* Kept normal cursor so you can navigate easily */
}

body {
    font-family: var(--font-sans);
    color: var(--ghibli-light);
    background-color: var(--ghibli-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ==========================================================================
   2. CUSTOM MAGICAL CURSOR
   ========================================================================== */
.cursor-dot {
    position: fixed; top: 0; left: 0; width: 6px; height: 6px;
    background-color: var(--spirit-blue); border-radius: 50%;
    pointer-events: none; z-index: 10000; transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--spirit-blue), 0 0 20px var(--spirit-blue);
    will-change: transform; 
}

.cursor-outline {
    position: fixed; top: 0; left: 0; width: 40px; height: 40px;
    border: 1px solid rgba(139, 233, 253, 0.5); border-radius: 50%;
    pointer-events: none; z-index: 9999; transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-ghibli), height 0.3s var(--ease-ghibli), background-color 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    will-change: transform, width, height; 
}

.cursor-text {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--ghibli-dark); opacity: 0;
    transition: opacity 0.2s ease;
}

.cursor-outline.hover-pointer {
    width: 60px; height: 60px; background-color: rgba(139, 233, 253, 0.1);
    backdrop-filter: blur(2px); border-color: var(--spirit-blue);
}

.cursor-outline.hover-text {
    width: 80px; height: 80px; background-color: var(--ghibli-light);
    mix-blend-mode: normal; border: none;
}
.cursor-outline.hover-text .cursor-text { opacity: 1; }

/* ==========================================================================
   3. PRELOADER & NAVIGATION
   ========================================================================== */
.loader-wrapper {
    position: fixed; inset: 0; background: var(--ghibli-dark); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.loader-content { text-align: center; }
.loader-title {
    font-family: var(--font-display); font-size: 3rem; letter-spacing: 4px;
    color: var(--ghibli-light); margin-bottom: 2rem; animation: pulse-glow 2s infinite alternate;
}
.loader-progress-wrapper {
    width: 200px; height: 1px; background: rgba(255, 255, 255, 0.1);
    margin: 0 auto 1rem; position: relative; overflow: hidden;
}
.loader-progress-bar {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: var(--spirit-blue); box-shadow: 0 0 10px var(--spirit-blue);
}
.loader-percentage { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 2px; }

@keyframes pulse-glow {
    0% { text-shadow: 0 0 10px rgba(139, 233, 253, 0.2); }
    100% { text-shadow: 0 0 30px rgba(139, 233, 253, 0.8), 0 0 50px rgba(139, 233, 253, 0.4); }
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0; /* Let the inner container handle padding */
    height: 80px; /* Force a consistent height */
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.4s ease, height 0.4s ease;
}
.site-header.scrolled {
    background: rgba(12, 20, 16, 0.85);
    backdrop-filter: blur(15px);
    height: 65px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center; /* This "sits" the nav items perfectly in the middle */
}
.brand a { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: var(--ghibli-light); text-decoration: none; letter-spacing: 1px; }
.nav-list {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-list a {
    color: var(--ghibli-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    transition: opacity 0.3s ease, text-shadow 0.3s ease;
}
.nav-list a:hover {
    opacity: 1;
    text-shadow: 0 0 10px var(--spirit-blue);
}
.nav-list a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 1px; background: var(--spirit-blue); transition: width 0.3s var(--ease-ghibli); }
.nav-list a:hover::after, .nav-list a.active::after { width: 100%; }

/* ==========================================================================
   4. BUTTONS & TYPOGRAPHY
   ========================================================================== */
.btn-premium {
    position: relative; background: transparent; border: 1px solid rgba(255,255,255,0.2);
    color: var(--ghibli-light); padding: 0.8rem 2rem; border-radius: 50px;
    font-family: var(--font-sans); font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; font-size: 0.8rem; overflow: hidden;
    transition: border-color 0.3s ease, color 0.3s ease; will-change: transform; 
}
.btn-premium .btn-text { position: relative; z-index: 2; }
.btn-premium .btn-hover-fill { position: absolute; top: 100%; left: 0; width: 100%; height: 100%; background: var(--ghibli-light); z-index: 1; transition: top 0.4s var(--ease-ghibli); border-radius: 50px 50px 0 0; }
.btn-premium:hover { color: var(--ghibli-dark); border-color: var(--ghibli-light); }
.btn-premium:hover .btn-hover-fill { top: 0; border-radius: 0; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

.massive-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem); 
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    text-transform: uppercase;
    /* Added a massive multi-layer shadow to separate text from background */
    text-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.8),
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(0, 0, 0, 0.3);
}

.anomaly-glow {
    color: var(--spirit-blue); /* Fill it with color so it's readable */
    -webkit-text-stroke: 1px #fff;
    text-shadow: 0 0 20px rgba(139, 233, 253, 0.8);
}
.mono-badge { font-family: monospace; font-size: 0.8rem; letter-spacing: 2px; padding: 0.4rem 1rem; border: 1px solid var(--glass-border); border-radius: 50px; background: var(--glass-bg); display: inline-block; margin-bottom: 2rem; text-transform: uppercase; }
.split-text { overflow: hidden; }
.split-text .line { display: block; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; color: var(--spirit-blue); text-decoration: none; font-weight: 700; }
.link-arrow svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; }

/* ==========================================================================
   5. HERO SECTION & PARALLAX ENGINE
   ========================================================================== */
.section-hero { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#webgl-canvas { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

.parallax-bg, .parallax-mid, .hero-character-wrapper {
    position: absolute; inset: -10%; width: 120%; height: 120%;
    will-change: transform; transform: translateZ(0); backface-visibility: hidden; perspective: 1000px; 
}
.bg-image { width: 100%; height: 100%; background-size: cover; background-position: center; }

/* Links to your background image */
.bg-forest { background-image: url('../assets/hero-background.webp'); }
.bg-details { background-image: radial-gradient(circle at center, transparent 20%, rgba(12, 20, 16, 0.8) 100%); }

/* THE MAGIC HERO TEXT FIX */
.hero-typography {
    position: relative;
    z-index: 30;
    text-align: center;
    margin-top: 40vh; /* Pushes text UP out of the way */
}

/* THE MAGIC CA BOX FIX (Crystal clear glass) */
.ca-wrapper {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.15); 
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); 
    position: relative;
    z-index: 20;
}

.ca-label {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 3px;
    color: var(--ghibli-light); margin: 0; font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Shadow added */
}

.ca-string {
    font-family: monospace; font-size: 1.2rem;
    color: #ffffff; margin: 0; font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Shadow added */
    user-select: all;
}

.copy-icon {
    margin-top: 0.5rem; background: transparent; border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--ghibli-light); padding: 0.4rem 1.5rem; border-radius: 50px;
    font-family: var(--font-sans); font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; transition: all 0.3s ease;
}
.copy-icon:hover { background: var(--spirit-blue); color: var(--ghibli-dark); border-color: var(--spirit-blue); box-shadow: 0 0 15px var(--spirit-blue); }

/* The Cat positioning */
.hero-cat {
    display: none;
    position: absolute; bottom: 0 !important; left: 50%; transform: translateX(-50%);
    max-height: 55vh; z-index: 15; filter: drop-shadow(0 30px 40px rgba(0,0,0,0.6));
    will-change: transform;
}

/* ==========================================================================
   6. BENTO UI & MARQUEE
   ========================================================================== */
.glass-panel, .glass-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 24px; overflow: hidden; position: relative; transform: translateZ(0); }
.glass-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent); z-index: 1; }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(300px, auto); gap: 1.5rem; margin-top: 4rem; }
.bento-large { grid-column: span 2; }
.bento-box { padding: 3rem; display: flex; flex-direction: column; justify-content: flex-end; transition: transform 0.4s var(--ease-ghibli), box-shadow 0.4s ease; will-change: transform; }
.bento-box:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(139, 233, 253, 0.3); }
.bento-content { position: relative; z-index: 2; }
.bento-content h3 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.5rem; }
.bento-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.4; transition: opacity 0.4s ease, transform 0.8s ease; z-index: 1; }
.bento-box:hover .bento-bg { opacity: 0.6; transform: scale(1.05); }

.marquee-wrapper { padding: 2rem 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); background: rgba(0,0,0,0.2); overflow: hidden; white-space: nowrap; display: flex; }
.marquee-inner { display: flex; width: fit-content; animation: marquee 20s linear infinite; will-change: transform; }
.marquee-part { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: 2px; color: var(--ghibli-light); padding-right: 2rem; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ==========================================================================
   7. UTILITY CLASSES & GLOBAL SPACING
   ========================================================================== */
section { padding: 12vh 0; position: relative; z-index: 10; }
.site-footer { padding: 5vh 0 2vh 0; position: relative; z-index: 20; background-color: var(--ghibli-dark); }
.footer-bottom { border-top: 1px solid var(--glass-border); padding-top: 2rem; margin-top: 3rem; text-align: center; opacity: 0.6; }

.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 4rem; }
.mb-5 { margin-bottom: 4rem; }
.pt-10 { padding-top: 6rem; }
.pb-10 { padding-bottom: 6rem; }
.pb-20 { padding-bottom: 10rem; }

/* ==========================================================================
   8. MOBILE RESPONSIVENESS MASTER PATCH
   ========================================================================== */
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large { grid-column: span 1; }
    .nav-list { display: none; }
}

@media (max-width: 768px) {
    section { padding: 8vh 0; }
    .container { padding: 0 1.5rem; }
    .massive-title { font-size: 2.2rem !important; line-height: 1.1; letter-spacing: -1px; }
    h2 { font-size: 2rem !important; }
    p { font-size: 1rem !important; }

    .header-inner { flex-direction: column; gap: 1rem; }
    .nav-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; padding-top: 0.5rem; }
    .nav-list a { font-size: 0.75rem; }
    .site-header { padding: 1rem; }
    .btn-premium { padding: 0.6rem 1.5rem; font-size: 0.75rem; }

    .page-hero.split-hero, .distribution-layout, .editorial-grid { grid-template-columns: 1fr !important; gap: 3rem; text-align: center; padding-top: 20vh; }
    .art-overlay-stats { flex-direction: column; bottom: -50px; gap: 0.5rem; }
    .dashboard-grid { grid-template-columns: 1fr; margin-top: 4rem; }
    .terminal-body { padding: 1rem; font-size: 0.75rem; }

    .toc-sticky-wrapper { position: relative; top: 0; margin-bottom: 2rem; text-align: left; }
    .drop-cap::first-letter { font-size: 3rem; padding-right: 10px; }

    .horizontal-scroll-section { height: auto !important; overflow: visible; }
    .horizontal-container { flex-direction: column; width: 100% !important; transform: none !important; }
    .journey-panel { width: 100vw; height: auto; min-height: 100vh; padding: 15vh 1.5rem; flex-direction: column; justify-content: center; }
    .panel-content { padding: 2rem; text-align: center; }
    .roadmap-list li { justify-content: center; text-align: left; font-size: 0.9rem; }
    .panel-art { position: relative; max-width: 90%; margin: 2rem auto 0; display: block; right: auto; bottom: auto; }

    .marquee-part { font-size: 1.2rem; }
    .cursor-dot, .cursor-outline { display: none !important; }
    body.custom-cursor-active, body.custom-cursor-active * { cursor: auto !important; }
}
/* ==========================================================================
   14. EPIC PRELOADER UPGRADE
   ========================================================================== */
.loader-mascot-container {
    margin-bottom: 1.5rem;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-cat {
    max-height: 80px;
    opacity: 0.8;
    filter: drop-shadow(0 0 15px var(--spirit-blue));
}

.terminal-loader-text {
    font-family: monospace;
    color: var(--spirit-blue);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    height: 20px; /* Prevents layout jumping */
    text-shadow: 0 0 5px rgba(139, 233, 253, 0.5);
}

.mono-text {
    font-family: monospace;
}
/* ==========================================================================
   14. THE $10K MAGICAL PRELOADER
   ========================================================================== */
.loader-wrapper {
    position: fixed; inset: 0; background: var(--ghibli-dark); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.loader-content {
    position: relative; display: flex; flex-direction: column; align-items: center;
    z-index: 2;
}

/* The magical summoning ring */
.magical-ring {
    position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%);
    width: 250px; height: 250px; border-radius: 50%;
    border: 2px dashed rgba(139, 233, 253, 0.3);
    animation: spin 15s linear infinite; pointer-events: none;
}

.magical-ring::before {
    content: ''; position: absolute; inset: -15px; border-radius: 50%;
    border: 1px solid rgba(255, 184, 108, 0.2);
    animation: spin-reverse 20s linear infinite;
}

.loader-mascot-container {
    width: 120px; height: 120px; margin-bottom: 2rem;
    display: flex; justify-content: center; align-items: center;
    position: relative; z-index: 10;
}

.loader-cat {
    max-width: 100%; max-height: 100%;
    filter: drop-shadow(0 0 25px rgba(139, 233, 253, 0.6));
    animation: float-loader 3s ease-in-out infinite;
    will-change: transform;
}

.loader-title {
    font-family: var(--font-display); font-size: 4rem; letter-spacing: 6px;
    color: var(--ghibli-light); margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(139, 233, 253, 0.5);
}

.loader-progress-container {
    width: 250px; height: 3px; background: rgba(255, 255, 255, 0.1);
    position: relative; overflow: hidden; border-radius: 50px;
    margin-bottom: 1.5rem;
}

.loader-progress-bar {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--spirit-blue), var(--firefly-gold));
    box-shadow: 0 0 15px var(--spirit-blue);
}

.loader-text-wrapper { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.loader-percentage {
    font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
    color: var(--ghibli-light); letter-spacing: 2px;
}

.terminal-loader-text {
    font-family: monospace; color: rgba(252, 247, 234, 0.6);
    font-size: 0.85rem; letter-spacing: 1px; height: 20px;
}

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }
@keyframes float-loader { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }