/* ============================================================================
   The Hope Journey — site layout (header, nav, hero, footer, sections)
   ========================================================================== */

/* ---- Header / masthead --------------------------------------------------- */
.masthead { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border-subtle); }
/* Frosted effect only on desktop — on mobile it would create a containing block
   that breaks the position:fixed nav drawer. */
@media (min-width: 1057px) {
  .masthead { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.masthead__bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: var(--sp-04); text-decoration: none; color: var(--text-primary); }
.brand:hover { text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand__name { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; line-height: 1; letter-spacing: -0.01em; }
.brand__name span { color: var(--hj-gold); }
.brand__tag { font-size: .6875rem; color: var(--text-helper); letter-spacing: .04em; text-transform: uppercase; margin-top: 3px; }

/* primary nav */
.nav { display: flex; align-items: center; gap: var(--sp-02); }
.nav > ul { display: flex; align-items: center; }
.nav li { position: relative; }
.nav a.nav__link { display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--sp-05); height: 72px; font-size: .9375rem; font-weight: 500; color: var(--text-primary); border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a.nav__link:hover { color: var(--hj-green); text-decoration: none; }
.nav li.is-active > a.nav__link { border-bottom-color: var(--hj-green); color: var(--hj-green); }
.nav__link svg { width: 14px; height: 14px; opacity: .6; transition: transform var(--transition); }
.nav li:hover .nav__link svg { transform: rotate(180deg); }

/* dropdown */
.nav .submenu {
  position: absolute; top: 100%; left: 0; min-width: 248px; background: #fff;
  border: 1px solid var(--border-subtle); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all var(--transition); padding: var(--sp-03) 0; z-index: 50;
}
.nav li:hover > .submenu, .nav li:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: var(--sp-04) var(--sp-06); font-size: .9rem; color: var(--text-primary); border-left: 3px solid transparent; }
.submenu a:hover { background: var(--cds-gray-10); border-left-color: var(--hj-green); color: var(--hj-green); text-decoration: none; }
.submenu a small { display: block; color: var(--text-helper); font-size: .75rem; font-weight: 400; margin-top: 2px; }

.masthead__cta { display: flex; align-items: center; gap: var(--sp-04); }

/* Tighten the (now 8-item) nav on smaller desktops so it never wraps */
@media (min-width: 1057px) and (max-width: 1240px) {
  .nav a.nav__link { padding: 0 var(--sp-04); font-size: .9rem; }
  .brand__tag { display: none; }
}

/* mobile nav toggle + drawer */
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--text-primary); border: 1px solid var(--border-subtle); background: #fff; }
.nav-toggle:hover { background: var(--cds-gray-10); border-color: var(--hj-green); color: var(--hj-green); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav__drawer-head { display: none; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(18,18,18,.5); z-index: 95; opacity: 0; visibility: hidden; transition: opacity 220ms ease; }
.nav-backdrop.is-open { opacity: 1; visibility: visible; }

@media (max-width: 1056px) {
  .brand__tag { display: none; }
  .brand img { width: 36px; height: 36px; }
  .brand__name { font-size: 1.02rem; }
  .masthead__bar { height: 60px; }

  .nav-toggle { display: inline-flex; }
  .masthead__cta .btn { display: none; }

  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(102%); transition: transform 260ms cubic-bezier(.2,0,.38,.9);
    z-index: 100; box-shadow: -14px 0 44px rgba(0,0,0,.18);
  }
  .nav.is-open { transform: translateX(0); }

  .nav__drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--sp-05) var(--sp-04) var(--sp-05) var(--sp-06);
    border-bottom: 1px solid var(--border-subtle); position: sticky; top: 0; background: #fff; z-index: 2;
  }
  .nav__drawer-head .brand__name { font-size: .95rem; }
  .nav__drawer-close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
  .nav__drawer-close:hover { color: var(--hj-red); }
  .nav__drawer-close svg { width: 22px; height: 22px; }

  .nav > ul { flex-direction: column; align-items: stretch; padding: var(--sp-03) 0; }
  .nav li { border: none; }
  .nav a.nav__link {
    height: auto; min-height: 54px; padding: var(--sp-05) var(--sp-06);
    border-bottom: 1px solid var(--cds-gray-10); justify-content: space-between;
    font-size: 1.02rem; border-left: 3px solid transparent;
  }
  .nav a.nav__link:hover { background: var(--cds-gray-10); }
  .nav li.is-active > a.nav__link { color: var(--hj-green); border-left-color: var(--hj-green); }
  .nav li.has-sub > a.nav__link svg { width: 18px; height: 18px; opacity: .85; transition: transform 220ms ease; }
  .nav li.has-sub.open > a.nav__link svg { transform: rotate(180deg); }

  .nav .submenu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none;
    padding: 0; background: var(--cds-gray-10); max-height: 0; overflow: hidden; transition: max-height 280ms ease;
  }
  .nav li.has-sub.open > .submenu { max-height: 640px; }
  .nav .submenu a {
    padding: var(--sp-04) var(--sp-06) var(--sp-04) var(--sp-08); min-height: 46px;
    display: flex; flex-direction: column; justify-content: center; border-left: 3px solid transparent;
  }
  .nav .submenu a:hover { border-left-color: var(--hj-green); }
  .nav__mobile-cta { display: flex; margin: var(--sp-06); }
}
@media (min-width: 1057px) { .nav__mobile-cta, .nav-backdrop { display: none; } }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; background: var(--cds-gray-100); color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.hero__bg::after { content:""; position:absolute; inset:0; background: linear-gradient(120deg, rgba(15,15,15,.92) 0%, rgba(27,107,53,.72) 55%, rgba(26,79,156,.55) 100%); }
.hero__inner { position: relative; z-index: 1; padding-block: clamp(var(--sp-10), 11vw, var(--sp-13)); max-width: 880px; }
.hero .eyebrow { color: var(--hj-gold); }
.hero h1 { color: #fff; margin-top: var(--sp-05); }
.hero p { color: rgba(255,255,255,.86); font-size: 1.2rem; margin-top: var(--sp-05); max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-05); margin-top: var(--sp-08); }
.hero__verse { margin-top: var(--sp-09); padding-top: var(--sp-06); border-top: 1px solid rgba(255,255,255,.2); font-family: var(--font-serif); font-style: italic; color: rgba(255,255,255,.82); max-width: 560px; }
.hero__verse cite { display: block; margin-top: var(--sp-03); font-style: normal; font-family: var(--font-sans); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--hj-gold); }
@media (max-width: 560px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { max-width: none; width: 100%; }
}

