/* Case Study Styles */

/* Base typography */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
}

/* Color selection */
p::selection {
  background: #92c1f6ea;
  color: #000000;
}

/* Navigation */
.case-nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fafafa;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
    z-index: 1000;
}

.case-nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-back-link {
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.case-back-link:hover {
    opacity: 0.7;
}

.case-nav-links {
    display: flex;
    gap: 32px;
}

.case-nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.case-nav-links a:hover {
    color: #1a1a1a;
}

/* Container */
.case-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
}

.case-container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 80px;
}

/* Hero Section */
.case-hero {
    padding: clamp(100px, 12vh, 140px) 0 clamp(60px, 8vh, 100px);
    text-align: center;
}

.case-meta {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: clamp(24px, 4vh, 40px);
    font-weight: 500;
}

.case-company-logo-hero {
    height: 28px;
    width: auto;
    margin: 0 auto clamp(32px, 5vh, 48px);
    display: block;
    opacity: 0.85;
}

.case-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    color: #0a0a0a;
    margin: 0 auto clamp(16px, 2vh, 24px);
    max-width: 820px;
    letter-spacing: -0.025em;
}

.case-subtitle {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 400;
    color: #666;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.case-scroll {
    font-size: 13px;
    color: #a3a3a3;
}

/* Sections */
.case-section {
    padding: 100px 0px 20px;
}

.case-section-gray {
    background-color: #fcfdfe;
}

.case-section-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 60px;
    width: 100%;
    text-align: center;
}

/* Grids */
.case-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.case-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 80px;
}

/* Cards */
.case-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 30px;
    border: none;
}

.case-section-gray .case-card {
    background-color: #fcfdfe;
}

/* Card Images */
.case-card-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    object-fit: cover;
}

/* Detail Images - Large format in grid */
.case-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.case-detail-image {
    width: 420px;
    height: auto;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-detail-image:hover {
    transform: scale(1.00);
}

.case-image-caption {
    font-size: 14px;
    color: #737373;
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}

.case-card-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.case-card-text {
    font-size: 15px;
    color: #737373;
    line-height: 1.7;
}

/* Context Section - No Cards */
.case-context-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.3;
}

.case-context-text {
    font-size: 15px;
    color: #737373;
    line-height: 1.7;
}

/* Results Section with White Background */


/* Results Grid - Bento Box Layout */
.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 80px;
}

/* Small Metric Cards */
.metric-card-small {
    grid-column: span 1;
    background-color: #fbfbfb;
    padding: 32px;
    border-radius: 12px;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card-small:hover {
    transform: translateY(-2px);
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.08),
                0px 1px 2px -1px rgba(0, 0, 0, 0.08),
                0px 2px 4px 0px rgba(0, 0, 0, 0.06);
}

.metric-value {
    font-size: 48px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1;
}

.metric-label {
    font-size: 14px;
    color: #585858;
    line-height: 1.5;
}

/* Testimonial Cards */
.testimonial-card-large {
    grid-column: span 2;
    grid-row: span 1;
    padding: 40px;
    border-radius: 12px;
    color: #1a1a1a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #f7f9ff;
}

.testimonial-card-medium {
    grid-column: span 2;
    padding: 40px;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #e7e7e7;
}

.testimonial-card-large:hover,
.testimonial-card-medium:hover {
    transform: translateY(-2px);
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.08),
                0px 1px 2px -1px rgba(0, 0, 0, 0.08),
                0px 2px 4px 0px rgba(0, 0, 0, 0.06);
}


/* Testimonial Content */
.testimonial-company {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.7;
}

.testimonial-card-large blockquote,
.testimonial-card-medium blockquote {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-weight: 400;
    quotes: none;
}

.testimonial-author {
    font-size: 13px;
    opacity: 0.7;
    font-weight: 500;
}

/* Legacy Metric Cards (keep for backwards compatibility) */
.case-metric-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    border: none;
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.06),
                0px 1px 2px -1px rgba(0, 0, 0, 0.06),
                0px 2px 4px 0px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.case-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.08),
                0px 1px 2px -1px rgba(0, 0, 0, 0.08),
                0px 2px 4px 0px rgba(0, 0, 0, 0.06);
}

.case-metric-value {
    font-size: 48px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1;
}

.case-metric-label {
    font-size: 15px;
    color: #585858;
    line-height: 1.6;
}

/* Content Blocks */
.case-content-block {
    margin-bottom: 40px;
}

