/* Base Variables & Reset */
:root {
    --primary: #FFD166;
    --bg-dark: #08141f;
    --bg-gradient: linear-gradient(135deg, #08141f, #0d2234, #133c55);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-light: #f1f1f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Kufi Arabic', sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-light);
    line-height: 1.8;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom Cursor */
.cursor {
    width: 20px; height: 20px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: 0.1s ease-out;
}
.cursor2 {
    width: 6px; height: 6px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* Loader */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(255,209,102,0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Particles */
#particles-js {
    position: fixed;
    width: 100%; height: 100%;
    top: 0; left: 0;
    z-index: -1;
}

/* Layout Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}
.text-center { text-align: center; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: clamp(32px, 5vw, 60px);
    margin-bottom: 20px;
}
.hero h1 span { color: var(--primary); }
.hero p {
    font-size: clamp(16px, 2vw, 24px);
    color: #d8eefe;
    margin-bottom: 30px;
}
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: #111;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    transition: 0.3s;
}
.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255,209,102,0.3);
}

/* Glassmorphism Sections */
.about-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 80px 20px;
}
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    transition: 0.3s;
}
.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.08);
}
.glass-card h3 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 20px;
}

/* Counters */
.counters {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}
.count {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

/* --- Process Section Styles (Sofa Animation) --- */
.process-section {
    padding: 80px 20px;
}
.section-title h2 {
    color: var(--primary);
    font-size: 32px;
    margin-bottom: 10px;
}
.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.process-step {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.step-icon {
    font-size: 40px;
    background: rgba(255, 209, 102, 0.1);
    padding: 15px;
    border-radius: 50%;
    min-width: 80px;
    text-align: center;
}
.step-content h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

/* Interactive Factory Scene */
.showcase-step {
    flex-direction: column;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    min-height: 350px;
    position: relative;
}
.factory-scene {
    width: 100%;
    height: 220px;
    position: relative;
    border-bottom: 3px dashed rgba(255,255,255,0.2);
}

/* 3D-Like Sofa Assembly */
.sofa-assembly {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 100px;
}
.sofa-piece {
    position: absolute;
    background: #e67e22; /* Wooden/Leather Color */
    border: 2px solid #d35400;
    border-radius: 5px;
    opacity: 0;
}
/* Keyframe triggers by JS when visible */
.animate-sofa .backrest { width: 140px; height: 60px; top: 10px; left: 20px; background: #d35400; animation: dropIn 0.8s 0.5s forwards; }
.animate-sofa .base { width: 150px; height: 25px; bottom: 10px; left: 15px; animation: dropIn 0.8s 1s forwards; }
.animate-sofa .armrest-l { width: 20px; height: 50px; bottom: 15px; left: 0; animation: dropIn 0.8s 1.5s forwards; }
.animate-sofa .armrest-r { width: 20px; height: 50px; bottom: 15px; right: 0; animation: dropIn 0.8s 1.8s forwards; }
.animate-sofa .cushion { width: 130px; height: 15px; bottom: 25px; left: 25px; background: #f39c12; animation: dropIn 0.8s 2.3s forwards; }

@keyframes dropIn {
    0% { transform: translateY(-200px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Delivery Truck Animation */
.delivery-truck {
    position: absolute;
    bottom: 15px;
    left: -250px; /* Hidden initially */
    width: 200px;
    height: 90px;
    display: flex;
    align-items: flex-end;
}
.animate-truck {
    animation: driveAway 5s 3.5s ease-in-out forwards;
}
.truck-box {
    width: 140px;
    height: 80px;
    background: #ffcc00;
    border-radius: 5px 5px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 11px;
    font-weight: bold;
}
.truck-cab {
    width: 50px;
    height: 50px;
    background: #f1f1f1;
    border-radius: 0 15px 5px 0;
    position: relative;
}
.truck-cab::after { /* Window */
    content: '';
    position: absolute;
    top: 10px; right: 8px;
    width: 18px; height: 18px;
    background: #333;
    border-radius: 0 5px 0 0;
}
.wheel {
    position: absolute;
    bottom: -10px;
    width: 25px; height: 25px;
    background: #222;
    border: 3px dashed #fff;
    border-radius: 50%;
}
.w1 { left: 30px; }
.w2 { right: 30px; }
.animate-truck .wheel { animation: spinWheel 1s linear infinite; }

@keyframes spinWheel { 100% { transform: rotate(-360deg); } }
@keyframes driveAway {
    0% { left: -250px; }
    30% { left: 40%; transform: translateX(-50%); } /* Pick up sofa */
    45% { left: 40%; transform: translateX(-50%); }
    100% { left: 110%; } /* Drive to customer */
}

/* Sofa fade-out when packed into truck */
.animate-sofa-fadeout {
    animation: fadeOutSofa 0.5s 4.8s forwards;
}
@keyframes fadeOutSofa {
    100% { opacity: 0; transform: scale(0.5) translateX(-100px); }
}

.current-status { margin-top: 15px; font-weight: 500; color: var(--primary); }

/* Notice / Coming Soon */
.notice {
    background: rgba(255, 204, 0, 0.05);
    border: 1px solid var(--primary);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin: 40px auto;
}
.notice h2 { color: var(--primary); margin-bottom: 15px; }

/* Footer */
.footer {
    text-align: center;
    padding: 60px 20px 40px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    margin-top: 60px;
}
.footer h3 { color: var(--text-light); font-size: 18px; margin-bottom: 10px; }
.brand-text { color: var(--primary); font-size: 24px; letter-spacing: 2px; margin-bottom: 20px; }
.supervisor { font-size: 14px; opacity: 0.8; }
.badge {
    display: inline-block;
    margin-top: 30px;
    padding: 8px 24px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 30px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Responsive */
@media(max-width: 768px) {
    .cursor, .cursor2 { display: none; }
    .counters { flex-direction: column; gap: 20px; }
    .process-step { flex-direction: column; text-align: center; }
}