/* ============================================
   Dorçe Production Story — Frontend Styles
   ============================================ */

/* Overlay */
.dps-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.dps-overlay.dps-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.dps-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.1);
    transform: scale(0.9) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dps-overlay.dps-visible .dps-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.dps-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f3f5;
    color: #49454f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.dps-close:hover {
    background: #e9ecef;
    color: #1a1c1e;
    transform: rotate(90deg);
}

/* Header */
.dps-header {
    text-align: center;
    margin-bottom: 24px;
}
.dps-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fff3e6, #ffe0cc);
    color: #f37021;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.dps-main-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #0b1c3c;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Progress Bar */
.dps-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    padding: 0 20px;
}
.dps-progress-step {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.dps-progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #79747e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.dps-progress-step.active .dps-progress-dot,
.dps-progress-step.completed .dps-progress-dot {
    background: #f37021;
    color: #fff;
    box-shadow: 0 4px 12px rgba(243, 112, 33, 0.35);
    transform: scale(1.1);
}
.dps-progress-step.completed .dps-progress-dot {
    background: #0b1c3c;
    box-shadow: 0 4px 12px rgba(11, 28, 60, 0.25);
}
.dps-progress-line {
    width: 60px;
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.dps-progress-line-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0b1c3c, #f37021);
    border-radius: 2px;
    transition: width 0.5s ease;
}
.dps-progress-step.completed .dps-progress-line .dps-progress-line-fill {
    width: 100%;
}

/* Content Area */
.dps-content-area {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    margin-bottom: 20px;
}
.dps-step {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.dps-step.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.dps-step.exit-left {
    opacity: 0;
    transform: translateX(-60px);
}
.dps-illustration {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.dps-illustration svg {
    width: 100%;
    height: 100%;
    max-width: 500px;
}

/* Step Info */
.dps-step-info {
    text-align: center;
    margin-bottom: 20px;
    min-height: 100px;
}
.dps-step-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #fff3e6, #ffe0cc);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}
.dps-icon-emoji {
    font-size: 24px;
    line-height: 1;
}
.dps-step-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0b1c3c;
    margin: 0 0 8px;
    transition: opacity 0.3s;
}
.dps-step-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: #49454f;
    line-height: 1.6;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    transition: opacity 0.3s;
}

/* CTA Buttons (visible only on step 5) */
.dps-cta {
    display: none;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    animation: dps-fadeInUp 0.5s ease;
}
.dps-cta.dps-cta-visible {
    display: flex;
}
.dps-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}
.dps-cta-primary {
    background: #f37021;
    color: #fff;
    box-shadow: 0 4px 16px rgba(243, 112, 33, 0.3);
}
.dps-cta-primary:hover {
    background: #d65a0a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 112, 33, 0.4);
    color: #fff;
}
.dps-cta-secondary {
    background: #0b1c3c;
    color: #fff;
    box-shadow: 0 4px 16px rgba(11, 28, 60, 0.2);
}
.dps-cta-secondary:hover {
    background: #162d5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 28, 60, 0.3);
    color: #fff;
}
.dps-cta-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Navigation */
.dps-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}
.dps-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #49454f;
}
.dps-nav-btn:hover {
    border-color: #f37021;
    color: #f37021;
    background: #fff8f3;
}
.dps-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.dps-dots {
    display: flex;
    gap: 8px;
}
.dps-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}
.dps-dot.active {
    background: #f37021;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(243, 112, 33, 0.4);
}
.dps-dot:hover:not(.active) {
    background: #9ca3af;
}

/* Timer Bar */
.dps-timer-bar {
    width: 100%;
    height: 3px;
    background: #f1f3f5;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 0;
}
.dps-timer-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f37021, #ff9a56);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Animations */
@keyframes dps-fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================
   SVG Animation Keyframes
   ================================ */

/* Step 1: Factory — Sparks */
@keyframes dps-spark {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}
@keyframes dps-conveyor {
    0% { transform: translateX(-40px); }
    100% { transform: translateX(40px); }
}
@keyframes dps-arm-move {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-15deg); }
}

/* Step 2: Assembly — Walls sliding */
@keyframes dps-wall-left {
    0% { transform: translateX(-80px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes dps-wall-right {
    0% { transform: translateX(80px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes dps-roof-close {
    0% { transform: translateY(-40px) scaleY(0); opacity: 0; }
    100% { transform: translateY(0) scaleY(1); opacity: 1; }
}

/* Step 3: Quality — Checkmarks */
@keyframes dps-check-draw {
    0% { stroke-dashoffset: 24; }
    100% { stroke-dashoffset: 0; }
}
@keyframes dps-stamp {
    0% { transform: scale(3) rotate(-15deg); opacity: 0; }
    60% { transform: scale(0.9) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Step 4: Transport — Truck moving */
@keyframes dps-truck-drive {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(0); }
}
@keyframes dps-wheel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes dps-road-move {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -40; }
}

/* Step 5: Installation — Crane & lights */
@keyframes dps-crane-lower {
    0% { transform: translateY(-60px); }
    100% { transform: translateY(0); }
}
@keyframes dps-light-on {
    0%, 60% { fill: #d1d5db; }
    100% { fill: #fbbf24; }
}
@keyframes dps-door-open {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(0.1); transform-origin: right center; }
}
@keyframes dps-pulse-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Apply animations when step is active */
.dps-step[data-step="1"].active .dps-spark-1 { animation: dps-spark 1.2s ease infinite; }
.dps-step[data-step="1"].active .dps-spark-2 { animation: dps-spark 1.2s ease 0.3s infinite; }
.dps-step[data-step="1"].active .dps-spark-3 { animation: dps-spark 1.2s ease 0.6s infinite; }
.dps-step[data-step="1"].active .dps-conveyor-item { animation: dps-conveyor 3s ease-in-out infinite alternate; }
.dps-step[data-step="1"].active .dps-robot-arm { animation: dps-arm-move 2s ease-in-out infinite; }

.dps-step[data-step="2"].active .dps-wall-l { animation: dps-wall-left 0.8s ease 0.2s forwards; }
.dps-step[data-step="2"].active .dps-wall-r { animation: dps-wall-right 0.8s ease 0.4s forwards; }
.dps-step[data-step="2"].active .dps-roof { animation: dps-roof-close 0.6s ease 0.8s forwards; }

.dps-step[data-step="3"].active .dps-check { stroke-dasharray: 24; stroke-dashoffset: 24; animation: dps-check-draw 0.5s ease forwards; }
.dps-step[data-step="3"].active .dps-check-2 { animation-delay: 0.4s; }
.dps-step[data-step="3"].active .dps-check-3 { animation-delay: 0.8s; }
.dps-step[data-step="3"].active .dps-stamp-mark { animation: dps-stamp 0.6s ease 1.2s forwards; opacity: 0; }

.dps-step[data-step="4"].active .dps-truck-group { animation: dps-truck-drive 1.2s ease forwards; }
.dps-step[data-step="4"].active .dps-road-dash { animation: dps-road-move 1s linear infinite; }

.dps-step[data-step="5"].active .dps-crane-load { animation: dps-crane-lower 1.5s ease forwards; }
.dps-step[data-step="5"].active .dps-window-light { animation: dps-light-on 0.5s ease 1.8s forwards; }
.dps-step[data-step="5"].active .dps-glow { animation: dps-pulse-glow 2s ease 2s infinite; }

/* ================================
   Responsive
   ================================ */
@media (max-width: 640px) {
    .dps-modal { padding: 24px 20px; border-radius: 20px; }
    .dps-main-title { font-size: 22px; }
    .dps-content-area { height: 180px; }
    .dps-progress-line { width: 30px; }
    .dps-progress-dot { width: 28px; height: 28px; font-size: 12px; }
    .dps-step-title { font-size: 17px; }
    .dps-step-desc { font-size: 13px; }
    .dps-cta { flex-direction: column; }
    .dps-cta-btn { justify-content: center; font-size: 14px; padding: 12px 20px; }
}

@media (max-width: 380px) {
    .dps-modal { padding: 20px 16px; }
    .dps-content-area { height: 150px; }
    .dps-progress-line { width: 20px; }
}
