@charset "UTF-8";

/* =========================================================================
   1. VARIABLES & BASE SETUP (Minimalist Descent)
   ========================================================================= */
:root {
    /* Fonts (Core Signal & System Auxiliary) */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Depths Colors */
    --color-depth1-bg: #FFFFFF;
    --color-depth1-fg: #1F1F23;
    --color-depth1-accent: #0A0A0C;

    --color-depth2-bg: #6E7075;
    --color-depth2-fg: #F1F1F3;
    --color-depth2-accent: #000000;

    --color-depth3-bg: #0A0A0C;
    --color-depth3-fg: #D4D5D9;
    --color-depth3-accent: #FFFFFF;

    /* Base Colors */
    --bg-color: var(--color-depth1-bg);
    --txt-color: var(--color-depth1-fg);
    --accent-color: var(--color-depth1-accent);

    --transition-speed: 1s;
    --nav-width: 120px;
}

/* Base Body Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    background-color: var(--bg-color);
    color: var(--txt-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

body.no-scroll {
    overflow: hidden;
}

/* Thematic Overrides controlled by JS */
body.depth-1 {
    --bg-color: var(--color-depth1-bg);
    --txt-color: var(--color-depth1-fg);
    --accent-color: var(--color-depth1-accent);
}

body.depth-2 {
    --bg-color: var(--color-depth2-bg);
    --txt-color: var(--color-depth2-fg);
    --accent-color: var(--color-depth2-accent);
}

body.depth-3 {
    --bg-color: var(--color-depth3-bg);
    --txt-color: var(--color-depth3-fg);
    --accent-color: var(--color-depth3-accent);
}

a {
    color: inherit;
    text-decoration: none;
    position: relative;
    outline: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    background: none;
    border: none;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    outline: none;
}


/* =========================================================================
   2. UI LAYERS (Title, Pulse, Nav, Footer)
   ========================================================================= */
.ui-layer {
    position: fixed;
    z-index: 100;
    pointer-events: none;
}

.ui-layer a,
.ui-layer button,
.ui-layer h1 {
    pointer-events: auto;
}

/* Splash Screen Setup */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease, background-color var(--transition-speed) ease;
}

#splash-screen:not(.splash-active) {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Left Navigation Rail (System Auxiliary) */
.side-nav {
    top: 55%;
    left: 1.5rem;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.side-nav a {
    opacity: 0.4;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--txt-color);
    padding: 0.5rem 0.5rem;
    display: inline-flex;
    align-items: center;
    border-radius: 2px;
}

