/* ==========================================================================
   Proof Page Specific Styles
   ========================================================================== */

/* AOS Animation Library */
@import url('https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.css');

/* Proof Hero Section */
.proof-hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--midnight-blue) 0%, var(--coral-red) 100%);
}

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

.animated-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(30, 213, 195, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 90, 95, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(30, 213, 195, 0.2) 0%, transparent 50%);
    animation: patternFloat 20s ease-in-out infinite;
}

@keyframes patternFloat {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    33% {
        transform: translateX(-20px) translateY(-30px) rotate(5deg);
    }
    66% {
        transform: translateX(20px) translateY(20px) rotate(-3deg);
    }
}

.proof-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 2rem;
}

.proof-hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.proof-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.4;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Main Content */
.proof-main {
    padding: 5rem 0;
    background: var(--light-gray);
}

/* Proof Groups */
.proof-group {
    margin-bottom: 6rem;
    padding: 4rem 0;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.group-header {
    text-align: center;
    margin-bottom: 3rem;
}

.group-headline {
    color: var(--midnight-blue);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.group-description {
    color: var(--medium-gray);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Narrative Copy */
.narrative-copy {
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.narrative-item {
    margin-bottom: 1.5rem;
    text-align: center;
}

.narrative-item p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.narrative-item strong {
    color: var(--coral-red);
    font-weight: 600;
}

/* Case Grid */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

/* Case Cards */
.case-card {
    display: flex;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    cursor: pointer;
    min-height: 200px;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.case-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--coral-red), var(--electric-teal));
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    width: fit-content;
}

.case-title {
    color: var(--midnight-blue);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.case-description {
    color: var(--medium-gray);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.case-metrics {
    color: var(--coral-red);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-media {
    flex: 0 0 200px;
    position: relative;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, var(--midnight-blue), var(--coral-red));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.video-thumbnail:hover {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--midnight-blue);
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.video-thumbnail:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--white);
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Case Popup Content Scroll Styling */
.case-popup-content {
    scrollbar-width: thin;
    scrollbar-color: var(--coral-red) var(--light-gray);
}

.case-popup-content::-webkit-scrollbar {
    width: 12px;
}

.case-popup-content::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 6px;
}

.case-popup-content::-webkit-scrollbar-thumb {
    background: var(--coral-red);
    border-radius: 6px;
    border: 2px solid var(--light-gray);
}

.case-popup-content::-webkit-scrollbar-thumb:hover {
    background: var(--midnight-blue);
}

/* Ensure scrollable area is properly visible */
.case-popup-content {
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10001;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--coral-red);
}

.modal-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.modal-video-container iframe,
.modal-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Accessibility Enhancements */
.video-thumbnail:focus,
.case-card:focus,
.modal-close:focus {
    outline: 3px solid var(--electric-teal);
    outline-offset: 2px;
}

.video-thumbnail:focus .play-overlay,
.case-card:focus .video-thumbnail .play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--electric-teal);
    color: var(--white);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .animated-pattern,
    .scroll-indicator,
    .play-overlay,
    .case-card {
        animation: none !important;
        transition: none !important;
    }
    
    .video-thumbnail:hover,
    .case-card:hover {
        transform: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .case-tag {
        background: var(--midnight-blue);
        color: var(--white);
        border: 2px solid var(--white);
    }
    
    .video-thumbnail {
        border: 2px solid var(--midnight-blue);
    }
    
    .play-overlay {
        background: var(--white);
        border: 2px solid var(--midnight-blue);
    }
}

/* Print styles */
@media print {
    .proof-hero,
    .video-modal,
    .play-overlay,
    .scroll-indicator {
        display: none !important;
    }
    
    .case-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .case-media {
        display: none;
    }
    
    .case-content {
        width: 100%;
    }
}

/* Loading states */
.case-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.case-card.loading .play-overlay {
    background: var(--medium-gray);
}

.case-card.loading .play-overlay::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* End CTA Section */
.proof-cta {
    background: linear-gradient(135deg, var(--midnight-blue) 0%, var(--coral-red) 100%);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.proof-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(30, 213, 195, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.cta-headline {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.cta-primary,
.cta-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
    justify-content: center;
}

.cta-primary {
    background: var(--white);
    color: var(--midnight-blue);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-primary:hover {
    background: var(--electric-teal);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cta-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-secondary:hover {
    background: var(--white);
    color: var(--midnight-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.cta-secondary i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .proof-hero-title {
        font-size: 2.5rem;
    }
    
    .proof-hero-subtitle {
        font-size: 1.2rem;
    }
    
    .case-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .case-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .case-media {
        flex: 0 0 150px;
        order: -1;
    }
    
    .case-content {
        padding: 1.5rem;
    }
    
    .group-headline {
        font-size: 2rem;
    }
    
    .narrative-copy {
        padding: 0 1rem;
    }
    
    .proof-group {
        margin-bottom: 3rem;
        padding: 2rem 0;
    }
    
    /* Mobile modal improvements for tablets and large phones */
    .modal-content {
        width: 95vw;
        height: 90vh;
        max-width: none;
        margin: 5vh auto;
    }
    
    .modal-close {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .proof-hero-title {
        font-size: 2rem;
    }
    
    .proof-hero-subtitle {
        font-size: 1rem;
    }
    
    .case-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .case-content {
        padding: 1rem;
    }
    
    /* Full-screen mobile modals */
    .video-modal {
        padding: 0;
    }
    
    .modal-content {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-close {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 10002;
        background: rgba(0, 0, 0, 0.8);
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }
    
    .modal-video-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--midnight-blue);
    }
    
    /* Ensure content popups also use full screen on mobile */
    .case-popup-modal .modal-content {
        padding: 2rem 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .case-popup-content {
        padding: 0;
        max-height: none;
        overflow: visible;
    }
    
    .cta-headline {
        font-size: 1.5rem;
    }
    
    .cta-headline {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-primary,
    .cta-secondary {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
}