/* ========================================
   Case Study — Navigation
   ======================================== */
.cs-nav {
    opacity: 1;
}

.cs-nav .nav-pill {
    padding: 10px 24px;
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.01em;
    transition: opacity 0.3s;
}

.nav-back:hover {
    opacity: 0.7;
}

.nav-back svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Case Study — Hero
   ======================================== */
.cs-hero {
    padding: clamp(140px, 16vw, 200px) 0 0;
    text-align: center;
}

.cs-hero-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: clamp(24px, 3vw, 40px);
    opacity: 0;
    animation: csFadeUp 0.8s var(--ease) 0.2s forwards;
}

.cs-hero-tags span {
    font-size: clamp(0.68rem, 0.8vw, 0.76rem);
    font-weight: 500;
    padding: 6px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 100px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray-600);
}

.cs-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: clamp(20px, 2.5vw, 32px);
    opacity: 0;
    animation: csFadeUp 0.8s var(--ease) 0.35s forwards;
}

.cs-hero-title-line {
    display: block;
}

.cs-hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: var(--gray-600);
    max-width: 680px;
    margin: 0 auto clamp(40px, 5vw, 64px);
    opacity: 0;
    animation: csFadeUp 0.8s var(--ease) 0.5s forwards;
}

.cs-hero-meta {
    display: flex;
    justify-content: center;
    gap: clamp(24px, 4vw, 56px);
    padding-bottom: clamp(48px, 6vw, 80px);
    opacity: 0;
    animation: csFadeUp 0.8s var(--ease) 0.65s forwards;
}

.cs-meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-meta-label {
    font-size: clamp(0.65rem, 0.75vw, 0.72rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
}

.cs-meta-value {
    font-family: var(--font-heading);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.cs-hero-image {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--px);
    opacity: 0;
    animation: csFadeUp 1s var(--ease) 0.8s forwards;
}

.cs-hero-image img {
    width: 100%;
    border-radius: clamp(16px, 2vw, 24px);
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

/* ========================================
   Case Study — Sections
   ======================================== */
.cs-section {
    padding: clamp(80px, 10vw, 140px) 0;
}

.cs-section-dark {
    background: var(--gray-50);
}

.cs-section-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}

.cs-section-label {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-label-number {
    font-family: var(--font-heading);
    font-size: clamp(0.7rem, 0.85vw, 0.8rem);
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.05em;
}

.cs-label-text {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.cs-section-content p {
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 16px;
}

.cs-section-content p:last-child {
    margin-bottom: 0;
}

.cs-lead {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 1.5vw, 1.3rem) !important;
    font-weight: 600;
    line-height: 1.6 !important;
    letter-spacing: -0.02em;
    color: var(--black) !important;
    margin-bottom: clamp(16px, 2vw, 24px) !important;
}

/* ========================================
   Challenge List
   ======================================== */
.cs-challenge-list {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 2.5vw, 28px);
    margin-top: clamp(24px, 3vw, 36px);
}

.cs-challenge-item {
    display: flex;
    gap: clamp(16px, 2vw, 24px);
    align-items: flex-start;
    padding: clamp(20px, 2.5vw, 28px);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.cs-challenge-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.cs-challenge-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--gray-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-challenge-icon svg {
    width: 22px;
    height: 22px;
    color: var(--gray-700);
}

.cs-challenge-item h4 {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.cs-challenge-item p {
    font-size: clamp(0.82rem, 0.95vw, 0.9rem) !important;
    color: var(--gray-600) !important;
    margin-bottom: 0 !important;
    line-height: 1.6 !important;
}

/* ========================================
   Design Principles
   ======================================== */
.cs-principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 24px);
    margin-top: clamp(8px, 1vw, 16px);
}

.cs-principle-card {
    padding: clamp(28px, 3vw, 40px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.cs-principle-card:hover {
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

.cs-principle-num {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--gray-200);
    display: block;
    margin-bottom: clamp(16px, 2vw, 24px);
}

.cs-principle-card h3 {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.cs-principle-card p {
    font-size: clamp(0.82rem, 0.95vw, 0.9rem) !important;
    color: var(--gray-600) !important;
    line-height: 1.7 !important;
}

/* ========================================
   Key Features
   ======================================== */
.cs-features {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 20px);
    margin-top: clamp(8px, 1vw, 16px);
}

.cs-feature-block {
    padding: clamp(24px, 3vw, 36px);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.cs-feature-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.cs-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(12px, 1.5vw, 16px);
}

.cs-feature-header h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cs-feature-tag {
    font-size: clamp(0.62rem, 0.72vw, 0.7rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 14px;
    background: var(--gray-50);
    border-radius: 100px;
    color: var(--gray-600);
}

.cs-feature-block p {
    margin-bottom: 0 !important;
}

/* ========================================
   Design System
   ======================================== */
.cs-system-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 24px);
    margin-top: clamp(24px, 3vw, 36px);
    margin-bottom: clamp(32px, 4vw, 48px);
}

.cs-system-card {
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: border-color 0.4s var(--ease);
}

.cs-system-card:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

.cs-system-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto clamp(12px, 1.5vw, 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
}

.cs-system-icon svg {
    width: 40px;
    height: 40px;
}

.cs-system-card h4 {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.cs-system-card p {
    font-size: clamp(0.78rem, 0.9vw, 0.85rem) !important;
    color: var(--gray-600) !important;
    line-height: 1.6 !important;
    margin-bottom: 0 !important;
}

.cs-system-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cs-system-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--gray-700);
}

.cs-check {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-check svg {
    width: 14px;
    height: 14px;
    color: var(--white);
}

/* ========================================
   Results
   ======================================== */
.cs-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 24px);
}

