/*
Theme Name: HACN
Theme URI: https://hac-network.org
Author: Help Africans Charity Network
Description: Block theme for Help Africans Charity Network, built from the 2026 Claude Design overhaul: navy header and footer, an orange "sun" accent for giving and progress, exercise-book corner cuts on photos, and pages for causes, media, our work, contact and donating. Works with the HACN Giving plugin.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hacn
*/

:root { --hacn-band: #10228c; --hacn-band-deep: var(--wp--preset--color--navy-deep); }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) :focus-visible { outline: 3px solid var(--wp--preset--color--sky); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
mark.has-inline-color { background-color: transparent; }
p { text-wrap: pretty; }
[id] { scroll-margin-top: 88px; }

/* ---------- header ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.hacn-header { background: var(--hacn-band); color: #fff; padding-top: 12px; padding-bottom: 12px; }
.hacn-header .wp-block-site-logo img { border-radius: 50%; background: #fff; padding: 2px; }
.hacn-header .wp-block-site-title, .hacn-header .wp-block-site-tagline { margin: 0; }
.hacn-header .wp-block-navigation a { color: #fff; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.hacn-header .wp-block-navigation a:hover,
.hacn-header .wp-block-navigation .current-menu-item > a,
.hacn-header .wp-block-navigation [aria-current="page"] { border-bottom-color: var(--wp--preset--color--sun); color: #fff; }
.hacn-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--hacn-band); color: #fff; padding: 24px; }
.hacn-header .wp-block-navigation__responsive-container.is-menu-open a { font-size: 20px; }
.hacn-header .wp-block-navigation__responsive-container-open,
.hacn-header .wp-block-navigation__responsive-container-close { color: #fff; }
.hacn-header .wp-block-navigation__responsive-container-open { border: 1px solid #3b4fb5; border-radius: 6px; padding: 9px; }
.hacn-header :focus-visible { outline-color: #fff; }

/* ---------- buttons ---------- */
.wp-block-button .wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
.wp-block-button.is-style-donate .wp-block-button__link { background: var(--wp--preset--color--sun); color: #0e1838; }
.wp-block-button.is-style-donate .wp-block-button__link:hover { background: #ff7d45; color: #0e1838; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--navy); border: 1.5px solid var(--wp--preset--color--navy); padding-top: 0; padding-bottom: 0; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--tint); color: var(--wp--preset--color--navy); }
.hacn-header .wp-block-button .wp-block-button__link { min-height: 44px; font-size: 16px; padding-left: 20px; padding-right: 20px; }
.hacn-monthly .wp-block-button.is-style-donate .wp-block-button__link:focus-visible,
.hacn-header .wp-block-button .wp-block-button__link:focus-visible { outline-color: #fff; }

/* ---------- labels ---------- */
.is-style-label, .is-style-label-quiet, .is-style-label-live { font-family: var(--wp--preset--font-family--money); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1; color: var(--wp--preset--color--live-ink); }
.is-style-label-quiet { color: var(--wp--preset--color--muted); }
.is-style-label-live { display: inline-flex; align-items: center; gap: 8px; }
.is-style-label-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--sun); animation: hacn-pulse 1.8s ease-out infinite; }
@keyframes hacn-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 43, .6); } 70% { box-shadow: 0 0 0 9px rgba(255, 106, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 106, 43, 0); } }
.hacn-lede { font-size: var(--wp--preset--font-size--lead); line-height: 1.5; color: var(--wp--preset--color--body); max-width: 46ch; }
.hacn-intro { color: #3b4766; max-width: 52ch; }

/* ---------- sections ---------- */
.hacn-band { padding-top: var(--wp--preset--spacing--90); padding-bottom: var(--wp--preset--spacing--90); }
.hacn-band--tight-top { padding-top: 0; }
.hacn-band--white { background: var(--wp--preset--color--card); border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }
.hacn-sechead { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; }
.hacn-pagehead { padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(24px, 3vw, 40px); }
.hacn-pagehead h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1; }

/* ---------- hero ---------- */
.hacn-hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 96px); padding-bottom: var(--wp--preset--spacing--90); }
.hacn-hero h1 { font-size: var(--wp--preset--font-size--display); }
.hacn-hero-art { position: relative; min-width: 0; padding-bottom: 8px; }
.hacn-hero-art::before { content: ""; position: absolute; left: -30%; right: -30%; top: 50%; height: 10px; background: var(--wp--preset--color--sun); transform: rotate(-11deg); z-index: 0; }
.hacn-hero-figure { position: relative; z-index: 1; }
.hacn-hero-figure .wp-block-hacn-latest-gift { position: absolute; left: clamp(8px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px); margin: 0; z-index: 2; }
.hacn-figcap { margin-top: 12px; font-family: var(--wp--preset--font-family--money); font-size: 13px; line-height: 1.5; color: var(--wp--preset--color--muted); position: relative; z-index: 1; }

/* exercise-book corner cuts on photos */
.wp-block-image.is-style-cut-br, .wp-block-post-featured-image.is-style-cut-br { position: relative; }
.wp-block-image.is-style-cut-br { margin: 0; }
.wp-block-image.is-style-cut-br img, .wp-block-post-featured-image.is-style-cut-br img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; clip-path: polygon(0 0, 100% 0, 100% 88%, 90% 100%, 0 100%); display: block; }
.wp-block-image.is-style-cut-br::after, .wp-block-post-featured-image.is-style-cut-br::after { content: ""; position: absolute; top: 0; left: 0; width: 22%; aspect-ratio: 1; background: var(--hacn-band); clip-path: polygon(0 0, 100% 0, 0 100%); pointer-events: none; }
.wp-block-post-featured-image.is-style-cut-br img { aspect-ratio: 3 / 2; }
.wp-block-image.is-style-cut-tr { margin: 0; }
.wp-block-image.is-style-cut-tr img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; clip-path: polygon(0 0, 92% 0, 100% 12%, 100% 100%, 0 100%); display: block; }

