/* ==========================================================================
   Notes of Happiness — Stylesheet
   Palette pulled from the NofH logos: warm cream, deep espresso brown, bronze gold.
   Display face: Playfair Display  |  Body: EB Garamond  |  Utility: Jost
   ========================================================================== */

:root {
  --cream: #FBF3E7;
  --cream-deep: #ECD8B4;
  --ink: #2A1809;
  --umber: #55340D;
  --gold: #B8802A;
  --gold-light: #E0A94A;
  --gold-soft: #F0C978;
  --white: #FFFDF9;
  --shadow: 0 20px 45px -25px rgba(42, 24, 9, 0.5);

  --font-display: "Playfair Display", "Georgia", serif;
  --font-body: "EB Garamond", "Georgia", serif;
  --font-utility: "Jost", "Helvetica Neue", sans-serif;

  --container: 1180px;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: 0.01em;
}
p { margin: 0 0 1em; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-utility);
  font-size: 1.2rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.eyebrow.getInvolved {
  font-size: 1rem;
  margin-bottom: 0;
}

/* ---------- Signature divider: scroll & string motif ---------- */
.motif-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 3.5rem 0;
  color: var(--gold);
}
.motif-divider .line {
  height: 1px;
  width: clamp(60px, 12vw, 160px);
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}
.motif-divider svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-utility);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95em 1.9em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--umber), var(--gold));
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 40px -20px rgba(169, 117, 46, 0.55); }
.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--ink);
}
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--umber);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 0.4em 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(24, 14, 6, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(240, 201, 120, 0.18);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: 70vw;
  margin: 0 auto;
  height: 95px;
}
@media (max-width: 1600px) {
  .nav { max-width: 100%; }
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.04rem;
  color: var(--white);
}
.nav-logo img { height: 56px; width: auto; }
.nav-links {
  display: flex;
  gap: 1.1rem;
  font-family: var(--font-utility);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  padding: 0.3rem 0;
  color: rgba(251, 243, 231, 0.72);
  margin-right: 15px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--gold-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 105px 0 auto 0;
    flex-direction: column;
    background: #180E06;
    padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
    gap: 1.1rem;
    transform: translateY(-140%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.3s ease;
    border-bottom: 1px solid rgba(240, 201, 120, 0.18);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
}

/* ---------- Hero / Carousel ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
  text-align: center;
  height: calc(100vh - 95px);
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(53,32,15,0.55), rgba(53,32,15,0.35) 45%, rgba(53,32,15,0.75));
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem;
  max-width: 820px;
}
.hero-content .eyebrow { color: var(--gold-soft); }
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.hero-sub {
  font-family: var(--font-utility);
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-dots {
  position: absolute;
  bottom: 1.75rem;
  left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.hero-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--white);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.hero-dots button.active { background: var(--white); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: clamp(4rem, 10vw, 6.5rem) 0 clamp(2.5rem, 6vw, 3.5rem);
  text-align: center;
}
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.page-hero .lede {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.2rem;
  color: var(--umber);
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--cream-deep); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  align-items: center;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(53,32,15,0.06);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  text-align: center;
}
@media (max-width: 700px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-utility);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--umber);
  margin-top: 0.5rem;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border-bottom: 1px solid rgba(53,32,15,0.12);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  padding: 1.4rem 0;
  cursor: pointer;
}
.faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--gold);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-icon::before { width: 100%; height: 1.5px; }
.faq-icon::after { width: 1.5px; height: 100%; transition: transform 0.3s ease; }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg) scaleX(0); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  color: var(--umber);
}
.faq-answer-inner { padding-bottom: 1.4rem; }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-sub-list { margin: 0.6rem 0 0 1.2rem; }
.faq-sub-list li { list-style: disc; margin-bottom: 0.3rem; }

/* ---------- Team ---------- */
.section-subtitle {
  max-width: 650px;
  margin: 0.6rem auto 0;
  color: var(--umber);
  font-size: 1.05rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
@media (max-width: 780px) { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  text-align: left;
  padding: 1.35rem;
  background: rgba(255, 253, 249, 0.84);
  border-radius: 18px;
  border: 1px solid rgba(53, 32, 15, 0.08);
  box-shadow: 0 14px 30px -24px rgba(42, 24, 9, 0.45);
}
.team-card--compact .team-photo {
  width: min(220px, 100%);
  aspect-ratio: 4/5;
  margin: 0 auto 1rem;
}
.team-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}
.team-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}
.team-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1rem;
  background: var(--cream-deep);
  box-shadow: var(--shadow);
}
.team-role {
  font-family: var(--font-utility);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.team-members-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: clamp(1rem, 2vw, 1.4rem);
  justify-content: center;
  align-items: start;
}
@media (max-width: 1200px) {
  .team-members-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}
