/* ==========================================
   Case Study Pages — Light Purple Theme 2026
   ========================================== */

/* ── Google Fonts (Outfit) via link in HTML, fallback here ── */

/* ── CSS Variables ── */
:root {
    --bg-primary:    #F5F4F9;
    --bg-secondary:  #EEEDF5;
    --bg-card:       #FFFFFF;
    --text-primary:  #1C1B2E;
    --text-secondary: #5B5680;
    --accent:        #3B3470;
    --accent-blue:   #6C63B8;
    --border:        #E8E6F0;
    --glow:          rgba(59, 52, 112, 0.2);

    --spacing-xs:  0.5rem;
    --spacing-sm:  1rem;
    --spacing-md:  1.5rem;
    --spacing-lg:  2rem;
    --spacing-xl:  3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 5rem;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition-base); }
a:hover { opacity: 0.8; }

/* ── Navigation ── */
.cs-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.25rem 5%;
    display: flex; align-items: center; justify-content: space-between;
    transition: all 0.3s ease;
}
.cs-nav.scrolled {
    background: rgba(245, 244, 249, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(59, 52, 112, 0.06);
}

/* On case study pages, navbar matches dark hero */
#navbar {
    background: #12102A;
    border-bottom-color: rgba(108, 99, 184, 0.15);
    box-shadow: none;
}
#navbar .nav-link,
#navbar .nav-link-heinsapp {
    color: rgba(255,255,255,0.7);
}
#navbar .nav-link:hover,
#navbar .nav-link.active {
    color: #ffffff;
}
#navbar .contact-btn {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}
#navbar .webdesign-hs-logo .webdesign,
#navbar .webdesign-hs-logo .hs {
    color: #ffffff;
}
#navbar .webdesign-hs-logo .slash {
    color: var(--accent);
}
#navbar .hamburger-btn span {
    background: rgba(255,255,255,0.8);
}

/* ── Hero ── */
.cs-hero {
    min-height: 56vh;
    position: relative;
    display: flex; align-items: flex-end;
    overflow: hidden;
    background: #12102A;
}
.cs-hero::before, .cs-hero::after { display: none; }
/* hide any leftover bg images */
.cs-hero-bg { display: none; }
.cs-hero-content {
    position: relative; z-index: 2;
    padding: 6rem 5% 5rem;
    max-width: 1000px;
    color: #FAFAFA;
}
.cs-category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(108, 99, 184, 0.25);
    border: 1px solid rgba(108, 99, 184, 0.4);
    border-radius: 50px;
    font-size: 0.8rem; font-weight: 600;
    color: #A89FD4;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 1.5rem;
}
.cs-hero-title {
    font-size: clamp(3rem, 7.5vw, 7rem);
    font-weight: 800; line-height: 1.0;
    margin-bottom: 1.25rem;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}
.cs-hero-tagline { font-size: 1.2rem; color: rgba(255, 255, 255, 0.55); font-weight: 400; max-width: 600px; line-height: 1.6; }

/* ── Content Layout ── */
.cs-content {
    max-width: 900px; margin: 0 auto;
    padding: 5rem 5%;
}

/* ── Section ── */
.cs-section {
    margin-bottom: 5rem;
    padding-bottom: 5rem;
    border-bottom: 1px solid var(--border);
}
.cs-section:last-child { border-bottom: none; }
.cs-section-label {
    display: block;
    font-size: 0.75rem; font-weight: 600;
    color: var(--accent);
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 0.75rem;
}
.cs-section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700; line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-primary);
}
.cs-section-body {
    font-size: 1.1rem; color: var(--text-secondary);
    line-height: 1.8;
}
.cs-section-body p { margin-bottom: 1.5rem; }
.cs-section-body p:last-child { margin-bottom: 0; }

