/* =========================================================
   EVERLASTING VESSELS
   Hero Component
   ========================================================= */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: 
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 42%,
            #f6effb 100%
        );
}

/* =========================================================
   Background
   ========================================================= */

.hero__background {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.hero__background-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 72%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    opacity: 0.9;
}

.hero__background-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            #ffffff 0%,
            rgb(255 255 255 / 98%) 25%,
            rgb(255 255 255 / 82%) 46%,
            rgb(255 255 255 / 12%) 75%,
            rgb(87 9 145 / 8%) 100%
        );
}

/* =========================================================
   Main Container
   ========================================================= */

.hero__container {
    position: relative;
    padding-top: clamp(2.5rem, 6vw, 5rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
}

.hero__layout {
    display: grid;
    min-height: 36rem;
    align-items: center;
    gap: 2rem;
}

/* =========================================================
   Content
   ========================================================= */

.hero__content {
    position: relative;
    z-index: 3;
    max-width: 38rem;
}

.hero__eyebrow {
    margin-bottom: 0.75rem;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero__headline {
    max-width: 10ch;
    margin-bottom: 1.25rem;
    color: var(--color-black);
    font-family: var(--font-heading);
    font-size: clamp(2.65rem, 9vw, 5.4rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.hero__headline em,
.hero__headline strong {
    color: var(--color-primary);
    font-style: normal;
}

.hero__accent-line {
    width: 4rem;
    height: 0.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
}

.hero__description {
    max-width: 35rem;
    margin-bottom: 1.75rem;
    color: var(--color-text);
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.75;
}

/* =========================================================
   Buttons
   ========================================================= */

.hero__actions {
    display: flex;
    align-items: stretch;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.hero__button {
    min-width: 10.25rem;
    min-height: 3.25rem;
    border-radius: 0.55rem;
}

.hero__button-icon {
    display: inline-grid;
    width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
}

/* =========================================================
   Founder Media
   ========================================================= */

.hero__media {
    position: relative;
    z-index: 2;
    align-self: end;
    min-height: 28rem;
}

.hero__portrait-wrapper {
    position: relative;
    display: flex;
    min-height: 28rem;
    align-items: flex-end;
    justify-content: center;
}

.hero__portrait-wrapper::before {
    position: absolute;
    top: 10%;
    right: 0;
    width: 90%;
    height: 76%;
    border-radius: 52% 48% 28% 58%;
    background:
        radial-gradient(
            circle at center,
            rgb(121 45 168 / 22%),
            rgb(91 7 148 / 7%) 55%,
            transparent 72%
        );
    content: "";
    filter: blur(2px);
}

.hero__portrait {
    position: relative;
    z-index: 2;
    width: min(100%, 35rem);
    max-height: 39rem;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 1.5rem 1.5rem rgb(33 8 45 / 18%));
}

/* =========================================================
   Founder Quote
   ========================================================= */

.hero__quote {
    position: absolute;
    right: 0;
    bottom: 2.5rem;
    z-index: 4;
    width: min(90%, 23rem);
    padding: 1.15rem 1.5rem 1.15rem 2.5rem;
    margin: 0;
    background:
        linear-gradient(
            110deg,
            rgb(59 4 91 / 96%),
            rgb(103 10 157 / 96%)
        );
    color: var(--color-white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.15rem, 2.3vw, 1.65rem);
    font-style: italic;
    line-height: 1.15;
    transform: rotate(-2deg);
    box-shadow: var(--shadow-md);
    clip-path: polygon(
        4% 5%,
        100% 0,
        97% 93%,
        2% 100%,
        0 58%
    );
}

.hero__quote::before {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 5px,
            rgb(255 255 255 / 3%) 6px
        );
    content: "";
    pointer-events: none;
}

.hero__quote-line {
    position: relative;
    display: block;
}

.hero__quote-line--accent {
    color: var(--color-accent);
}

/* =========================================================
   Statistics Container
   ========================================================= */

.hero__stats {
    position: relative;
    z-index: 5;
    display: grid;
    overflow: hidden;
    margin-top: 0;
    border: 1px solid rgb(91 7 148 / 10%);
    border-radius: 1.3rem;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 1.25rem 3rem rgb(36 7 50 / 14%);
    backdrop-filter: blur(0.9rem);
}

/* =========================================================
   Hero Stat Card
   ========================================================= */

.hero-stat-card {
    position: relative;
    display: flex;
    min-height: 10.5rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1.5rem 1rem;
    text-align: center;
}

.hero-stat-card:not(:last-child)::after {
    position: absolute;
    right: 0;
    bottom: 20%;
    width: 1px;
    height: 60%;
    background: var(--color-border);
    content: "";
}

.hero-stat-card__icon {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    margin-bottom: 0.55rem;
    color: var(--color-primary);
}

.hero-stat-card__icon svg {
    width: 2rem;
    height: 2rem;
}

.hero-stat-card__title {
    margin-bottom: 0.3rem;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 800;
    line-height: 1.05;
}

.hero-stat-card__description {
    max-width: 13rem;
    margin-bottom: 0;
    color: var(--color-text);
    font-size: 0.84rem;
    line-height: 1.35;
}

.hero__portrait-picture {
    display: contents;
}

/* =========================================================
   Hover Enhancements
   ========================================================= */

@media (hover: hover) {
    .hero-stat-card {
        transition:
            background-color var(--transition-base),
            transform var(--transition-base);
    }

    .hero-stat-card:hover {
        z-index: 2;
        background: var(--color-surface);
        transform: translateY(-0.25rem);
    }

    .hero-stat-card__icon {
        transition: transform var(--transition-base);
    }

    .hero-stat-card:hover .hero-stat-card__icon {
        transform: scale(1.08);
    }
}



/* =========================================================
   Responsive Hero: Mobile and Tablet
   Founder image displays first and blends into the content.
   ========================================================= */

@media (max-width: 63.9375rem) {
    .hero {
        overflow: hidden;
        background:
            linear-gradient(
                180deg,
                #f8f1fc 0%,
                #ffffff 48%,
                #ffffff 100%
            );
    }

    /*
       Keep the community background behind the full hero,
       but make it subtle on smaller screens.
    */
    .hero__background {
        inset: 0;
    }

    .hero__background-image {
        top: 0;
        right: -20%;
        bottom: auto;
        width: 135%;
        height: 34rem;
        object-fit: cover;
        object-position: center top;
        opacity: 0.24;
    }

    .hero__background-overlay {
        background:
            linear-gradient(
                180deg,
                rgb(255 255 255 / 8%) 0%,
                rgb(255 255 255 / 20%) 25%,
                rgb(255 255 255 / 72%) 60%,
                #ffffff 88%,
                #ffffff 100%
            );
    }

    .hero__container {
        width: min(
            calc(100% - 2rem),
            var(--container-width)
        );
        padding-top: 0;
        padding-bottom: 2.5rem;
    }

    /*
       The HTML places content before media.
       Explicit grid rows visually move Danielle above it.
    */
    .hero__layout {
        display: grid;
        min-height: auto;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: stretch;
        gap: 0;
    }

    .hero__media {
        position: relative;
        z-index: 2;
        grid-column: 1;
        grid-row: 1;
        width: calc(100% + 2rem);
        min-height: 25rem;
        height: clamp(25rem, 72vw, 34rem);
        margin: 0 -1rem -6rem;
        overflow: visible;
        border-radius: 0;
        background: transparent;
    }

    .hero__portrait-wrapper {
        position: absolute;
        inset: 0;
        display: flex;
        min-height: 0;
        align-items: flex-start;
        justify-content: center;
        overflow: hidden;
    }

    .hero__portrait-wrapper::before {
        top: 0;
        right: -6%;
        width: 108%;
        height: 92%;
        border-radius: 50%;
        opacity: 0.55;
    }

    .hero__portrait {
        width: min(100%, 34rem);
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        object-fit: contain;
        object-position: center top;
        filter:
            drop-shadow(
                0 1rem 1.25rem
                rgb(33 8 45 / 14%)
            );

        /*
           Fade the bottom of the transparent portrait
           into the white content area.
        */
        -webkit-mask-image:
            linear-gradient(
                to bottom,
                #000 0%,
                #000 66%,
                rgb(0 0 0 / 82%) 77%,
                transparent 100%
            );

        mask-image:
            linear-gradient(
                to bottom,
                #000 0%,
                #000 66%,
                rgb(0 0 0 / 82%) 77%,
                transparent 100%
            );
    }

    /*
       Content follows beneath Danielle and slightly overlaps
       the faded bottom of her portrait.
    */
    .hero__content {
        position: relative;
        z-index: 5;
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        max-width: 42rem;
        padding: 2rem 0 0;
        margin: 0;
    }

    .hero__eyebrow {
        margin-bottom: 0.65rem;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .hero__headline {
        max-width: 12ch;
        margin-bottom: 1rem;
        font-size: clamp(2.65rem, 9vw, 4.25rem);
        line-height: 1;
        letter-spacing: -0.04em;
    }

    .hero__accent-line {
        margin-bottom: 1.15rem;
    }

    .hero__description {
        max-width: 38rem;
        margin-bottom: 1.4rem;
        font-size: clamp(0.98rem, 2.3vw, 1.08rem);
        line-height: 1.65;
    }

    .hero__actions {
        display: flex;
        align-items: stretch;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .hero__button {
        min-width: 9.75rem;
        min-height: 3.1rem;
    }

    /*
       Keep the quote over the lower part of the portrait.
    */
    .hero__quote {
        right: 1rem;
        bottom: 5.5rem;
        left: auto;
        width: min(76%, 22rem);
        max-width: 22rem;
        padding: 0.9rem 1.1rem 0.9rem 1.55rem;
        font-size: clamp(1rem, 3vw, 1.25rem);
        line-height: 1.16;
        transform: rotate(-1deg);
    }

    .hero__stats {
        margin-top: 1.25rem;
        margin-bottom: 0;
        border-radius: 1rem;
        transform: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-stat-card {
        min-width: 0;
        min-height: 9.5rem;
        padding: 1.2rem 0.85rem;
    }

    .hero-stat-card:nth-child(odd)::after {
        display: block;
        right: 0;
        bottom: 15%;
        height: 70%;
    }

    .hero-stat-card:nth-child(even)::after {
        display: none;
    }

    .hero-stat-card:nth-child(-n + 2) {
        border-bottom: 1px solid var(--color-border);
    }


}

/* =========================================================
   Tablet
   ========================================================= */

@media (min-width: 36rem) and (max-width: 63.9375rem) {
    .hero__container {
        width: min(
            calc(100% - 3rem),
            var(--container-width)
        );
    }

    .hero__headline {
        max-width: 13ch;
    }

    .hero__actions {
        flex-wrap: nowrap;
    }

    .hero__media {
        min-height: 34rem;
    }

    .hero__portrait {
        width: min(88%, 34rem);
    }

    .hero__quote {
        right: 1.5rem;
        bottom: 1.5rem;
        left: auto;
        width: min(75%, 24rem);
    }

    .hero__background-image {
        right: -4%;
        bottom: 7.5rem;
        width: 104%;
        height: 51%;
    }

    .hero-stat-card {
        min-height: 10rem;
    }
}

/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 35rem) {
    .hero__container {
        width: 100%;
        padding: 1.75rem 1rem 1.5rem;
    }

    .hero__headline {
        max-width: 11ch;
        font-size: clamp(2.35rem, 11.5vw, 3.35rem);
    }

    .hero__description {
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .hero__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero__button {
        width: 100%;
        min-width: 0;
    }

    /*
       On phones, simplify the background so it does not
       compete with the headline.
    */
    .hero__background-image {
        right: -12%;
        bottom: 7.5rem;

        /*
        Bring more of the purple/community artwork
        across the width of the mobile hero.
        */
        width: 135%;
        height: 48%;

        /*
        Slightly stronger than before so the purple
        feels intentional without competing with text.
        */
        opacity: 0.34;

        object-fit: cover;
        object-position: center top;
    }

    .hero__background-overlay {
        background:
            linear-gradient(
                180deg,
                rgb(255 255 255 / 3%) 0%,
                rgb(255 255 255 / 10%) 28%,
                rgb(255 255 255 / 48%) 58%,
                rgb(255 255 255 / 88%) 78%,
                #ffffff 100%
            );
    }

    .hero__content {
        position: relative;
        isolation: isolate;
    }

    .hero__eyebrow {
        position: relative;
        font-weight: 900;

        text-shadow:
            0 1px 2px rgb(255 255 255 / 95%),
            0 2px 7px rgb(255 255 255 / 75%);
    }

    /*
    Soft white glow behind the mobile copy.
    This separates the headline from the purple
    photography without creating a visible card.
    */
    .hero__content::before {
        position: absolute;
        z-index: -1;

        /*
        Keep the glow's original dimensions stable.
        */
        top: -1.5rem;
        right: -1rem;
        bottom: -1rem;
        left: -1rem;

        background:
            radial-gradient(
                ellipse at 25% 35%,
                rgb(255 255 255 / 98%) 0%,
                rgb(255 255 255 / 92%) 42%,
                rgb(255 255 255 / 65%) 68%,
                transparent 88%
            );

        /*
        THIS controls the vertical position.
        Increase to move the entire glow DOWN.
        */
        transform: translateY(2rem);

        content: "";
        pointer-events: none;
    }

    .hero__headline {
        max-width: 11ch;
        font-size: clamp(2.35rem, 11.5vw, 3.35rem);

        text-shadow:
            0 1px 0 rgb(255 255 255 / 90%),
            0 2px 8px rgb(255 255 255 / 55%);
    }


    .hero__media {
        min-height: 23rem;
        height: 26rem;
        margin-bottom: -5rem;
        border-radius: 0;
    }

    .hero__portrait {
        width: min(112%, 29rem);
        max-width: none;
        object-position: center top;
    }

    .hero__quote {
        right: 0.5rem;
        bottom: 4.5rem;
        left: auto;
        width: min(78%, 18rem);
        padding: 0.75rem 0.9rem 0.75rem 1.2rem;
        font-size: 0.92rem;
        line-height: 1.16;
    }

    .hero-donation {
        grid-template-columns: minmax(0, 1fr) 4.75rem;
        gap: 0.75rem;

        padding: 0.9rem;
        margin-bottom: 1rem;

        border-radius: 0.85rem;
    }

    .hero-donation__title {
        font-size: 0.85rem;
    }

    .hero-donation__text {
        font-size: 0.78rem;
    }

    .hero-donation__hashtag {
        font-size: 0.72rem;
    }

    .hero-donation__link {
        font-size: 0.74rem;
    }

    .hero-donation__qr {
        width: 4rem;
        height: 4rem;
    }    

    .hero__stats {
        margin-top: 1rem;
        border-radius: 1rem;
    }

    .hero-stat-card {
        min-height: 8.75rem;
        padding: 1rem 0.55rem;
    }

    .hero-stat-card__icon {
        width: 2.15rem;
        height: 2.15rem;
        margin-bottom: 0.4rem;
    }

    .hero-stat-card__icon svg {
        width: 1.75rem;
        height: 1.75rem;
    }

    .hero-stat-card__title {
        font-size: clamp(1.05rem, 5vw, 1.3rem);
    }

    .hero-stat-card__description {
        max-width: 9rem;
        font-size: 0.73rem;
        line-height: 1.3;
    }
}

/* =========================================================
   Hero Donation / Givelify Callout
   ========================================================= */

.hero-donation {
    display: grid;
    max-width: 34rem;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;

    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;

    border:
        1px solid
        rgb(91 7 148 / 14%);

    border-radius: 1rem;

    background:
        linear-gradient(
            135deg,
            rgb(255 255 255 / 95%),
            rgb(246 239 251 / 95%)
        );

    box-shadow:
        0 0.6rem 1.5rem
        rgb(49 13 70 / 9%);

    backdrop-filter: blur(0.5rem);
}

.hero-donation__content {
    min-width: 0;
}

.hero-donation__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    margin-bottom: 0.35rem;

    color: var(--color-primary);

    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
}

.hero-donation__title i {
    color: var(--color-primary);
}

.hero-donation__text {
    margin-bottom: 0.35rem;

    color: var(--color-text);

    font-size: 0.84rem;
    line-height: 1.45;
}

.hero-donation__hashtag {
    display: block;
    margin-bottom: 0.55rem;

    color: var(--color-primary);

    font-size: 0.77rem;
    font-weight: 800;
}

.hero-donation__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    color: var(--color-primary);

    font-size: 0.78rem;
    font-weight: 800;

    text-decoration: none;
}

.hero-donation__link:hover {
    text-decoration: underline;
}

.hero-donation__qr-link {
    display: block;
    flex: 0 0 auto;

    padding: 0.35rem;

    border:
        1px solid
        rgb(91 7 148 / 14%);

    border-radius: 0.65rem;

    background: #ffffff;
}

.hero-donation__qr {
    display: block;

    width: 5.25rem;
    height: 5.25rem;

    object-fit: contain;
}
/* =========================================================
   Desktop
   ========================================================= */

@media (min-width: 64rem) {
    .hero__container {
        padding-top: 4.25rem;

        /*
         Creates actual space inside the hero for the cards.
         The following section can no longer cover them.
        */
        padding-bottom: 4.5rem;
    }

    .hero__layout {
        grid-template-columns:
            minmax(0, 0.9fr)
            minmax(28rem, 1.1fr);
        gap: 1rem;
    }

    .hero__content {
        align-self: center;
        padding-bottom: 6rem;
    }

    .hero__media {
        margin-right: -3.5rem;
    }

    .hero__portrait {
        width: min(100%, 41rem);
    }

    .hero__stats {
        /*
         Preserve the overlapping appearance using margin,
         not transform. Margin contributes to layout height.
        */
        margin-top: -2.5rem;
        transform: none;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* =========================================================
   Wide Desktop
   ========================================================= */

@media (min-width: 80rem) {
    .hero__layout {
        grid-template-columns:
            minmax(30rem, 0.95fr)
            minmax(36rem, 1.05fr);
    }

    .hero__media {
        margin-right: -5rem;
    }

    .hero__headline {
        font-size: clamp(4rem, 5.3vw, 5.8rem);
    }
}

/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
    .hero__content {
        animation: hero-content-enter 650ms ease both;
    }

    .hero__media {
        animation: hero-media-enter 750ms ease 100ms both;
    }

    .hero__stats {
        animation: hero-stats-enter 650ms ease 200ms both;
    }

    @keyframes hero-content-enter {
        from {
            opacity: 0;
            transform: translateY(1.25rem);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes hero-media-enter {
        from {
            opacity: 0;
            transform: translateX(1.5rem);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes hero-stats-enter {
        from {
            opacity: 0;
            transform: translateY(1.5rem);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}