/* ---- Page header (interior pages) ---------------------------------------- */
.page-hero { background: var(--background-alt); border-bottom: 1px solid var(--border-subtle); }
.page-hero__inner { padding-block: var(--sp-09) var(--sp-08); }
.page-hero .eyebrow { display:block; margin-bottom: var(--sp-04); }
.page-hero h1 { max-width: 18ch; }
.page-hero p { color: var(--text-secondary); font-size: 1.15rem; margin-top: var(--sp-05); max-width: 60ch; }
.page-hero--image { position: relative; background: var(--cds-gray-100); color: #fff; border: none; }
.page-hero--image .page-hero__bg { position:absolute; inset:0; }
.page-hero--image .page-hero__bg img { width:100%; height:100%; object-fit:cover; opacity:.4; }
.page-hero--image .page-hero__bg::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(15,15,15,.55), rgba(27,107,53,.65)); }
.page-hero--image .page-hero__inner { position: relative; z-index: 1; }
.page-hero--image h1 { color:#fff; }
.page-hero--image p { color: rgba(255,255,255,.88); }

/* ---- Stat band ----------------------------------------------------------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); }
.stat { background: #fff; padding: var(--sp-07) var(--sp-06); text-align: center; }
.stat__num { font-family: var(--font-serif); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 600; line-height: 1; color: var(--hj-green); }
.stat:nth-child(2) .stat__num { color: var(--hj-gold); }
.stat:nth-child(3) .stat__num { color: var(--hj-blue); }
.stat:nth-child(4) .stat__num { color: var(--hj-red); }
.stat__label { margin-top: var(--sp-04); font-size: .9rem; color: var(--text-secondary); }
@media (max-width: 720px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }

/* ---- Cause tile (with logo) ---------------------------------------------- */
.cause { display: flex; flex-direction: column; gap: var(--sp-05); background: #fff; border: 1px solid var(--border-subtle); padding: var(--sp-07) var(--sp-06); color: inherit; text-decoration: none; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); height: 100%; }
.cause:hover { border-color: var(--hj-green); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.cause__icon { width: 64px; height: 64px; object-fit: contain; }
.cause__icon-fallback { width: 56px; height: 56px; display:flex; align-items:center; justify-content:center; background: var(--hj-green-light); color: var(--hj-green); border-radius: 50%; font-family: var(--font-serif); font-weight: 600; font-size: 1.5rem; }
.cause h3 { font-size: 1.2rem; }
.cause p { color: var(--text-secondary); font-size: .9375rem; flex: 1; }
.cause__cta { font-weight: 600; color: var(--hj-green); font-size: .9rem; display: inline-flex; align-items: center; gap: var(--sp-03); }

/* ---- Split feature (image + text) ---------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-09); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--border-subtle); }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: var(--sp-07); } .split--reverse .split__media { order: 0; } }

/* ---- Verse / quote band -------------------------------------------------- */
.verse-band { text-align: center; }
.verse-band blockquote { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.4; max-width: 880px; margin-inline: auto; }
.verse-band cite { display: block; margin-top: var(--sp-06); font-style: normal; font-family: var(--font-sans); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hj-gold); }
.section--green .verse-band cite { color: var(--hj-gold-light); }

/* ---- Newsletter / join CTA ----------------------------------------------- */
.cta-band { background: var(--hj-green); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin-top: var(--sp-04); }
.subscribe-form { display: flex; gap: var(--sp-04); max-width: 520px; margin-top: var(--sp-06); }
.subscribe-form input { flex: 1; background: rgba(255,255,255,.12); color: #fff; border-bottom-color: rgba(255,255,255,.5); }
.subscribe-form input::placeholder { color: rgba(255,255,255,.7); }
.subscribe-form input:focus { background: rgba(255,255,255,.2); }
@media (max-width: 560px) { .subscribe-form { flex-direction: column; } }

/* ---- Contact layout ------------------------------------------------------ */
.contact-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--sp-10); align-items: start; }
@media (max-width: 880px) { .contact-layout { grid-template-columns: 1fr; gap: var(--sp-08); } }

/* ---- Article / post layout ----------------------------------------------- */
.article-head { max-width: 760px; }
.article-head h1 { margin-block: var(--sp-05) var(--sp-05); }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--sp-05); font-size: .875rem; color: var(--text-helper); align-items: center; }
.article-feature { margin-block: var(--sp-07); }
.article-feature img { width: 100%; max-height: 520px; object-fit: cover; border: 1px solid var(--border-subtle); }
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: var(--sp-09); align-items: start; }
.article-aside { position: sticky; top: 96px; }
.aside-card { border: 1px solid var(--border-subtle); padding: var(--sp-06); }
.aside-card h4 { margin-bottom: var(--sp-05); }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } .article-aside { position: static; } }