/* ── Overview Grid ── */
.cs-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem; margin-bottom: 2.5rem;
}
.cs-overview-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(59, 52, 112, 0.06);
    transition: all 0.3s ease;
}
.cs-overview-item:hover { box-shadow: 0 4px 12px rgba(59, 52, 112, 0.1); transform: translateY(-2px); }
.cs-overview-item dt {
    font-size: 0.75rem; font-weight: 600;
    color: var(--accent); text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 0.5rem;
}
.cs-overview-item dd { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

/* ── Tech Tags ── */
.cs-tech-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.cs-tech-tag {
    padding: 0.4rem 0.875rem;
    background: rgba(59, 52, 112, 0.06);
    border: 1px solid rgba(59, 52, 112, 0.15);
    border-radius: 6px;
    font-size: 0.8rem; color: var(--accent);
    font-weight: 500;
}

/* ── Bullet List ── */
.cs-bullet-list { list-style: none; padding: 0; }
.cs-bullet-list li {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem; line-height: 1.6;
    display: flex; align-items: flex-start; gap: 0.75rem;
}
.cs-bullet-list li:last-child { border-bottom: none; }
.cs-bullet-list li::before {
    content: '→';
    color: var(--accent); font-weight: 600;
    flex-shrink: 0; margin-top: 0.1em;
}

/* ── Result Stats ── */
.cs-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem; margin-top: 2rem;
}
.cs-result-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(59, 52, 112, 0.06);
    transition: all 0.3s ease;
}
.cs-result-stat:hover { box-shadow: 0 4px 12px rgba(59, 52, 112, 0.1); transform: translateY(-2px); border-color: rgba(59, 52, 112, 0.2); }
.cs-result-stat-number {
    display: block; font-size: 2.5rem; font-weight: 700;
    color: var(--accent); margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #3B3470 0%, #6C63B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cs-result-stat-label { font-size: 0.875rem; color: var(--text-secondary); }

/* ── Screenshots ── */
.cs-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem; margin-top: 2rem;
}
.cs-screenshot-item {
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(59, 52, 112, 0.1);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex; flex-direction: column;
}
.cs-screenshot-item:hover { box-shadow: 0 8px 30px rgba(59, 52, 112, 0.15); transform: translateY(-3px); }
.cs-screenshot-item img { width: 100%; height: 350px; object-fit: cover; object-position: top; display: block; }
.cs-screenshot-caption {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem; color: var(--text-secondary);
    text-align: center; background: var(--bg-card);
    border-top: 1px solid var(--border);
}

/* ── CTA Section ── */
.cs-cta-section {
    background: linear-gradient(135deg, #EEEDF5 0%, #F5F4F9 100%);
    border-radius: 20px;
    padding: 4rem;
    text-align: center;
    border: 1px solid var(--border);
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(59, 52, 112, 0.06);
}
.cs-cta-section h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1rem; color: var(--text-primary); }
.cs-cta-section p { color: var(--text-secondary); font-size: 1.125rem; margin-bottom: 2.5rem; line-height: 1.7; }
.cs-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--accent); color: #FFFFFF;
    padding: 1rem 2rem; border-radius: 9999px;
    text-decoration: none; font-weight: 600; font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 52, 112, 0.25);
}
.cs-btn-primary:hover { background: #2D2B55; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(59, 52, 112, 0.35); color: #FFFFFF; opacity: 1; }

/* ── Pagination ── */
.cs-pagination {
    display: flex; gap: 1rem; justify-content: center;
    padding: 3rem 5%;
    flex-wrap: wrap;
}
.cs-pag-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9999px;
    color: var(--text-primary);
    text-decoration: none; font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(59, 52, 112, 0.06);
}
.cs-pag-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 4px 12px rgba(59, 52, 112, 0.1); transform: translateY(-2px); opacity: 1; }
.cs-pag-back {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--accent); color: #FFFFFF;
    border: none; border-radius: 9999px;
    text-decoration: none; font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 52, 112, 0.25);
}
.cs-pag-back:hover { background: #2D2B55; transform: translateY(-2px); color: #FFFFFF; opacity: 1; }

/* ── Footer ── */
.cs-footer {
    padding: 2rem 5%;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-primary);
}
.cs-footer a { color: var(--accent); }
.cs-footer a:hover { text-decoration: underline; opacity: 1; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .cs-content { padding: 3rem 5%; }
    .cs-cta-section { padding: 2.5rem; }
    .cs-hero-title { font-size: 2.5rem; }
    .cs-section-title { font-size: 1.75rem; }
    .cs-overview-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-result-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-screenshots { grid-template-columns: 1fr; }
    .cs-pagination { padding: 2rem 5%; }
}
@media (max-width: 480px) {
    .cs-overview-grid { grid-template-columns: 1fr; }
    .cs-result-grid { grid-template-columns: 1fr; }
    .cs-hero-title { font-size: 2rem; }
    .cs-pag-btn, .cs-pag-back { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .cs-hero-bg { transition: none; }
    .cs-overview-item, .cs-result-stat, .cs-screenshot-item { transition: none; }
}
