/* ========================================
   Case Study Dark Layout
   Shared by all case study pages
   ======================================== */

:root { --background: #07071a; --card-bg: #0f0f28; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    width: 100%;
}
body { font-family: 'DM Sans', sans-serif; background: #07071a !important; color: #e2e8f0; line-height: 1.6; }


/* ── Hero ──────────────────────────────────── */
.cs-hero {
    position: relative;
    padding: 110px 0 0;
    text-align: center;
    overflow: hidden;
}
.cs-hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 55% at 50% 0%, rgba(99,85,255,0.22) 0%, transparent 65%),
        radial-gradient(ellipse 40% 40% at 10% 90%, rgba(62,200,192,0.08) 0%, transparent 60%),
        #07071a;
    z-index: 0;
}
.cs-hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(99,85,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,85,255,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}
.cs-hero-inner {
    position: relative; z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumb */
.cs-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
    font-size: 0.8rem; color: #64748b;
}
.cs-breadcrumb a { color: #64748b; text-decoration: none; transition: color 0.2s; }
.cs-breadcrumb a:hover { color: #818cf8; }
.cs-breadcrumb-sep { color: #334155; }

/* Tags */
.cs-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}
.cs-tag {
    padding: 4px 14px;
    background: rgba(99,85,255,0.10);
    border: 1px solid rgba(99,85,255,0.22);
    border-radius: 999px;
    font-size: 0.76rem; font-weight: 600;
    color: #a5b4fc; letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Title */
.cs-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 700; color: #f8fafc;
    line-height: 1.15; margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

/* Date */
.cs-date {
    font-size: 0.82rem; color: #475569;
    font-style: italic; margin-bottom: 14px;
}

/* Subtitle */
.cs-subtitle {
    font-size: 1.05rem; color: #94a3b8;
    max-width: 660px; margin: 0 auto 48px;
    line-height: 1.75;
}

/* ── Media container ───────────────────────── */
.cs-media {
    position: relative;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
    border: none !important;
    background: #0b0b22;
}
.cs-media img,
.cs-media video {
    width: 100%; height: auto;
    display: block;
    max-height: 520px;
    object-fit: cover;
}

/* ── Stats strip ───────────────────────────── */
.cs-stats-wrap {
    background: rgba(255,255,255,0.025);
    border-top: 1px solid rgba(99,85,255,0.18);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 36px 24px;
    margin-bottom: 0;
}
.cs-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.cs-stat {
    flex: 1;
    min-width: 160px;
    text-align: center;
    padding: 0 24px;
    position: relative;
}
.cs-stat + .cs-stat::before {
    content: '';
    position: absolute; left: 0; top: 10%; bottom: 10%;
    width: 1px;
    background: rgba(255,255,255,0.08);
}
.cs-stat-val {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8 0%, #38bdf8 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1.1;
    margin-bottom: 6px;
}
.cs-stat-lbl {
    font-size: 0.8rem; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.8px;
    font-weight: 500;
}

/* ── Body content ──────────────────────────── */
.cs-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 72px 40px 20px;
}

.cs-section { margin-bottom: 56px; }

.cs-section-label {
    font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 1.5px; color: #6161ff;
    font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 10px;
}
.cs-section-label::before {
    content: ''; width: 24px; height: 2px;
    background: linear-gradient(90deg, #6161ff, #38bdf8);
    border-radius: 2px;
}

.cs-section h2 {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #ffffff !important; margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.cs-section h3 {
    font-size: 1rem; font-weight: 700;
    color: #e0e7ff !important; margin: 24px 0 10px;
}
.cs-section p {
    font-size: 1rem; color: #94a3b8;
    line-height: 1.78; margin-bottom: 14px;
}
.cs-section ul, .cs-section ol {
    padding-left: 20px; margin-bottom: 14px;
    color: #94a3b8; font-size: 1rem; line-height: 1.75;
}
.cs-section li { margin-bottom: 8px; }
.cs-section li strong { color: #e2e8f0; }

/* Divider */
.cs-divider {
    width: 100%; height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 0 0 48px;
}

/* ── Tech stack ────────────────────────────── */
.cs-tech-wrap {
    max-width: 960px;
    margin: 0 auto 80px;
    padding: 0 40px;
}
.cs-tech-wrap h3 {
    font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: 1px; color: #475569;
    margin-bottom: 14px;
}
.cs-tech-pills {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.cs-tech-pill {
    padding: 5px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    font-size: 0.82rem; color: #94a3b8;
}

/* ── CTA ───────────────────────────────────── */
.cs-cta-wrap {
    max-width: 960px;
    margin: 0 auto 80px;
    padding: 0 40px;
}
.cs-cta {
    padding: 52px 40px;
    background: linear-gradient(135deg, rgba(97,97,255,0.10) 0%, rgba(139,92,246,0.07) 100%);
    border: 1px solid rgba(99,85,255,0.20);
    border-radius: 20px;
    text-align: center;
    position: relative; overflow: hidden;
}
.cs-cta::before {
    content: ''; position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(99,85,255,0.12) 0%, transparent 70%);
}
.cs-cta h2 {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    color: #fff; margin-bottom: 12px;
}
.cs-cta p {
    color: #94a3b8; font-size: 0.98rem;
    margin-bottom: 28px;
    max-width: 460px; margin-left: auto; margin-right: auto;
}
.cs-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, #6161ff 0%, #8b5cf6 100%);
    color: #fff; border-radius: 12px;
    font-weight: 600; font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(99,85,255,0.30);
}
.cs-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,85,255,0.45); }
.cs-cta-note {
    margin-top: 14px;
    font-size: 0.78rem; color: #475569;
}

/* ── Back link ─────────────────────────────── */
.cs-back {
    display: flex; align-items: center; gap: 6px;
    max-width: 780px; margin: 0 auto 28px;
    padding: 0 24px;
    font-size: 0.85rem; color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}
.cs-back:hover { color: #818cf8; }
.cs-back svg { transform: rotate(180deg); }

@media (max-width: 640px) {
    .cs-stats { flex-direction: column; gap: 24px; }
    .cs-stat + .cs-stat::before { display: none; }
    .cs-cta { padding: 36px 20px; }
}
