/* ============================================
   CASE STUDY PAGE — Styles
   ============================================ */

/* ---------- CASE HERO ---------- */
.case-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.case-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.case-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    will-change: transform;
}

.case-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0.3) 0%,
        rgba(10, 10, 10, 0.5) 40%,
        rgba(10, 10, 10, 0.9) 100%
    );
    z-index: 1;
}

.case-hero__content {
    position: relative;
    z-index: 2;
    padding: 0 5% 100px;
    max-width: 900px;
}

.case-hero__meta {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.case-hero__tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blue);
    border: 1px solid var(--blue);
    padding: 6px 14px;
    border-radius: 0;
}

.case-hero__title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.case-hero__line {
    display: block;
    overflow: hidden;
}

.case-hero__line--stroke {
    -webkit-text-stroke: 2px var(--white);
    color: transparent;
}

.case-hero__subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gray-light);
    max-width: 600px;
    font-weight: 300;
}

.case-hero__scroll {
    position: absolute;
    bottom: 40px;
    right: 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.case-hero__scroll-line {
    width: 1px;
    height: 60px;
    background: var(--gray-mid);
    position: relative;
    overflow: hidden;
}

.case-hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--blue);
    animation: scrollLine 2s ease-in-out infinite;
}

.case-hero__scroll span {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray);
    writing-mode: vertical-rl;
}

/* ---------- PROJECT INFO BAR ---------- */
.case-info {
    border-bottom: 1px solid var(--gray-mid);
    padding: 40px 0;
}

.case-info__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.case-info__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.case-info__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray);
}

.case-info__value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
}

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

.case-section--dark {
    background: var(--gray-dark);
}

.case-section__header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
}

.case-section__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: uppercase;
}

.case-section__text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--gray-light);
    max-width: 700px;
    font-weight: 300;
    margin-bottom: 50px;
}

/* ---------- CASE IMAGES ---------- */
.case-image {
    overflow: hidden;
    margin-bottom: 4px;
}

.case-image--full {
    width: 100%;
}

.case-image--full img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s var(--ease-out-expo);
}

.case-image--contained {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4px;
}

.case-image--contained img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--gray-mid);
    transition: transform 0.8s var(--ease-out-expo);
}

/* ---------- CASE GALLERY (side by side) ---------- */
.case-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 4px;
}

.case-gallery__item {
    overflow: hidden;
}

.case-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s var(--ease-out-expo);
}

.case-gallery__item:hover img {
    transform: scale(1.03);
}

/* ---------- NEXT PROJECT ---------- */
.case-next {
    padding: 120px 0;
    text-align: center;
    position: relative;
    border-top: 1px solid var(--gray-mid);
}

.case-next::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.case-next__content {
    position: relative;
    z-index: 1;
}

.case-next__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray);
    display: block;
    margin-bottom: 20px;
}

.case-next__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    display: inline-block;
    transition: color 0.3s ease;
    cursor: none;
}

.case-next__title:hover {
    color: var(--blue);
}

/* ---------- NAV PROJECT VARIANT ---------- */
.nav--project {
    mix-blend-mode: difference;
}

/* ---------- REVEAL ANIMATION DEFAULTS ---------- */
.reveal-img {
    opacity: 0;
    transform: translateY(50px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .case-info__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

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

@media (max-width: 768px) {
    .case-hero__title {
        font-size: clamp(3rem, 14vw, 5rem);
    }

    .case-hero__content {
        padding: 0 24px 80px;
    }

    .case-hero__scroll {
        display: none;
    }

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

    .case-section {
        padding: 60px 0 40px;
    }

    .case-section__title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .case-section__text {
        font-size: 1rem;
    }

    .case-image--contained {
        width: 95%;
    }

    .case-next {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .case-info__grid {
        grid-template-columns: 1fr;
    }

    .case-hero__meta {
        gap: 8px;
    }

    .case-hero__tag {
        font-size: 0.6rem;
        padding: 4px 10px;
    }
}
