/* SP Masterfem — SGI Showcase Site */
/* Design system: matches SGI SaaS marketing site */

body { font-family: 'Barlow', system-ui, sans-serif; }
h1, h2, h3, h4, h5, h6, .font-display { font-family: 'Archivo', system-ui, sans-serif; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-up { animation: fadeUp 0.6s ease-out both; }
.animate-fade-in { animation: fadeIn 0.5s ease-out both; }
.animate-slide-up { animation: slideUp 0.5s ease-out both; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ── Background patterns ── */
.bg-grid {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Gradient text ── */
.gradient-text {
    background: linear-gradient(135deg, #06b6d4, #22d3ee, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Scroll reveal: elements start invisible ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
}
.reveal.visible {
    animation: fadeUp 0.6s ease-out both;
}

/* ── Browser mockup frame for screenshots ── */
.browser-frame {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.browser-frame__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: #0f172a;
}
.browser-frame__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.browser-frame__dot--red { background: #ef4444; }
.browser-frame__dot--yellow { background: #eab308; }
.browser-frame__dot--green { background: #22c55e; }
.browser-frame__url {
    flex: 1;
    margin-left: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    background: #1e293b;
    color: #64748b;
    font-size: 12px;
    font-family: 'Barlow', monospace;
}
.browser-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Deep-dive modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 101;
    max-height: 85vh;
    overflow-y: auto;
    background: #1e293b;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 2rem;
    pointer-events: none;
}
.modal-content.active {
    transform: translateY(0);
    pointer-events: auto;
}
@media (min-width: 768px) {
    .modal-content {
        position: fixed;
        top: 50%;
        left: 50%;
        bottom: auto;
        right: auto;
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
        max-width: 800px;
        width: 90%;
        max-height: 80vh;
        border-radius: 24px;
    }
    .modal-content.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}
.modal-content .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.modal-content .modal-close:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ── Expandable panel (accordion) ── */
.expand-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
    opacity: 0;
}
.expand-panel.open {
    opacity: 1;
    max-height: 2000px; /* CSS fallback — JS also sets precise value */
    overflow: visible;
}

/* ── Workflow diagram ── */
.workflow-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.workflow-step::after {
    content: '\2192';
    color: #475569;
    font-weight: bold;
}
.workflow-step:last-child::after {
    content: '';
}

/* ── Slide indicators ── */
.slide-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}
.slide-dot.active {
    background: #06b6d4;
    border-color: #06b6d4;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}
@media (max-width: 767px) {
    .slide-dots { display: none; }
}

/* ── Capability card hover ── */
.capability-card {
    transition: all 0.3s ease;
}
.capability-card:hover {
    transform: translateY(-2px);
}

/* ── Screenshot lazy load ── */
img[data-src] {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img[data-src].loaded {
    opacity: 1;
}

/* ── Screenshot lightbox ── */
.screenshot-zoom {
    cursor: zoom-in;
}
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}
