/* ==========================================================================
   HopeFund — theme styles
   Tokens first, then base, layout, components, blocks, utilities.
   ========================================================================== */

:root {
  --hf-ink: #16232b;
  --hf-ink-soft: #4d5f68;
  --hf-line: #dfe7e3;
  --hf-paper: #ffffff;
  --hf-mist: #f1f5f2;
  --hf-grove: #1f6f5c;
  --hf-grove-deep: #12463a;
  --hf-grove-tint: #e4f0ea;
  --hf-amber: #f2b544;
  --hf-amber-deep: #c98b1c;
  --hf-clay: #e0614c;

  --hf-display: "Fraunces", Georgia, "Times New Roman", serif;
  --hf-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --hf-shell: 1200px;
  --hf-gutter: 24px;
  --hf-radius: 14px;
  --hf-radius-lg: 26px;

  --hf-shadow: 0 18px 40px -28px rgba(18, 70, 58, .55);
  --hf-shadow-lift: 0 26px 60px -30px rgba(18, 70, 58, .6);
}

/* --------------------------------------------------------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--hf-paper);
  color: var(--hf-ink);
  font-family: var(--hf-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hf-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--hf-ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.85rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.15em; max-width: 72ch; }

a { color: var(--hf-grove); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--hf-grove-deep); }

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--hf-amber);
  outline-offset: 3px;
  border-radius: 4px;
}

blockquote {
  margin: 2rem 0;
  padding: .25rem 0 .25rem 1.5rem;
  border-left: 3px solid var(--hf-amber);
  font-family: var(--hf-display);
  font-size: 1.3rem;
  line-height: 1.45;
}

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
pre { background: var(--hf-mist); padding: 1.25rem; border-radius: var(--hf-radius); overflow: auto; }

table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--hf-line); padding: .65rem .5rem; text-align: left; }

/* ------------------------------------------------------- helpers ---------- */

.hf-shell { width: 100%; max-width: var(--hf-shell); margin-inline: auto; padding-inline: var(--hf-gutter); }
.hf-shell--narrow { max-width: 760px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--hf-ink); color: #fff; padding: .75rem 1.1rem; border-radius: 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

