/* =========================================================
   PURPOSE SECTION
   Why CodNesta Exists
   ========================================================= */


/*--------------------------------------------------
Section Container
--------------------------------------------------*/

.purpose-section {
    position: relative;

    margin-top: 118px;
    padding-top: var(--space-6);
    padding-bottom: var(--space-8);

    overflow: visible;

    background: var(--color-navy-deep);
}


/*--------------------------------------------------
Wave Transition
--------------------------------------------------*/

.purpose-section__wave {
    position: absolute;
    top: -110px;
    left: 0;

    width: 100%;
    height: 120px;

    overflow: hidden;

    pointer-events: none;
}

.purpose-section__wave svg {
    position: absolute;
    top: 0;
    left: 0;

    display: block;

    width: 100%;
    height: 100%;

    preserve-aspect-ratio: none;
}

/* Gold wave displayed slightly behind the navy wave */
.purpose-section__wave-gold {
    z-index: 1;

    transform: translateY(2px);
}

.purpose-section__wave-gold path {
    fill: var(--color-gold);
}

/* Main navy wave connected to the section */
.purpose-section__wave-navy {
    z-index: 2;
}

.purpose-section__wave-navy path {
    fill: var(--color-navy-deep);
}


/*--------------------------------------------------
Main Layout
--------------------------------------------------*/

.purpose-section__inner {
    position: relative;
    z-index: 3;

    display: grid;
    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.05fr);

    align-items: center;
    gap: clamp(3rem, 7vw, 6rem);

    padding-top: var(--space-5);
}


/*--------------------------------------------------
Visual Area
--------------------------------------------------*/

.purpose-section__visual {
    position: relative;

    min-height: 560px;

    overflow: hidden;

    border-radius: var(--radius-xl);
}

.purpose-section__visual img {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 560px;

    object-fit: cover;
}


/*--------------------------------------------------
Image Overlay
--------------------------------------------------*/

.purpose-section__visual::after {
    content: "";

    position: absolute;
    inset: 0;

    background: rgba(4, 29, 46, 0.2);

    pointer-events: none;
}


/*--------------------------------------------------
Floating Image Label
--------------------------------------------------*/

.purpose-section__label {
    position: absolute;
    bottom: var(--space-5);
    left: var(--space-5);

    z-index: 2;

    max-width: 250px;
    padding: var(--space-4) var(--space-5);

    border: 1px solid rgba(10, 58, 87, 0.12);
    border-radius: var(--radius-lg);

    background: var(--color-white);
}

.purpose-section__label span,
.purpose-section__label strong {
    display: block;

    color: var(--color-navy);
}

.purpose-section__label span {
    margin-bottom: var(--space-1);

    font-size: var(--font-size-sm);

    opacity: 0.75;
}


/*--------------------------------------------------
Content Area
--------------------------------------------------*/

.purpose-section__content .section__eyebrow {
    color: var(--color-gold-light);
}

.purpose-section__content h2,
.purpose-section__content p {
    color: var(--color-white);
}

.purpose-section__content p {
    max-width: 650px;

    opacity: 0.82;
}


/*--------------------------------------------------
Purpose Outcomes
--------------------------------------------------*/

.purpose-section__outcomes {
    display: grid;
    gap: var(--space-3);

    margin-block: var(--space-6);
}

.purpose-outcome {
    display: flex;
    align-items: center;
    gap: var(--space-4);

    padding-block: var(--space-3);

    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.purpose-outcome span {
    color: var(--color-gold);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
}

.purpose-outcome strong {
    color: var(--color-white);
    font-size: var(--font-size-md);
}


/*--------------------------------------------------
Section Button
--------------------------------------------------*/

.purpose-section .button--secondary {
    border-color: var(--color-gold);

    color: var(--color-white);
}

.purpose-section .button--secondary:hover {
    background: var(--color-gold);
    color: var(--color-navy-deep);
}

.purpose-section .button--secondary:focus-visible {
    outline: 3px solid rgba(244, 180, 0, 0.45);
    outline-offset: 4px;
}


/*--------------------------------------------------
Tablet — 900px and Below
--------------------------------------------------*/

@media (max-width: 900px) {
    .purpose-section__inner {
        grid-template-columns: 1fr;
    }

    .purpose-section__visual,
    .purpose-section__visual img {
        min-height: 460px;
    }
}


/*--------------------------------------------------
Mobile — 768px and Below
--------------------------------------------------*/

@media (max-width: 768px) {
    .purpose-section {
        margin-top: 74px;
    }

    .purpose-section__wave {
        top: -74px;

        height: 76px;
    }

    .purpose-section__inner {
        padding-top: var(--space-4);
    }
}


/*--------------------------------------------------
Small Mobile — 600px and Below
--------------------------------------------------*/

@media (max-width: 600px) {
    .purpose-section__visual,
    .purpose-section__visual img {
        min-height: 380px;
    }

    .purpose-section__label {
        right: var(--space-4);
        bottom: var(--space-4);
        left: var(--space-4);

        max-width: none;
    }

    .purpose-outcome {
        align-items: flex-start;
    }
}


/*--------------------------------------------------
Reduced Motion
--------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {
    .purpose-section__wave-gold {
        transform: translateY(8px);
    }
}