.case-block-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.case-text {
    font-size: 16px;
    color: #585858;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: center;
}

.case-list {
    list-style: none;
    padding: 0;
}

.case-list li {
    font-size: 15px;
    line-height: 1.8;
    padding-left: 24px;
    position: relative;
    margin-bottom: 12px;
}

.case-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: 600;
}

/* Images */
.case-image-section {
    padding: clamp(40px, 6vh, 80px) 0;
    background-color: #ffffff;
}

.case-featured-image {
    width: 100%;
    max-width: 1100px;
    height: auto;
    border-radius: 16px;
    display: block;
    margin: 48px auto;
    margin-bottom: 48px;
}

/* Companies Section */
.case-companies {
    padding: 0 0 80px;
    background-color: #ffffff;
    text-align: center;
    overflow: hidden;
}

.case-companies-label {
    font-size: 13px;
    color: #a3a3a3;
    letter-spacing: 0.05em;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.case-companies-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.case-companies-track {
    display: flex;
    align-items: center;
    gap: 80px;
    animation: scroll-infinite 30s linear infinite;
    width: fit-content;
}

.case-company-logo {
    flex-shrink: 0;
    width: 160px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-company-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.case-company-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.case-companies-slider:hover .case-companies-track {
    animation-play-state: paused;
}

/* Legacy styles for backwards compatibility */
.case-companies-grid {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.case-company-name {
    font-size: 16px;
    font-weight: 500;
    color: #585858;
}

/* Back Navigation Section */
.case-back-nav {
    padding: 60px 0;
    text-align: center;
}

/* CTA Section */
.case-cta {
    background-color: #131a16;
    padding: 80px 0 0;
    text-align: center;
}

.case-cta-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 20px;
}

.case-cta-text {
    font-size: 16px;
    color: #a3a3a3;
    margin-bottom: 40px;
    line-height: 1.6;
}

.case-cta-button {
    display: inline-block;
    padding: 10px 24px;
    background-color: #ffffff;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.case-cta-button:hover {
    background-color: #ffef13;
    color: #000000;
    transform: translateY(-1px);
}

/* Footer */
.case-footer {
    padding: 60px 0;
    border-top: 1px solid #e5e5e5;
}

.case-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-footer-link {
    font-size: 14px;
    color: #737373;
    text-decoration: none;
    transition: color 0.2s ease;
}

.case-footer-link:hover {
    color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .case-nav-content,
    .case-container,
    .case-container-narrow {
        padding: 0 40px;
    }

    .case-grid-2 {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .case-grid-3.case-carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 16px;
        margin: 0 -40px;
        padding-left: 40px;
        padding-right: 40px;
        -webkit-overflow-scrolling: touch;
    }

    .case-grid-3.case-carousel::-webkit-scrollbar {
        display: none;
    }

    .case-grid-3.case-carousel {
        scrollbar-width: none;
    }

    .case-grid-3.case-carousel .case-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .testimonial-card-large,
    .testimonial-card-medium {
        grid-column: span 2;
    }

    .metric-card-small {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .case-nav-content,
    .case-container,
    .case-container-narrow {
        padding: 0 24px;
    }

    .case-nav-links {
        display: none;
    }

    .case-hero {
        padding: 100px 0 48px;
    }

    .case-title {
        font-weight: 600;
    }

    .case-section,
    .case-section-white {
        padding: 60px 0;
    }

    .case-cta {
        padding: 80px 0 0;
    }

    .case-footer {
        padding: 40px 0;
    }

    .case-footer-nav {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .case-card,
    .case-metric-card {
        padding: 28px;
    }

    .case-grid-3.case-carousel {
        margin: 0 -24px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .case-grid-3.case-carousel .case-card {
        flex: 0 0 90%;
    }

    .case-metric-value,
    .metric-value {
        font-size: 36px;
    }

    /* Results Grid Mobile */
    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .metric-card-small,
    .testimonial-card-large,
    .testimonial-card-medium {
        grid-column: span 1;
    }

    .testimonial-card-large,
    .testimonial-card-medium {
        padding: 32px;
    }

    .testimonial-card-large blockquote,
    .testimonial-card-medium blockquote {
        font-size: 15px;
    }

    /* Companies Slider Mobile */
    .case-companies-track {
        gap: 48px;
    }

    .case-company-logo {
        width: 120px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .case-nav-content,
    .case-container,
    .case-container-narrow {
        padding: 0 20px;
    }
}
