/*
Theme Name: Togetherness Community
Theme URI: https://togetherness.life
Author: Togetherness Life
Description: Custom theme for Togetherness Life with a warm, respectful, stigma-free visual identity.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: togetherness-community
*/

@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans:wght@400;500;700;800&family=Source+Serif+4:opsz,wght@8..60,500;8..60,700&display=swap');

:root {
    --tg-navy: #153f6e;
    --tg-teal: #9cdad2;
    --tg-gold: #e8ba57;
    --tg-cream: #f5efe1;
    --tg-ink: #1f2f3f;
    --tg-soft: #faf8f2;
    --tg-white: #ffffff;
    --tg-shadow: 0 14px 34px rgba(21, 63, 110, 0.18);
    --tg-radius: 16px;
    --tg-radius-sm: 10px;
    --tg-container: 1160px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--tg-ink);
    background:
        radial-gradient(circle at 10% 15%, rgba(156, 218, 210, 0.26), transparent 36%),
        radial-gradient(circle at 90% 4%, rgba(232, 186, 87, 0.2), transparent 26%),
        linear-gradient(180deg, #fefcf7 0%, #f8f3e8 100%);
    font-family: 'Merriweather Sans', sans-serif;
    line-height: 1.6;
}

a {
    color: var(--tg-navy);
    text-decoration: none;
}

a:hover {
    color: #0f2e51;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.tg-container {
    width: min(100% - 2rem, var(--tg-container));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(21, 63, 110, 0.08);
    backdrop-filter: blur(8px);
}

.site-header__inner {
    min-height: 82px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
}

.branding {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.branding__icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    box-shadow: 0 10px 18px rgba(21, 63, 110, 0.2);
}

.branding__text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
}

.site-nav {
    justify-self: end;
}

.site-nav a {
    font-weight: 600;
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--tg-navy);
    color: var(--tg-white);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.header-donate-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.52rem 1rem;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4b3704;
    background: linear-gradient(180deg, #f7cb77 0%, #e8ba57 100%);
    box-shadow: 0 10px 18px rgba(118, 82, 14, 0.2);
    animation: donatePulse 2.8s ease-in-out infinite;
}

.header-donate-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    border: 2px solid rgba(232, 186, 87, 0.65);
    animation: donateRing 2.8s ease-out infinite;
    pointer-events: none;
}

.header-donate-btn:hover {
    color: #3f2e03;
    transform: translateY(-1px);
}

@keyframes donatePulse {
    0%,
    100% {
        box-shadow: 0 10px 18px rgba(118, 82, 14, 0.2);
        transform: translateY(0);
    }

    50% {
        box-shadow: 0 14px 28px rgba(118, 82, 14, 0.38);
        transform: translateY(-1px);
    }
}

