/* =========================================================
   PROJECTS PAGE
   Loads after main.css
========================================================= */

/* =========================================================
   HERO
========================================================= */

.projects-hero {
    position: relative;
    overflow: hidden;
    min-height: 760px;
    display: flex;
    align-items: center;
    padding: 170px max(5vw, 34px) 100px;
    background:
        radial-gradient(
            circle at 78% 26%,
            rgba(133, 83, 255, 0.22),
            transparent 30%
        ),
        radial-gradient(
            circle at 18% 76%,
            rgba(48, 209, 88, 0.15),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #04132f 0%,
            #071b41 55%,
            #0e1741 100%
        );
}

.projects-hero-glow {
    position: absolute;
    top: 15%;
    right: 5%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(133, 83, 255, 0.22),
            transparent 68%
        );
    filter: blur(22px);
}

.projects-hero-content {
    position: relative;
    z-index: 2;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.projects-hero h1 {
    max-width: 880px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(64px, 7vw, 104px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.projects-hero h1 span {
    display: block;
    color: var(--green-400);
}

.projects-hero-copy {
    max-width: 720px;
    margin: 30px 0 0;
    color: #c4d0e4;
    font-size: 19px;
    line-height: 1.75;
}

.projects-hero-actions,
.projects-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

.projects-hero-message {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 48px;
}

.projects-hero-message p {
    margin: 0;
    color: #9eacc3;
    font-size: 14px;
}

.projects-hero-message strong {
    color: #ffffff;
}

/* =========================================================
   BUTTONS
========================================================= */

.projects-hero .button,
.projects-cta .button {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.projects-hero .button:hover,
.projects-cta .button:hover {
    transform: translateY(-3px);
}

.projects-hero .button-primary,
.projects-cta .button-primary {
    background: var(--green-400);
    color: var(--navy-950);
    box-shadow: 0 16px 36px rgba(53, 199, 89, 0.22);
}

.projects-hero .button-primary:hover,
.projects-cta .button-primary:hover {
    background: var(--green-300);
    box-shadow: 0 22px 46px rgba(53, 199, 89, 0.3);
}

.projects-hero .button-secondary,
.projects-cta .button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.23);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.projects-hero .button-secondary:hover,
.projects-cta .button-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   GENERAL HEADINGS
========================================================= */

.section-eyebrow {
    margin: 0 0 16px;
    color: #28a64b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.projects-hero .section-eyebrow,
.projects-cta .section-eyebrow {
    color: var(--green-300);
}

.projects-section-heading {
    width: min(100%, 880px);
    margin: 0 auto 55px;
    text-align: center;
}

.projects-section-heading h2,
.projects-directory-heading h2,
.projects-cta h2 {
    margin: 0;
    font-size: clamp(42px, 5vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

/* =========================================================
   HOW IT WORKS
========================================================= */

.projects-process {
    padding: 115px max(5vw, 34px);
    background: #f5f8fb;
    color: var(--text-dark);
}

.projects-section-heading h2 {
    color: var(--text-dark);
}

.process-grid {
    width: min(100%, 1180px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.process-card {
    min-height: 280px;
    padding: 34px;
    border: 1px solid var(--light-border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(13, 35, 77, 0.08);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.process-card:hover {
    transform: translateY(-7px);
    border-color: rgba(53, 199, 89, 0.4);
    box-shadow: 0 30px 72px rgba(13, 35, 77, 0.13);
}

.process-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            var(--green-400),
            var(--purple-400)
        );
    color: var(--navy-950);
    font-size: 14px;
    font-weight: 900;
}

.process-card h3 {
    margin: 62px 0 12px;
    color: var(--text-dark);
    font-size: 30px;
    letter-spacing: -0.03em;
}

.process-card p {
    margin: 0;
    color: var(--text-body);
    line-height: 1.7;
}

/* =========================================================
   PROJECT DIRECTORY
========================================================= */

.projects-directory {
    padding: 120px max(5vw, 34px);
    background:
        radial-gradient(
            circle at 90% 8%,
            rgba(133, 83, 255, 0.11),
            transparent 26%
        ),
        linear-gradient(
            180deg,
            #06152f,
            #04122a
        );
}

.projects-directory-heading {
    width: min(100%, 1180px);
    margin: 0 auto 48px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 50px;
}

.projects-directory-heading h2 {
    max-width: 720px;
    color: #ffffff;
}

.projects-directory-copy {
    max-width: 350px;
    margin: 0;
    color: #a9b6ca;
    line-height: 1.7;
}
/* =========================================================
   PROJECT FILTERS
========================================================= */

.project-filters {
    width: min(100%, 1180px);
    margin: 0 auto 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-filter {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: #aebbd0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.project-filter:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(133, 83, 255, 0.5);
    background: rgba(133, 83, 255, 0.13);
}

.project-filter.active {
    border-color: rgba(117, 230, 151, 0.55);
    background: var(--green-400);
    color: var(--navy-950);
}

.project-card.project-hidden {
    display: none;
}

.project-list {
    width: min(100%, 1180px);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

/* =========================================================
   PROJECT CARD
========================================================= */

.project-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(15px);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(133, 83, 255, 0.42);
}

.project-card.active {
    border-color: rgba(160, 112, 255, 0.85);
    background:
        radial-gradient(
            circle at 90% 15%,
            rgba(160, 112, 255, 0.24),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            rgba(56, 31, 108, 0.94),
            rgba(26, 20, 67, 0.98)
        );
    box-shadow:
        0 24px 70px rgba(44, 21, 92, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.project-toggle {
    width: 100%;
    padding: 28px 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 35px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.project-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 22px;
}

.project-icon {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background:
        linear-gradient(
            145deg,
            var(--green-400),
            var(--purple-400)
        );
    color: var(--navy-950);
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.03em;
    box-shadow: 0 15px 35px rgba(53, 199, 89, 0.16);
}

.project-icon-impact {
    background:
        linear-gradient(
            145deg,
            #73e89b,
            #2c9f58
        );
}

.project-tags .impact-badge {
    background: rgba(133, 83, 255, 0.18);
    color: #c8adff;
}

.project-title-group {
    min-width: 0;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 9px;
}

.project-tags span {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(53, 199, 89, 0.12);
    color: #75e697;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-title-group h3 {
    margin: 0;
    color: #ffffff;
    font-size: 29px;
    letter-spacing: -0.03em;
}

.project-title-group p {
    max-width: 620px;
    margin: 8px 0 0;
    color: #aebbd0;
    line-height: 1.55;
}

.project-summary {
    display: grid;
    grid-template-columns: minmax(120px, auto) minmax(120px, auto) 52px;
    align-items: center;
    gap: 25px;
}

.project-summary > div {
    min-width: 120px;
}

.summary-label {
    display: block;
    margin-bottom: 6px;
    color: #7f8da4;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.project-summary strong {
    color: #ffffff;
    font-size: 14px;
}

.project-arrow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 25px;
    font-weight: 300;
    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}

.project-card.active .project-arrow {
    transform: rotate(45deg);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   EXPANDED DETAILS
========================================================= */

.project-details {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    opacity: 0;
    border-top: 1px solid transparent;
    transition:
        max-height 0.45s ease,
        opacity 0.3s ease,
        padding 0.45s ease,
        border-color 0.3s ease;
}

.project-card.active .project-details {
    max-height: 520px;
    padding: 30px;
    opacity: 1;
    border-top-color: rgba(255, 255, 255, 0.1);
}

.project-details > p {
    max-width: 860px;
    margin: 0;
    color: #d1d8e6;
    font-size: 16px;
    line-height: 1.75;
}

.project-detail-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.project-detail-grid > div {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
}

.project-detail-grid p {
    margin: 0;
    color: #ffffff;
    line-height: 1.55;
}

.project-join-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 26px;
    padding: 0 22px;
    border-radius: 11px;
    background: var(--green-400);
    color: var(--navy-950);
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(53, 199, 89, 0.22);
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.project-join-button:hover {
    transform: translateY(-2px);
    background: var(--green-300);
    box-shadow: 0 20px 42px rgba(53, 199, 89, 0.3);
}

/* =========================================================
   FINAL CTA
========================================================= */

.projects-cta {
    padding: 110px max(5vw, 34px);
    background: #eef3f7;
}

.projects-cta-content {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 82px 40px;
    border-radius: 30px;
    text-align: center;
    background:
        radial-gradient(
            circle at 80% 8%,
            rgba(133, 83, 255, 0.2),
            transparent 30%
        ),
        radial-gradient(
            circle at 12% 90%,
            rgba(53, 199, 89, 0.15),
            transparent 28%
        ),
        linear-gradient(
            140deg,
            var(--navy-950),
            #0b2854
        );
    box-shadow: 0 30px 80px rgba(4, 19, 47, 0.22);
}

.projects-cta h2 {
    color: #ffffff;
}

.projects-cta-content > p:not(.section-eyebrow) {
    max-width: 680px;
    margin: 22px auto 0;
    color: #bcc8db;
    font-size: 17px;
    line-height: 1.75;
}

.projects-cta-actions {
    justify-content: center;
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes projectsFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

.projects-hero-content,
.projects-section-heading,
.process-card,
.projects-directory-heading,
.project-card,
.projects-cta-content {
    animation: projectsFadeUp 0.8s ease both;
}

.process-card:nth-child(2),
.project-card:nth-child(2) {
    animation-delay: 0.08s;
}

.process-card:nth-child(3),
.project-card:nth-child(3) {
    animation-delay: 0.16s;
}

.project-card:nth-child(4) {
    animation-delay: 0.24s;
}

.project-card:nth-child(5) {
    animation-delay: 0.32s;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .process-grid {
        grid-template-columns: 1fr;
    }

    .process-card {
        min-height: auto;
    }

    .process-card h3 {
        margin-top: 36px;
    }

    .projects-directory-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .project-toggle {
        grid-template-columns: 1fr;
    }

    .project-summary {
        padding-left: 96px;
        grid-template-columns: repeat(2, minmax(120px, 1fr)) 52px;
    }
}

@media (max-width: 760px) {

    .projects-hero {
        min-height: 700px;
        padding-top: 140px;
    }

    .projects-hero h1 {
        font-size: clamp(52px, 14vw, 78px);
    }

    .projects-hero-copy {
        font-size: 17px;
    }

    .projects-hero-actions,
    .projects-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .projects-hero .button,
    .projects-cta .button {
        width: 100%;
    }

    .project-main {
        align-items: flex-start;
    }

    .project-summary {
        padding-left: 0;
        grid-template-columns: 1fr 1fr 48px;
    }

    .project-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {

    .projects-hero,
    .projects-process,
    .projects-directory,
    .projects-cta {
        padding-left: 20px;
        padding-right: 20px;
    }

    .projects-hero {
        min-height: 660px;
    }

    .projects-hero h1 {
        font-size: clamp(46px, 15vw, 62px);
    }

    .projects-hero-message {
        flex-direction: column;
        gap: 10px;
    }

    .project-toggle {
        padding: 22px;
    }

    .project-main {
        flex-direction: column;
    }

    .project-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .project-summary > div {
        min-width: 0;
    }

    .project-arrow {
        position: absolute;
        top: 22px;
        right: 22px;
    }

    .project-toggle {
        position: relative;
    }

    .project-card.active .project-details {
        max-height: 760px;
        padding: 24px 22px;
    }

    .projects-cta-content {
        padding: 60px 24px;
        border-radius: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}