.hf-section { padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }
.hf-section--mist { background: var(--hf-mist); }
.hf-section--grove { background: var(--hf-grove-deep); color: #e8f2ee; }
.hf-section--grove h2,
.hf-section--grove h3 { color: #fff; }

.hf-heading { max-width: 640px; margin-bottom: 2.75rem; }
.hf-heading--center { margin-inline: auto; text-align: center; }
.hf-heading p { color: var(--hf-ink-soft); margin-bottom: 0; }
.hf-section--grove .hf-heading p { color: #b9d2c8; }

.hf-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .95rem; font-weight: 600; color: var(--hf-grove);
  margin-bottom: .6rem;
}
.hf-kicker::before {
  content: ""; width: 26px; height: 2px; background: var(--hf-amber); border-radius: 2px;
}
.hf-section--grove .hf-kicker { color: var(--hf-amber); }
.hf-heading--center .hf-kicker::before { display: none; }

/* -------------------------------------------------------- buttons --------- */

.hf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--hf-body); font-weight: 700; font-size: 1rem; line-height: 1;
  padding: 1rem 1.6rem; border: 2px solid transparent; border-radius: 999px;
  background: var(--hf-grove); color: #fff; cursor: pointer;
  text-decoration: none; transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.hf-btn:hover { background: var(--hf-grove-deep); color: #fff; }
.hf-btn--amber { background: var(--hf-amber); color: var(--hf-ink); }
.hf-btn--amber:hover { background: var(--hf-amber-deep); color: var(--hf-ink); }
.hf-btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.hf-btn--ghost:hover { background: var(--hf-ink); border-color: var(--hf-ink); color: #fff; }
.hf-btn--sm { padding: .7rem 1.15rem; font-size: .92rem; }
.hf-btn--block { width: 100%; }

/* --------------------------------------------------------- header --------- */

.hf-topbar {
  background: var(--hf-grove-deep); color: #cfe2da; font-size: .9rem;
}
.hf-topbar .hf-shell { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; padding-block: .65rem; }
.hf-topbar a { color: #cfe2da; text-decoration: none; }
.hf-topbar a:hover { color: #fff; }
.hf-topbar__meta { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.hf-topbar__social { margin-left: auto; display: flex; gap: .9rem; }

.hf-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hf-line);
}
.hf-header__inner { display: flex; align-items: center; gap: 1.5rem; padding-block: .9rem; }

.hf-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.hf-brand__mark { flex: none; }
.hf-brand__name { font-family: var(--hf-display); font-size: 1.45rem; font-weight: 600; color: var(--hf-ink); letter-spacing: -.02em; }
.hf-brand__tagline { display: block; font-family: var(--hf-body); font-size: .8rem; font-weight: 500; color: var(--hf-ink-soft); letter-spacing: 0; }
.hf-brand img { max-height: 54px; width: auto; }

.hf-nav { margin-left: auto; }
.hf-nav ul { list-style: none; display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0; }
.hf-nav li { position: relative; }
.hf-nav a {
  display: block; padding: .6rem .85rem; border-radius: 10px;
  font-weight: 600; font-size: 1rem; color: var(--hf-ink); text-decoration: none;
}
.hf-nav a:hover,
.hf-nav .current-menu-item > a,
.hf-nav .current-menu-ancestor > a { background: var(--hf-grove-tint); color: var(--hf-grove-deep); }

.hf-nav .sub-menu {
  position: absolute; left: 0; top: calc(100% + .35rem); min-width: 220px;
  flex-direction: column; align-items: stretch; gap: 0;
  background: #fff; border: 1px solid var(--hf-line); border-radius: var(--hf-radius);
  box-shadow: var(--hf-shadow); padding: .4rem; display: none;
}
.hf-nav li:hover > .sub-menu,
.hf-nav li:focus-within > .sub-menu { display: flex; }
.hf-nav .sub-menu .sub-menu { left: 100%; top: -.4rem; }

.hf-header__actions { display: flex; align-items: center; gap: .6rem; }

.hf-burger {
  display: none; width: 46px; height: 46px; border: 1px solid var(--hf-line);
  border-radius: 12px; background: #fff; cursor: pointer; padding: 0;
}
.hf-burger span, .hf-burger span::before, .hf-burger span::after {
  display: block; width: 20px; height: 2px; background: var(--hf-ink); border-radius: 2px;
  margin-inline: auto; position: relative; content: "";
}
.hf-burger span::before { position: absolute; top: -6px; }
.hf-burger span::after { position: absolute; top: 6px; }

@media (max-width: 991px) {
  .hf-burger { display: block; }
  .hf-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--hf-line);
    padding: 1rem var(--hf-gutter) 1.5rem; display: none;
  }
  .hf-nav.is-open { display: block; }
  .hf-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .hf-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 1rem; }
  .hf-header__actions .hf-btn { display: none; }
}

/* ----------------------------------------------------------- hero --------- */

.hf-hero {
  position: relative;
  background: var(--hf-grove-deep);
  color: #e8f2ee;
  overflow: hidden;
}
.hf-hero__media { position: absolute; inset: 0; }
.hf-hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hf-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(18,70,58,.94) 12%, rgba(18,70,58,.6) 62%, rgba(18,70,58,.3) 100%);
}
.hf-hero .hf-shell { position: relative; z-index: 2; padding-block: clamp(4rem, 2rem + 9vw, 8.5rem); }
.hf-hero__inner { max-width: 660px; }
.hf-hero h1 { color: #fff; margin-bottom: .6rem; }
.hf-hero__lead { font-size: 1.2rem; color: #c6ddd4; max-width: 52ch; }
.hf-hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }
.hf-hero .hf-kicker { color: var(--hf-amber); }

.hf-hero__stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: rgba(255,255,255,.14);
  border-top: 1px solid rgba(255,255,255,.14);
}
.hf-hero__stat { background: var(--hf-grove-deep); padding: 1.6rem var(--hf-gutter); }
.hf-hero__stat b {
  display: block; font-family: var(--hf-display); font-size: 2.4rem; font-weight: 600;
  line-height: 1; color: var(--hf-amber);
}
.hf-hero__stat span { font-size: .95rem; color: #b9d2c8; }

/* ---------------------------------------------------------- cards --------- */

.hf-grid { display: grid; gap: 1.75rem; }
.hf-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.hf-grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.hf-grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.hf-card {
  background: #fff; border: 1px solid var(--hf-line); border-radius: var(--hf-radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.hf-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--hf-mist); }
.hf-card__media img { width: 100%; height: 100%; object-fit: cover; }
.hf-card__body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.hf-card__title { font-size: 1.35rem; margin-bottom: .5rem; }
.hf-card__title a { color: inherit; text-decoration: none; }
.hf-card__title a:hover { color: var(--hf-grove); }
.hf-card__excerpt { color: var(--hf-ink-soft); font-size: 1rem; }
.hf-card__foot { margin-top: auto; padding-top: 1.15rem; }

.hf-tag {
  position: absolute; left: 1rem; top: 1rem;
  background: var(--hf-amber); color: var(--hf-ink);
  font-size: .82rem; font-weight: 700; padding: .35rem .8rem; border-radius: 999px;
}
.hf-tag--urgent { background: var(--hf-clay); color: #fff; }

/* ------------------------------------------------- donation progress ------ */

.hf-progress { margin-block: 1.1rem; }
.hf-progress__bar {
  height: 10px; background: var(--hf-grove-tint); border-radius: 999px; overflow: hidden;
}
.hf-progress__fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--hf-grove), var(--hf-amber));
}
.hf-progress__meta {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .95rem; margin-top: .6rem;
}
.hf-progress__meta b { font-family: var(--hf-display); font-size: 1.1rem; }
.hf-progress__meta span { color: var(--hf-ink-soft); display: block; font-size: .82rem; }

