/* --- Obsidian Systems: Ultra-Premium Aesthetic --- */
:root {
    --bg-main: #000000; /* Pure Black */
    --bg-card: rgba(15, 23, 42, 0.4); /* Very subtle slate glass */
    --accent: #f8fafc; /* Pure White as primary accent */
    --accent-hover: #cbd5e1;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

* { cursor: none !important; } /* Force custom cursor on absolutely everything */

/* --- Custom Cursor Follower --- */
.cursor-follower {
    position: fixed; top: 0; left: 0;
    width: 20px; height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%; pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: difference;
}
.cursor-follower.hover-active {
    width: 60px; height: 60px;
    background: rgba(255, 255, 255, 1);
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; font-weight: 300; letter-spacing: 1px; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }

/* --- Header --- */
.app-header {
    position: absolute; top: 0; left: 0; right: 0;
    padding: 2rem 0; z-index: 100;
}

.header-inner { display: flex; justify-content: space-between; align-items: center; }

.logo a { text-decoration: none; color: inherit; }
.logo h1 { font-size: 1.2rem; letter-spacing: 4px; font-weight: 600; text-transform: uppercase; }
.logo .accent { color: var(--text-muted); font-weight: 300; }

.nav-links a {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase;
    transition: color 0.3s; margin-left: 2rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-btn {
    border: 1px solid var(--glass-border); padding: 10px 20px;
    border-radius: 30px; display: inline-block;
}
.nav-btn:hover { background: rgba(255,255,255,0.1); }

/* --- Magnetic Button Utility --- */
.magnetic-btn { display: inline-block; transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); }

/* --- Scroll Reveal Utility --- */
.scroll-reveal { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* --- Landing Page (index.html) --- */
.hero-parallax {
    height: 100vh; position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; top: -10%; left: -10%; width: 120%; height: 120%;
    background-size: cover; background-position: center;
    z-index: 1; pointer-events: none;
    will-change: transform; /* Hardware acceleration for parallax */
}
.hero-overlay-dark {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,1) 100%);
}
.hero-content { position: relative; z-index: 3; text-align: center; }
.hero-content h1 { font-size: 6rem; line-height: 1; text-transform: uppercase; margin-bottom: 2rem; text-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.hero-content p { font-size: 1.5rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.reveal-text { opacity: 0; transform: translateY(30px); animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.link-arrow { color: var(--text-main); text-decoration: none; font-size: 1.1rem; border-bottom: 1px solid var(--text-main); padding-bottom: 5px; text-transform: uppercase; letter-spacing: 2px;}

/* --- Craftsmanship (craft.html) --- */
.craft-hero { height: 60vh; display: flex; align-items: flex-end; padding-bottom: 5rem; }
.huge-title { font-size: 8rem; line-height: 0.9; text-transform: uppercase; }

.craft-split {
    display: flex; align-items: center; min-height: 80vh;
    padding: 0 5%; margin-bottom: 10rem; gap: 5rem;
}
.craft-split.reverse { flex-direction: row-reverse; }
.craft-img { flex: 1; height: 600px; background-size: cover; background-position: center; border-radius: 8px; opacity: 0.6; transition: opacity 0.5s; will-change: opacity; }
.craft-split:hover .craft-img { opacity: 1; }
.craft-text { flex: 1; padding: 2rem; }
.craft-text h2 { font-size: 3rem; margin-bottom: 2rem; }
.craft-text p { font-size: 1.2rem; color: var(--text-muted); }

/* --- Gallery (gallery.html) --- */
.masonry-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem; padding-bottom: 5rem;
}
.masonry-item {
    position: relative; border-radius: 8px; overflow: hidden;
    cursor: none; aspect-ratio: 4/3;
}
.masonry-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.masonry-item:hover img { transform: scale(1.05); }
.item-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.4s;
}
.masonry-item:hover .item-overlay { opacity: 1; }
.item-overlay span { font-size: 1.5rem; font-family: 'Outfit'; font-weight: 600; transform: translateY(20px); transition: transform 0.4s; }
.masonry-item:hover .item-overlay span { transform: translateY(0); }

/* --- Advanced Builder (advanced-builder.html) --- */
.advanced-body { overflow: hidden; height: 100vh; display: flex; flex-direction: column; }
.advanced-layout { 
    display: grid; grid-template-columns: 250px 1fr 350px; gap: 2rem; 
    flex: 1; padding: 2rem; overflow: hidden;
}

.advanced-sidebar, .advanced-summary { 
    background: var(--bg-card); backdrop-filter: blur(10px); 
    border: 1px solid var(--glass-border); border-radius: 12px; 
    padding: 2rem; overflow-y: auto; 
}

.advanced-main { overflow-y: auto; padding-right: 1rem; }

.category-list { list-style: none; }
.category-list li { 
    padding: 1rem; margin-bottom: 0.5rem; border-radius: 8px; 
    cursor: none; transition: background 0.2s; color: var(--text-muted);
    display: flex; justify-content: space-between; align-items: center;
}
.category-list li:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.category-list li.active { background: rgba(255,255,255,0.1); color: var(--text-main); font-weight: 600; }
.category-list li.completed::after { content: '✓'; color: #10b981; }

.parts-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 1.5rem; margin-top: 2rem; padding-bottom: 5rem;
}

.part-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 1.5rem; cursor: none;
    transition: transform 0.2s, border-color 0.2s;
    display: flex; flex-direction: column; justify-content: space-between;
    opacity: 0; transform: translateY(20px); animation: staggerIn 0.5s ease-out forwards;
}