@keyframes donateRing {
    0% {
        opacity: 0.85;
        transform: scale(1);
    }

    75% {
        opacity: 0;
        transform: scale(1.14);
    }

    100% {
        opacity: 0;
        transform: scale(1.14);
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-donate-btn {
        animation: none;
    }

    .header-donate-btn::after {
        animation: none;
    }
}

.hero {
    padding: 4.5rem 0 3rem;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.hero h1 {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    color: #143760;
}

.hero p {
    margin-top: 0;
    font-size: 1.12rem;
    max-width: 58ch;
}

.pillars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.25rem 0 1.7rem;
}

.pillars span {
    background: var(--tg-white);
    border: 1px solid rgba(21, 63, 110, 0.12);
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(21, 63, 110, 0.18);
}

.btn--primary {
    background: var(--tg-navy);
    color: var(--tg-white);
}

.btn--accent {
    background: var(--tg-gold);
    color: #4b3704;
}

.hero__panel {
    background: var(--tg-cream);
    border-radius: 50px;
    padding: 1.1rem;
    box-shadow: var(--tg-shadow);
    position: relative;
}

.hero__panel img {
    border-radius: 40px;
}

section {
    padding: 2.5rem 0;
}

.section-title {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 0.5rem;
    color: #163a63;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.card {
    background: var(--tg-white);
    border-radius: var(--tg-radius);
    padding: 1.3rem;
    box-shadow: 0 8px 22px rgba(26, 48, 78, 0.12);
    border-top: 4px solid var(--tg-teal);
}

.card:nth-child(2) {
    border-top-color: var(--tg-gold);
}

.card:nth-child(3) {
    border-top-color: var(--tg-navy);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.tg-members-area {
    margin-top: 1.2rem;
}

.tg-members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.auth-wrap {
    background: linear-gradient(120deg, rgba(156, 218, 210, 0.24), rgba(232, 186, 87, 0.24));
    border: 1px solid rgba(21, 63, 110, 0.12);
    border-radius: var(--tg-radius);
    padding: 1rem;
    margin-top: 1.4rem;
}

.tg-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tg-auth-card {
    background: var(--tg-white);
    border-radius: var(--tg-radius-sm);
    padding: 1rem;
}

.tg-auth-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.tg-auth-card label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.tg-auth-card input {
    width: 100%;
    border: 1px solid rgba(21, 63, 110, 0.25);
    border-radius: 8px;
    padding: 0.62rem 0.7rem;
    margin-bottom: 0.8rem;
}

.tg-auth-card select,
.tg-auth-card textarea,
.tg-partner-form select,
.tg-partner-form textarea,
.tg-partner-form input {
    width: 100%;
    border: 1px solid rgba(21, 63, 110, 0.25);
    border-radius: 8px;
    padding: 0.62rem 0.7rem;
    margin-bottom: 0.8rem;
    font: inherit;
}

.tg-partner-shell {
    max-width: 920px;
    margin: 0 auto;
}

.tg-link-list {
    margin: 0;
    padding-left: 1.1rem;
}

.tg-link-list li + li {
    margin-top: 0.45rem;
}

.tg-auth-card .btn {
    width: 100%;
}

.tg-message {
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.9rem;
    font-weight: 700;
}

.tg-message--ok {
    background: rgba(156, 218, 210, 0.35);
    color: #0d4f4a;
}

.tg-message--error {
    background: rgba(255, 212, 212, 0.55);
    color: #69212a;
}

.tg-impact-cta-wrap {
    padding-top: 1rem;
}

.tg-impact-cta {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: clamp(1.2rem, 3vw, 2.1rem);
    color: #0f2f4f;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.75), transparent 42%),
        radial-gradient(circle at 86% 14%, rgba(255, 226, 160, 0.58), transparent 36%),
        linear-gradient(135deg, rgba(156, 218, 210, 0.78), rgba(232, 186, 87, 0.84));
    border: 1px solid rgba(21, 63, 110, 0.14);
    box-shadow: 0 18px 40px rgba(21, 63, 110, 0.15);
}

.tg-impact-cta::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    right: -70px;
    bottom: -95px;
    border-radius: 50%;
    background: rgba(21, 63, 110, 0.12);
}

.tg-impact-cta > * {
    position: relative;
    z-index: 1;
}

.tg-impact-cta__eyebrow {
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    font-size: 0.82rem;
    color: #6a4405;
}

.tg-impact-cta h2 {
    margin: 0 0 0.65rem;
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.2;
}

.tg-impact-cta p {
    max-width: 72ch;
}

.tg-impact-cta__button {
    box-shadow: 0 12px 22px rgba(115, 68, 1, 0.24);
}

.tg-charity-page {
    display: grid;
    gap: 1.4rem;
}

.tg-charity-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 1.5rem;
    align-items: center;
}

.tg-charity-eyebrow {
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 800;
    color: #8d6620;
}

.tg-charity-hero__intro {
    max-width: 58ch;
    margin-top: 0;
    font-size: 1.05rem;
}

.tg-charity-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1.2rem 0 1.4rem;
}

.tg-charity-kpi {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(21, 63, 110, 0.12);
    border-radius: var(--tg-radius-sm);
    padding: 0.95rem 1rem;
}

.tg-charity-kpi__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4d6277;
}

.tg-charity-kpi strong {
    font-size: 1.2rem;
    color: var(--tg-navy);
}

.tg-thermometer-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8f2e6 100%);
    border: 1px solid rgba(21, 63, 110, 0.12);
    border-radius: 28px;
    box-shadow: 0 20px 42px rgba(21, 63, 110, 0.14);
    padding: 1.5rem 1.4rem;
    display: grid;
    justify-items: center;
    gap: 0.9rem;
}

