:root {
    --terracotta: #C84B31;
    --blue: #1E3A8A;
    --olive: #4A5D23;
    --saffron: #F4B41A;
    --text-light: #FFF8F0;
    --text-dark: #2D3748;
    --dark-bg: #0F0F11;
    --accent: #F4B41A;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-light);
    overflow-x: hidden;
    background-color: var(--terracotta);
}

.text-dark { color: var(--text-dark) !important; }
.text-blue { color: var(--blue) !important; }
.text-olive { color: var(--olive) !important; }
.text-saffron { color: var(--text-dark) !important; }

/* Lang Toggle */
.lang-toggle {
    position: fixed; top: 2rem; right: 2rem; z-index: 999;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem; border-radius: 50px;
    font-weight: 800; border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.lang-btn { cursor: pointer; opacity: 0.4; transition: all 0.3s; }
.lang-btn.active { opacity: 1; color: var(--accent); }
.lang-btn:hover { opacity: 0.8; }

/* Typography */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 900; margin-bottom: 1rem; line-height: 1.1; }
h1 { font-size: clamp(4rem, 7vw, 7rem); }
h2 { font-size: clamp(3rem, 5vw, 5rem); }
p { font-size: clamp(1.1rem, 1.3vw, 1.5rem); line-height: 1.6; font-weight: 400; opacity: 0.9; }

#global-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: var(--terracotta); z-index: -2; transition: background-color 0.8s ease;
}

.panel {
    position: relative; min-height: 100vh; width: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 10% 5%; z-index: 1;
}

.content-wrapper { max-width: 1400px; width: 100%; position: relative; z-index: 2; }

/* PRO UI Layout */
.pro-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

@media (max-width: 1000px) {
    .pro-layout { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
    .pro-layout.reverse .pro-text { order: 2; }
    .pro-layout.reverse .pro-visual { order: 1; }
    .pro-logo { margin: 0 auto 1rem auto !important; }
}

.pro-logo {
    max-width: 400px;
    width: 100%;
    margin-bottom: 1rem;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.4));
}

.center-logo {
    margin: 0 auto 2rem auto;
    display: block;
    max-width: 500px;
}

.main-logo { max-width: 500px; margin: 0 auto 2rem auto; display: block; }

.pro-subtitle {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 5px;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.pro-desc { margin-bottom: 3rem; }

/* Pro Masked Images (The Nano-Banana treatment) */
.masked-image-container {
    width: 100%;
    height: 70vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.masked-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Create a gorgeous soft fading edge to eliminate harsh JPG borders */
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 70%);
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 70%);
    filter: contrast(1.1) brightness(1.1);
}

/* 3D Book Presentation */
.book-presentation {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
}

.book-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(-20px 20px 30px rgba(0,0,0,0.6));
    transition: transform 0.6s;
}

.glow-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.bounce-hover:hover { transform: scale(1.05); }
.float-hover:hover { transform: translateY(-20px) rotate(-2deg); }
.map-hover:hover { transform: scale(1.05) rotate(3deg); }

/* Pro Buttons */
.pro-btn {
    background: var(--text-light);
    color: var(--terracotta);
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    font-family: var(--font-body);
    font-weight: 900;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pro-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    background: #FFF;
}

.pulse-btn { animation: pulseGlow 3s infinite alternate; }
@keyframes pulseGlow {
    0% { box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
    100% { box-shadow: 0 20px 60px rgba(255,255,255,0.4); }
}

/* Quest Stats */
.quest-stats-grid {
    display: flex; gap: 2rem; margin-bottom: 3rem;
}
.stat-item {
    font-size: 1.5rem; font-weight: 800; color: var(--text-light);
    background: rgba(0,0,0,0.2); padding: 1rem 2rem; border-radius: 15px;
}
@media (max-width: 1000px) { .quest-stats-grid { justify-content: center; } }

.text-center { text-align: center; margin: 0 auto; max-width: 1000px; }
.scroll-indicator {
    margin-top: 5rem; display: flex; flex-direction: column; align-items: center;
    animation: bounce 2s infinite; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
}
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} }
.arrow-down { width: 15px; height: 15px; border-right: 3px solid white; border-bottom: 3px solid white; transform: rotate(45deg); margin-top: 15px; }

/* Side Drawers */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px);
    display: block; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content.dark-theme {
    background: var(--dark-bg); color: var(--text-light);
    padding: 5rem 4rem; height: 100vh; width: 100%; max-width: 550px;
    position: absolute; top: 0; right: 0; transform: translateX(100%) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -20px 0 50px rgba(0,0,0,0.5); overflow-y: auto; border-left: 1px solid rgba(255,255,255,0.1);
}
.modal-overlay.active .modal-content { transform: translateX(0); }

.close-modal {
    position: absolute; top: 2rem; right: 2.5rem; background: rgba(255,255,255,0.1);
    border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 2rem;
    cursor: pointer; color: #FFF; transition: all 0.3s;
}
.close-modal:hover { background: var(--terracotta); transform: rotate(90deg) scale(1.1); }

.drawer-logo { max-width: 150px; margin-bottom: 2rem; opacity: 0.9; }
.modal-body h3 { color: #FFF; font-size: 2.5rem; text-transform: uppercase; }
.price-tag { color: var(--accent); font-size: 2rem; font-family: var(--font-heading); font-weight: 900; margin-bottom: 1.5rem; }
.sales-pitch { font-size: 1.2rem; color: #DDD; margin-bottom: 2.5rem; }

.specs-box {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem; border-radius: 15px; margin-bottom: 3rem;
}
.specs-box strong { display: block; color: var(--accent); margin-bottom: 1rem; letter-spacing: 2px; }
.specs-box ul { list-style: none; }
.specs-box ul li { margin-bottom: 0.8rem; position: relative; padding-left: 1.5rem; color: #DDD; }
.specs-box ul li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); }

.timeline-box { margin-bottom: 3rem; }
.timeline-box h4 { color: var(--accent); margin-bottom: 1.5rem; letter-spacing: 2px; }
.timeline-item { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; align-items: center; }
.timeline-item .time { background: rgba(255,255,255,0.1); padding: 0.5rem 1rem; border-radius: 8px; font-weight: 900; color: #FFF; }
.timeline-item .desc { color: #CCC; font-size: 1.1rem; font-weight: 600;}

.checkout-btn {
    background: var(--terracotta); color: white; border: none; padding: 1.5rem;
    font-size: 1.2rem; font-weight: 900; letter-spacing: 2px; width: 100%;
    box-shadow: 0 10px 30px rgba(200, 75, 49, 0.4); border-radius: 50px; cursor: pointer; transition: all 0.3s;
}
.checkout-btn:hover { background: #FF5A36; transform: translateY(-3px); box-shadow: 0 15px 40px rgba(255, 90, 54, 0.6); }

/* Physics & Canvases */
#tifinagh-canvas, #matter-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#matter-canvas { pointer-events: auto; }
.floating-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.particle { position: absolute; background: rgba(255,255,255,0.4); border-radius: 50%; }
.compass-container {
    position: absolute; top: 15%; right: 5%; width: 250px; height: 250px;
    border: 2px dashed rgba(255,255,255,0.3); border-radius: 50%; display: flex; justify-content: center; align-items: center; pointer-events: none; opacity: 0.5;
}
.compass-needle { width: 4px; height: 150px; background: linear-gradient(to bottom, var(--accent) 50%, white 50%); border-radius: 4px; transition: transform 0.1s; }