.side-nav a::before {
    content: '>';
    margin-right: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.side-nav a:hover,
.side-nav a.active {
    opacity: 1;
    color: var(--bg-color) !important;
    background-color: var(--txt-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.side-nav a:hover::before,
.side-nav a.active::before {
    opacity: 1;
    transform: translateX(0);
}

.side-nav a.active::before {
    content: '[ ';
    margin-right: 0;
}

.side-nav a.active::after {
    content: ' ]';
    opacity: 0.5;
}

/* Top Left Title (Core Signal) */
.top-header {
    position: absolute;
    top: 2rem;
    left: var(--nav-width);
    z-index: 101;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    cursor: pointer;
    opacity: 1;
    text-transform: uppercase;
    /* Boxed Design */
    border: 2px solid var(--txt-color);
    padding: 0.6rem 1.2rem;
    display: inline-block;
    background: transparent;
    transition: all 0.3s ease;
}

.main-title:hover {
    background: var(--txt-color);
    color: var(--bg-color) !important;
}

/* Top Right Pulse Indicator (System Auxiliary) */
.top-right-indicator {
    position: absolute;
    /* Allows scrolling with content */
    top: 2rem;
    right: 2rem;
}

/* Store link state */
.nav-link[data-target="store"].active .store-subtext {
    opacity: 1;
}

/* Store Navigation Block Vibration (Legacy error state) */
.error-vibrate {
    animation: errorShake 0.3s cubic-bezier(.36, .07, .19, .97) both;
    color: red !important;
    /* visually indicate error state */
}

@keyframes errorShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.pulse-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    opacity: 0.8;
}

.waveform-svg {
    width: 80px;
    height: 20px;
    margin-top: 4px;
    overflow: visible;
}

.pulse-line {
    stroke: var(--txt-color);
    stroke-width: 1.5px;
    /* Create a dash exactly the length of one half-cycle (50px on the 100px SVG) */
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    /* Animate just the offset to draw the line continuously */
    animation: slidePulse 1.5s linear infinite;
}

@keyframes slidePulse {
    0% {
        stroke-dashoffset: 100;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -100;
    }
}

/* Bottom Footer (System Auxiliary) */
.bottom-footer {
    position: fixed;
    bottom: 2rem;
    left: 1.5rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.social-icon {
    opacity: 0.5;
    transition: opacity 0.3s;
}

.social-icon:hover {
    opacity: 1;
    border-bottom: 1px solid var(--txt-color);
}

.mute-toggle {
    opacity: 0.5;
    transition: all 0.3s;
    text-transform: uppercase;
    border: 1px solid var(--txt-color);
    padding: 0.5rem 1rem;
    background: transparent;
}

.mute-toggle:hover {
    opacity: 1;
    background: var(--txt-color);
    color: var(--bg-color);
}

/* =========================================================================
   3. CYBER DUST (Background Particles)
   ========================================================================= */
#bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.dust {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: var(--txt-color);
    opacity: 0;
    animation: blinkDust var(--dust-dur, 4s) step-end infinite;
}

@keyframes blinkDust {
    0% {
        opacity: 0;
        transform: scale(0.5) translate(0, 0);
    }

    10% {
        opacity: 0.8;
        transform: scale(1.5) translate(1px, -1px);
    }

    20% {
        opacity: 0;
        transform: scale(0.5) translate(2px, -2px);
    }

    100% {
        opacity: 0;
    }
}

/* =========================================================================
   4. PAGE CONTENTS (SPA Views)
   ========================================================================= */
#app-container {
    position: relative;
    z-index: 50;
    padding: 10rem 5vw 10vh calc(var(--nav-width) + 8vw);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: opacity 0.5s ease;
}

.view-section {
    width: 100%;
    max-width: 1000px;
    animation: fadeIn 1s ease forwards;
}

.section-title {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    opacity: 0.6;
    text-transform: uppercase;
}

.section-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 4rem;
    max-width: 600px;
    line-height: 1.6;
}

/* Brutalist Inline Navigation Buttons */
.nav-btn-brutalist {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0;
    width: max-content;
    border-bottom: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-btn-brutalist::before {
    content: '>';
    margin-right: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.nav-btn-brutalist:hover {
    color: var(--bg-color);
    background: var(--txt-color);
    padding: 0.5rem 1rem;
    border-radius: 2px;
}

.nav-btn-brutalist:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Small image galleries for sections */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background-color: rgba(128, 128, 128, 0.2);
    border: 1px solid rgba(128, 128, 128, 0.2);
}

.gallery-item {
    aspect-ratio: 4/5;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.03);
    opacity: 1;
}

.btn-outline {
    border: 1px solid var(--txt-color);
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.btn-outline:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================================
   5. LIQUID MORPH TRANSITION OVERLAY
   ========================================================================= */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    pointer-events: all;
    cursor: wait;
}

#transition-overlay.hidden {
    display: none;
}

.liquid-container {
    width: 100%;
    height: 100%;
    position: absolute;
    filter: url('#goo');
    /* SVG filter for organic liquid meld */
}

