/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

/* Portfolio Hero Section */
.portfolio-hero {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
    z-index: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 60%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.portfolio-hero .hero-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 800px;
    text-align: center;
    z-index: 1;
    width: 90%;
    padding: 0 2rem;
    transition: opacity 0.3s ease-out;
}

.portfolio-hero .hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 200;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    color: #0f0f0f;
}

.portfolio-hero .hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

/* Content wrapper that starts after hero */
.case-studies,
.portfolio-links,
.client-trust,
.why-matters,
.footer {
    position: relative;
    z-index: 10;
}

/* Case Studies Section */
.case-studies {
    padding: 8rem 0;
    background: #ffffff;
    margin-top: 100vh;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 4rem;
    margin-top: 2rem;
}

.case-study-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.case-study-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.case-image {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.device-mockup {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
}

/* MacBook Mockup */
.macbook-mockup {
    position: relative;
    width: 280px;
    height: 180px;
    background: #2d3748;
    border-radius: 8px;
    padding: 8px 8px 24px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.macbook-mockup::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #4a5568;
    border-radius: 2px;
}

.macbook-mockup .screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

/* iPhone Mockup */
.iphone-mockup {
    position: relative;
    width: 70px;
    height: 140px;
    background: #2d3748;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.iphone-mockup .screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* Case Study Screenshots */
.case-screenshot {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Placeholder backgrounds for screenshots */
.case-1-desktop {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.case-1-mobile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.case-2-desktop {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.case-2-mobile {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.case-3-desktop {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.case-3-mobile {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.case-4-desktop {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.case-4-mobile {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Case Logo Container */
.case-logo-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.case-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.case-study-card:hover .case-logo {
    transform: scale(1.05);
}

/* Case Info */
.case-info {
    padding: 2.5rem;
    position: relative;
}

.case-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f0f0f;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.case-tagline {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.case-study-card:hover .case-overlay {
    opacity: 1;
}

.view-case-btn {
    background: #ffffff;
    color: #0f0f0f;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.case-study-card:hover .view-case-btn {
    transform: translateY(0);
}

.view-case-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Client Trust Section */
.client-trust {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    text-align: center;
    scroll-snap-align: start;
}

.trust-caption {
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.client-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.client-logo {
    font-size: 1.25rem;
    font-weight: 500;
    color: #9ca3af;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(156, 163, 175, 0.2);
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.client-logo:hover {
    color: #4b5563;
    border-color: rgba(75, 85, 99, 0.3);
    transform: translateY(-2px);
}

/* Why This Matters Section */
.why-matters {
    padding: 6rem 0;
    background: #ffffff;
    text-align: center;
    scroll-snap-align: start;
}

.why-matters-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.why-matters .section-title {
    color: #1a1a1a;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 500;
}

.why-matters-text {
    font-size: 1.25rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.why-matters-cta {
    margin-top: 4rem;
    text-align: center;
}

.cta-subtitle {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 2rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Portfolio Links Section */
.portfolio-links {
    min-height: 100vh;
    padding: 8rem 0;
    background: #ffffff;
    margin-top: 100vh;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
}

.portfolio-main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
    color: #0f0f0f;
    text-align: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.portfolio-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8rem;
    max-width: 1000px;
    margin: 0 auto;
}

.portfolio-column {
    display: flex;
    flex-direction: column;
}

.column-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f0f0f;
    margin-bottom: 0.75rem;
    text-align: left;
    letter-spacing: -0.01em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.portfolio-links-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.portfolio-link-item {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    border: none;
    padding: 0.5rem 0;
    outline: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.portfolio-link-item:hover {
    background: linear-gradient(-45deg, #1a1a1a, #4a90e2, #7b68ee, #ff6b6b, #1a1a1a);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chromatic 2s ease infinite;
    transform: translateY(-2px);
}

@keyframes chromatic {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-content {
    padding: 3rem;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 2rem;
    color: #0f0f0f;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-tagline {
    color: #6b7280;
    font-size: 1.125rem;
}

.modal-overview {
    margin-bottom: 3rem;
}

.modal-overview h3 {
    color: #0f0f0f;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.modal-overview p {
    color: #4b5563;
    line-height: 1.7;
}

.modal-services {
    margin-bottom: 3rem;
}

.modal-services h3 {
    color: #0f0f0f;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.service-tag {
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    text-align: center;
    font-size: 0.9rem;
}

.modal-outcome {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.modal-outcome h3 {
    color: #0f0f0f;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.outcome-stat {
    font-size: 2.5rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.outcome-description {
    color: #4b5563;
    font-size: 1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-hero {
        height: 100vh;
    }

    .portfolio-hero .hero-content {
        padding: 0 1rem;
    }

    .portfolio-links {
        min-height: 100vh;
        padding: 4rem 0;
    }

    .portfolio-main-title {
        font-size: clamp(2rem, 6vw, 3rem);
        margin-bottom: 3rem;
    }

    .portfolio-columns {
        grid-template-columns: 1fr;
        gap: 4rem;
        max-width: 100%;
    }

    .column-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .portfolio-links-list {
        gap: 0;
    }

    .portfolio-link-item {
        font-size: 1rem;
        padding: 0.4rem 0;
    }

    .case-studies {
        padding: 4rem 0;
    }

    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .case-study-card {
        margin: 0 1rem;
    }

    .case-image {
        height: 300px;
    }

    .device-mockup {
        gap: 1rem;
        padding: 1rem;
    }

    .macbook-mockup {
        width: 200px;
        height: 130px;
    }

    .iphone-mockup {
        width: 50px;
        height: 100px;
    }

    .case-info {
        padding: 2rem;
    }

    .case-logo-container {
        padding: 1rem;
    }

    .case-logo {
        border-radius: 12px;
    }

    .client-trust {
        padding: 4rem 0;
    }

    .client-logos {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .why-matters {
        padding: 4rem 0;
    }

    .modal-content {
        padding: 2rem;
    }

    .services-list {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .portfolio-links {
        min-height: 100vh;
        padding: 3rem 0;
    }

    .portfolio-main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 2rem;
    }

    .portfolio-columns {
        gap: 3rem;
    }

    .column-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .portfolio-links-list {
        gap: 0;
    }

    .portfolio-link-item {
        font-size: 0.95rem;
        padding: 0.3rem 0;
    }

    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .case-image {
        height: 250px;
    }

    .macbook-mockup {
        width: 160px;
        height: 100px;
    }

    .iphone-mockup {
        width: 40px;
        height: 80px;
    }

    .client-logos {
        flex-direction: column;
        align-items: center;
    }

    .client-logo {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}

/* Animation for scroll */
@media (prefers-reduced-motion: no-preference) {
    .case-study-card {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease forwards;
    }
    
    .case-study-card:nth-child(1) { animation-delay: 0.1s; }
    .case-study-card:nth-child(2) { animation-delay: 0.2s; }
    .case-study-card:nth-child(3) { animation-delay: 0.3s; }
    .case-study-card:nth-child(4) { animation-delay: 0.4s; }
    
    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
} 