.tg-thermometer-card__eyebrow {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b05732;
}

.tg-thermometer-card__target {
    margin: 0;
    font-family: 'Source Serif 4', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    color: #173e68;
}

.tg-thermometer-shell {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    justify-content: center;
}

.tg-thermometer-scale {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 800;
    color: #677a8c;
}

.tg-thermometer-scale--right {
    justify-content: center;
    min-height: auto;
    gap: 0.25rem;
    color: var(--tg-navy);
}

.tg-thermometer-scale--right strong {
    font-size: 1.25rem;
}

.tg-thermometer-scale__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
}

.tg-thermometer {
    position: relative;
    display: grid;
    justify-items: center;
    padding-top: 0.25rem;
}

.tg-thermometer__track {
    position: relative;
    width: 92px;
    height: 360px;
    border-radius: 999px;
    border: 8px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, rgba(234, 240, 246, 0.92), rgba(255, 255, 255, 0.82));
    box-shadow: inset 0 0 0 2px rgba(21, 63, 110, 0.06), 0 18px 28px rgba(21, 63, 110, 0.12);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
}

.tg-thermometer__fill-wrap {
    position: absolute;
    inset: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(214, 225, 235, 0.45));
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.tg-thermometer__mercury {
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff8d6f 0%, #f15f3f 35%, #d54021 100%);
    box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.28), 0 0 22px rgba(220, 89, 51, 0.34);
}

.tg-thermometer__shine {
    position: absolute;
    top: 18px;
    left: 20px;
    width: 18px;
    height: 250px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0));
}

.tg-thermometer__bulb {
    position: relative;
    width: 126px;
    height: 126px;
    margin-top: -14px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(231, 238, 244, 0.96));
    border: 8px solid rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 0 0 2px rgba(21, 63, 110, 0.06), 0 18px 28px rgba(21, 63, 110, 0.12);
    display: grid;
    place-items: center;
}

.tg-thermometer__bulb-core {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffb49a 0%, #f26c49 42%, #d24021 100%);
    box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.34), 0 0 22px rgba(220, 89, 51, 0.3);
}

.tg-charity-progress {
    width: 100%;
}

.tg-charity-progress__bar {
    height: 14px;
    background: rgba(21, 63, 110, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.tg-charity-progress__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--tg-teal), var(--tg-gold));
}

.tg-charity-progress__summary {
    margin: 0.75rem 0 0;
    text-align: center;
    font-weight: 700;
}

.tg-charity-panel {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(21, 63, 110, 0.1);
    border-radius: 24px;
    box-shadow: 0 10px 24px rgba(21, 63, 110, 0.08);
    padding: 1.3rem;
}

.tg-charity-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tg-charity-panel__header h3 {
    margin: 0;
    font-family: 'Source Serif 4', serif;
    font-size: 1.5rem;
    color: #163a63;
}

.tg-carousel-controls {
    display: flex;
    gap: 0.55rem;
}

.tg-carousel-controls__button {
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--tg-navy);
    color: var(--tg-white);
    font-size: 1.2rem;
    cursor: pointer;
}

.tg-carousel-controls__button:disabled {
    opacity: 0.35;
    cursor: default;
}

.tg-sponsor-carousel__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.tg-sponsor-carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 1rem;
}

.tg-sponsor-card {
    scroll-snap-align: start;
    min-height: 100%;
    background: linear-gradient(160deg, rgba(156, 218, 210, 0.24), rgba(255, 255, 255, 0.94));
    border: 1px solid rgba(21, 63, 110, 0.1);
    border-radius: 20px;
    padding: 1.2rem;
}

.tg-sponsor-card__name {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tg-navy);
}

.tg-stage-track {
    display: grid;
    gap: 0.9rem;
}

.tg-stage-node {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: start;
    gap: 0.95rem;
}

.tg-stage-node:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 52px;
    bottom: -16px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(60, 179, 154, 0.42), rgba(21, 63, 110, 0.14));
}

.tg-stage-node__pin {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    border: 2px solid rgba(21, 63, 110, 0.14);
    background: #f2f5f8;
    color: #37516b;
    box-shadow: 0 8px 18px rgba(21, 63, 110, 0.12);
}

