/* ============================================
   SignumCyber Auto-Play Demo
   All styles scoped under .demo-wrapper
   ============================================ */

.demo-wrapper {
    /* Design tokens */
    --orange-warm: #D4A574;
    --orange-bright: #f97316;
    --orange-glow: rgba(249, 115, 22, 0.15);
    --surface-light: #fafaf9;
    --surface-card: #ffffff;
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    --border-subtle: rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --radius-xl: 16px;

    /* Layout */
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    font-family: var(--font-body);
    color: var(--text-primary);
}


.browser-frame {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.browser-toolbar {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-subtle);
    gap: 10px;
}

.toolbar-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

.toolbar-nav-btn {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: transparent; display: flex; align-items: center;
    justify-content: center; color: var(--text-muted); cursor: default;
}
.toolbar-nav-btn svg {
    width: 16px; height: 16px; stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.toolbar-url { flex: 1; display: flex; align-items: center; justify-content: center; }

.toolbar-url-bar {
    background: #f1f3f4; border-radius: 20px; padding: 7px 16px;
    font-size: 13px; display: flex; align-items: center; gap: 7px;
    width: 100%; max-width: 480px;
}
.toolbar-url-bar .lock-svg svg {
    width: 13px; height: 13px; stroke: #57534e; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block;
}
.toolbar-url-bar .url-text { color: var(--text-secondary); font-size: 13px; }

.toolbar-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.toolbar-action-btn {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: transparent; display: flex; align-items: center;
    justify-content: center; color: var(--text-muted); cursor: default;
}
.toolbar-action-btn svg {
    width: 16px; height: 16px; stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.toolbar-profile {
    width: 24px; height: 24px; border-radius: 50%; background: #e0e0de;
    display: flex; align-items: center; justify-content: center;
    margin-left: 2px; flex-shrink: 0;
}
.toolbar-profile svg {
    width: 14px; height: 14px; stroke: #8a8a88; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* === VIEWPORT & SLIDES === */
.demo-viewport {
    position: relative; width: 100%; aspect-ratio: 16 / 9.5;
    overflow: hidden; background: #f5f5f4;
}

.demo-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; will-change: opacity; overflow: hidden;
}

.demo-slide img {
    width: 100%; height: auto; display: block; position: absolute;
    top: 0; left: 0; transform-origin: top left; will-change: transform;
    transition: transform 1.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.demo-slide .secondary-img,
.demo-slide .tertiary-img,
.demo-slide .quaternary-img { opacity: 0; z-index: 2; }

.demo-slide .secondary-img { transition: opacity 0.5s ease, transform 1.8s cubic-bezier(0.25, 0.1, 0.25, 1); }
.demo-slide .tertiary-img { z-index: 3; transition: transform 1.8s cubic-bezier(0.25, 0.1, 0.25, 1); }
.demo-slide .quaternary-img { z-index: 4; transition: transform 1.8s cubic-bezier(0.25, 0.1, 0.25, 1); }

.demo-slide .secondary-img.visible { opacity: 1; }
.demo-slide .tertiary-img.visible { opacity: 1; }
.demo-slide .quaternary-img.visible { opacity: 1; }

.demo-slide.active { z-index: 2; animation: demoFadeIn 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) forwards; }
.demo-slide.exiting { z-index: 1; animation: demoFadeOut 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) forwards; }

@keyframes demoFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes demoFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }

/* === CURSOR & RIPPLE === */
.demo-cursor {
    position: absolute; z-index: 20; pointer-events: none;
    width: 20px; height: 20px; opacity: 0; transition: opacity 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.demo-cursor.visible { opacity: 1; }
.demo-cursor svg { width: 20px; height: 20px; }

.cursor-ripple {
    position: absolute; z-index: 19; pointer-events: none;
    width: 40px; height: 40px; margin-left: -20px; margin-top: -20px;
    border-radius: 50%; background: rgba(249, 115, 22, 0.2);
    border: 2px solid rgba(249, 115, 22, 0.4); opacity: 0; transform: scale(0);
}
.cursor-ripple.animate { animation: ripple 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards; }

@keyframes ripple {
    0% { opacity: 1; transform: scale(0); }
    50% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.4); }
}

