/* Case Study Page Specific Styles */
/* Note: This file should be loaded AFTER styles.css to override base styles */
/* All color variables and text styling come from styles.css */



/* Navigation and Footer styles are in styles.css */

/* Main Content */
main {
    margin-top: 160px;
    padding: 0 208px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero */
.hero {
    padding-bottom: 16px;
}

.hero-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;

}

.hero-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 1024px;
    margin-bottom: 0px;
}


.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
    animation: fadeIn 0.8s ease-out 0.4s forwards;
    
}

.pill {
    display: inline-flex;
    padding: 6px 10px;
    background: #EEEEEF;
    border: 0px solid var(--divider);
    border-radius: 100px;
    font-weight: 500;
    font-size: 13px;
    line-height: 1;
    text-transform: titlecase;
    color: var(--text-secondary);
    
}

/* Hero Image */
.hero-image {
    padding: 40px 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
    opacity: 0;
}

.hero-image img,
.hero-image picture {
    width: 100%;
    height: auto;
    display: block;
}

.image-placeholder {
    width: 100%;
    background: none;
    border: .25px solid var(--divider);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

/* Image frames for content */
.image-frame {
    width: 100%;
    max-width: 1024px;
    border-radius: 10px;
    overflow: hidden;
}

.image-frame img,
.image-frame picture {
    width: 100%;
    height: auto;
    display: block;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

.image-frame.placeholder {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.image-frame .image-link {
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.image-frame .image-link:hover {
    opacity: 0.9;
}

.image-frame .image-link img {
    width: 100%;
    height: auto;
    display: block;
}
/* Image Modal/Lightbox */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: default;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 54px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.image-modal-close:hover {
    opacity: 0.7;
}

/* Segmented Control */
.depth-control {
    position: sticky;
    top: 90px;   /* Adjust to match your nav height so it sits below the fixed nav */
    z-index: 100;
    background: var(--bg-primary);  /* Prevents content from showing through when scrolling */
    padding-top: 8px;   /* or combine with existing spacing */
    padding-bottom: 16px;
    margin-top: 16px;
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
    gap: 12px;

}

.control-label {
font-size: 16px;
line-height: 1.7;
text-align: left;
color: var(--text-secondary);
}

/* Container */
.segmented-control {
background: #EEEEEF;
border: 0.25px solid #E5E1DB;
border-radius: 10px;
padding: 4px;
display: flex;
gap: 4px;
}

/* Segments */
.segment {
flex: 1;
padding: 8px 16px;
background: transparent;
border: none;
border-radius: 7px;
font-family: var(--font-body);
font-weight: 500;
font-size: 14px;
color: var(--text-white);
cursor: pointer;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover */
.segment:hover {
background: rgba(255, 255, 255, 0.6);
color: var(--text-primary);
}

/* Active */
.segment.active {
font-weight: 600; 
background: var(--bg-white);
color: var(--text-primary);
box-shadow:
0 1px 2px rgba(0, 0, 0, 0.04),
0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Focus (keyboard) */
.segment:focus-visible {
outline: 2px solid #3F6F5A;
outline-offset: 2px;
}

/* Short labels for segmented control below 600px */
.segment .segment-label-short {
    display: none;
}

@media (max-width: 600px) {
    .segment .segment-label-long {
        display: none;
    }
    .segment .segment-label-short {
        display: inline;
    }
}

/* Content transition animations */
#basics-content,
#deeper-content,
#details-content {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
            transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#basics-content.animate,
#deeper-content.animate,
#details-content.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure hidden content divs are not visible */
#basics-content[style*="display: none"],
#deeper-content[style*="display: none"],
#details-content[style*="display: none"] {
display: none !important;
opacity: 0 !important;
}

/* Sections inside segment-control content use .animate-on-scroll (opacity: 0) from styles.css
   until scroll adds .visible – override so tab content is visible as soon as the panel is shown */
#basics-content .animate-on-scroll,
#deeper-content .animate-on-scroll,
#details-content .animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* Sections */
section {
    margin-bottom: 56px;
}

/* First heading after segment control – override h2 margin from styles.css so gap is editable here */
#basics-content section:first-child h2,
#deeper-content section:first-child h2,
#details-content section:first-child h2 {
    margin-top: 0;
}


/* Competitors grid */
.competitors-grid {
    display: flex;
    padding: 16px 0;
    align-items: flex-start;
    gap: 24px;
    align-self: stretch;
}


.competitor-item {
    flex: 1;
}

.competitor-item .body-copy {
    margin-bottom: 0;
}

/* Footer styles are in styles.css */

/* Case Study Specific Animations */
/* Base animations are in styles.css */

/* Hero section fade in on load */
.hero-section {
    animation: fadeInUp .5s ease-out forwards;
}

/* Navigation animations are in styles.css */

/* Smooth page transitions */
body {
    animation: pageLoad 0.3s ease-in;
}



/* Password-protected content: content hidden until unlocked */
.case-study-protected-wrapper {
    position: relative;
}

/* Hide all content (everything after the overlay) until password is entered */
.case-study-protected-wrapper:not(.unlocked) .case-study-overlay ~ * {
    display: none !important;
}

/* When unlocked: hide overlay; content visibility is controlled by the page JS */
.case-study-protected-wrapper.unlocked .case-study-overlay {
    display: none !important;
}

.case-study-overlay {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 0px;
    background: transparent;
}

.case-study-overlay.unlocked {
    display: none !important;
}

.case-study-overlay-box {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 40px 32px;
    text-align: left;
}

/* Footer: always visible on case study pages (not covered by overlay) */
body:has(.case-study-protected-wrapper) footer {
    position: relative;
    z-index: 1;
}

.case-study-overlay-box p {
    font-family: var(--font-body);
    font-size: 16px;
    padding-bottom: 12px;
    color: var(--text-secondary);
    margin: 16px;
    line-height: 1.5;
}

.case-study-overlay-form input[type="password"] {
    width: 100%;
    max-width: 500px;
    padding: 16px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    border: 1px solid var(--divider);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-primary);
    box-sizing: border-box;
}

.case-study-overlay-form input[type="password"]::placeholder {
    color: var(--text-secondary);
}

.case-study-overlay-form input[type="password"]:focus {
    outline: none;
    border-color: var(--text-secondary);
    background: #fff;
}

.case-study-overlay-error {
    font-size: 13px;
    color: #c62828;
    margin-top: 12px;
    min-height: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    main {
        padding: 0 48px;
    }
}

@media (max-width: 768px) {
    main {
        padding: 0 24px;
        margin-top: 120px;
    }

    h1 {
        font-size: 28px;
        max-width: 100%;
        line-height: 1.2;
    }

    h2 {
        font-size: 24px;
    }

    /* Case study hero: stack title, subheader, and pills; keep visible */
    .hero-intro {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
    }

    .hero-intro .subheader {
        font-size: 18px;
        max-width: 100%;
        margin-bottom: 0;
    }

    .hero-intro .pills {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 4px;
        margin-bottom: 8px;
    }

    .hero-intro .pill {
        font-size: 12px;
        padding: 6px 10px;
    }
}