/* =====================================================
   UNITED BALLOTS — CASE STUDY
   Fixed Visual Height: 600px
====================================================== */

.ub-case-study {

    position: relative;

    height: 600px;

    min-height: 600px;

    overflow: hidden;

    display: flex;

    align-items: center;

    background:
        linear-gradient(
            135deg,
            var(--navy) 0%,
            var(--navy-2) 55%,
            var(--blue) 100%
        );

    color: var(--white);

    isolation: isolate;

}


/* =====================================================
   CONTAINER
====================================================== */

.ub-case-container {

    width: min(
        calc(100% - 80px),
        var(--container)
    );

    height: 100%;

    margin: auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

    align-items: center;

    gap: 80px;

}


/* =====================================================
   BACKGROUND GRID
====================================================== */

.ub-case-grid {

    position: absolute;

    inset: 0;

    z-index: -2;

    opacity: 0.07;

    background-image:

        linear-gradient(
            rgba(255,255,255,0.4) 1px,
            transparent 1px
        ),

        linear-gradient(
            90deg,
            rgba(255,255,255,0.4) 1px,
            transparent 1px
        );

    background-size:
        65px 65px;

}


/* =====================================================
   BACKGROUND GLOW
====================================================== */

.ub-case-glow {

    position: absolute;

    border-radius: 50%;

    pointer-events: none;

    z-index: -1;

    filter: blur(20px);

}


.ub-case-glow-red {

    width: 450px;

    height: 450px;

    top: -280px;

    right: -100px;

    background:
        radial-gradient(
            circle,
            rgba(200,16,46,0.4),
            transparent 70%
        );

}


.ub-case-glow-blue {

    width: 400px;

    height: 400px;

    bottom: -300px;

    left: -150px;

    background:
        radial-gradient(
            circle,
            rgba(23,62,109,0.7),
            transparent 70%
        );

}


/* =====================================================
   LEFT CONTENT
====================================================== */

.ub-case-content {

    position: relative;

    max-width: 610px;

    z-index: 2;

}


/* =====================================================
   TOP META
====================================================== */

.ub-case-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 22px;

}


.ub-case-eyebrow {

    display: flex;

    align-items: center;

    gap: 10px;

    color: var(--red-light);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.16em;

    text-transform: uppercase;

}


.ub-case-eyebrow i {

    display: block;

    width: 32px;

    height: 2px;

    background:
        var(--red);

}


.ub-case-index {

    color:
        rgba(255,255,255,0.35);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.12em;

}


/* =====================================================
   TITLE
====================================================== */

.ub-case-title {

    margin: 0;

    color: var(--white);

    font-size:
        clamp(
            4rem,
            6vw,
            6rem
        );

    font-weight: 700;

    line-height: 0.9;

    letter-spacing: -0.065em;

}


/* =====================================================
   LOCATION
====================================================== */

.ub-case-location {

    margin-top: 15px;

    color:
        rgba(255,255,255,0.45);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.14em;

    text-transform: uppercase;

}


/* =====================================================
   DESCRIPTION
====================================================== */

.ub-case-description {

    max-width: 590px;

    margin-top: 24px;

}


.ub-case-description p {

    margin: 0 0 12px;

    color:
        rgba(255,255,255,0.65);

    font-size: 13px;

    line-height: 1.6;

}


/* =====================================================
   HIGHLIGHT
====================================================== */

.ub-case-description
.ub-case-highlight {

    position: relative;

    padding-left: 14px;

    color:
        rgba(255,255,255,0.9);

    font-weight: 500;

}


.ub-case-highlight::before {

    content: "";

    position: absolute;

    left: 0;

    top: 3px;

    width: 2px;

    height:
        calc(100% - 6px);

    background:
        var(--red);

}


/* =====================================================
   BUTTON
====================================================== */

.ub-case-button {

    display: inline-flex;

    align-items: center;

    gap: 25px;

    margin-top: 14px;

    padding:
        10px 12px 10px 18px;

    color: var(--white);

    background:
        var(--red);

    border-radius: 3px;

    text-decoration: none;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.1em;

    text-transform: uppercase;

    transition:
        all 0.35s ease;

}