/* === CALLOUT PILL === */
.callout-pill {
    position: absolute; bottom: 24px; left: 24px; z-index: 10;
    display: flex; align-items: center; gap: 10px; padding: 10px 20px;
    background: rgba(28, 25, 23, 0.82); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08); opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
}
.callout-pill.visible { opacity: 1; transform: translateY(0); }
.callout-pill.hiding { opacity: 0; transform: translateY(-4px); transition: opacity 0.3s ease, transform 0.3s ease; }
.callout-pill .pill-icon {
    width: 8px; height: 8px; border-radius: 50%; background: var(--orange-bright);
    flex-shrink: 0; box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}
.callout-pill .pill-text {
    font-size: 13.5px; font-weight: 500; color: #ffffff;
    white-space: nowrap; letter-spacing: 0.01em;
}

/* === CONTROLS === */
.demo-controls {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px;
    background: linear-gradient(180deg, #f8f8f7 0%, #f2f2f0 100%);
    border-top: 1px solid var(--border-subtle);
}

.progress-dots { display: flex; align-items: center; gap: 6px; }

.progress-dot {
    width: 32px; height: 4px; border-radius: 100px;
    background: rgba(0, 0, 0, 0.08); cursor: pointer;
    transition: all 0.3s ease; overflow: hidden;
    position: relative; border: none; padding: 0;
}
.progress-dot:hover { background: rgba(0, 0, 0, 0.12); }
.progress-dot:focus-visible { outline: 2px solid var(--orange-bright); outline-offset: 2px; }
.progress-dot.active { background: rgba(249, 115, 22, 0.15); }

.progress-dot .dot-fill {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: var(--orange-bright); border-radius: 100px;
}
.progress-dot.completed .dot-fill { width: 100%; background: var(--orange-warm); }

.play-pause-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border-subtle); background: var(--surface-card);
    cursor: pointer; transition: all 0.2s ease; color: var(--text-secondary);
}
.play-pause-btn:hover {
    border-color: var(--orange-warm); color: var(--orange-bright);
    box-shadow: 0 0 0 3px var(--orange-glow);
}
.play-pause-btn:focus-visible { outline: 2px solid var(--orange-bright); outline-offset: 2px; }
.play-pause-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* === LOADING === */
.demo-loading {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f4; z-index: 20; transition: opacity 0.5s ease;
}
.demo-loading.hidden { opacity: 0; pointer-events: none; }
.loading-spinner {
    width: 32px; height: 32px; border: 3px solid rgba(0, 0, 0, 0.06);
    border-top-color: var(--orange-bright); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === PHONE — hide entire demo section === */
@media (max-width: 639px) {
    .demo-container { display: none; }
}

/* === TABLET === */
@media (max-width: 768px) {
    .demo-wrapper { padding: 12px; }
    .browser-toolbar { padding: 8px 10px; gap: 8px; }
    .toolbar-nav-btn { width: 44px; height: 44px; }
    .toolbar-nav-btn svg { width: 14px; height: 14px; }
    .toolbar-url-bar { max-width: 100%; padding: 6px 12px; font-size: 12px; }
    .demo-viewport { aspect-ratio: 16 / 10; }
    .callout-pill { bottom: 12px; left: 12px; padding: 8px 14px; }
    .callout-pill .pill-text { font-size: 11.5px; }
    .demo-controls { padding: 12px 16px; }
    .progress-dot { width: 32px; height: 4px; }
    .play-pause-btn { min-width: 44px; min-height: 44px; }
    .demo-cursor { display: none; }
    .cursor-ripple { display: none; }
}