/* ---- Filters / toolbar --------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-04); align-items: center; margin-bottom: var(--sp-07); }
.filter-pills { display: flex; flex-wrap: wrap; gap: var(--sp-03); }
.filter-pills a { font-size: .875rem; padding: .4375rem .875rem; border: 1px solid var(--border-subtle); color: var(--text-secondary); background: #fff; border-radius: 999px; }
.filter-pills a:hover { border-color: var(--hj-green); color: var(--hj-green); text-decoration: none; }
.filter-pills a.is-active { background: var(--hj-green); border-color: var(--hj-green); color: #fff; }

/* ---- Team grid ----------------------------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-06); }
@media (max-width: 880px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.member { border: 1px solid var(--border-subtle); background: #fff; display: flex; flex-direction: column; }
.member__photo { aspect-ratio: 3/4; background: var(--cds-gray-10); overflow: hidden; }
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__photo--empty { display:flex; align-items:center; justify-content:center; font-family: var(--font-serif); font-size: 3rem; color: var(--hj-green); background: var(--hj-green-light); }
.member__body { padding: var(--sp-05) var(--sp-06) var(--sp-06); }
.member__name { font-weight: 600; font-size: 1.05rem; }
.member__role { color: var(--hj-green); font-size: .875rem; font-weight: 500; margin-top: 2px; }
.member__bio { color: var(--text-secondary); font-size: .875rem; margin-top: var(--sp-04); }
.trustee-list { columns: 2; gap: var(--sp-08); }
.trustee-list li { break-inside: avoid; padding: var(--sp-04) 0; border-bottom: 1px solid var(--border-subtle); display:flex; justify-content: space-between; gap: var(--sp-04); }
.trustee-list .role { color: var(--text-helper); font-size: .8125rem; }
@media (max-width: 560px) { .trustee-list { columns: 1; } }

/* ---- Events list --------------------------------------------------------- */
.event-row { display: grid; grid-template-columns: 120px 1fr auto; gap: var(--sp-06); align-items: center; padding: var(--sp-06) 0; border-bottom: 1px solid var(--border-subtle); }
.event-date { text-align: center; border: 1px solid var(--border-subtle); padding: var(--sp-04); }
.event-date .d { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 600; line-height: 1; color: var(--hj-green); }
.event-date .m { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-helper); margin-top: 4px; }
.event-date .y { font-size: .75rem; color: var(--text-helper); }
.event-row__title { font-size: 1.15rem; font-weight: 600; }
.event-row__meta { color: var(--text-helper); font-size: .875rem; margin-top: 4px; display:flex; gap: var(--sp-05); flex-wrap: wrap; }
@media (max-width: 640px) { .event-row { grid-template-columns: 88px 1fr; } .event-row .btn { grid-column: 2; justify-self: start; } }