.ub-case-button b {

    display: grid;

    place-items: center;

    width: 27px;

    height: 27px;

    color: var(--navy);

    background:
        var(--white);

    border-radius: 50%;

    font-size: 14px;

    transition:
        transform 0.35s ease;

}


.ub-case-button:hover {

    background:
        var(--red-dark);

    transform:
        translateY(-3px);

    box-shadow:
        0 12px 30px
        rgba(200,16,46,0.3);

}


.ub-case-button:hover b {

    transform:
        translateX(4px);

}


/* =====================================================
   RIGHT VISUAL
====================================================== */

.ub-case-visual {

    position: relative;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

}


/* =====================================================
   CAMPAIGN CARD
====================================================== */

.ub-campaign-card {

    position: relative;

    width: 100%;

    max-width: 440px;

    height: 470px;

    padding: 25px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.15);

    border-radius:
        var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.1),
            rgba(255,255,255,0.025)
        );

    box-shadow:
        0 30px 70px
        rgba(0,0,0,0.3);

    backdrop-filter:
        blur(15px);

    transform:
        rotate(2deg);

    transition:
        transform 0.5s ease,
        box-shadow 0.5s ease;

}


.ub-campaign-card:hover {

    transform:
        rotate(0deg)
        translateY(-6px);

    box-shadow:
        0 40px 90px
        rgba(0,0,0,0.4);

}


/* =====================================================
   CARD DECORATION
====================================================== */

.ub-campaign-card::before {

    content: "";

    position: absolute;

    width: 250px;

    height: 250px;

    top: -130px;

    right: -80px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(200,16,46,0.65),
            transparent 70%
        );

}


.ub-campaign-card::after {

    content: "";

    position: absolute;

    inset: 10px;

    border:
        1px solid
        rgba(255,255,255,0.08);

    border-radius:
        calc(
            var(--radius) - 4px
        );

    pointer-events: none;

}


/* =====================================================
   CARD HEADER
====================================================== */

.ub-card-header {

    position: relative;

    z-index: 2;

    display: flex;

    justify-content: space-between;

    color:
        rgba(255,255,255,0.45);

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 0.15em;

}


/* =====================================================
   CARD IDENTITY
====================================================== */

.ub-card-identity {

    position: relative;

    z-index: 2;

}


