:root {
    --brand-purple:         #512974;
    --brand-purple-dark:    #3d1d57;
    --brand-purple-mid:     #6b3a8a;
    --brand-pink:           #dd89af;
    --brand-pink-light:     rgba(221, 137, 175, 0.15);
    --brand-pink-medium:    rgba(221, 137, 175, 0.35);

    --bg-white:             #ffffff;
    --bg-subtle:            #faf8fd;
    --bg-light-purple:      #f4f0fa;
    --bg-hero-overlay:      rgba(30, 10, 50, 0.55);

    --text-dark:            #1a0c2e;
    --text-body:            #4a3860;
    --text-muted:           #7a6b8a;
    --text-on-dark:         #ffffff;

    --divider:              rgba(81, 41, 116, 0.1);
    --divider-strong:       rgba(81, 41, 116, 0.2);

    --btn-radius:           8px;
    --btn-shadow:           rgba(81, 41, 116, 0.25);

    --font-serif:           Georgia, 'Times New Roman', serif;
    --font-sans:            'Segoe UI', system-ui, -apple-system, sans-serif;

    --section-v:            clamp(4rem, 8vw, 7rem);
    --card-radius:          12px;
    --img-radius:           10px;

    --hero-height:          clamp(560px, 82vh, 900px);
    --card-img-h:           200px;
}

.wrap {
    max-width: var(--content-max-w);
    margin: 0 auto;
    padding: 0 var(--page-pad-h);
}

.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-pink);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    color: var(--text-dark);
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-sub {
    font-size: clamp(1rem, 1.6vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 540px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-purple);
    color: #fff;
    border: none;
    border-radius: var(--btn-radius);
    padding: 13px 30px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px var(--btn-shadow);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--brand-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 26px var(--btn-shadow);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--brand-purple);
    border: 1.5px solid var(--brand-purple);
    border-radius: var(--btn-radius);
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--brand-pink);
    color: #fff;
    transform: translateY(-2px);
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--brand-purple);
    border: none;
    border-radius: var(--btn-radius);
    padding: 13px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
}

.btn-white:hover {
    background: #f0e8f8;
    transform: translateY(-2px);
}

/* Larger donate button variant */
.btn-white--lg {
    padding: 16px 44px;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    box-shadow: 0 6px 28px rgba(0,0,0,0.22);
}

hr.section-rule {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 0;
}

/* ── ANIMATIONS ────────────────────────────────────────
   All motion respects prefers-reduced-motion.
   ─────────────────────────────────────────────────── */

/* ── Hero entrance — staggered on load ── */
.hero-eyebrow {
    animation: hero-fade-up 0.7s ease both;
    animation-delay: 0.1s;
}
.hero h1 {
    animation: hero-fade-up 0.75s ease both;
    animation-delay: 0.25s;
}
.hero p {
    animation: hero-fade-up 0.75s ease both;
    animation-delay: 0.4s;
}
.hero-actions {
    animation: hero-fade-up 0.75s ease both;
    animation-delay: 0.55s;
}

@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Scroll-reveal ──
   Elements start invisible; IntersectionObserver adds .is-visible. */
