/*
==========================================================
CESA Contemporary
----------------------------------------------------------
NOTE: 
==========================================================
*/

:root {
    --brand-1: #16a34a;
    /* emerald */
    --brand-2: #22c55e;
    /* light emerald */
    --brand-3: #84cc16;
    /* lime accent */
    --ink: #0f172a;
    /* slate-900 */
    --ink-2: #1e293b;
    /* slate-800 */
    --muted: #64748b;
    /* slate-500 */
    --bg: #0b1020;
    /* deep night */
    --card: #10172a;
    /* glass card */
    --glass: rgba(255, 255, 255, .06);
    --ring: rgba(34, 197, 94, .25);
    --radius: 20px;
    --shadow-1: 0 10px 30px rgba(2, 6, 23, .25);
    --shadow-2: 0 16px 60px rgba(2, 6, 23, .35);
    --grid-gap: clamp(16px, 2.2vw, 28px);
    /* Control logo + nav sizes */
    --logo-size: 80px;
    /* tweak as needed */
    --nav-font-size: 1.08rem;
    /* pill link text size */
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: #e5e7eb;
    /* slate-200 */

    /* Persistent page-wide backdrop */
    background-color: var(--bg);
    background-image:
        radial-gradient(1400px 1000px at 10% -10%, rgba(36, 241, 120, .15), transparent 60%),
        radial-gradient(1100px 800px at 110% 10%, rgba(132, 204, 22, .14), transparent 60%),
        radial-gradient(1200px 900px at 50% 120%, rgba(34, 197, 94, .12), transparent 70%);
    background-attachment: fixed, fixed, fixed;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: 10% -10%, 110% 10%, 50% 120%;

    overflow-x: hidden;
    accent-color: var(--brand-2);
}

p {
    text-align: justify;
}

p a {
    color: #ffffff;
}


/* ============ Utilities ============ */
.container {
    width: min(1280px, 95vw);
    margin-inline: auto;
}

.grid {
    display: grid;
    gap: var(--grid-gap);
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.btn {
    --_bg: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    padding: .95rem 1.2rem;
    border-radius: 999px;
    background: var(--_bg);
    color: #04110a;
    font-weight: 700;
    letter-spacing: .2px;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(16, 185, 129, .25);
    border: 1px solid rgba(255, 255, 255, .08);
    transform: translateZ(0);
}

.btn:hover {
    filter: brightness(1.02) saturate(1.1);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    color: #e6ffe6;
    background: rgba(255, 255, 255, .03);
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .06);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .7rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    font-weight: 600;
    color: #d1fae5;
}

.kicker {
    text-transform: uppercase;
    letter-spacing: .22em;
    font-weight: 800;
    color: #a7f3d0;
    font-size: .74rem;
}

.headline {
    font-family: "Space Grotesk", Inter, system-ui;
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.05;
    margin: .3rem 0 .7rem;
}

.subtitle {
    color: #cbd5e1;
    font-weight: 500;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stroke {
    -webkit-text-stroke: 1px rgba(255, 255, 255, .25);
    text-shadow: 0 12px 36px rgba(0, 0, 0, .45);
}

/* ============ Header ============ */
header.site {
    position: sticky;
    top: 0;
    z-index: 40;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: .8rem;
    width: 100%;
    background: rgba(10, 16, 28, .55);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    padding: .5rem;
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-height: calc(var(--logo-size, 40px) + 20px);
    overflow: visible;
}

.logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    text-decoration: none;
    flex: 0 0 auto;
    line-height: 0;
}

.logo img {
    width: var(--logo-size, 40px);
    height: var(--logo-size, 40px);
    display: block;
    object-fit: contain;
    max-width: none;
    max-height: none;
}

.brand {
    font-family: "Space Grotesk", Inter;
    font-weight: 800;
    letter-spacing: .02em;
    display: none;
}

.nav-inner>nav {
    flex: 1 1 auto;
    min-width: 0;
}

nav ul {
    display: flex;
    align-items: center;
    gap: .2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

nav a {
    display: inline-flex;
    padding: .7rem .9rem;
    border-radius: 999px;
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: .02em;
    font-size: var(--nav-font-size, 1.08rem);
}

nav a:hover {
    background: rgba(255, 255, 255, .06);
}

nav a[href*="donate"] {
    font-weight: 900;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex: 0 0 auto;
}

/* Mobile menu button */
.menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    cursor: pointer;
}

.menu-btn .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #e5e7eb;
    margin: 3px 0;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

html.menu-open .menu-btn .bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

html.menu-open .menu-btn .bar:nth-child(2) {
    opacity: 0;
}

html.menu-open .menu-btn .bar:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* Mobile menu sheet */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(3, 7, 18, .55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.mobile-menu .sheet {
    background: rgba(8, 12, 22, .92);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    box-shadow: var(--shadow-2);
    padding: 12px;
    padding-top: calc(12px + env(safe-area-inset-top));
}

.mobile-menu nav {
    display: grid;
    gap: .4rem;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #e5e7eb;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    font-weight: 700;
}

.mobile-menu .actions {
    display: flex;
    gap: .6rem;
    padding: 12px 8px 14px;
}

html.menu-open .mobile-menu {
    opacity: 1;
    pointer-events: auto;
}

/* Safe areas */
.floating-donate {
    bottom: calc(18px + env(safe-area-inset-bottom));
}

/* ============ Hero ============ */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    isolation: isolate;
    z-index: 1;
}