/* --------------------------------------------------------- events --------- */

.hf-event {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 1.5rem; align-items: center;
  padding: 1.35rem 1.5rem; background: #fff;
  border: 1px solid var(--hf-line); border-radius: var(--hf-radius);
}
.hf-event + .hf-event { margin-top: 1rem; }
.hf-event__date {
  text-align: center; background: var(--hf-grove-tint); border-radius: var(--hf-radius);
  padding: .8rem .4rem; color: var(--hf-grove-deep);
}
.hf-event__date b { display: block; font-family: var(--hf-display); font-size: 1.8rem; line-height: 1; }
.hf-event__date span { font-size: .85rem; font-weight: 600; }
.hf-event h3 { font-size: 1.25rem; margin-bottom: .25rem; }
.hf-event h3 a { color: inherit; text-decoration: none; }
.hf-event__meta { color: var(--hf-ink-soft); font-size: .95rem; }
@media (max-width: 640px) {
  .hf-event { grid-template-columns: 76px 1fr; }
  .hf-event .hf-btn { grid-column: 1 / -1; }
}

/* ------------------------------------------------- team / volunteers ------ */

.hf-person { text-align: center; }
.hf-person__photo {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin: 0 auto 1.1rem;
  max-width: 200px; background: var(--hf-mist);
}
.hf-person__photo img { width: 100%; height: 100%; object-fit: cover; }
.hf-person h3 { font-size: 1.2rem; margin-bottom: .15rem; }
.hf-person__role { color: var(--hf-grove); font-weight: 600; font-size: .95rem; }
.hf-person__social { display: flex; justify-content: center; gap: .8rem; margin-top: .7rem; }

/* ---------------------------------------------------- testimonials -------- */

.hf-quote {
  background: #fff; border: 1px solid var(--hf-line); border-radius: var(--hf-radius-lg);
  padding: 2rem 1.9rem;
}
.hf-quote__text { font-family: var(--hf-display); font-size: 1.2rem; line-height: 1.5; }
.hf-quote__person { display: flex; align-items: center; gap: .9rem; margin-top: 1.4rem; }
.hf-quote__person img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.hf-quote__person b { display: block; }
.hf-quote__person span { color: var(--hf-ink-soft); font-size: .92rem; }

/* ------------------------------------------------------ donate form ------- */

.hf-donate {
  background: #fff; border-radius: var(--hf-radius-lg); padding: 2rem;
  box-shadow: var(--hf-shadow-lift); color: var(--hf-ink);
}
.hf-donate h3 { margin-bottom: 1.2rem; }
.hf-donate__amounts { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.hf-donate__amount {
  flex: 1 1 88px; padding: .85rem .5rem; border: 2px solid var(--hf-line); background: #fff;
  border-radius: 12px; font-family: var(--hf-body); font-weight: 700; font-size: 1.05rem; cursor: pointer;
}
.hf-donate__amount[aria-pressed="true"] { border-color: var(--hf-grove); background: var(--hf-grove-tint); color: var(--hf-grove-deep); }
.hf-donate__freq { display: flex; gap: .5rem; margin-bottom: 1rem; }
.hf-donate__freq button {
  flex: 1; padding: .7rem; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--hf-mist); font-family: var(--hf-body); font-weight: 600;
}
.hf-donate__freq button[aria-pressed="true"] { background: var(--hf-ink); color: #fff; }
.hf-donate__note { font-size: .88rem; color: var(--hf-ink-soft); margin: .9rem 0 0; }

input[type="text"], input[type="email"], input[type="url"], input[type="number"],
input[type="search"], input[type="tel"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: inherit;
  padding: .85rem 1rem; border: 1px solid var(--hf-line); border-radius: 12px;
  background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--hf-grove); outline: none; box-shadow: 0 0 0 3px var(--hf-grove-tint); }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.hf-field { margin-bottom: 1rem; }

