/* ===========================================================================
   Danex Charity Foundation — public site styles
   Brand (from the logo): red + black + white, on a warm cream neutral.
   Dependency-free (no build step).
   Note: legacy variable names (--teal, --gold, --blue) are kept as aliases so
   existing markup keeps working; their VALUES now carry the red/black palette.
   =========================================================================== */

:root {
    --red:         #c81e2d;   /* --teal alias below */
    --red-dark:    #9d0f1b;
    --red-soft:    #fdecec;

    --teal:        #c81e2d;   /* primary (red) */
    --teal-dark:   #9d0f1b;
    --teal-soft:   #fdecec;
    --blue:        #1c1c1c;   /* headings / dark surfaces (near-black) */
    --gold:        #c81e2d;   /* donate accent (red) */
    --gold-dark:   #9d0f1b;

    --ink:         #242424;
    --charcoal:    #1c1c1c;
    --muted:       #5f5952;
    --line:        #e8e1d6;
    --bg:          #ffffff;
    --soft:        #faf6f0;   /* warm cream */
    --radius:      14px;
    --shadow:      0 6px 24px rgba(28, 20, 18, 0.08);
    --shadow-lg:   0 18px 48px rgba(28, 20, 18, 0.16);
    --wrap:        1140px;
    --font:        'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; color: var(--charcoal); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--soft { background: var(--soft); }
.section--teal { background: var(--red); color: #ffe9ea; }   /* bold red band */
.section--teal h2, .section--teal h3 { color: #fff; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--red); margin-bottom: .6rem; }

/* Skip link ---------------------------------------------------------------- */
.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons ------------------------------------------------------------------ */
.btn { display: inline-block; font-weight: 600; padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; text-decoration: none; font-size: 1rem; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--donate { background: var(--red); color: #fff; }
.btn--donate:hover { background: var(--red-dark); color: #fff; }
.btn--primary { background: var(--charcoal); color: #fff; }
.btn--primary:hover { background: #000; }
.btn--outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn--outline:hover { background: var(--red); color: #fff; }
.btn--light { background: #fff; color: var(--red); }
.btn--light:hover { background: var(--soft); color: var(--red-dark); }
.btn--ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost-light:hover { background: #fff; color: var(--charcoal); }

/* Header / nav ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__logo { width: 56px; height: 56px; display: block; flex: 0 0 auto; }
.brand__mark { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; position: relative; }
.brand__mark::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-weight: 800; color: var(--charcoal); font-size: 1.05rem; letter-spacing: .01em; }
.brand__sub { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
.nav__links { display: flex; align-items: center; gap: .3rem; margin-left: auto; list-style: none; padding: 0; }
.nav__links a { color: var(--ink); padding: .5rem .7rem; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav__links a:hover { background: var(--red-soft); text-decoration: none; color: var(--red-dark); }
.nav__links a.is-active { color: var(--red-dark); font-weight: 700; }
.nav__cta { margin-left: .4rem; }
.nav__toggle { display: none; margin-left: auto; background: none; border: 0; padding: .4rem; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--charcoal); margin: 5px 0; border-radius: 2px; }

@media (max-width: 900px) {
    .nav__toggle { display: block; }
    .nav__links { position: fixed; inset: 62px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem 20px 1rem; margin: 0; transform: translateY(-140%); transition: transform .25s ease; }
    .nav__links.open { transform: translateY(0); }
    .nav__links a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); }
    .nav__cta { margin: .6rem 0 0; }
}

/* Hero --------------------------------------------------------------------- */
.hero { background: linear-gradient(155deg, #262626 0%, #111 100%); color: #f3efe9; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 340px; height: 340px; background: radial-gradient(circle, rgba(200,30,45,.55), transparent 70%); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; padding: clamp(3rem, 6vw, 5rem) 0; position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; color: #ded9d2; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero__photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; background: rgba(255,255,255,.08); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo--placeholder { display: grid; place-items: center; color: #c9c2b8; text-align: center; padding: 1rem; font-size: .9rem; border: 1px dashed rgba(255,255,255,.35); }
@media (max-width: 820px) { .hero__inner { grid-template-columns: 1fr; } .hero__photo { order: -1; } }

/* Cards / grids ------------------------------------------------------------ */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 { color: var(--charcoal); }
.card__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; margin-bottom: .9rem; font-size: 1.4rem; }
.card p:last-child { margin-bottom: 0; }

.serve-card { text-align: center; }
.serve-card .card__icon { margin: 0 auto .9rem; }

/* CTA band ----------------------------------------------------------------- */
.cta-band { background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 55ch; margin: 0 auto 1.4rem; color: #ffe1e3; }

/* Children gallery --------------------------------------------------------- */
.child-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 820px) { .child-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .child-grid { grid-template-columns: 1fr; } }
.child { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.child__photo { aspect-ratio: 1/1; background: var(--red-soft); overflow: hidden; }
.child__photo img { width: 100%; height: 100%; object-fit: cover; }
.child__body { padding: 1rem 1.2rem 1.3rem; }
.child__name { font-weight: 700; color: var(--charcoal); font-size: 1.1rem; margin-bottom: .2rem; }
.child__meta { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .6rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--red); color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.empty-note { background: var(--soft); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }

/* Content blocks ----------------------------------------------------------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.value-card { background: #fff; border-left: 4px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.2rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.value-card h3 { margin-bottom: .3rem; }

.note { background: var(--red-soft); border-radius: var(--radius); padding: 1.2rem 1.5rem; color: var(--red-dark); font-size: .98rem; }

/* Forms -------------------------------------------------------------------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--charcoal); }
.field input, .field textarea { width: 100%; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: #fffdfb; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }
.field textarea { min-height: 130px; resize: vertical; }
.form__error { color: #b3261e; font-size: .85rem; margin-top: .3rem; }
.alert { padding: 1rem 1.2rem; border-radius: 10px; margin-bottom: 1.4rem; }
.alert--success { background: #e6f5ec; color: #1b5e33; border: 1px solid #b7e0c4; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: .7rem; margin-bottom: 1rem; }
.contact-list strong { color: var(--charcoal); }

/* Page header -------------------------------------------------------------- */
.page-head { background: linear-gradient(155deg, #262626 0%, #111 100%); color: #f3efe9; padding: clamp(2.4rem, 5vw, 3.6rem) 0; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(200,30,45,.5), transparent 70%); }
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { color: #fff; margin-bottom: .4rem; }
.page-head p { color: #ded9d2; max-width: 60ch; margin: 0; }

/* Footer ------------------------------------------------------------------- */
.site-footer { background: var(--charcoal); color: #c9c2b8; padding: 3rem 0 1.5rem; margin-top: 0; }
.site-footer a { color: #e6ded3; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: #a59d92; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.footer-note { font-size: .85rem; color: #a59d92; }

/* Blog post body (rich text) ---------------------------------------------- */
.post-body { color: var(--ink); font-size: 1.06rem; line-height: 1.8; }
.post-body h2 { margin: 2rem 0 .6rem; }
.post-body h3 { margin: 1.6rem 0 .5rem; }
.post-body p { margin: 0 0 1.1rem; }
.post-body ul, .post-body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: .4rem; }
.post-body a { color: var(--red); text-decoration: underline; }
.post-body img { border-radius: var(--radius); margin: 1.2rem 0; box-shadow: var(--shadow); }
.post-body blockquote { margin: 1.4rem 0; padding: .6rem 1.2rem; border-left: 4px solid var(--red); background: var(--red-soft); border-radius: 0 var(--radius) var(--radius) 0; color: var(--red-dark); }
.post-body hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
