/* Demo Modal */
.demo-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    transition: background 0.4s ease, visibility 0s 0.4s;
}

.demo-modal.is-open {
    background: rgba(0, 0, 0, 0.7);
    visibility: visible;
    transition: background 0.4s ease, visibility 0s 0s;
}

.demo-modal__panel {
    position: relative;
    width: 90%;
    max-width: 56rem;
    max-height: 88vh;
    overflow-y: auto;
    padding: 2.5rem;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(30px) scale(0.97);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
}

.demo-modal.is-open .demo-modal__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.demo-modal__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.demo-modal__close:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent2);
    color: var(--accent2);
    transform: rotate(90deg);
}

.demo-modal__eyebrow {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.demo-modal__title {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--heading);
}

.demo-modal__summary {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.demo-modal__preview-shell {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.demo-modal__caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.demo-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.demo-panel h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1rem;
}

.demo-flow {
    display: grid;
    gap: 1rem;
}

.demo-flow__step {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.demo-flow__number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
}

.demo-flow__text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--heading);
    margin-bottom: 0.3rem;
}

.demo-flow__text p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.demo-checklist {
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.demo-checklist li {
    position: relative;
    padding-left: 1.3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.demo-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

/* Works Filtering & Interaction */
.works-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s ease;
    letter-spacing: 0.3px;
    position: relative;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 999px;
}

.filter-btn:hover {
    color: var(--fg);
    border-color: var(--accent);
}

.filter-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.06);
}

.filter-btn.active::after {
    width: 60%;
    left: 20%;
}

.work-card {
    transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.4s ease;
}

.work-card.is-hidden {
    display: none;
}