.reveal {
    opacity: 0;
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.from-up    { transform: translateY(28px); }
.reveal.from-left  { transform: translateX(-32px); }
.reveal.from-right { transform: translateX(32px); }
.reveal.from-scale { transform: scale(0.96); }

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Cards use only opacity for their reveal so their hover transform
   is never blocked by the reveal system's transform: none rule. */
.offering-card.reveal          { transform: none; }
.offering-card.reveal.from-up  { transform: none; }
.offering-card:hover           { transform: translateY(-5px); }

/* Stagger children inside a reveal-group */
.reveal-group .reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal-group .reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal-group .reveal:nth-child(3) { transition-delay: 0.25s; }
.reveal-group .reveal:nth-child(4) { transition-delay: 0.35s; }
.reveal-group .reveal:nth-child(5) { transition-delay: 0.45s; }
.reveal-group .reveal:nth-child(6) { transition-delay: 0.55s; }
.reveal-group .reveal:nth-child(7) { transition-delay: 0.65s; }
.reveal-group .reveal:nth-child(8) { transition-delay: 0.75s; }
.reveal-group .reveal:nth-child(9) { transition-delay: 0.85s; }

/* Once revealed, clear the delay so hover interactions are always instant */
.reveal-group .reveal.is-visible { transition-delay: 0s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-eyebrow,
    .hero h1,
    .hero p,
    .hero-actions { animation: none; }

    .reveal,
    .reveal.from-up,
    .reveal.from-left,
    .reveal.from-right,
    .reveal.from-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── HERO ──────────────────────────────────────────── */
.hero {
    position: relative;
    height: var(--hero-height);
    background-image: url("Pictures/HomePage/texting-hero.jpg");
    background-size: cover;
    background-position: center 20%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-hero-overlay);
    pointer-events: none;
}

.hero-content {
    position: relative;
    width: 100%;
    max-width: var(--content-max-w);
    margin: 0 auto;
    padding: 0 var(--page-pad-h);
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-pink);
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero h1 {
    font-family: var(--font-serif);
    color: var(--text-on-dark);
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 20px rgba(15, 5, 30, 0.5);
    max-width: 620px;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.88);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── ONLINE SUPPORT ────────────────────────────────── */
.online-support {
    background: var(--bg-white);
    padding: var(--section-v) 0;
}

.online-support .wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.support-text .section-sub {
    margin-bottom: 2rem;
}

.support-pills {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.support-pill {
    background: var(--brand-pink-light);
    color: var(--brand-purple);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    padding: 5px 16px;
    border-radius: 999px;
    border: 1px solid var(--brand-pink-medium);
}

.support-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8f0;
    border: 1px solid rgba(220, 100, 60, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #8a4a1e;
    margin-top: 1rem;
}

.support-note-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.support-img-wrap {
    position: relative;
}

.support-img-wrap img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    border-radius: var(--img-radius);
    display: block;
}

.support-img-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--brand-purple);
    color: #fff;
    border-radius: 10px;
    padding: 16px 22px;
    box-shadow: 0 8px 28px rgba(81,41,116,0.28);
    text-align: center;
    min-width: 120px;
}

.support-img-badge strong {
    display: block;
    font-size: 1.8rem;
    font-family: var(--font-serif);
    line-height: 1;
    margin-bottom: 2px;
}

.support-img-badge span {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    opacity: 0.85;
    text-transform: uppercase;
}

/* ── OFFERINGS ─────────────────────────────────────── */
.help-offerings {
    background: var(--bg-light-purple);
    padding: var(--section-v) 0;
}

.offerings-head {
    text-align: center;
    margin-bottom: 3rem;
}

.offerings-head .section-sub {
    margin: 0 auto;
}

.offerings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.offering-card {
    background: var(--bg-white);
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--divider);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}

.offering-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(81, 41, 116, 0.13);
    border-color: var(--divider-strong);
}

.offering-card img {
    width: 100%;
    height: var(--card-img-h);
    object-fit: cover;
    display: block;
}

.offering-card-body {
    padding: 0.85rem 1.1rem;
}

.offering-card h3 {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--brand-purple);
    font-weight: 700;
    margin: 0;
}

.offering-card-tag {
    display: none;
}

.offerings-cta {
    text-align: center;
}

/* ── MISSION / VISION ──────────────────────────────── */
.mv-section {
    padding: var(--section-v) 0;
}

.mv-section:nth-child(odd) {
    background: var(--bg-white);
}

.mv-section:nth-child(even) {
    background: var(--bg-subtle);
}

.mv-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.mv-inner.reverse {
    direction: rtl;
}

.mv-inner.reverse > * {
    direction: ltr;
}

/* No accent circles — .mv-img-accent removed entirely */
.mv-img-wrap {
    position: relative;
}

.mv-img-wrap img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--img-radius);
    display: block;
}

.mv-text .section-title {
    margin-bottom: 1rem;
}

.mv-text .section-sub {
    margin-bottom: 0;
}