@keyframes staggerIn { to { opacity: 1; transform: translateY(0); } }

.part-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.3); }
.part-card.selected { border-color: var(--accent); background: rgba(255,255,255,0.05); }

.part-card img { width: 100%; height: 150px; object-fit: contain; margin-bottom: 1rem; mix-blend-mode: lighten; }
.part-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.part-card .specs { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }
.part-card .price { font-size: 1.25rem; font-weight: 600; font-family: 'Outfit'; }

.compat-warning { background: rgba(239, 68, 68, 0.1); border-left: 4px solid #ef4444; padding: 1rem; margin-top: 1rem; color: #fca5a5; font-size: 0.9rem; }

.summary-list { list-style: none; }
.summary-list li { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.summary-item-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.25rem; }
.summary-item-name { font-size: 0.9rem; font-weight: 500; }
.summary-item-price { font-size: 0.9rem; font-family: 'Outfit'; float: right; color: var(--text-muted); }

.perf-bar-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.perf-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); }

/* --- Modal & Invoice --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
    opacity: 0; transition: opacity 0.3s;
}
.invoice-container {
    width: 90%; max-width: 800px; background: var(--bg-main); padding: 3rem;
    position: relative; max-height: 90vh; overflow-y: auto;
    border: 1px solid var(--glass-border);
}
.close-btn {
    position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; 
    background: none; border: none; color: var(--text-muted); cursor: pointer;
}
.invoice-header { text-align: center; border-bottom: 2px solid var(--glass-border); padding-bottom: 2rem; margin-bottom: 2rem; }
.invoice-meta { display: flex; justify-content: space-between; margin-top: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.invoice-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.invoice-table th, .invoice-table td { padding: 1rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.invoice-totals { width: 300px; margin-left: auto; margin-bottom: 2rem; }
.invoice-totals .row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.invoice-totals .total { font-size: 1.5rem; font-weight: 600; font-family: 'Outfit'; color: var(--accent); border-top: 1px solid var(--glass-border); padding-top: 1rem; margin-top: 1rem; }

/* --- Accessibility (a11y) Focus States --- */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

@media (max-width: 1200px) {
    .advanced-layout { grid-template-columns: 1fr; overflow-y: auto; height: auto; }
    .advanced-body { overflow: auto; }
}

