/* =====================================================
   WHY UNITED BALLOTS SECTION
====================================================== */

.why-ub-section {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    background:
        linear-gradient(
            135deg,
            var(--off-white) 0%,
            var(--white) 55%,
            var(--paper) 100%
        );
    isolation: isolate;
}


/* =====================================================
   CONTAINER
====================================================== */

.why-ub-section .container {
    width: min(100% - 48px, var(--container));
    margin-inline: auto;
}


/* =====================================================
   BACKGROUND ORBS
====================================================== */

.why-ub-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(2px);
}

.why-ub-orb-one {
    width: 420px;
    height: 420px;
    top: -220px;
    right: -160px;

    background:
        radial-gradient(
            circle,
            rgba(200, 16, 46, 0.08) 0%,
            rgba(200, 16, 46, 0) 70%
        );

    animation: whyOrbFloat 8s ease-in-out infinite;
}

.why-ub-orb-two {
    width: 360px;
    height: 360px;
    bottom: -220px;
    left: -180px;

    background:
        radial-gradient(
            circle,
            rgba(7, 26, 58, 0.08) 0%,
            rgba(7, 26, 58, 0) 70%
        );

    animation: whyOrbFloat 10s ease-in-out infinite reverse;
}


/* =====================================================
   MAIN GRID
====================================================== */

.why-ub-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(360px, 0.65fr);

    align-items: center;
    gap: clamp(60px, 8vw, 130px);
}


/* =====================================================
   CONTENT
====================================================== */

.why-ub-content {
    max-width: 720px;
}


/* =====================================================
   EYEBROW
====================================================== */

.why-ub-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 24px;

    color: var(--red);

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.eyebrow-line {
    width: 38px;
    height: 2px;
    flex-shrink: 0;

    background: var(--red);

    transform-origin: left;
    animation: eyebrowLine 1s ease forwards;
}


/* =====================================================
   TITLE
====================================================== */

.why-ub-title {
    max-width: 760px;

    margin: 0 0 30px;

    color: var(--navy);

    font-size: clamp(
        2.2rem,
        4vw,
        4.15rem
    );

    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.why-ub-title span {
    display: block;
    color: var(--red);
}


/* =====================================================
   TEXT
====================================================== */

.why-ub-text {
    max-width: 650px;
}

.why-ub-text p {
    margin: 0 0 18px;

    color: var(--muted);

    font-size: clamp(
        0.95rem,
        1.2vw,
        1.05rem
    );

    line-height: 1.8;
}


/* =====================================================
   HIGHLIGHT PARAGRAPH
====================================================== */

.why-ub-text .why-ub-highlight {
    position: relative;

    margin-top: 26px;
    padding-left: 20px;

    color: var(--text);

    font-weight: 600;
    line-height: 1.75;
}

.why-ub-highlight::before {
    content: "";

    position: absolute;
    left: 0;
    top: 5px;

    width: 3px;
    height: calc(100% - 10px);

    border-radius: 10px;

    background:
        linear-gradient(
            to bottom,
            var(--red),
            var(--navy)
        );
}


/* =====================================================
   BOTTOM SIGNATURE
====================================================== */

.why-ub-bottom {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 32px;
}

.why-ub-line {
    width: 55px;
    height: 1px;

    background: var(--navy);
}

.why-ub-caption {
    color: var(--navy);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* =====================================================
   RIGHT VISUAL
====================================================== */

.why-ub-visual {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 480px;
}


/* =====================================================
   UB CARD
====================================================== */

.why-ub-card {
    position: relative;

    width: min(100%, 420px);
    aspect-ratio: 0.82;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 28px;

    overflow: hidden;

    border: 1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            var(--navy),
            var(--navy-2) 65%,
            var(--blue)
        );

    box-shadow:
        0 30px 80px
        rgba(7, 26, 58, 0.25);

    transform: rotate(2deg);

    transition:
        transform 0.5s ease,
        box-shadow 0.5s ease;
}


/* Decorative card border */

.why-ub-card::before {
    content: "";

    position: absolute;
    inset: 12px;

    border: 1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: calc(
        var(--radius) - 5px
    );

    pointer-events: none;
}


/* Red decorative circle */

.why-ub-card::after {
    content: "";

    position: absolute;

    width: 230px;
    height: 230px;

    right: -100px;
    top: -80px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(200, 16, 46, 0.9),
            rgba(200, 16, 46, 0)
        );

    opacity: 0.8;
}


/* =====================================================
   CARD TOP
====================================================== */

.why-ub-card-top {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: space-between;

    color: rgba(255, 255, 255, 0.65);

    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}


/* =====================================================
   MONOGRAM
====================================================== */

