/* =============================================
   OpptyWave AI - Case Studies Landing Page
   Authentic branding and single-page design
   ============================================= */

/* CSS Variables - OpptyWave AI Brand Colors */
:root {
    /* Primary Brand Colors - From Logo */
    --brand-orange: #FF6B35;
    --brand-pink: #E91E63;
    --brand-purple: #9C27B0;
    --brand-violet: #673AB7;
    --brand-dark: #1A1A1A;
    
    /* Secondary Colors */
    --accent-teal: #00BCD4;
    --accent-green: #4CAF50;
    --accent-blue: #2196F3;
    
    /* Neutral Colors */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    
    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAFAFA;
    --bg-dark: #1A1A1A;
    --bg-card: #FFFFFF;
    
    /* Text Colors */
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-muted: #BDBDBD;
    --text-white: #FFFFFF;
    
    /* Brand Gradients - Matching Logo */
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #E91E63 50%, #9C27B0 100%);
    --gradient-secondary: linear-gradient(135deg, #00BCD4 0%, #4CAF50 100%);
    --gradient-accent: linear-gradient(135deg, #E91E63 0%, #673AB7 100%);
    --gradient-dark: linear-gradient(135deg, #1A1A1A 0%, #424242 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

h1 { 
    font-size: 4rem; 
    font-weight: 800;
}

h2 { 
    font-size: 3rem; 
    font-weight: 700;
}

h3 { 
    font-size: 2rem; 
    font-weight: 600;
}

h4 { 
    font-size: 1.5rem; 
    font-weight: 600;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--brand-purple);
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--brand-purple);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--gray-300);
}

.btn-ghost:hover {
    color: var(--brand-purple);
    border-color: var(--brand-purple);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 0.75rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #FFFFFF !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);\n    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 1.25rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 60px;
    width: auto;
    transition: var(--transition);
    background: transparent !important;
    mix-blend-mode: normal;
    border: none;
    outline: none;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Ensure no background bleeding */
.nav-brand .logo {
    background: transparent;
    border: none;
}

/* Optimize logo display - remove white background */
.logo-image {
    background-color: transparent !important;
    mix-blend-mode: multiply;
    filter: contrast(1.05);
}

/* Header logo - blend with white background */
.nav-brand .logo-image {
    mix-blend-mode: multiply;
}

/* Footer logo - optimized for dark background */
.footer-logo .logo-image,
.footer-logo-image {
    mix-blend-mode: normal;
    filter: none;
    background: transparent !important;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--brand-purple);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge, .cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-orange);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.05);
    }
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.stat {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}



/* Case Studies Section */
.case-studies {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.industry-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--gray-200);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 2rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gradient-primary);
    color: var(--text-white);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.case-studies-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.case-study-card {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.case-study-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.case-study-media {
    position: relative;
    overflow: hidden;
    background: var(--gray-100);
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-study-media img,
.case-study-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
    background: transparent;
}

.case-study-media:hover img,
.case-study-media:hover video {
    transform: scale(1.02);
}

/* Ensure GIF dates in top-right corner are visible */
.case-study-media::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 40px;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

/* Add visual enhancement for GIF playback */
.case-study-media img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transition: filter 0.3s ease;
}

/* Preload hover state for faster interaction */
.case-study-card:hover .case-study-media img {
    filter: brightness(1.05) contrast(1.05);
}

/* Loading state for GIFs */
.case-study-media img:not(.loaded) {
    opacity: 0.7;
    filter: blur(1px);
}

.case-study-media img.loaded {
    opacity: 1;
    filter: none;
    transition: all 0.3s ease;
}

/* Add a subtle animation while GIF loads */
.case-study-media img:not(.loaded)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px;
    border: 2px solid var(--brand-purple);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.case-study-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    background: var(--gradient-primary);
    color: var(--text-white);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    z-index: 2;
}

.case-study-date {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-white);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.case-study-content {
    padding: 2rem;
}

.case-study-action {
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 1rem;
}

.btn-case-study {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-case-study:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.case-study-header {
    margin-bottom: 0.75rem;
}

.case-study-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.case-study-timestamp {
    font-size: 0.875rem;
    color: var(--brand-orange);
    font-weight: 500;
    display: block;
}

.case-study-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

.case-study-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.metric {
    text-align: center;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Results Summary */
.results-summary {
    background: var(--gradient-dark);
    padding: 4rem 0;
    margin-top: 2rem;
    color: var(--text-white);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.summary-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content .stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: var(--bg-primary);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.feature i {
    color: var(--brand-orange);
    width: 20px;
}

.cta-buttons {
    margin-bottom: 2rem;
}

.cta-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.cta-guarantee i {
    color: var(--brand-orange);
}

/* Footer */
.footer {
    background: #000000 !important;
    color: var(--text-white);
    padding: 3rem 0 1.5rem;
}

.footer a:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo .logo {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.footer-logo .logo-image,
.footer-logo-image {
    height: 48px;
    width: auto;
    background: transparent !important;
    border: none;
    outline: none;
}

.footer-logo .logo {
    background: transparent;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Hidden by default - will be shown by JavaScript */
.case-study-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.case-study-card.visible {
    opacity: 1;
    transform: translateY(0);
}



/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .case-studies-masonry {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-actions {
        gap: 1rem;
    }
    
    .btn-primary.btn-sm {
        display: none;
    }
    
    .logo-image {
        height: 48px;
    }
    
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .case-studies-masonry {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .summary-stat {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-features {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .industry-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        gap: 0.75rem;
    }
    
    .filter-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animation utilities */
.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }