/* Explain: Organic agency layout shapes, hero split, and masonry support */
.section-shell {
    position: relative;
}

.section-shell::before {
    position: absolute;
    inset: 0 auto auto 50%;
    width: min(36rem, 82vw);
    height: min(36rem, 82vw);
    content: "";
    transform: translate(-50%, -18%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.08), transparent 68%);
    pointer-events: none;
}

.hero-split::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    width: 54%;
    content: "";
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
    background: linear-gradient(145deg, rgba(51, 51, 51, 0.84), rgba(10, 10, 10, 0.1));
}

.hero-visual-wrap {
    position: relative;
}

.hero-visual-card {
    transform: rotate(2deg);
}

.floating-metric {
    position: absolute;
    right: -0.5rem;
    bottom: 2.2rem;
    transform: rotate(-5deg);
}

.layered-frame {
    position: relative;
    min-height: 34rem;
}

.frame-back {
    position: absolute;
    inset: 2rem 0 0 2rem;
    border: 1px solid rgba(251, 146, 60, 0.55);
    background: linear-gradient(145deg, rgba(251, 146, 60, 0.2), rgba(244, 244, 244, 0.035));
    transform: rotate(-5deg);
}

.frame-front {
    position: relative;
    transform: rotate(2deg);
}

.masonry-gallery .case-card:nth-child(2),
.masonry-gallery .case-card:nth-child(4) {
    margin-top: 2.25rem;
}

.case-card img {
    aspect-ratio: 4 / 5;
}

.case-card:nth-child(2) img,
.case-card:nth-child(3) img {
    aspect-ratio: 5 / 4;
}

@media (max-width: 1023px) {
    .hero-split::after {
        width: 100%;
        opacity: 0.42;
        clip-path: polygon(0 38%, 100% 18%, 100% 100%, 0 100%);
    }
}

@media (max-width: 767px) {
    .floating-metric {
        right: 0.5rem;
        bottom: 1rem;
    }

    .layered-frame {
        min-height: auto;
    }

    .frame-back {
        inset: 1.3rem 0 0 1rem;
    }

    .masonry-gallery .case-card:nth-child(2),
    .masonry-gallery .case-card:nth-child(4) {
        margin-top: 0;
    }
}
