/* =========================================
   CRAPTONGHOST GLOBAL ENGINE: BATCH 1
   ========================================= */

   @font-face {
    font-family: 'Cgtone';
    src: url('assets/fonts/cgtone.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 1. CORE VARIABLES & THEME STATE */
:root {
    /* Default: PULL MODE (Dark) */
    --bg-core: #0a0a0a;
    --text-primary: #f0f0f0;
    --text-muted: #888888;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-glow: #8961ff;
    --logo-path: url('assets/brand/logo-white.png');
    --blur-tier: blur(16px);
    --transition-fluid: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
--font-exec: 'Jost', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-impact: 'Syne', sans-serif;
    --font-identity: 'Cgtone', sans-serif;
}

[data-theme="shine"] {
    /* SHINE MODE (Light) */
    --bg-core: #fafafa;
    --text-primary: #0a0a0a;
    --text-muted: #555555;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.08);
    --logo-path: url('assets/brand/logo-black.png');
}

/* 2. BASE PHYSICS & RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-core);
    color: var(--text-primary);
    font-family: var(--font-body); /* Placeholder until custom font */
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--transition-fluid), color var(--transition-fluid);
}

/* 3. HARDWARE FALLBACK LAYER */
.hw-accel-off .liquid-glass {
    backdrop-filter: none;
    background-color: var(--bg-core);
    border: 1px solid var(--glass-border);
}

/* 4. LIQUID GLASS COMPONENTS */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-tier);
    -webkit-backdrop-filter: var(--blur-tier);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.03); /* The Frosting */
}

[data-theme="shine"] .liquid-glass {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.03);
}

/* 5. GLOBAL HEADER & ASCENSION ANCHOR */
.terminal-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    transition: all var(--transition-fluid);
}

.terminal-header.imploded {
    width: 50px;
    height: 50px;
    top: 10px;
    left: 10px;
    transform: translateX(0);
    border-radius: 25px;
    padding: 0;
    justify-content: center;
}

.brand-logo {
    width: 120px;
    height: 40px;
    background-image: var(--logo-path);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.3s ease;
}

.imploded .brand-logo, .imploded .nav-nodes {
    display: none;
}

/* 6. INTERACTION & ANOMALY TARGETS */
.anomaly-glow {
    box-shadow: 0 0 15px var(--accent-glow);
    border-color: var(--accent-glow);
}

/* 7. HORIZONTAL TIER MATRIX (SKELETON) */
.tier-container {
    display: flex;
    width: 100%;
    height: 70vh;
    gap: 10px;
    padding: 20px;
    margin-top: 100px;
}

.tier-pillar {
    flex: 1;
    transition: flex var(--transition-fluid);
    overflow: hidden;
    cursor: pointer;
}

.tier-pillar.expanded {
    flex: 8;
}

.tier-pillar.compressed {
    flex: 0.5;
}

/* 8. KINETIC WELCOME LAYOUT */
.welcome-layout {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 40px;
    text-align: center;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 320px;
    opacity: 1;
}

.welcome-title {
    font-family: var(--font-exec);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin: 0;
}

.welcome-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
}

.welcome-sub {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.btn-dismiss {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: inherit;
    font-family: var(--font-exec);
    font-weight: 800;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.btn-dismiss:hover {
    opacity: 1;
}

/* 9. CAPSULE HUB & DIAMOND NAVIGATION */

.nav-nodes {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-exec);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-diamond {
    width: 6px;
    height: 6px;
    border: 1px solid var(--text-primary);
    transform: rotate(45deg);
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

/* Active State Trigger */
.nav-link.active .nav-diamond {
    opacity: 1;
    background-color: var(--accent-glow);
    border-color: var(--accent-glow);
}

.nav-link:hover .nav-diamond {
    opacity: 0.5;
}

/* The Utility Pill */
.capsule-hub {
    display: flex;
    align-items: center;
    border-radius: 30px;
    padding: 4px 8px;
    height: 36px;
}

.capsule-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.2s ease;
}

.capsule-btn:hover {
    color: var(--accent-glow);
    transform: scale(1.05);
}

.capsule-divider {
    width: 1px;
    height: 14px;
    background-color: var(--glass-border);
    margin: 0 4px;
}


/* 10. KINETIC WELCOME TIMELINE */
.welcome-body, .welcome-sub {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.state-rgb-pulse .welcome-title {
    animation: rgbPulse 2s infinite alternate;
}

.state-body-glow .welcome-body,
.state-sub-glow .welcome-sub {
    opacity: 1;
    transform: translateY(0);
}

.state-exit-blink .btn-dismiss {
    animation: exitBlink 0.3s 3 forwards;
    color: var(--accent-glow);
}

@keyframes rgbPulse {
    0% { text-shadow: 0 0 10px transparent; }
    100% { text-shadow: 0 0 20px rgba(137, 97, 255, 0.4); }
}

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

/* 11. ANOMALY 8 (THE PATIENCE STENCIL) */
.brand-logo {
    width: 120px;
    height: 40px;
    background-color: var(--text-primary);
    -webkit-mask-image: var(--logo-path);
    mask-image: var(--logo-path);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-image: none !important; /* Overrides Phase 1 */
    position: relative;
    cursor: crosshair; /* Kept strictly on the target */
    touch-action: none; /* Prevents mobile OS hijacking */
    user-select: none;
    transition: background-color var(--transition-fluid);
}

/* The Viscous Vertical Fill */
.brand-logo::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0%;
    background: var(--accent-glow);
    transition: height 0.5s ease-out; /* Drains back down if released early */
    z-index: 1;
    pointer-events: none;
}

.brand-logo.holding::before {
    height: 100%;
    transition: height 5s linear; /* 5s fill sequence */
}

/* Identity Alignment */
.brand-logo.anomaly-8-revealed {
    -webkit-mask-image: none;
    mask-image: none;
    background-color: transparent;
    width: max-content;
}

.cgtone-stack {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center alignment */
    justify-content: center;
    font-family: var(--font-identity);
    font-size: 1.6rem;
    line-height: 0.8;
    color: var(--text-primary);
    animation: radialRipple 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    cursor: pointer;
}

.cgtone-stack sup {
    font-size: 0.5rem;
    vertical-align: super;
    color: var(--text-muted);
    margin-left: 4px;
}

@keyframes radialRipple {
    0% { filter: blur(10px); transform: scale(0.9); opacity: 0; }
    100% { filter: blur(0); transform: scale(1); opacity: 1; }
}