.ub-card-identity small {

    display: block;

    margin-bottom: 8px;

    color:
        var(--red-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 0.15em;

}


.ub-card-identity h3 {

    margin: 0;

    color: var(--white);

    font-size: 65px;

    font-weight: 700;

    line-height: 0.9;

    letter-spacing: -0.06em;

}


/* =====================================================
   STRATEGY PATH
====================================================== */

.ub-strategy-path {

    position: relative;

    z-index: 2;

}


.ub-strategy-item {

    display: flex;

    align-items: center;

    gap: 15px;

}


.ub-strategy-number {

    display: grid;

    place-items: center;

    width: 34px;

    height: 34px;

    flex-shrink: 0;

    border:
        1px solid
        rgba(255,255,255,0.2);

    border-radius: 50%;

    color:
        rgba(255,255,255,0.5);

    font-size: 9px;

    font-weight: 800;

}


.ub-strategy-item.active
.ub-strategy-number {

    color: var(--white);

    background:
        var(--red);

    border-color:
        var(--red);

}


.ub-strategy-item strong {

    display: block;

    color: var(--white);

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 0.08em;

}


.ub-strategy-item small {

    display: block;

    margin-top: 3px;

    color:
        rgba(255,255,255,0.4);

    font-size: 9px;

}


.ub-strategy-line {

    width: 1px;

    height: 22px;

    margin-left: 17px;

    background:
        rgba(255,255,255,0.2);

}


/* =====================================================
   CARD FOOTER
====================================================== */

.ub-card-footer {

    position: relative;

    z-index: 2;

    display: flex;

    justify-content: space-between;

    padding-top: 15px;

    border-top:
        1px solid
        rgba(255,255,255,0.12);

    color:
        rgba(255,255,255,0.35);

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.12em;

}


/* =====================================================
   RESULT BADGE
====================================================== */

.ub-result-badge {

    position: absolute;

    right: -15px;

    bottom: 85px;

    z-index: 5;

    display: flex;

    align-items: center;

    gap: 10px;

    padding:
        12px 17px;

    border:
        1px solid
        rgba(7,26,58,0.1);

    border-radius: 40px;

    background:
        rgba(255,255,255,0.96);

    box-shadow:
        0 15px 40px
        rgba(0,0,0,0.3);

    color:
        var(--navy);

    animation:
        ubBadgeFloat
        4s ease-in-out
        infinite;

}


.ub-result-dot {

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background:
        var(--red);

    box-shadow:
        0 0 0 5px
        rgba(200,16,46,0.12);

}


.ub-result-badge strong {

    display: block;

    font-size: 10px;

}


.ub-result-badge small {

    display: block;

    margin-top: 2px;

    color:
        var(--muted);

    font-size: 8px;

}


/* =====================================================
   FLOATING UB
====================================================== */

.ub-floating-mark {

    position: absolute;

    left: -20px;

    top: 75px;

    color:
        rgba(255,255,255,0.035);

    font-size: 110px;

    font-weight: 900;

    line-height: 1;

    letter-spacing: -0.1em;

    pointer-events: none;

}


/* =====================================================
   ANIMATION
====================================================== */

@keyframes ubBadgeFloat {

    0%,
    100% {

        transform:
            translateY(0);

    }

    50% {

        transform:
            translateY(-8px);

    }

}


/* =====================================================
   TABLET
====================================================== */

@media (max-width: 1000px) {

    .ub-case-study {

        height: auto;

        min-height: 600px;

        padding:
            70px 0;

    }


    .ub-case-container {

        grid-template-columns:
            1fr 1fr;

        gap:
            40px;

        width:
            min(
                calc(100% - 50px),
                var(--container)
            );

    }


    .ub-case-title {

        font-size:
            clamp(
                3.5rem,
                6vw,
                5rem
            );

    }


    .ub-case-description p {

        font-size:
            12px;

    }


    .ub-campaign-card {

        height:
            450px;

    }

}


/* =====================================================
   MOBILE
====================================================== */

@media (max-width: 700px) {

    .ub-case-study {

        height: auto;

        min-height: auto;

        padding:
            65px 0;

    }


    .ub-case-container {

        width:
            calc(100% - 32px);

        grid-template-columns:
            1fr;

        gap:
            55px;

    }


    .ub-case-content {

        max-width:
            100%;

    }


    .ub-case-top {

        margin-bottom:
            18px;

    }


    .ub-case-title {

        font-size:
            clamp(
                3.5rem,
                18vw,
                5rem
            );

    }


    .ub-case-description {

        margin-top:
            22px;

    }


    .ub-case-description p {

        font-size:
            13px;

        line-height:
            1.7;

    }


    .ub-case-visual {

        height:
            500px;

    }


    .ub-campaign-card {

        width:
            100%;

        height:
            450px;

        transform:
            none;

    }


    .ub-campaign-card:hover {

        transform:
            translateY(-5px);

    }


    .ub-result-badge {

        right:
            -2px;

        bottom:
            25px;

    }


    .ub-floating-mark {

        left:
            -5px;

        top:
            50px;

        font-size:
            80px;

    }

}


/* =====================================================
   SMALL MOBILE
====================================================== */

@media (max-width: 400px) {

    .ub-case-container {

        width:
            calc(100% - 24px);

    }


    .ub-case-title {

        font-size:
            3.2rem;

    }


    .ub-card-identity h3 {

        font-size:
            52px;

    }


    .ub-campaign-card {

        padding:
            21px;

    }

}


/* =====================================================
   ACCESSIBILITY
====================================================== */

@media (prefers-reduced-motion: reduce) {

    .ub-result-badge,
    .ub-campaign-card {

        animation:
            none !important;

        transition:
            none !important;

    }

}