.cs-result-card {
    padding: clamp(28px, 3.5vw, 44px);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.cs-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.cs-result-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(16px, 2vw, 24px);
    color: var(--black);
}

.cs-result-icon svg {
    width: 24px;
    height: 24px;
}

.cs-result-card h4 {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.cs-result-card p {
    font-size: clamp(0.82rem, 0.95vw, 0.9rem) !important;
    color: var(--gray-600) !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
}

/* ========================================
   Testimonial
   ======================================== */
.cs-testimonial-section {
    padding: clamp(100px, 12vw, 160px) 0;
    text-align: center;
}

.cs-testimonial {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.cs-quote-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
}

.cs-quote {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.03em;
    margin-bottom: clamp(24px, 3vw, 40px);
}

.cs-quote-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-quote-name {
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cs-quote-role {
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    color: var(--gray-500);
}

/* ========================================
   Next Project CTA
   ======================================== */
.cs-next {
    padding: clamp(80px, 10vw, 120px) 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cs-next-label {
    font-size: clamp(0.72rem, 0.85vw, 0.8rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-500);
    margin-bottom: clamp(12px, 1.5vw, 20px);
}

.cs-next-title {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    transition: opacity 0.3s;
}

.cs-next-title:hover {
    opacity: 0.6;
}

.cs-next-title svg {
    width: clamp(24px, 3vw, 36px);
    height: clamp(24px, 3vw, 36px);
    transition: transform 0.4s var(--ease);
}

.cs-next-title:hover svg {
    transform: translate(4px, -4px);
}

/* ========================================
   Footer Override
   ======================================== */
.cs-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: clamp(32px, 4vw, 48px) 0;
}

/* ========================================
   Full-Width Images
   ======================================== */
.cs-full-image {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--px);
}

.cs-full-image img {
    width: 100%;
    border-radius: clamp(12px, 1.5vw, 20px);
    object-fit: cover;
}

.cs-full-image-padded {
    padding-top: clamp(48px, 6vw, 80px);
    padding-bottom: clamp(48px, 6vw, 80px);
}

.cs-image-caption {
    margin-bottom: clamp(20px, 2.5vw, 32px);
}

.cs-caption-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: clamp(0.68rem, 0.8vw, 0.76rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    padding: 5px 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 100px;
    margin-bottom: 12px;
}

.cs-image-caption p {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--black);
    max-width: 560px;
}

.cs-image-note {
    display: block;
    max-width: 900px;
    margin: clamp(12px, 1.5vw, 16px) auto 0;
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    color: var(--gray-500);
    text-align: center;
}

/* ========================================
   In-Section Image (full container width, title stays in place)
   ======================================== */
.cs-content-image {
    margin-top: clamp(36px, 4.5vw, 60px);
}

.cs-content-image img {
    display: block;
    width: 100%;
    border-radius: clamp(12px, 1.5vw, 20px);
    object-fit: cover;
}

.cs-content-image + .cs-content-image {
    margin-top: clamp(16px, 2vw, 24px);
}

/* ========================================
   Two-Column Image Grid
   ======================================== */
.cs-image-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 1.5vw, 20px);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--px);
}

.cs-image-grid-two img {
    width: 100%;
    border-radius: clamp(12px, 1.5vw, 20px);
    object-fit: cover;
}

@media (max-width: 768px) {
    .cs-image-grid-two {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Secondary Testimonials
   ======================================== */
.cs-testimonial-secondary {
    margin-top: clamp(32px, 4vw, 48px);
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cs-quote-sm {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem) !important;
    opacity: 0.7;
}

/* ========================================
   Hero — Live Site CTA
   ======================================== */
.cs-hero-cta {
    display: flex;
    justify-content: center;
    margin-top: clamp(-8px, -1vw, 0px);
    margin-bottom: clamp(32px, 4vw, 48px);
    opacity: 0;
    animation: csFadeUp 0.8s var(--ease) 0.65s forwards;
}

.cs-hero-cta .btn-roll {
    background: var(--black);
    color: var(--white);
}

/* ========================================
   Quick Stats Bar
   ======================================== */
.cs-stats-bar {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: clamp(32px, 4vw, 48px) 0;
}

.cs-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(20px, 3vw, 32px);
}

.cs-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.cs-stat-value {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.cs-stat-label {
    font-size: clamp(0.68rem, 0.8vw, 0.76rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
}

@media (max-width: 768px) {
    .cs-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Before / After Comparison
   ======================================== */
.cs-compare {
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(48px, 6vw, 80px) var(--px);
}

.cs-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2vw, 24px);
}

.cs-compare-item {
    position: relative;
}

.cs-compare-item img {
    width: 100%;
    border-radius: clamp(12px, 1.5vw, 20px);
    object-fit: cover;
    aspect-ratio: 4 / 3;
    filter: grayscale(0.3) opacity(0.85);
}

.cs-compare-after img {
    filter: none;
}

.cs-compare-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: clamp(0.65rem, 0.75vw, 0.72rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--black);
    backdrop-filter: blur(8px);
    z-index: 2;
}

.cs-compare-after .cs-compare-tag {
    background: var(--black);
    color: var(--white);
}

@media (max-width: 768px) {
    .cs-compare-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   CTA Banner (mid-page conversion prompt)
   ======================================== */
.cs-cta-banner {
    margin: clamp(80px, 10vw, 140px) auto;
    max-width: 1280px;
    padding: 0 var(--px);
}

.cs-cta-banner-inner {
    background: var(--black);
    color: var(--white);
    border-radius: clamp(16px, 2vw, 24px);
    padding: clamp(40px, 6vw, 72px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, 2vw, 24px);
}

.cs-cta-banner-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    max-width: 620px;
}

.cs-cta-banner .btn-roll {
    background: var(--white);
    color: var(--black);
}

/* ========================================
   Template Image Placeholder
   Add this class to any <img> whose src doesn't exist yet — it keeps the
   box visibly bounded (instead of collapsing to a stray broken-image icon)
   so the page previews correctly before real assets are dropped in.
   Remove the class once the real image is in place.
   ======================================== */
.cs-img-placeholder {
    background: repeating-linear-gradient(-45deg,
            var(--gray-50),
            var(--gray-50) 12px,
            #ffffff 12px,
            #ffffff 24px);
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

/* ========================================
   Animations
   ======================================== */
@keyframes csFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 968px) {
    .cs-section-grid {
        grid-template-columns: 1fr;
        gap: clamp(24px, 4vw, 32px);
    }

    .cs-section-label {
        position: relative;
        top: auto;
    }

    .cs-principles {
        grid-template-columns: 1fr;
    }

    .cs-system-grid {
        grid-template-columns: 1fr;
    }

    .cs-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cs-hero-meta {
        flex-wrap: wrap;
        gap: 20px;
    }

    .cs-meta-item {
        min-width: 120px;
    }

    .cs-challenge-item {
        flex-direction: column;
    }

    .cs-feature-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cs-next-title {
        flex-direction: column;
        gap: 8px;
    }

    .cs-footer .footer-inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        align-items: center;
    }

    .cs-footer .footer-right {
        align-items: center;
    }

    .cs-footer .footer-socials {
        flex-wrap: wrap;
        justify-content: center;
    }
}
