/* 1. 3D Parallax & Dynamic Glare */
.parallax-container {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    overflow: hidden;
    cursor: crosshair;
}
.parallax-card {
    width: 100%;
    height: 100%;
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}
.parallax-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.glare {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: overlay;
    z-index: 10;
}

/* 2. Apple-Style X-Ray Split Peel */
.split-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
    --split-pos: 50%;
}
.split-base, .split-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.split-base img, .split-overlay img {
    width: 100%; height: 100%;
    object-fit: cover;
}
/* X-Ray/Blueprint Effect for interior visualization */
.split-base img {
    filter: invert(1) opacity(0.8) sepia(1) hue-rotate(180deg) contrast(1.5);
}
.split-overlay {
    clip-path: polygon(0 0, var(--split-pos) 0, var(--split-pos) 100%, 0 100%);
}
.split-divider {
    position: absolute;
    top: 0; left: var(--split-pos);
    width: 40px; height: 100%;
    margin-left: -20px;
    cursor: ew-resize;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.split-handle {
    width: 4px;
    height: 60px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* 3. Macro Inspection Loupe & Radar Pins */
.loupe-wrapper {
    position: relative;
    width: 100%; height: 100%;
    overflow: hidden;
    cursor: none;
}
.loupe-wrapper > img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.loupe {
    position: absolute;
    width: 120px; height: 120px;
    border: 2px solid var(--clr-champagne);
    border-radius: 50%;
    background-repeat: no-repeat;
    background-size: 250%; /* Loupe Zoom Factor */
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    z-index: 10;
    transition: opacity 0.2s ease;
}
.radar-pin {
    position: absolute;
    width: 12px; height: 12px;
    background: var(--clr-champagne);
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(212, 196, 168, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(212, 196, 168, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 196, 168, 0); }
}
.radar-tooltip {
    position: absolute;
    bottom: 20px; left: 20px; right: 20px;
    background: rgba(24, 24, 24, 0.95);
    color: #fff;
    padding: 12px;
    font-size: 0.7rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 6;
    line-height: 1.4;
}
.radar-tooltip strong {
    color: var(--clr-champagne);
    font-size: 0.8rem;
    margin-bottom: 4px;
    display: inline-block;
}

/* 4. AI Chat Widget */
.chat-toggle {
    position: fixed; bottom: 30px; right: 30px;
    width: 60px; height: 60px; border-radius: 50%;
    background: #181818; color: #fff;
    border: none; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    cursor: pointer; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease;
}
.chat-toggle:hover { transform: scale(1.05); }
.chat-toggle svg { width: 28px; height: 28px; }

.chat-window {
    position: fixed; bottom: 100px; right: 30px;
    width: 350px; height: 500px;
    background: #F7F5F0; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 99; display: flex; flex-direction: column;
    overflow: hidden; opacity: 0; pointer-events: none;
    transform: translateY(20px); transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid #D4C4A8;
}
.chat-window.active {
    opacity: 1; pointer-events: all; transform: translateY(0);
}
.chat-header {
    background: #181818; color: #D4C4A8; padding: 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.chat-header h3 { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-style: italic; }
.chat-header button { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.chat-messages {
    flex: 1; padding: 20px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 15px;
}
.msg { max-width: 80%; padding: 12px 16px; border-radius: 12px; font-size: 0.85rem; line-height: 1.4; }
.msg.bot { background: #E5D3B3; color: #181818; align-self: flex-start; border-bottom-left-radius: 2px; }
.msg.user { background: #181818; color: #F7F5F0; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-input-area {
    padding: 15px; background: #fff; display: flex; gap: 10px; border-top: 1px solid rgba(0,0,0,0.05);
}
.chat-input-area input {
    flex: 1; padding: 12px; border: 1px solid #ccc; border-radius: 20px; outline: none; font-family: 'Inter', sans-serif;
}
.chat-input-area button {
    background: #181818; color: #D4C4A8; border: none; padding: 0 20px; border-radius: 20px; cursor: pointer; font-weight: 600;
}

/* 5. Mobile Nav Drawer */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; color: #181818; }
.mobile-menu-btn svg { width: 28px; height: 28px; }
@media (max-width: 768px) {
    .header-left { display: none; }
    .mobile-menu-btn { display: block; }
}
.nav-drawer {
    position: fixed; top: 0; left: -100%; width: 80%; max-width: 300px; height: 100vh;
    background: #F7F5F0; z-index: 1000; box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    transition: left 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex; flex-direction: column; padding: 40px;
}
.nav-drawer.open { left: 0; }
.drawer-close { align-self: flex-end; background: none; border: none; font-size: 2rem; cursor: pointer; margin-bottom: 40px;}
.nav-drawer a {
    font-size: 1.5rem; color: #181818; text-decoration: none; margin-bottom: 24px;
    font-family: 'Cormorant Garamond', serif; font-style: italic;
}
.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.active { opacity: 1; pointer-events: all; }