/* ------------------------------------------------------- page head -------- */

.hf-pagehead {
  background: var(--hf-grove-deep); color: #e8f2ee;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  position: relative; overflow: hidden;
}
.hf-pagehead h1 { color: #fff; margin-bottom: .35rem; }
.hf-breadcrumb { font-size: .95rem; color: #b9d2c8; }
.hf-breadcrumb a { color: var(--hf-amber); text-decoration: none; }
.hf-breadcrumb span + span::before { content: "/"; margin-inline: .5rem; color: rgba(255,255,255,.35); }

/* ---------------------------------------------------------- posts --------- */

.hf-layout { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); }
.hf-layout--sidebar { grid-template-columns: minmax(0, 1fr) 330px; }
@media (max-width: 991px) { .hf-layout--sidebar { grid-template-columns: minmax(0, 1fr); } }

.hf-entry__meta { color: var(--hf-ink-soft); font-size: .95rem; margin-bottom: 1.5rem; }
.hf-entry__meta a { color: var(--hf-ink-soft); }
.hf-entry__thumb { border-radius: var(--hf-radius-lg); overflow: hidden; margin-bottom: 2rem; }
.hf-entry__content > * { max-width: 100%; }
.hf-entry__content h2, .hf-entry__content h3 { margin-top: 2rem; }

.hf-widget + .hf-widget { margin-top: 2rem; }
.hf-widget__title { font-size: 1.15rem; margin-bottom: .9rem; }
.hf-widget ul { list-style: none; margin: 0; padding: 0; }
.hf-widget li + li { border-top: 1px solid var(--hf-line); }
.hf-widget li a { display: block; padding: .6rem 0; color: var(--hf-ink); text-decoration: none; }
.hf-widget li a:hover { color: var(--hf-grove); }
.hf-sidebar__card {
  background: var(--hf-mist); border-radius: var(--hf-radius-lg); padding: 1.6rem;
}

.hf-pagination { margin-top: 3rem; display: flex; justify-content: center; }
.hf-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding-inline: .6rem; margin: 0 .2rem;
  border: 1px solid var(--hf-line); border-radius: 12px;
  text-decoration: none; color: var(--hf-ink); font-weight: 600;
}
.hf-pagination .page-numbers.current,
.hf-pagination .page-numbers:hover { background: var(--hf-grove); border-color: var(--hf-grove); color: #fff; }

.hf-comments { margin-top: 3.5rem; }
.hf-comments ol { list-style: none; margin: 0; padding: 0; }
.hf-comments .comment-body { padding: 1.4rem 0; border-bottom: 1px solid var(--hf-line); }
.hf-comments .children { padding-left: 1.75rem; }

/* --------------------------------------------------------- footer --------- */

.hf-cta {
  background: var(--hf-amber); color: var(--hf-ink);
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
}
.hf-cta__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; }
.hf-cta h2 { margin-bottom: .25rem; max-width: 22ch; }
.hf-cta p { margin: 0; color: #59481d; }
.hf-cta .hf-btn { margin-left: auto; background: var(--hf-ink); }
.hf-cta .hf-btn:hover { background: #000; }

.hf-footer { background: var(--hf-ink); color: #a9bcc4; padding-top: clamp(3rem, 2rem + 4vw, 5rem); }
.hf-footer h2, .hf-footer h3, .hf-footer .hf-widget__title { color: #fff; font-size: 1.15rem; }
.hf-footer a { color: #a9bcc4; text-decoration: none; }
.hf-footer a:hover { color: var(--hf-amber); }
.hf-footer__cols { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.hf-footer li + li { border-top: 1px solid rgba(255,255,255,.08); }
.hf-footer .hf-widget li a { color: #a9bcc4; }
.hf-footer__bottom {
  margin-top: 3rem; padding-block: 1.4rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .93rem;
}

/* --------------------------------------------------- editor blocks -------- */

.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { max-width: none; }
.alignleft { float: left; margin: .35rem 1.75rem 1.25rem 0; }
.alignright { float: right; margin: .35rem 0 1.25rem 1.75rem; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .9rem; color: var(--hf-ink-soft); text-align: center; margin-top: .6rem; }
.sticky .hf-card { border-color: var(--hf-amber); }

.has-grove-color { color: var(--hf-grove); }
.has-grove-background-color { background-color: var(--hf-grove); }
.has-amber-color { color: var(--hf-amber); }
.has-amber-background-color { background-color: var(--hf-amber); }
.has-ink-color { color: var(--hf-ink); }
.has-ink-background-color { background-color: var(--hf-ink); }
.has-mist-background-color { background-color: var(--hf-mist); }