/* The central seep shape utilizing custom border-radius properties to mimic water/amorphous shapes */
.color-seep {
    width: 10px;
    height: 10px;
    background-color: var(--target-bg, #000);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0;
}

.seep-active .color-seep {
    animation: liquidMorphSeep 2.5s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes liquidMorphSeep {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    50% {
        width: 100vw;
        height: 100vh;
        opacity: 1;
        border-radius: 60% 30% 50% 70% / 50% 60% 30% 60%;
    }

    100% {
        width: 300vw;
        height: 300vw;
        opacity: 1;
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

/* Persistent Liquid Bubbles */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    position: absolute;
    left: 50%;
    top: 50%;
    background-color: var(--target-bg, #000);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    /* amorphous bubble */
    transform: translate(-50%, -50%);
}

@keyframes explodeOutLinger {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        opacity: 1;
        border-radius: 50%;
    }

    20% {
        transform: translate(calc(var(--tx, 0) * 0.4), calc(var(--ty, 0) * 0.4)) scale(2.5) rotate(60deg) skewX(10deg);
        opacity: 1;
        border-radius: 60% 40% 70% 30% / 40% 60% 30% 70%;
    }

    60% {
        transform: translate(calc(var(--tx, 0) * 0.9), calc(var(--ty, 0) * 0.9)) scale(8) rotate(180deg) skewY(-15deg);
        opacity: 0.9;
        border-radius: 20% 80% 30% 70% / 80% 20% 70% 30%;
    }

    80% {
        transform: translate(calc(var(--tx, 0) * 1.2), calc(var(--ty, 0) * 1.2)) scale(3) rotate(240deg);
        opacity: 0.5;
        border-radius: 80% 20% 60% 40% / 30% 70% 40% 60%;
    }

    100% {
        transform: translate(calc(var(--tx, 0) * 1.5), calc(var(--ty, 0) * 1.5)) scale(0) rotate(360deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* =========================================================================
   6. HAMBURGER BUTTON & MOBILE MENU OVERLAY
   ========================================================================= */

/* Desktop: hide hamburger and overlay completely */
#hamburger-btn {
    display: none;
}

#mobile-menu-overlay {
    display: none;
}

/* =========================================================================
   7. RESPONSIVE MOBILE LAYOUT
   ========================================================================= */
@media (max-width: 768px) {

    /* --- Hamburger Button --- */
    #hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: fixed;
        top: 1.2rem;
        left: 1.2rem;
        width: 22px;
        height: 16px;
        z-index: 10000;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    #hamburger-btn span {
        display: block;
        width: 100%;
        height: 1.5px;
        background: var(--txt-color);
        transition: all 0.3s ease;
    }

    #hamburger-btn.open span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    #hamburger-btn.open span:nth-child(2) {
        opacity: 0;
    }

    #hamburger-btn.open span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    /* --- Mobile Menu Overlay --- */
    #mobile-menu-overlay {
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--bg-color);
        z-index: 9998;
        padding: 3rem 2rem 2rem 2rem;
        box-sizing: border-box;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        pointer-events: none;
    }

    #mobile-menu-overlay.open {
        transform: translateX(0);
        pointer-events: all;
    }

    #mobile-menu-close {
        position: absolute;
        top: 1.2rem;
        right: 1.5rem;
        font-family: var(--font-mono);
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        opacity: 0.5;
        background: none;
        border: none;
        color: var(--txt-color);
        cursor: pointer;
    }

    #mobile-menu-close:hover {
        opacity: 1;
    }

    #mobile-menu-overlay nav ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    #mobile-menu-overlay nav a {
        font-family: var(--font-heading);
        font-size: 2rem;
        font-weight: 900;
        letter-spacing: -0.02em;
        color: var(--txt-color);
        opacity: 0.5;
        text-decoration: none;
        transition: opacity 0.3s, color 0.3s;
        display: block;
    }

    #mobile-menu-overlay nav a:hover,
    #mobile-menu-overlay nav a.active {
        opacity: 1;
        color: var(--accent-color);
    }

    .mobile-menu-footer {
        margin-top: 3rem;
        display: flex;
        gap: 2rem;
        align-items: center;
        border-top: 1px solid var(--txt-color);
        padding-top: 1.5rem;
        opacity: 0.7;
    }

    /* --- Desktop elements hidden on Mobile --- */
    .side-nav {
        display: none !important;
    }

    .bottom-footer {
        display: none !important;
    }

    .top-header {
        left: 3.5rem;
        z-index: 200;
    }

    .main-title {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    /* App Container expands full width */
    #app-container {
        margin-left: 0;
        padding: 7rem 1.2rem 4rem 1.2rem;
    }
}