/* --- Print Stylesheet --- */
@media print {
    body * { visibility: hidden; }
    .invoice-container, .invoice-container * { visibility: visible; }
    .invoice-container { position: absolute; left: 0; top: 0; width: 100%; border: none; padding: 0; background: white; color: black; }
    .close-btn, #printBtn { display: none; }
    .invoice-table th, .invoice-table td { border-color: #ddd; }
}

/* --- Fullscreen Questionnaire (index.html) --- */
.fullscreen-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.questionnaire-container { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }

.q-slide {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; max-width: 1000px;
    text-align: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.q-slide.active { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.q-slide.exit-left { opacity: 0; transform: translate(-100%, -50%) scale(0.95); }
.q-slide.enter-right { opacity: 0; transform: translate(0%, -50%) scale(1.05); }

.q-title { font-size: 3.5rem; margin-bottom: 4rem; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.q-options { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }

.q-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 3rem 2rem; width: 300px; text-align: left;
    color: var(--text-main); cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s, border-color 0.4s;
}

.q-card:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}

.q-card h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.q-card p { color: var(--text-muted); font-size: 0.95rem; }
.price-hint { display: block; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted); letter-spacing: 1px;}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* --- Boutique Configurator (configurator.html) --- */
.config-body { height: 100vh; overflow: hidden; background: radial-gradient(circle at center, #111 0%, #000 100%); }

.boutique-layout {
    display: flex; height: 100vh; padding-top: 100px;
}

.boutique-visuals {
    flex: 2; position: relative;
    display: flex; align-items: center; justify-content: center;
}

.boutique-img {
    position: absolute; width: 80%; max-height: 80vh; object-fit: contain;
    opacity: 0; transition: opacity 0.8s ease-in-out, transform 0.8s ease-out;
    transform: scale(0.95);
}

.boutique-img.active { opacity: 1; transform: scale(1); z-index: 2; }

.boutique-controls {
    flex: 1; max-width: 500px; padding: 2rem 4rem 2rem 0;
    overflow-y: auto; display: flex; flex-direction: column; justify-content: center;
}

.config-title { font-size: 3rem; font-weight: 600; margin-bottom: 0.5rem; }
.config-desc { color: var(--text-muted); font-size: 1rem; margin-bottom: 2rem; }

.price-display { margin-bottom: 3rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 1.5rem; }
.price-display span { font-size: 2.5rem; font-weight: 300; font-family: 'Outfit', sans-serif;}

.config-section { margin-bottom: 3rem; }
.config-section h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 1.5rem; }

.color-options { display: flex; gap: 1.5rem; }
.color-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid transparent; cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.color-btn:hover { transform: scale(1.1); }
.color-btn.active { border-color: #fff; transform: scale(1.1); outline: 2px solid rgba(255,255,255,0.2); outline-offset: 4px; }

.tier-options { display: flex; flex-direction: column; gap: 1rem; }
.tier-btn {
    background: transparent; border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 1.5rem; text-align: left;
    color: var(--text-main); cursor: pointer; position: relative;
    transition: background 0.3s, border-color 0.3s;
}
.tier-btn:hover { border-color: rgba(255,255,255,0.3); }
.tier-btn.active { border-color: #fff; background: rgba(255,255,255,0.03); }
.tier-btn h4 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.tier-btn p { color: var(--text-muted); font-size: 0.85rem; }
.price-diff { position: absolute; right: 1.5rem; top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }

.btn-primary {
    background: #fff; color: #000; border: none;
    padding: 18px 0; width: 100%; border-radius: 8px;
    font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: opacity 0.2s, transform 0.2s;
    margin-top: 2rem;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }

.waitlist-note { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin-top: 1rem; }

@media (max-width: 1024px) {
    .boutique-layout { flex-direction: column; overflow-y: auto; padding-top: 80px; height: auto;}
    .boutique-visuals { min-height: 50vh; }
    .boutique-controls { padding: 2rem; max-width: 100%; }
}