.why-ub-monogram {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: auto;

    color: var(--white);

    font-size: clamp(
        7rem,
        14vw,
        11rem
    );

    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.12em;

    user-select: none;
}

.why-ub-monogram span:first-child {
    color: var(--white);
}

.why-ub-monogram span:last-child {
    color: var(--red);
}


/* =====================================================
   CARD BOTTOM
====================================================== */

.why-ub-card-bottom {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;

    padding-top: 22px;

    border-top: 1px solid
        rgba(255, 255, 255, 0.15);
}

.why-ub-card-bottom div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.why-ub-card-bottom strong {
    color: var(--white);

    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.why-ub-card-bottom small {
    color: rgba(255, 255, 255, 0.55);

    font-size: 0.7rem;
}


/* =====================================================
   FLOATING BADGE
====================================================== */

.why-ub-badge {
    position: absolute;

    right: -15px;
    bottom: 50px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 18px;

    border: 1px solid
        rgba(7, 26, 58, 0.1);

    border-radius: 50px;

    color: var(--navy);

    background:
        rgba(255, 255, 255, 0.92);

    box-shadow:
        0 15px 40px
        rgba(7, 26, 58, 0.15);

    font-size: 0.72rem;
    font-weight: 700;

    backdrop-filter: blur(12px);

    animation:
        badgeFloat 4s ease-in-out infinite;
}

.badge-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--red);

    box-shadow:
        0 0 0 5px
        rgba(200, 16, 46, 0.12);
}


/* =====================================================
   HOVER EFFECT
====================================================== */

.why-ub-visual:hover .why-ub-card {
    transform:
        rotate(0deg)
        translateY(-8px);

    box-shadow:
        0 40px 100px
        rgba(7, 26, 58, 0.3);
}


/* =====================================================
   REVEAL ANIMATION
====================================================== */

.reveal {
    opacity: 0;

    transform:
        translateY(35px);

    animation:
        whyReveal 0.9s
        cubic-bezier(
            0.22,
            1,
            0.36,
            1
        )
        forwards;
}

.why-ub-content.reveal {
    animation-delay: 0.1s;
}

.why-ub-visual.reveal {
    animation-delay: 0.25s;
}


/* =====================================================
   KEYFRAMES
====================================================== */

@keyframes whyReveal {

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

@keyframes eyebrowLine {

    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }

}

@keyframes whyOrbFloat {

    0%,
    100% {
        transform: translate3d(
            0,
            0,
            0
        );
    }

    50% {
        transform: translate3d(
            0,
            20px,
            0
        );
    }

}

@keyframes badgeFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }

}


/* =====================================================
   TABLET
====================================================== */

@media (max-width: 1000px) {

    .why-ub-section {
        padding: 80px 0;
    }

    .why-ub-grid {
        grid-template-columns:
            1fr;

        gap: 65px;
    }

    .why-ub-content {
        max-width: 800px;
    }

    .why-ub-visual {
        min-height: auto;
        padding: 20px 0 30px;
    }

    .why-ub-card {
        width: min(
            100%,
            400px
        );
    }

}


/* =====================================================
   MOBILE
====================================================== */

@media (max-width: 600px) {

    .why-ub-section {
        padding: 65px 0;
    }

    .why-ub-section .container {
        width: min(
            100% - 32px,
            var(--container)
        );
    }

    .why-ub-eyebrow {
        margin-bottom: 18px;

        font-size: 0.65rem;
        letter-spacing: 0.12em;
    }

    .eyebrow-line {
        width: 28px;
    }

    .why-ub-title {
        margin-bottom: 24px;

        font-size: clamp(
            2rem,
            10vw,
            2.8rem
        );

        line-height: 1.1;
    }

    .why-ub-text p {
        font-size: 0.92rem;
        line-height: 1.7;
    }

    .why-ub-text .why-ub-highlight {
        padding-left: 16px;
    }

    .why-ub-bottom {
        margin-top: 25px;
    }

    .why-ub-visual {
        padding: 10px 8px 40px;
    }

    .why-ub-card {
        width: 100%;
        max-width: 360px;

        padding: 22px;

        transform: none;
    }

    .why-ub-card::before {
        inset: 9px;
    }

    .why-ub-monogram {
        font-size: 8rem;
    }

    .why-ub-card-bottom {
        gap: 12px;
    }

    .why-ub-card-bottom strong {
        font-size: 0.7rem;
    }

    .why-ub-card-bottom small {
        font-size: 0.62rem;
    }

    .why-ub-badge {
        right: 0;
        bottom: 5px;

        padding: 11px 15px;

        font-size: 0.65rem;
    }

}


/* =====================================================
   REDUCED MOTION ACCESSIBILITY
====================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}






