/* Projectabe visual refresh: shared design language for every public page. */
:root {
    --color-primary: #5948f5;
    --color-primary-hover: #4635dc;
    --color-secondary: #7665ff;
    --color-background: #fbfaf8;
    --color-surface: #ffffff;
    --color-surface-alt: #f3f1ff;
    --color-surface-raised: #ffffff;
    --color-text: #242842;
    --color-heading: #111a3a;
    --color-text-muted: #66708a;
    --color-border: #e6e7f0;
    --color-border-strong: #d5d8e6;
    --color-link: #5140e8;
    --color-focus: #5948f5;
    --color-header: rgba(255, 255, 255, .96);
    --color-overlay: rgba(25, 30, 65, .08);
    --shadow-card: 0 12px 34px rgba(25, 30, 65, .055);
    --shadow-header: 0 1px 0 rgba(25, 30, 65, .06);
    --shadow-button: 0 8px 18px rgba(89, 72, 245, .2);
}

body {
    background: var(--color-background);
    color: var(--color-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

.container { width: min(1240px, calc(100% - 48px)); }
main.container { padding-block: 34px 72px; }
.site-header { border-bottom-color: #ececf3; box-shadow: 0 4px 18px rgba(25, 30, 65, .025); }
.site-header .nav-wrap { min-height: 76px; }
.brand-with-logo { gap: 9px; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; }
.brand-wordmark { width: 176px; height: 46px; }
.site-header nav { gap: 3px; }
.site-header nav a,
.site-header .explore-nav-button,
.site-header .account-nav-button {
    border-radius: 10px;
    color: #505a75;
    font-size: .9rem;
    font-weight: 650;
    transition: background-color .18s ease, color .18s ease;
}
.site-header nav a:hover,
.site-header .explore-nav-button:hover,
.site-header .account-nav-button:hover,
.site-header nav a.is-active {
    color: var(--color-primary);
    background: #f3f1ff;
}
.site-header nav > a[href="/submit.php"] {
    margin-inline: 5px;
    padding: 9px 16px;
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-button);
}
.site-header nav > a[href="/submit.php"]:hover { background: var(--color-primary-hover); color: #fff; }

h1, h2, h3, h4 { color: var(--color-heading); letter-spacing: -.035em; }
h1 { font-weight: 780; }
h2, h3 { font-weight: 730; }
.eyebrow { color: var(--color-primary); font-size: .76rem; font-weight: 800; letter-spacing: .12em; }

.btn,
button.btn,
input[type="submit"],
button[type="submit"] {
    border-radius: 11px;
    font-weight: 700;
}
.btn-primary, .btn:not(.btn-secondary):not(.btn-quiet) { background: var(--color-primary); }
.btn-primary:hover, .btn:not(.btn-secondary):not(.btn-quiet):hover { background: var(--color-primary-hover); }
.btn-secondary { border-color: var(--color-border); background: #fff; color: #343c5a; box-shadow: none; }
.btn-secondary:hover { border-color: #c9c3ff; background: #f6f4ff; color: var(--color-primary); }

.card,
.project-card,
.homepage-sidebar-panel,
.homepage-discovery-copy,
.section-heading {
    border-color: var(--color-border);
    border-radius: 17px;
    box-shadow: var(--shadow-card);
}
.card, .project-card, .homepage-sidebar-panel { background: #fff; }
.project-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.project-card:hover { transform: translateY(-3px); border-color: #d5d0ff; box-shadow: 0 16px 36px rgba(25, 30, 65, .09); }
.project-logo { background: #f1efff; }

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    border-color: #dfe2ed;
    border-radius: 11px;
    background: #fff;
    color: var(--color-text);
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus { border-color: #9e94ff; box-shadow: 0 0 0 4px rgba(89, 72, 245, .12); }
label { color: #333b58; font-weight: 650; }

.page-section { margin-block: 32px; }
.page-section-header { margin-bottom: 18px; }
.page-section-header h2, .section-heading h2 { margin: 0 0 8px; font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
.page-section-header p, .section-heading p { color: var(--color-text-muted); }
.site-footer { border-top: 1px solid var(--color-border); background: #fff; }
.footer-logo { color: var(--color-heading); }
.footer-column h2 { color: var(--color-heading); }

.homepage-discovery-layout {
    width: 100%;
    max-width: 1240px;
    grid-template-columns: minmax(0, 1fr) 292px;
    align-items: start;
    gap: 26px;
}
.homepage-discovery-sidebar { gap: 16px; }
.homepage-sidebar-panel { padding: 19px; }
.homepage-sidebar-panel-heading h3 { font-size: 1.05rem; }
.homepage-sidebar-list li + li { border-top-color: #eff0f5; }
.homepage-sidebar-project-copy strong { color: #202746; font-size: .92rem; }
.homepage-sidebar-project:hover .homepage-sidebar-project-copy strong { color: var(--color-primary); }
.homepage-sidebar-submit { border-radius: 16px; background: #f1efff; color: #342b91; }

.discover-project-grid { align-items: stretch; }
.discover-invite-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding: clamp(26px, 4vw, 42px);
    border: 1px solid #e2defe;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0edff 0%, #faf9ff 56%, #e9f7ff 100%);
}
.discover-invite-card::after {
    position: absolute;
    right: -50px;
    bottom: -82px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(89, 72, 245, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(89, 72, 245, .035), 0 0 0 48px rgba(89, 72, 245, .025);
    content: "";
    pointer-events: none;
}
.discover-invite-span-1 { grid-column: span 1; }
.discover-invite-span-2 { grid-column: span 2; }
.discover-invite-span-3 { grid-column: 1 / -1; min-height: 250px; }
.discover-invite-card > * { position: relative; z-index: 1; }
.discover-invite-card .eyebrow { margin: 18px 0 7px; }
.discover-invite-card h2 { max-width: 480px; margin: 0 0 10px; font-size: clamp(1.55rem, 2.8vw, 2rem); line-height: 1.16; }
.discover-invite-card > p:not(.eyebrow) { max-width: 560px; margin: 0 0 21px; color: var(--color-text-muted); }
.discover-invite-card .btn { display: inline-flex; align-items: center; gap: 12px; }
.discover-card-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid rgba(89, 72, 245, .12);
    border-radius: 13px;
    background: rgba(255, 255, 255, .8);
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 700;
}
.discover-more { margin-top: 52px; }
.discover-more-heading { margin-bottom: 18px; }
.discover-more-heading .eyebrow { margin-bottom: 5px; }
.discover-more-heading h2 { margin: 0; font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
.discover-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.discover-more-card {
    display: flex;
    min-width: 0;
    min-height: 116px;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-card);
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.discover-more-card:hover { transform: translateY(-2px); border-color: #d5d0ff; box-shadow: 0 14px 30px rgba(25, 30, 65, .08); }
.discover-more-card > span:nth-child(2) { display: grid; min-width: 0; gap: 4px; }
.discover-more-card strong { color: var(--color-heading); }
.discover-more-card small { color: var(--color-text-muted); font-size: .84rem; line-height: 1.45; }
.discover-card-arrow { margin-left: auto; color: var(--color-primary); font-size: 1.2rem; }
@media (max-width: 900px) {
    .discover-more-grid { grid-template-columns: 1fr; }
    .discover-more-card { min-height: 92px; }
}
@media (max-width: 640px) {
    .discover-invite-span-1, .discover-invite-span-2, .discover-invite-span-3 { grid-column: 1 / -1; }
    .discover-invite-card { min-height: 290px; }
    .discover-more { margin-top: 38px; }
}

.homepage-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
    align-items: center;
    gap: clamp(24px, 4vw, 54px);
    min-height: 334px;
    margin: 4px 0 30px;
    padding: clamp(26px, 4vw, 48px);
    overflow: hidden;
    border: 1px solid #e9e6ff;
    border-radius: 24px;
    background: radial-gradient(circle at 85% 12%, rgba(224, 220, 255, .75), transparent 38%), linear-gradient(115deg, #fff 0%, #fff 48%, #f5f3ff 100%);
    box-shadow: 0 16px 42px rgba(56, 46, 125, .07);
}
.homepage-hero-copy { position: relative; z-index: 1; max-width: 620px; }
.homepage-hero .eyebrow { margin: 0 0 12px; }
.homepage-hero h1 { max-width: 610px; margin: 0 0 14px; font-size: clamp(2.45rem, 4.6vw, 4rem); line-height: 1.04; }
.homepage-hero-copy > p:not(.eyebrow) { max-width: 540px; margin: 0 0 21px; color: #616c87; font-size: 1.06rem; }
.homepage-search-form { display: flex; max-width: 610px; gap: 8px; padding: 5px; border: 1px solid #dcdfee; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgba(25, 30, 65, .06); }
.homepage-search-form input[type="search"] { min-width: 0; flex: 1; height: 46px; padding: 0 13px; border: 0; outline: 0; box-shadow: none; }
.homepage-search-form input[type="search"]:focus { box-shadow: none; }
.homepage-search-form .btn { min-width: 104px; min-height: 46px; }
.homepage-category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.homepage-category-chips a { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 11px; border: 1px solid #e4e4ef; border-radius: 999px; background: rgba(255,255,255,.84); color: #46506c; font-size: .78rem; font-weight: 650; text-decoration: none; }
.homepage-category-chips a:hover { border-color: #c9c3ff; background: #f4f2ff; color: var(--color-primary); }
.homepage-hero-art { position: relative; display: grid; min-height: 245px; place-items: center; }
.homepage-hero-art::before { position: absolute; width: 300px; height: 300px; border: 1px dashed rgba(112, 98, 235, .25); border-radius: 50%; content: ""; }
.hero-window { position: relative; z-index: 1; width: min(100%, 390px); padding: 12px; border: 1px solid rgba(119, 111, 188, .24); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 24px 54px rgba(47, 43, 115, .16); transform: rotate(-2deg); }
.hero-window-bar { display: flex; align-items: center; gap: 6px; padding: 3px 4px 11px; color: #8288a2; font-size: .69rem; }
.hero-window-bar > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #ff8e9b; box-shadow: 11px 0 #ffc76b, 22px 0 #6ad7b7; margin-right: 22px; }
.hero-window-bar strong { color: #5d6380; font-weight: 700; }
.hero-window-content { min-height: 172px; padding: 22px 19px; border-radius: 12px; background: linear-gradient(135deg, #f7f6ff, #e9e7ff); }
.hero-window-content > span { display: block; color: #6d5ef2; font-size: .57rem; font-weight: 800; letter-spacing: .13em; }
.hero-window-content > strong { display: block; max-width: 205px; margin-top: 8px; color: #161e44; font-size: 1.7rem; letter-spacing: -.045em; line-height: 1.12; }
.hero-window-content > p { margin: 8px 0 0; color: #717995; font-size: .72rem; }
.hero-window-art { position: absolute; right: 16px; top: 35px; width: 122px; height: 105px; overflow: hidden; border-radius: 14px; background: linear-gradient(155deg, #a9a4ff, #7465f5 62%, #4332c7); }
.hero-window-art::before, .hero-window-art::after { position: absolute; right: -12px; bottom: -34px; width: 170px; height: 92px; border-radius: 50% 50% 0 0; background: #d6d2ff; content: ""; transform: rotate(-18deg); }
.hero-window-art::after { right: 16px; bottom: -47px; background: #a29aff; transform: rotate(18deg); }
.hero-window-art span { position: absolute; top: 18px; left: 20px; width: 32px; height: 32px; border-radius: 50%; background: #fff4c8; box-shadow: 0 0 25px #fff4c8; }
.hero-floating-note { position: absolute; right: -2px; bottom: 3px; z-index: 2; display: grid; gap: 2px; padding: 12px 16px; border: 1px solid #e9e7f4; border-radius: 13px; background: #fff; box-shadow: 0 12px 28px rgba(36, 31, 93, .12); transform: rotate(2deg); }
.hero-floating-note strong { color: #20274b; font-size: .79rem; }
.hero-floating-note span { color: #7a829b; font-size: .69rem; }

.homepage-discovery-main .homepage-project-section[aria-labelledby="featured-projects-heading"] { margin-top: 8px; }
.homepage-discovery-main .homepage-project-section[aria-labelledby="featured-projects-heading"] > .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.homepage-project-section .project-card { min-width: 0; }
.homepage-curated-heading, .homepage-discovery-copy { margin-top: 28px; }
.homepage-discovery-copy { padding: clamp(22px, 3vw, 36px); border: 1px solid var(--color-border); background: #fff; }

@media (max-width: 1180px) {
    .homepage-discovery-layout { grid-template-columns: minmax(0, 1fr); }
    .homepage-discovery-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .homepage-sidebar-submit { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
    .container { width: min(100% - 32px, 680px); }
    .homepage-hero { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .homepage-hero-art { min-height: 240px; }
    .homepage-discovery-main .homepage-project-section[aria-labelledby="featured-projects-heading"] > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .container { width: calc(100% - 26px); }
    main.container { padding-block: 20px 48px; }
    .homepage-hero { gap: 8px; padding: 25px 19px 19px; border-radius: 19px; }
    .homepage-hero h1 { font-size: clamp(2.3rem, 11vw, 3.2rem); }
    .homepage-hero-copy > p:not(.eyebrow) { font-size: .96rem; }
    .homepage-search-form { gap: 4px; }
    .homepage-search-form .btn { min-width: 82px; padding-inline: 11px; }
    .homepage-hero-art { min-height: 220px; }
    .hero-window { width: min(100%, 340px); }
    .hero-window-content { min-height: 158px; padding: 19px 15px; }
    .hero-window-art { right: 10px; width: 105px; height: 95px; }
    .hero-floating-note { right: -4px; }
    .homepage-discovery-sidebar { grid-template-columns: minmax(0, 1fr); }
    .homepage-discovery-main .homepage-project-section[aria-labelledby="featured-projects-heading"] > .grid { grid-template-columns: minmax(0, 1fr); }
    .homepage-category-chips { gap: 6px; }
    .homepage-category-chips a { min-height: 30px; padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.homepage-category-chips { justify-content: flex-start; }


/* Resources page: a scannable guide grid with a clear partner feature. */
.resources-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 18px;
}
.resources-page > .resources-breadcrumb,
.resources-page > .resources-hero,
.resources-page > .resources-partner-card {
    grid-column: 1 / -1;
}
.resources-breadcrumb { margin: 0; padding: 0 2px; color: var(--color-text-muted); font-size: .9rem; }
.resources-hero {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: clamp(30px, 5vw, 62px);
    border: 1px solid #e8e5ff;
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 18%, rgba(151, 141, 255, .22), transparent 30%),
        linear-gradient(120deg, #fff 8%, #f5f3ff 72%, #efedff);
    box-shadow: 0 20px 48px rgba(45, 39, 113, .07);
}
.resources-hero h1 { max-width: 760px; margin: 0 0 14px; font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.03; }
.resources-hero > p:not(.eyebrow) { max-width: 650px; margin: 0; color: var(--color-text-muted); font-size: 1.08rem; }
.resources-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.resources-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}
.resources-shortcuts a {
    padding: 7px 12px;
    border: 1px solid rgba(106, 94, 204, .18);
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    color: #5140cf;
    font-size: .83rem;
    font-weight: 700;
    text-decoration: none;
}
.resources-shortcuts a:hover { background: #fff; border-color: #b7afff; }
.resources-page > .resources-card {
    min-width: 0;
    margin: 0;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-card);
}
.resources-card h2 { margin-top: 0; font-size: 1.35rem; }
.resources-card p { color: #606a84; }
.resources-card li + li { margin-top: 9px; }
.resources-partner-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: clamp(26px, 4vw, 42px);
    border: 0;
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 10%, rgba(174, 163, 255, .32), transparent 30%),
        linear-gradient(115deg, #242052, #4033a7 58%, #6555ed);
    color: #f3f1ff;
    box-shadow: 0 18px 42px rgba(52, 42, 154, .2);
}
.resources-partner-card h2 { margin: 4px 0 9px; color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.resources-partner-card p { max-width: 720px; color: #e1defe; }
.resources-partner-card .eyebrow { color: #c4bcff; }
.resources-partner-card .btn { margin-top: 4px; background: #fff; color: #382d9e; box-shadow: none; }
.resources-partner-card .btn:hover { background: #f0edff; color: #30258f; }
.resources-partner-card .muted { margin: 17px 0 0; color: #d0cbf5; font-size: .85rem; }

@media (max-width: 760px) {
    .resources-page { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .resources-page > .resources-breadcrumb,
    .resources-page > .resources-hero,
    .resources-page > .resources-partner-card { grid-column: auto; }
    .resources-hero { padding: 30px 24px; border-radius: 22px; }
    .resources-hero h1 { font-size: clamp(2.35rem, 10vw, 3.5rem); }
    .resources-shortcuts { gap: 7px; }
}
