@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
    --white: #ffffff;
    --black: #0a0a0b;
    --border: #e5e7eb;
    --accent: #6e00ff;
    --grid-color: rgba(110, 0, 255, 0.08);
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & GLOBAL (FIXED) --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    background: var(--white); 
    color: var(--black); 
    font-family: var(--font-main); 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased; 
    background: radial-gradient(circle at center, #ffffff 0%, #ebebef 100%);
}

/* --- HUD FRAME FIX (Moved to clear header buttons) --- */
.hud-frame { position: fixed; inset: 0; pointer-events: none; z-index: 2000; }
.hud-corner {
    position: absolute; font-family: var(--font-mono); font-size: 8px; 
    color: #bbb; letter-spacing: 2px; text-transform: uppercase;
}
.top-l { top: 40px; left: 40px; }
.top-r { top: 40px; right: 40px; }
.bot-l { bottom: 40px; left: 40px; }
.bot-r { bottom: 40px; right: 40px; }

/* --- OVERLAYS --- */
.noise-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 9999; background: url('https://grainy-gradients.vercel.app/noise.svg'); opacity: 0.04; }
.scanline { position: fixed; inset: 0; pointer-events: none; z-index: 9998; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.01) 50%, transparent); background-size: 100% 4px; }

/* --- VOID BACKGROUND --- */
.devoid-void-container { position: fixed; inset: 0; z-index: -1; overflow: hidden; perspective: 1000px; }
.devoid-grid {
    position: absolute; width: 200%; height: 200%; top: -50%; left: -50%;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px; transform: rotateX(60deg);
}
.void-fog { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 20%, var(--white) 80%); }