@media (max-width: 900px) {
  .team-members-grid { grid-template-columns: minmax(0, 1fr); }
}
.team-member-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(53, 32, 15, 0.06);
  text-align: left;
}
.team-member-card:only-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 320px);
}
.team-member-card h3 {
  font-size: 1.2rem;
  margin: 0.8rem 0 0.2rem;
}
.team-member-card p {
  font-size: 0.95rem;
}
.team-member-photo {
  width: min(100%, 180px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  background: var(--cream-deep);
  display: block;
  margin: 0 auto 0.8rem;
}

/* ---------- Get Involved ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.form-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}
.form-card .btn {
  margin-top: auto;
}
@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
}

.volunteer-list {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
  padding: 0;
}
.volunteer-list li {
  background: var(--white);
  border: 1px solid rgba(53, 32, 15, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  color: var(--ink);
}

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 700px) {
  /* On non-mobile devices, always show 3 columns */
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.blog-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(53,32,15,0.06);
  transition: transform 0.3s ease;
}
.blog-card:hover { transform: translateY(-4px); }
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--cream-deep);
}
.blog-card-body { padding: 1.4rem 1.5rem 1.7rem; }
.blog-card-date {
  font-family: var(--font-utility);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.blog-card h3 { font-size: 1.3rem; margin-top: 0.4rem; }
.blog-card p { color: var(--umber); font-size: 1rem; }

.blog-post-header { text-align: center; margin-bottom: 2.5rem; }
.blog-post-cover {
  display: block;
  width: 100%;
  max-width: 612px; /* 720px * 0.85 = 612px (15% smaller) */
  height: auto;
  object-fit: cover;
  border-radius: 18px;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow);
}
.blog-post-cover--small {
  max-width: 420px;
}
.blog-post-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (min-width: 700px) {
  /* Three gallery images per row on non-mobile devices */
  .blog-post-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
.blog-post-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
}
.blog-post-gallery-item {
  display: grid;
  gap: 0.65rem;
  align-items: center;
  justify-self: center;
  max-width: 220px;
}
.blog-post-gallery-caption {
  text-align: center;
  color: var(--umber);
  font-size: 0.95rem;
  line-height: 1.5;
}
.blog-post-inline-image {
  display: block;
  width: auto;
  max-width: 280px;
  height: auto;
  margin: 2rem auto 0;
  border-radius: 18px;
}
.blog-post-image-caption {
  text-align: center;
  color: var(--umber);
  margin: 0.75rem auto 1.75rem;
  max-width: 100%;
  font-size: 0.95rem;
  line-height: 1.5;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}
.gallery-grid img:hover { transform: scale(1.02); box-shadow: var(--shadow); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(24, 14, 6, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: none;
  border: 1px solid var(--gold-soft);
  color: var(--white);
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--gold-soft);
  color: var(--white);
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ---------- Forms ---------- */
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
@media (max-width: 860px) { .contact-panel { grid-template-columns: 1fr; } }
.info-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  font-family: var(--font-utility);
  font-size: 1rem;
}
.info-line svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream-deep);
  padding: clamp(3rem, 6vw, 4rem) 0 1.75rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--gap);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(251, 243, 231, 0.15);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.footer-brand img { height: 60px; opacity: 0.92; margin-right: 10px; }
.footer-brand span { font-family: var(--font-display); font-size: 1.2rem; color: var(--white); }
.footer-tagline { color: rgba(251,243,231,0.7); max-width: 320px; }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  color: var(--gold-soft);
  font-family: var(--font-utility);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-heading {
  font-family: var(--font-utility);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1rem;
}
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a { color: rgba(251,243,231,0.8); }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-utility);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(251,243,231,0.55);
}

@media (max-width: 2500px) {
  .site-footer {
    padding: 2.7rem 0 1.55rem;
  }

  .footer-grid {
    gap: 1.35rem;
    padding-bottom: 2.2rem;
  }

  .footer-brand img {
    height: 54px;
  }

  .footer-brand span {
    font-size: 1.08rem;
  }

  .footer-tagline {
    font-size: 0.95rem;
    max-width: 290px;
  }

  .footer-social {
    font-size: 0.77rem;
    margin-top: 0.7rem;
  }

  .footer-heading {
    font-size: 0.72rem;
    margin-bottom: 0.9rem;
  }

  .footer-links li {
    margin-bottom: 0.6rem;
  }

  .footer-links a {
    font-size: 0.95rem;
  }

  .footer-bottom {
    padding-top: 1.3rem;
    font-size: 0.7rem;
  }
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }
.max-w { max-width: 640px; margin-left: auto; margin-right: auto; }

@media (max-width: 780px) {
  .navTitle {
    font-size: 26px !important;
    line-height: 36px;
  }
}

.motif-divider {
  display: none !important;
}