.mv-rule {
    width: 40px;
    height: 3px;
    background: var(--brand-pink);
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

/* ── DONATE ────────────────────────────────────────── */
.donate-section {
    background: var(--brand-purple);
    padding: var(--section-v) 0;
    position: relative;
    overflow: hidden;
}

.donate-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.donate-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.donate-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}

.donate-text .section-label {
    color: rgba(221, 137, 175, 0.9);
}

.donate-text .section-title {
    color: #fff;
    margin-bottom: 0.75rem;
}

.donate-text p {
    color: rgba(255,255,255,0.78);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 480px;
}

.donate-actions {
    display: flex;
    flex-direction: column;
    align-items: center;       /* horizontally center both items */
    justify-content: center;   /* vertically center in the cell */
    gap: 1.5rem;
    flex-shrink: 0;
    text-align: center;
}

.donate-actions p {
    max-width: 220px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.65;
}

/* ── CONNECT ───────────────────────────────────────── */
.connect-section {
    background: var(--bg-light-purple);
    padding: var(--section-v) 0;
}

.connect-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.connect-text .section-sub {
    margin-bottom: 2rem;
}

.connect-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.fb-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1.5px solid var(--divider-strong);
    border-radius: var(--btn-radius);
    padding: 10px 18px;
    transition: background 0.18s, border-color 0.18s;
}

.fb-link:hover {
    background: var(--brand-pink-light);
    border-color: var(--brand-pink-medium);
}

.fb-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.connect-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.connect-stat {
    background: var(--bg-white);
    border: 1px solid var(--divider);
    border-radius: var(--card-radius);
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: box-shadow 0.2s;
}

.connect-stat:hover {
    box-shadow: 0 6px 24px rgba(81,41,116,0.09);
}

.connect-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--brand-pink-light);
    border: 1px solid var(--brand-pink-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.connect-stat-text strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 3px;
}

.connect-stat-text span {
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ── PARTNERS / CAROUSEL ───────────────────────────── */
.partners-section {
    background: var(--bg-white);
    padding: var(--section-v) 0;
    border-top: 1px solid var(--divider);
}

.partners-head {
    text-align: center;
    margin-bottom: 3rem;
}

/*
 * Carousel is now inside .wrap so it matches page width.
 * Smooth CSS animation replaces the JS rAF loop.
 */
.carousel-outer {
    position: relative;
    overflow: hidden;
    border-radius: 8px; /* soft edges since it's inset */
}

/* Fade edges */
.carousel-outer::before,
.carousel-outer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.carousel-outer::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-white) 10%, transparent);
}

.carousel-outer::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-white) 10%, transparent);
}

/*
 * The track holds two identical copies of the logos.
 * --one-set-w is set by JS once images are measured.
 * CSS animation scrolls exactly one set then loops seamlessly.
 */
@keyframes carousel-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-1 * var(--one-set-w, 50%))); }
}

.carousel-track {
    display: flex;
    align-items: center;
    width: max-content;
    /* Smooth, linear, infinite — no JS timers involved */
    animation: carousel-scroll 18s linear infinite;
}

/* Pause on hover (set by JS too, but CSS handles it cleanly) */
.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.carousel-item img {
    height: 64px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: 0.78;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    display: block;
}

.carousel-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}

/* Footer styles live in global.css */

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 960px) {
    .online-support .wrap,
    .mv-inner,
    .donate-inner,
    .connect-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .mv-inner.reverse { direction: ltr; }

    .support-img-wrap img { height: 300px; }
    .support-img-badge { bottom: 12px; left: 12px; }

    .offerings-grid { grid-template-columns: repeat(2, 1fr); }

    .donate-actions { flex-direction: row; justify-content: center; align-items: center; }
}

@media (max-width: 560px) {
    .offerings-grid { grid-template-columns: 1fr 1fr; }
    .hero-actions { flex-direction: column; }
    .connect-actions { flex-direction: column; }
    .donate-actions { flex-direction: column; }
}

@media (max-width: 380px) {
    .offerings-grid { grid-template-columns: 1fr; }
}