/* --- STARS --- */
.star-container { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.shooting-star { position: absolute; width: 1.5px; height: 180px; background: linear-gradient(to bottom, transparent, #000, transparent); transform: rotate(35deg); opacity: 0; }
@keyframes shoot { 0% { transform: rotate(35deg) translateY(-300px); opacity: 0; } 10% { opacity: 0.8; } 100% { transform: rotate(35deg) translateY(120vh); opacity: 0; } }

/* --- HEADER FIX (TRUE CENTER & EDGES) --- */
.header { 
    position: fixed; top: 0; width: 100%; z-index: 1500; 
    background: transparent; transition: 0.4s var(--ease);
}
.header.scrolled { background: rgba(255,255,255,0.8) !important; backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }

.header-inner { 
    width: 100%; height: 100px; 
    display: grid; grid-template-columns: 1fr auto 1fr; 
    align-items: center; padding: 0 40px; 
}
.nav-block { display: flex; gap: 15px; align-items: center; }
.nav-block.right { justify-content: flex-end; }
.logo { font-size: 1.4rem; font-weight: 900; letter-spacing: -2.2px; text-align: center; text-transform: uppercase; padding: 0 20px; }

.nav-item { 
    text-decoration: none; color: var(--black); font-size: 11px; font-weight: 700; 
    text-transform: uppercase; font-family: var(--font-mono); white-space: nowrap;
    border: 1px solid var(--black); padding: 10px 18px; background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s var(--ease);
}
.nav-item:hover { background: var(--black); color: var(--white); box-shadow: 4px 4px 0px var(--accent); transform: translate(-2px, -2px); }

/* --- HERO SECTION (FIXED SIZING) --- */
.hero { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    padding: 100px 40px 0; /* padding-top clears the fixed header */
    perspective: 1000px; 
    overflow: hidden;
}
.hero-container { 
    display: grid; grid-template-columns: 1.2fr 1fr; 
    max-width: 1400px; margin: 0 auto; width: 100%;
    gap: 40px; align-items: center; 
}
.hero-visual { display: flex; justify-content: center; align-items: center; position: relative; }
.hero-title { font-size: clamp(3rem, 10vw, 8rem); line-height: 0.8; letter-spacing: -5px; margin-bottom: 20px; }
.hero-hat { 
    width: 100%; 
    max-width: 650px; /* Constrains the hat from getting too huge */
    height: auto; 
    filter: drop-shadow(0 40px 80px rgba(0,0,0,0.15));
    transition: transform 0.1s ease-out;
}

/* --- SHOP GRID --- */
.featured-archive { padding: 100px 40px; }
.featured-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1400px; margin: 0 auto; }
.spec-card { border: 1px solid var(--border); background: var(--white); transition: 0.6s var(--ease); overflow: hidden; cursor: pointer; position: relative; }
.spec-card:hover { border-color: var(--black); transform: translateY(-10px); }
.spec-image-box { aspect-ratio: 1; background: #fbfbfb; display: flex; align-items: center; justify-content: center; position: relative; }
.archive-img { width: 75%; transition: 1s var(--ease); }

/* --- SOLD OUT --- */
.spec-card.sold-out { filter: grayscale(1); opacity: 0.7; pointer-events: none; }
.sold-out-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); background: var(--black); color: #fff; padding: 5px 15px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px; z-index: 10; border: 1px solid #fff; white-space: nowrap; font-weight: 700; }

.card-details { padding: 30px; }
.spec-title { font-size: 14px; font-weight: 900; text-transform: uppercase; margin-bottom: 20px; }
.spec-action { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 20px; }

.acquire-btn { background: var(--black); color: var(--white); padding: 15px 30px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; border: none; cursor: pointer; transition: 0.3s var(--ease); }
.acquire-btn:hover { background: var(--accent); }

/* --- MANIFESTO (CENTERED) --- */
.manifesto-archival { position: relative; padding: 200px 40px; display: flex; justify-content: center; align-items: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; overflow: hidden; }
.manifesto-inner { position: relative; z-index: 2; max-width: 1000px; width: 100%; }
.manifesto-text { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -2px; margin-bottom: 25px; text-align: left; text-transform: uppercase; font-weight: 900; }
.manifesto-signature { font-family: var(--font-mono); font-size: 10px; color: #bbb; letter-spacing: 4px; text-transform: uppercase; }
.manifesto-grid-bg { position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(to right, var(--grid-color) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px); background-size: 45px 45px; transform: perspective(1000px) rotateX(25deg) scale(1.2); mask-image: radial-gradient(ellipse at center, black, transparent 85%); }

/* --- FOOTER --- */
.system-footer { border-top: 1px solid var(--border); padding: 100px 40px 60px; text-align: center; background: #fff; }
.footer-container { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; text-align: left; }
.col-label { display: block; font-family: var(--font-mono); font-size: 10px; color: #999; margin-bottom: 20px; letter-spacing: 2px; }
.f-link { text-decoration: none; color: var(--black); font-size: 13px; display: block; margin-bottom: 10px; }
.system-box { background: #f9f9f9; padding: 30px; border: 1px solid var(--border); font-family: var(--font-mono); font-size: 10px; }
.status-ok { color: #00ff00; font-weight: 700; }
.activity-bar { width: 100%; height: 2px; background: #eee; margin-top: 15px; position: relative; overflow: hidden; }
.bar-fill { width: 30%; height: 100%; background: var(--black); position: absolute; animation: activity 2s infinite linear; }
@keyframes activity { 0% { left: -30%; } 100% { left: 100%; } }

/* --- AESTHETIC TERMINAL CART --- */
.cart-overlay { 
    position: fixed; 
    top: 0; 
    right: -100%; 
    width: 450px; 
    height: 100%; 
    background: rgba(255, 255, 255, 0.8); /* Frosted Glass */
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    z-index: 3000; 
    transition: 0.8s var(--ease); 
    border-left: 1px solid var(--black); 
    display: flex; 
    flex-direction: column;
    box-shadow: -20px 0 60px rgba(0,0,0,0.05);
}

.cart-overlay.active { right: 0; }

.cart-header { 
    background: var(--black); 
    color: white; 
    padding: 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.cart-title { 
    font-family: var(--font-mono); 
    font-size: 10px; 
    letter-spacing: 4px; 
    font-weight: 700;
}

#cart-items-wrapper { 
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 40px; 
}

/* Custom Scrollbar for the Bag */
#cart-items-wrapper::-webkit-scrollbar { width: 2px; }
#cart-items-wrapper::-webkit-scrollbar-thumb { background: var(--black); }

.cart-item { 
    display: grid; 
    grid-template-columns: 80px 1fr auto; 
    gap: 20px; 
    margin-bottom: 30px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    align-items: center; 
}

.cart-item img { 
    width: 100%; 
    aspect-ratio: 1;
    object-fit: contain;
    background: #f9f9f9;
    border: 1px solid #eee;
}

.cart-item h4 { 
    font-size: 12px; 
    text-transform: uppercase; 
    margin-bottom: 5px; 
    letter-spacing: -0.5px;
}

.cart-footer-block { 
    padding: 40px; 
    border-top: 1px solid var(--black); 
    background: rgba(255, 255, 255, 0.5);
}

.cart-total-row { 
    display: flex; 
    justify-content: space-between; 
    font-family: var(--font-mono); 
    font-size: 14px; 
    margin-bottom: 25px; 
    font-weight: 700;
}

.checkout-btn {
    width: 100%;
    background: var(--black);
    color: white;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.checkout-btn:hover { background: var(--accent); }

/* REVEALS */
.reveal { opacity: 0; transform: translateY(30px); transition: 1s var(--ease); }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) { .featured-container, .footer-container, .hero-container { grid-template-columns: 1fr; } .cart-overlay { width: 100%; } .header-inner { grid-template-columns: 1fr auto; } .nav-block.left { display: none; } }