/* ServiceAlert.ai — Demo Page */

/* ── Hero ─────────────────────────────────────── */
.demo-hero {
    text-align: center;
    padding: 80px 0 56px;
}

.demo-hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 16px;
}

.demo-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.demo-hero-sub {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

/* ── Eagle Eye section ────────────────────────── */
.demo-eagle-section {
    padding: 72px 0 64px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.demo-eagle-section .section-label,
.demo-eagle-section h2,
.demo-eagle-section .section-desc {
    /* reuse feature-section rules */
}

.demo-eagle-stage {
    margin: 40px 0 40px;
    background: #0d1117;
    padding: 28px 24px 20px;
    overflow-x: hidden;
}

.demo-eagle-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 0 8px;
    font-size: 0.8125rem;
    color: #9ca3af;
    font-weight: 500;
}

.demo-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

.demo-eagle-caption {
    text-align: center;
    font-size: 0.8rem;
    color: #4b5563;
    margin: 20px 0 0;
    padding: 0 8px;
}

.demo-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #22c55e;
    margin-left: auto;
}

.demo-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.demo-update-time {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.demo-eagle-loading {
    color: #6b7280;
    font-size: 0.875rem;
    padding: 40px 0;
    text-align: center;
}

/* ── Hex grid ─────────────────────────────────── */
.demo-eagle-grid {
    padding: 0;
}

.demo-hex-row {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    margin-top: -36px;
}

.demo-hex-row:first-child {
    margin-top: 0;
}

.demo-hex {
    position: relative;
    width: 120px;
    height: 138px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.15s ease, filter 0.15s ease;
    cursor: pointer;
}

.demo-hex:hover {
    transform: scale(1.08);
    filter: brightness(1.12);
    z-index: 2;
}

.demo-hex-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.demo-hex-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 6px;
    text-align: center;
}

.demo-hex-type {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

.demo-hex-value {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-hex-name {
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.9;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Alert pulse animation */
@keyframes hexAlert {
    0%   { transform: scale(1);    filter: brightness(1); }
    20%  { transform: scale(1.15); filter: brightness(1.4) drop-shadow(0 0 12px rgba(239,68,68,0.8)); }
    40%  { transform: scale(1.1);  filter: brightness(1.2); }
    60%  { transform: scale(1.13); filter: brightness(1.35) drop-shadow(0 0 8px rgba(239,68,68,0.6)); }
    80%  { transform: scale(1.08); filter: brightness(1.1); }
    100% { transform: scale(1);    filter: brightness(1); }
}

.demo-hex-alert {
    animation: hexAlert 2s ease-in-out;
    z-index: 10;
}

/* ── Eagle Eye feature cards ──────────────────── */
.demo-eagle-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 8px;
}

.demo-eagle-feat {
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.demo-eagle-feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.demo-eagle-feat strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.demo-eagle-feat p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* ── Mock team dashboard ──────────────────────── */
.mock-dash {
    font-size: 0.8125rem;
    background: var(--bg-secondary);
}

.mock-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.mock-team-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.mock-view-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mock-section-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

.mock-section-hdr.personal {
    margin-top: 10px;
}

.mock-section-hdr svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.mock-count {
    margin-left: auto;
    font-size: 0.7rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1px 7px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.mock-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.mock-row.last {
    border-bottom: none;
}

.mock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mock-dot.up   { background: #22c55e; }
.mock-dot.down { background: #ef4444; }

.mock-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mock-row-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-row-owner {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.mock-team-pill {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    color: var(--accent);
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.mock-type-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.mock-uptime {
    font-size: 0.75rem;
    font-weight: 600;
    color: #22c55e;
    min-width: 40px;
    text-align: right;
    flex-shrink: 0;
}

.mock-uptime.down {
    color: #ef4444;
}

/* ── Team Roles ───────────────────────────────── */
.demo-roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.demo-role-card {
    padding: 28px 24px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.demo-role-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent),
                0 4px 24px color-mix(in srgb, var(--accent) 10%, transparent);
}

.demo-role-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.demo-role-pill.ba {
    background: rgba(245, 158, 11, 0.12);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.demo-role-pill.lead {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.demo-role-pill.member {
    background: rgba(99, 102, 241, 0.12);
    color: #6366F1;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.demo-role-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.demo-role-card > p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 20px;
}

.demo-role-perms {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-role-perms li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.demo-role-perms li::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
}

.demo-role-perms li.yes {
    color: var(--text-primary);
}

.demo-role-perms li.yes::before {
    background-color: rgba(16, 185, 129, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.demo-role-perms li.no::before {
    background-color: rgba(107, 114, 128, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
    .demo-eagle-features {
        grid-template-columns: 1fr;
    }

    .demo-roles-grid {
        grid-template-columns: 1fr;
    }

    .demo-hero h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    .demo-hero h1 {
        font-size: 1.875rem;
    }

    .demo-hero {
        padding: 56px 0 40px;
    }

    .demo-eagle-stage {
        padding: 20px 12px 16px;
    }

    .demo-hex {
        width: 85px;
        height: 98px;
    }

    .demo-hex-row {
        margin-top: -24px;
    }

    .demo-hex-value {
        font-size: 0.82rem;
        max-width: 72px;
    }

    .demo-hex-name {
        font-size: 0.5rem;
        max-width: 72px;
    }

    .demo-eagle-legend {
        gap: 12px;
        font-size: 0.75rem;
    }
}
