/* ================================
   CASE STUDY PAGE STYLES
   ================================ */

/* Case Study Navbar Override */
.nav {
    padding: 20px 0;
    width: 100%;
    left: 0;
    transform: none;
    max-width: none;
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease, gap 0.3s ease;
}

.back-link:hover {
    color: var(--text-primary);
    gap: 12px;
}

.back-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-link:hover .back-arrow {
    transform: translateX(-4px);
}

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

/* Breadcrumb */
.case-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb-link {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--accent-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
}

/* ================================
   HERO SECTION
   ================================ */
.case-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 80px;
    position: relative;
}

/* Compact hero for legal pages only */
.legal-page .case-hero {
    min-height: auto;
    justify-content: flex-start;
    padding: 140px 0 40px;
}

.legal-page .case-hero-content {
    margin-bottom: 0px;
}

.legal-page .case-hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
}

.legal-page .case-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.case-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    margin-bottom: 80px;
}

.case-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.case-hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: 60px;
    max-width: 800px;
}

.case-hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    max-width: 800px;
}

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

.meta-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-value {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.case-hero-image {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.hero-image-wrapper {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.hero-image-wrapper:hover .hero-img {
    transform: scale(1.05);
}

/* Project Disclaimer */
.project-disclaimer {
    display: flex;
    gap: 20px;
    padding: 24px 28px;
    background: var(--bg-elevated);
    border-left: 4px solid var(--accent-primary);
    border-radius: 12px;
    max-width: 900px;
    color: var(--text-secondary);
}

.project-disclaimer svg {
    color: var(--accent-primary);
    margin-top: 2px;
}

.disclaimer-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.disclaimer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.disclaimer-text strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ================================
   CASE SECTIONS
   ================================ */
.case-section {
    padding: 120px 0;
    position: relative;
}

.section-intro {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 60px;
}

.section-number {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    opacity: 0.6;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
}

/* Privacy/Terms Content Spacing */
.privacy-content h2,
.privacy-content .section-title {
    margin-top: 80px;
    margin-bottom: 32px;
    font-size: 2rem;
}

.privacy-content h2:first-child,
.privacy-content .section-title:first-child {
    margin-top: 0;
}

.privacy-content h3,
.privacy-content .section-subtitle {
    margin-top: 48px;
    margin-bottom: 24px;
    font-size: 1.25rem;
    font-weight: 600;
}

.privacy-content p {
    margin-bottom: 24px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.privacy-content ul,
.privacy-content ol {
    margin-bottom: 32px;
    padding-left: 24px;
}

.privacy-content li {
    margin-bottom: 8px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.privacy-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ================================
   OVERVIEW SECTION
   ================================ */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.overview-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 32px;
    line-height: 1.3;
}

.overview-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.overview-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stat-card {
    padding: 40px;
    background: var(--bg-elevated);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* ================================
   CHALLENGE SECTION
   ================================ */
.challenge-section {
    background: var(--bg-secondary);
}

.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 900px;
}

.challenge-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 32px;
}

.challenge-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--gradient-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.challenge-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.challenge-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ================================
   SOLUTION SECTION
   ================================ */
.solution-text-block {
    max-width: 900px;
    margin-bottom: 80px;
}

.solution-heading {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    line-height: 1.3;
}

.solution-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Design System */
.design-system {
    background: var(--bg-elevated);
    padding: 60px;
    border-radius: 24px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.design-system-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 48px;
}

.design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 48px;
}

.design-block-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

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

.color-swatch {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.swatch {
    width: 100%;
    aspect-ratio: 2/1;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.swatch-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.type-sample {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.type-example {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ================================
   FEATURES SECTION
   ================================ */
.features-section {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    grid-auto-rows: 1fr;
}

.feature-card {
    padding: 40px;
    background: var(--bg-elevated);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.3) 0%,
        rgba(236, 72, 153, 0.3) 50%,
        rgba(245, 158, 11, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.2) 0%,
        rgba(236, 72, 153, 0.2) 50%,
        rgba(245, 158, 11, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(15px);
}

.feature-card:hover,
.feature-card.mobile-active {
    transform: translateY(-8px);
    box-shadow:
        0 15px 50px rgba(99, 102, 241, 0.25),
        0 25px 70px rgba(236, 72, 153, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-card:hover::before,
.feature-card.mobile-active::before {
    opacity: 1;
}

.feature-card:hover::after,
.feature-card.mobile-active::after {
    opacity: 1;
}

.feature-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.feature-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* ================================
   SHOWCASE SECTION
   ================================ */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
}

.showcase-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.showcase-item.full {
    grid-column: span 12;
}

.showcase-item.half {
    grid-column: span 6;
}

.showcase-item.third {
    grid-column: span 4;
}

.showcase-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.showcase-item:hover .showcase-img {
    transform: scale(1.05);
}

.showcase-caption {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* ================================
   RESULTS SECTION
   ================================ */
.results-section {
    background: var(--bg-secondary);
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.results-heading {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    line-height: 1.3;
}

.results-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
}

.results-metrics {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.metric-large {
    padding: 60px;
    background: var(--bg-elevated);
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.metric-large::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.metric-large:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md);
}

.metric-large:hover::before {
    opacity: 1;
}

.metric-large .metric-number {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.metric-large .metric-label {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.metric-large .metric-description {
    font-size: 1rem;
    color: var(--text-muted);
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.metric-small {
    padding: 40px;
    background: var(--bg-elevated);
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.metric-small::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.metric-small:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md);
}

.metric-small:hover::before {
    opacity: 1;
}

.metric-small .metric-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.metric-small .metric-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.results-testimonial {
    padding: 60px;
    background: var(--bg-elevated);
    border-radius: 24px;
    border-left: 4px solid var(--accent-primary);
}

.testimonial-quote {
    font-size: 1.5rem;
    line-height: 1.6;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 32px;
}

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

.author-name {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
}

.author-title {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ================================
   NEXT PROJECT SECTION
   ================================ */
.next-project-section {
    padding: 120px 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.next-project-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.next-project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.next-project-content,
.cta-card {
    position: relative;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-radius: 32px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.next-project-content:hover,
.cta-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 30px 80px rgba(99, 102, 241, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.1) inset;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
}

.next-project-content::after,
.cta-card::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.5s ease, width 0.5s ease;
}

.next-project-content:hover::after,
.cta-card:hover::after {
    opacity: 1;
    width: 80%;
}

.next-project-info,
.cta-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.next-label,
.cta-label {
    font-size: 0.85rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    display: block;
    font-weight: 600;
}

.next-title,
.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 40px;
    margin-top: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Light theme support for card titles */
[data-theme="light"] .next-title,
[data-theme="light"] .cta-title {
    background: linear-gradient(135deg, #0a0a0a 0%, rgba(10, 10, 10, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.next-link,
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.next-link::before,
.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.next-link:hover,
.cta-button:hover {
    border-color: transparent;
    color: white;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.next-link:hover::before,
.cta-button:hover::before {
    opacity: 1;
}

.next-link svg,
.cta-button svg {
    transition: transform 0.3s ease;
}

.next-link:hover svg,
.cta-button:hover svg {
    transform: translateX(4px);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 968px) {
    .container-case {
        padding: 0 40px;
    }

    .case-hero {
        padding: 100px 40px 60px;
    }

    .case-hero-content,
    .case-hero-image {
        padding: 0;
    }

    .case-hero-title {
        font-size: 3rem;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .challenge-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .design-system {
        padding: 40px;
    }

    .design-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .showcase-item.half,
    .showcase-item.third {
        grid-column: span 12;
    }

    .metric-large {
        padding: 40px;
    }

    .metric-large .metric-number {
        font-size: 4rem;
    }

    .results-testimonial {
        padding: 40px;
    }

    .testimonial-quote {
        font-size: 1.25rem;
    }

    .next-title {
        font-size: 2.5rem;
    }
}

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

@media (max-width: 640px) {
    .case-section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .case-hero-meta {
        grid-template-columns: 1fr 1fr;
    }

    .color-swatches {
        grid-template-columns: 1fr;
    }
}

/* ================================
   FOOTER - Uses styles from main.css
   ================================ */
/* Footer styles removed - all pages now use the shared footer from main.css */

@media (max-width: 640px) {
    .next-project-section {
        padding: 80px 0;
    }

    .next-project-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .next-project-content,
    .cta-card {
        padding: 50px 32px;
    }

    .next-title,
    .cta-title {
        font-size: 2rem;
    }

    .next-link,
    .cta-button {
        width: 100%;
        justify-content: center;
    }
}