/* ---------- trust strip ---------- */
.hacn-trust { background: var(--wp--preset--color--tint); padding-top: 20px; padding-bottom: 20px; }
.hacn-trust__list { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px 32px; font-size: 15px; font-weight: 600; color: var(--wp--preset--color--navy); }
.hacn-trust__list li { display: flex; align-items: center; gap: 10px; margin: 0; }
.hacn-trust__list li::before { content: ""; flex: none; width: 8px; height: 8px; background: currentColor; transform: rotate(45deg); }

/* ---------- how it works ---------- */
.hacn-steps { gap: 16px 32px; }
.hacn-step { border-top: 2px solid var(--wp--preset--color--navy); padding-top: 18px; }
.hacn-step > * { margin-block: 0; }
.hacn-step > * + * { margin-top: 10px; }
.hacn-step__n { font-family: var(--wp--preset--font-family--money); font-size: 14px; font-weight: 600; color: var(--wp--preset--color--live-ink); }
.hacn-step h3 { font-size: 22px; line-height: 1.15; }
.hacn-step p:not(.hacn-step__n) { color: #3b4766; }

/* ---------- cards ---------- */
.wp-block-group.is-style-card { background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 18px 20px; }
.wp-block-group.is-style-card > * { margin-block: 0; }
.wp-block-group.is-style-card > * + * { margin-top: 6px; }
.wp-block-group.is-style-card h3 { font-size: 20px; }
.wp-block-group.is-style-card p { font-size: 15px; color: #3b4766; }
.wp-block-group.is-style-card p:last-child a { font-weight: 700; }

/* ---------- monthly band ---------- */
.hacn-monthly { position: relative; overflow: hidden; isolation: isolate; background: var(--hacn-band); color: #fff; border-radius: 10px; padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 64px); }
.hacn-monthly::before { content: ""; position: absolute; z-index: -1; top: 0; left: 0; width: 180px; height: 180px; background: var(--hacn-band-deep); clip-path: polygon(0 0, 100% 0, 0 100%); }
.hacn-monthly::after { content: ""; position: absolute; z-index: -1; bottom: 0; right: 0; width: 240px; height: 240px; background: var(--wp--preset--color--sun); clip-path: polygon(100% 76%, 100% 82%, 82% 100%, 76% 100%); }
.hacn-monthly h2 { color: #fff; }
.hacn-monthly p { color: #dfe5ff; font-size: 18px; }

/* ---------- cause page ---------- */
.hacn-crumb { margin: 0; font-family: var(--wp--preset--font-family--money); font-size: 13px; color: var(--wp--preset--color--muted); }
.hacn-crumb a { color: var(--wp--preset--color--muted); }
.single-hacn_cause h1.wp-block-post-title { font-size: clamp(40px, 5.4vw, 72px); line-height: 1; }
.single-hacn_cause .wp-block-post-excerpt__excerpt { font-size: clamp(18px, 1.6vw, 21px); color: var(--wp--preset--color--body); max-width: 40ch; margin: 0; }
.hacn-story p { font-size: 18px; line-height: 1.6; color: var(--wp--preset--color--body); }
.hacn-tag { display: inline-block; border: 1px dashed #9aa6c4; border-radius: 4px; padding: 1px 7px; font-family: var(--wp--preset--font-family--money); font-size: 12px; color: var(--wp--preset--color--muted); }

/* ---------- posts ---------- */
.wp-block-post-template .wp-block-post-featured-image img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; }
.wp-block-post-template .wp-block-post-title a { text-decoration: none; color: inherit; }
.wp-block-post-template .wp-block-post-title a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.hacn-footer { position: relative; overflow: hidden; background: var(--hacn-band); color: #fff; padding-top: clamp(48px, 6vw, 80px); padding-bottom: 32px; }
.hacn-footer::before { content: ""; position: absolute; top: 0; right: 0; width: 260px; height: 260px; background: var(--hacn-band-deep); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.hacn-footer::after { content: ""; position: absolute; top: 0; right: 0; width: 320px; height: 320px; background: var(--wp--preset--color--sky); clip-path: polygon(78% 0, 84% 0, 100% 16%, 100% 22%); }
.hacn-footer > * { position: relative; z-index: 1; }
.hacn-footer a { color: #fff; }
.hacn-footer a:hover { color: var(--wp--preset--color--on-navy-muted); }
.hacn-footer p { margin: 0; line-height: 1.6; }
.hacn-flabel { font-family: var(--wp--preset--font-family--money); font-size: 12px; letter-spacing: .1em; color: var(--wp--preset--color--on-navy-muted); text-transform: uppercase; }
.hacn-fname { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 20px; line-height: 1.1; }
.hacn-ftag { font-family: var(--wp--preset--font-family--heading); font-size: 18px; line-height: 1.3; color: var(--wp--preset--color--on-navy-muted); max-width: 22ch; }
.hacn-fbase { border-top: 1px solid #2a3ca3; padding-top: 20px; font-size: 14px; color: var(--wp--preset--color--on-navy-muted); }
.hacn-fbase p { line-height: 1.5; }
.hacn-footer .wp-block-site-logo img { border-radius: 50%; background: #fff; padding: 3px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