/* ---- Footer -------------------------------------------------------------- */
.footer { background: var(--cds-gray-100); color: var(--cds-gray-30); padding-block: var(--sp-10) var(--sp-07); }
.footer a { color: var(--cds-gray-30); }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: var(--sp-08); padding-bottom: var(--sp-08); border-bottom: 1px solid var(--cds-gray-80); }
.footer__brand { display:flex; align-items:center; gap: var(--sp-04); }
.footer__brand img { width: 44px; filter: brightness(0) invert(1); }
.footer__brand .brand__name { color: #fff; }
.footer__about { margin-top: var(--sp-05); font-size: .9rem; color: var(--cds-gray-40); max-width: 36ch; }
.footer h5 { color: #fff; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--sp-05); }
.footer ul li { margin-bottom: var(--sp-04); font-size: .9rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-05); padding-top: var(--sp-06); font-size: .8125rem; color: var(--cds-gray-50); }
.footer__social { display: flex; gap: var(--sp-04); }
.footer__social a { width: 40px; height: 40px; border: 1px solid var(--cds-gray-80); display: flex; align-items: center; justify-content: center; }
.footer__social a:hover { background: var(--hj-green); border-color: var(--hj-green); }
.footer__social svg { width: 18px; height: 18px; }
@media (max-width: 880px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__top { grid-template-columns: 1fr; } }

/* ---- Pagination ---------------------------------------------------------- */
.pagination { display: flex; gap: var(--sp-03); justify-content: center; margin-top: var(--sp-09); }
.pagination a, .pagination span { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-subtle); font-size: .9rem; color: var(--text-primary); }
.pagination a:hover { border-color: var(--hj-green); color: var(--hj-green); text-decoration: none; }
.pagination .current { background: var(--hj-green); border-color: var(--hj-green); color: #fff; }
.pagination .disabled { color: var(--cds-gray-40); }

/* ---- Empty state --------------------------------------------------------- */
.empty-state { text-align: center; padding: var(--sp-11) var(--sp-06); color: var(--text-helper); }
.empty-state svg { width: 48px; height: 48px; color: var(--cds-gray-40); margin-inline: auto; margin-bottom: var(--sp-05); }

/* ---- Video & podcast embeds (Watch & Listen) ----------------------------- */
.video-embed { position: relative; aspect-ratio: 16/9; background: #000; border: 1px solid var(--border-subtle); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb { position: relative; }
.video-thumb__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(18,18,18,.18); transition: background var(--transition);
}
.video-thumb__play svg { width: 26px; height: 26px; color: #fff; background: var(--hj-red); border-radius: 50%; padding: 12px; box-sizing: content-box; box-shadow: var(--shadow-md); transition: transform var(--transition); }
a.video-card:hover .video-thumb__play { background: rgba(18,18,18,.32); }
a.video-card:hover .video-thumb__play svg { transform: scale(1.08); }
.podcast-embed iframe { width: 100%; height: 152px; border: 0; }
.podcast-embed--tall iframe { height: 315px; }

/* ---- Brand doodles ------------------------------------------------------- */
.doodle { position: absolute; pointer-events: none; z-index: 0; opacity: .5; }
.doodle--dots { width: 140px; height: 140px; color: var(--hj-gold); opacity: .25;
  background-image: radial-gradient(currentColor 1.6px, transparent 1.6px); background-size: 16px 16px; }
.section { position: relative; }
.section-head .eyebrow { position: relative; }
/* hand-drawn underline accent on emphasised words */
.scribble { position: relative; white-space: nowrap; }
.scribble::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 8px;
  background: no-repeat center/100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M2 7 C30 2 60 2 90 5 S116 8 118 4' fill='none' stroke='%23C48A00' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: .85;
}
.hero .doodle { opacity: .14; }
.hero__doodle-1 { top: 12%; right: 6%; width: 180px; height: 180px; color: #fff; }
.hero__doodle-2 { bottom: 14%; right: 22%; width: 90px; height: 90px; color: var(--hj-gold); opacity: .22; }
.float-slow { animation: floaty 9s ease-in-out infinite; }
.float-slower { animation: floaty 13s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(4deg); } }
.verse-band { position: relative; overflow: hidden; }
.verse-band .quote-mark { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-family: var(--font-serif); font-size: 9rem; line-height: 1; color: rgba(255,255,255,.12); z-index: 0; }
.verse-band > .container { position: relative; z-index: 1; }

/* ---- Scroll reveal ------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,0,.2,1), transform .7s cubic-bezier(.2,0,.2,1); will-change: opacity, transform; }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal-stagger].is-visible > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: .07s; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: .14s; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: .21s; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: .28s; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: .35s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .float-slow, .float-slower { animation: none; }
  * { scroll-behavior: auto !important; }
}
