﻿
.dcs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.dcs-modal-overlay.is-visible {
    display: block;
    opacity: 1;
}

.dcs-modal-overlay.is-hiding {
    opacity: 0;
}

/* Close button */
.dcs-close {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 100000;
    width: 44px;
    height: 44px;
    border: 1px solid #e2e2e2;
    border-radius: 50%;
    background: #fff;
    color: #1a1a1a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

    .dcs-close:hover {
        background: #f5f5f5;
        border-color: #ccc;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

/* Inner wrapper */
.dcs-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px 100px;
    color: #1a1a1a;
    font-family: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
}

/* Hero */
.dcs-hero {
    margin-bottom: 56px;
    padding-bottom: 40px;
    border-bottom: 1px solid #ebebeb;
}

.dcs-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.dcs-hero h2 {
    font-family:   sans-serif;
    font-size: clamp(36px, 5.5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.5px;
    color: #0d0d0d;
    margin: 0 0 16px;
}

.dcs-hero .dcs-subtitle {
    font-size: 17px;
    line-height: 1.65;
    color: #5a5a5a;
    max-width: 600px;
    margin: 0;
}

/* Section headings */
.dcs-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 14px;
}

.dcs-section-title {
    font-family: sans-serif;
    font-size: 26px;
    color: #0d0d0d;
    margin: 0 0 22px;
    letter-spacing: 0.3px;
}

/* Prose */
.dcs-prose {
    font-size: 15.5px;
    line-height: 1.8;
    color: #3d3d3d;
    margin-bottom: 36px;
}

    .dcs-prose strong {
        color: #0d0d0d;
        font-weight: 600;
    }

/* Metrics */
.dcs-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.dcs-metric-card {
    background: #fafafa;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 26px 22px;
    text-align: center;
}

.dcs-metric-val {
    font-family:  'Impact', sans-serif;
    font-size: 40px;
    line-height: 1;
    margin-bottom: 6px;
}

.dcs-metric-label {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

/* Features list */
.dcs-features {
    list-style: none;
    padding: 0;
    margin: 0 0 44px;
}

    .dcs-features li {
        position: relative;
        padding-left: 26px;
        margin-bottom: 13px;
        font-size: 15px;
        line-height: 1.65;
        color: #3d3d3d;
    }

        .dcs-features li::before {
            content: '';
            position: absolute;
            left: 0;
            top: 9px;
            width: 9px;
            height: 9px;
            border-radius: 50%;
        }

/* Divider */
.dcs-divider {
    border: none;
    border-top: 1px solid #ebebeb;
    margin: 44px 0;
}

/* Callout */
.dcs-callout {
    position: relative;
    padding: 28px 32px 28px 48px;
    border-radius: 12px;
    margin-bottom: 44px;
    font-size: 16px;
    line-height: 1.75;
    font-style: italic;
    color: #3d3d3d;
    border-left: 4px solid;
}

    .dcs-callout::before {
        content: '\201C';
        position: absolute;
        top: 14px;
        left: 16px;
        font-size: 42px;
        line-height: 1;
        opacity: 0.15;
        font-style: normal;
        color: #0d0d0d;
    }

/* Architecture flow */
.dcs-arch {
    background: #fafafa;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 44px;
    text-align: center;
}

.dcs-arch-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.dcs-arch-node {
    padding: 10px 20px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #ddd;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.dcs-arch-arrow {
    font-size: 18px;
    color: #bbb;
}

/* ── Per-modal accent colours ── */

/* Restaurant - warm amber */
#deployment-case-studies-restaurant-modal .dcs-badge {
    background: #fef3c7;
    color: #92400e;
}

#deployment-case-studies-restaurant-modal .dcs-features li::before {
    background: #d97706;
}

#deployment-case-studies-restaurant-modal .dcs-callout {
    background: #fffbeb;
    border-left-color: #d97706;
}

#deployment-case-studies-restaurant-modal .dcs-metric-val {
    color: #b45309;
}

#deployment-case-studies-restaurant-modal .dcs-arch-node {
    border-color: #fbbf24;
}

/* Institution - blue */
#deployment-case-studies-hbs-modal .dcs-badge {
    background: #fef3c7;
    color: #92400e;
}

#deployment-case-studies-hbs-modal .dcs-features li::before {
    background: #d97706;
}

#deployment-case-studies-hbs-modal .dcs-callout {
    background: #fffbeb;
    border-left-color: #d97706;
}

#deployment-case-studies-hbs-modal .dcs-metric-val {
    color: #b45309;
}

#deployment-case-studies-hbs-modal .dcs-arch-node {
    border-color: #fbbf24;
}

/* Lifestyle - emerald */
#deployment-case-studies-pandley-modal .dcs-badge {
    background: #d1fae5;
    color: #065f46;
}

#deployment-case-studies-pandley-modal .dcs-features li::before {
    background: #059669;
}

#deployment-case-studies-pandley-modal .dcs-callout {
    background: #ecfdf5;
    border-left-color: #059669;
}

#deployment-case-studies-pandley-modal .dcs-metric-val {
    color: #047857;
}

#deployment-case-studies-pandley-modal .dcs-arch-node {
    border-color: #6ee7b7;
}

@media (max-width: 640px) {
    .dcs-inner {
        padding: 64px 20px 80px;
    }

    .dcs-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .dcs-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .dcs-callout {
        padding: 24px 20px 24px 36px;
    }
}

/* ── Force modal above EVERYTHING including site nav ── */
.dcs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999 !important;  /* Higher than any navbar */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

/* ── Kill the old floating close button — it's unreliable ── */
.dcs-close {
    display: none !important;
}

/* ── NEW: Sticky close bar at TOP of modal — always visible ── */
.dcs-close-bar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    z-index: 1000000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dcs-close-bar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    border: none;
    background: none;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.dcs-close-bar-back:hover {
    background: #f5f5f5;
}

.dcs-close-bar-back:active {
    background: #eee;
}

.dcs-close-bar-back svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dcs-close-bar-label {
    font-size: 13px;
    color: #999;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ── Also add close button at BOTTOM of modal ── */
.dcs-close-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 48px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.2s, border-color 0.2s;
}

.dcs-close-bottom:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.dcs-close-bottom:active {
    background: #e8e8e8;
}

/* ── Remove old ::before pseudo back bar if present ── */
.dcs-modal-overlay::before {
    display: none !important;
}

/* ── Inner adjustments ── */
.dcs-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 40px 60px;
}

@media (max-width: 768px) {
    .dcs-close-bar {
        padding: 12px 16px;
    }
    .dcs-inner {
        padding: 24px 16px 60px;
    }
}