.tg-stage-node__body {
    border-radius: 20px;
    border: 1px solid rgba(21, 63, 110, 0.12);
    background: #fbfaf7;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 20px rgba(21, 63, 110, 0.08);
}

.tg-stage-node__status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.65rem;
}

.tg-stage-node__badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    background: rgba(21, 63, 110, 0.1);
    color: #2f4863;
}

.tg-stage-node__status strong {
    color: #173e68;
}

.tg-stage-node h4 {
    margin: 0 0 0.4rem;
    font-size: 1.08rem;
}

.tg-stage-node p {
    margin-top: 0;
    margin-bottom: 0.45rem;
}

.tg-stage-node__meta {
    margin-bottom: 0;
    font-weight: 700;
    color: #8d6620;
}

.tg-stage-node.is-completed .tg-stage-node__pin {
    background: linear-gradient(180deg, #4ebca2, #2f9d86);
    border-color: rgba(25, 132, 109, 0.4);
    color: #ffffff;
}

.tg-stage-node.is-completed .tg-stage-node__body {
    background: linear-gradient(145deg, rgba(156, 218, 210, 0.25), rgba(255, 255, 255, 0.97));
    border-color: rgba(52, 151, 130, 0.28);
}

.tg-stage-node.is-completed .tg-stage-node__badge {
    background: rgba(54, 158, 136, 0.18);
    color: #17624f;
}

.tg-stage-node.is-next .tg-stage-node__pin {
    background: linear-gradient(180deg, #f7c773, #e8a940);
    border-color: rgba(182, 121, 18, 0.35);
    color: #62400b;
}

.tg-stage-node.is-next .tg-stage-node__body {
    border-color: rgba(211, 153, 52, 0.45);
    box-shadow: 0 10px 24px rgba(210, 150, 51, 0.2);
}

.tg-stage-node.is-next .tg-stage-node__badge {
    background: rgba(232, 169, 64, 0.18);
    color: #8b5d0c;
}

.tg-stage-node.is-locked .tg-stage-node__pin {
    background: linear-gradient(180deg, #eef2f5, #dfe7ee);
    color: #5a6f84;
}

.tg-stage-node.is-locked .tg-stage-node__body {
    background: linear-gradient(145deg, rgba(21, 63, 110, 0.06), rgba(255, 255, 255, 0.96));
}

.tg-stage-node.is-locked .tg-stage-node__badge {
    background: rgba(21, 63, 110, 0.14);
    color: #37516b;
}

.site-footer {
    margin-top: 2rem;
    padding: 1.4rem 0 2.1rem;
    border-top: 1px solid rgba(21, 63, 110, 0.1);
    color: #3b4a5a;
}

@media (max-width: 900px) {
    .hero__grid,
    .grid-cards,
    .tg-auth-grid,
    .tg-members-grid,
    .tg-charity-hero {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        grid-template-columns: 1fr auto auto;
    }

    .site-nav {
        position: absolute;
        top: 82px;
        left: 1rem;
        right: 1rem;
        background: var(--tg-white);
        border-radius: 14px;
        box-shadow: var(--tg-shadow);
        padding: 0.85rem;
        display: none;
        justify-self: auto;
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-donate-btn {
        padding: 0.5rem 0.72rem;
        font-size: 0.75rem;
    }

    .tg-charity-panel__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tg-charity-kpis {
        grid-template-columns: 1fr;
    }

    .tg-thermometer-shell {
        grid-template-columns: 1fr;
    }

    .tg-thermometer-scale {
        min-height: auto;
        width: 100%;
    }

    .tg-thermometer-scale--left {
        order: 2;
        flex-direction: row;
    }

    .tg-thermometer-scale--right {
        order: 3;
        text-align: center;
    }

    .tg-thermometer {
        order: 1;
    }

    .tg-sponsor-carousel__track {
        grid-auto-columns: minmax(84%, 1fr);
    }

    .tg-stage-node {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 0.7rem;
    }

    .tg-stage-node__pin {
        width: 44px;
        height: 44px;
    }

    .tg-stage-node:not(:last-child)::after {
        left: 21px;
        top: 44px;
    }
}