.bg-pan {
    position: absolute;
    inset: -6vh 0 -6vh 0;
    z-index: -1;
    background-image: var(--bg-image, radial-gradient(circle at 50% 50%, #0b3b2b, #06111a));
    background-size: cover;
    background-position: center;
    filter: saturate(1.05) contrast(1.02) brightness(.92);
    transform: translateZ(0);
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 700px at 80% -10%, rgba(34, 197, 94, .25), transparent 60%),
        radial-gradient(600px 500px at 0% 100%, rgba(132, 204, 22, .18), transparent 60%),
        linear-gradient(180deg, rgba(3, 7, 18, .2), rgba(3, 7, 18, .75) 95%, rgba(3, 7, 18, .95));
    mix-blend-mode: normal;
}

.hero .content {
    padding: 18vh 0 10vh;
}

.hero .ctas {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hero .meta {
    margin-top: 1.2rem;
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.hero .meta .chip {
    background: rgba(20, 83, 45, .35);
    border-color: rgba(134, 239, 172, .28);
}

/* ============ Sections ============ */
.module {
    position: relative;
    padding: clamp(200px, 8vw, 110px) 0;
}

.module .section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(18px, 2vw, 24px);
}

.module h2 {
    font-family: "Space Grotesk", Inter;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    margin: 0 0 .6rem;
}

.module p.lead {
    color: #cbd5e1;
    max-width: 70ch;
}

.blob {
    position: absolute;
    width: 520px;
    height: 520px;
    filter: blur(90px);
    opacity: .22;
    border-radius: 50%;
    z-index: -1;
}

.blob.green {
    background: radial-gradient(circle at 50% 50%, #22c55e, transparent 60%);
    top: -140px;
    right: -160px;
}

.blob.lime {
    background: radial-gradient(circle at 50% 50%, #84cc16, transparent 60%);
    bottom: -180px;
    left: -100px;
}

/* About */
.about {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--grid-gap);
    align-items: center;
}

.aboutinverse {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--grid-gap);
    align-items: center;
}

.about aside,
.aboutinverse aside {
    position: relative;
}

.about .stat,
.aboutinverse .stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
}

.about .stat b,
.aboutinverse .stat b {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    color: #bbf7d0;
}

@media (max-width: 960px) {

    .about,
    .aboutinverse {
        grid-template-columns: 1fr;
    }

    .about aside,
    .aboutinverse aside {
        width: 90%;
    }
}

/* Projects */
.cards {
    grid-auto-rows: 1fr;
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: var(--shadow-1);
    min-height: 280px;
    /*cursor: pointer;*/
}

.card .media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .4s;
    filter: saturate(1.05) brightness(.9) contrast(1.05);
}

.card .scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .65) 65%, rgba(0, 0, 0, .9));
}

.card .body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.1rem;
    display: grid;
    gap: .4rem;
    z-index: 2;
}

.card h3 {
    margin: 0;
    font-size: 1.2rem;
}

.card .tags {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.card:hover .media {
    transform: scale(1.12) translateY(-4px);
    filter: brightness(.98) saturate(1.15);
}

/* Stretched links — VISIBLE TITLES (no overlay) */
.card,
.job {
    position: relative;
}

.card .stretched,
.job .stretched {
    position: static;
    /* keep in normal flow */
    display: block;
    /* block-level title */
    font-weight: 800;
    color: #e5e7eb;
    text-decoration: none;
    margin: 0 0 .25rem;
}

/* Remove overlay that could hide text */
.card .stretched::after,
.job .stretched::after {
    content: none;
}

/* Volunteer CTA */
.cta {
    display: grid;
    grid-template-columns: 1.0fr 1.0fr;
    gap: var(--grid-gap);
    align-items: center;
}

.cta .panel {
    padding: clamp(18px, 3vw, 28px);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: var(--shadow-2);
}

.cta .panelright {
    padding: clamp(18px, 3vw, 28px);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(34, 197, 94, .12), rgba(132, 204, 22, .06));
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: var(--shadow-2);
}

.cta aside img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}

@media (max-width: 960px) {
    .cta {
        grid-template-columns: 1fr;
    }
}

/* Careers */
.job {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    cursor: pointer;
}

.job .meta {
    color: #a3e635;
    font-weight: 700;
}

/* Donate */
.donate {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(34, 197, 94, .12), rgba(132, 204, 22, .06));
    border: 1px solid rgba(34, 197, 94, .25);
    box-shadow: var(--shadow-2);
}

.donate .inner {
    display: grid;
    grid-template-columns: 1.0fr 1.0fr;
    align-items: center;
    gap: var(--grid-gap);
    padding: clamp(22px, 3vw, 30px);
}

.donate figure {
    position: relative;
    padding-top: 64%;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
}

.donate figure .media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

@media (max-width: 960px) {
    .donate .inner {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    padding: 48px 0 80px;
    color: #cbd5e1;
}

.foot {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--grid-gap);
}

.foot small {
    color: #94a3b8;
}

.foot a {
    color: #e2e8f0;
    text-decoration: none;
}

.foot a:hover {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .foot {
        grid-template-columns: 1fr;
    }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Donate Button */
.floating-donate {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    box-shadow: var(--shadow-2);
}

/* Mobile tweaks */
@media (max-width: 900px) {
    :root {
        --logo-size: 56px;
        --nav-font-size: 1rem;
    }

    .nav-inner {
        border-radius: 16px;
    }

    .menu-btn {
        display: flex;
    }

    .nav-inner>nav,
    .nav-cta {
        display: none;
    }
}

@media (max-width: 760px) {
    nav ul {
        gap: .1rem;
    }

    nav a {
        padding: .7rem .9rem;
        font-size: clamp(.95rem, 3.5vw, 1.02rem);
    }

    .headline {
        letter-spacing: -.01em;
    }

    .marquee b {
        display: none;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }

    .card .media {
        transition: none;
    }
}