/* ===========================================================
   Joy Educational Foundation & Charitable Trust
   Design tokens
   =========================================================== */
:root {
  --ink:        #241710;
  --forest:     #1F3A2E;
  --forest-2:   #2C4A3B;
  --clay:       #8B3A2F;
  --saffron:    #C2541B;
  --saffron-2:  #DE6A2A;
  --gold:       #D9A441;
  --cream:      #F7EFE1;
  --cream-2:    #EFE3CC;
  --paper:      #FBF6EC;
  --white:      #FFFDF9;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mark: "Caveat", cursive;

  --radius: 6px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -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);
  font-weight: 600;
  margin: 0 0 .5em;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

:focus-visible {
  outline: 3px solid var(--saffron-2);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.eyebrow-light { color: var(--gold); }

.section-title {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  color: var(--forest);
}

/* signature "marker" highlight, evoking Helping Hands / handwritten warmth */
.mark {
  position: relative;
  white-space: nowrap;
}
.mark::after {
  content: "";
  position: absolute;
  left: -3px; right: -3px; bottom: 0.05em;
  height: 0.34em;
  background: var(--saffron-2);
  opacity: 0.45;
  z-index: -1;
  border-radius: 2px;
  transform: rotate(-0.6deg);
}
.mark-dark::after { background: var(--gold); opacity: .55; }

/* ===========================================================
   Buttons
   =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: 10px 20px; font-size: 0.85rem; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--saffron);
  color: var(--white);
}
.btn-primary:hover { background: var(--saffron-2); }

.btn-ghost-light {
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); }

.btn-ghost-dark {
  border-color: rgba(36,23,16,0.4);
  color: var(--ink);
}
.btn-ghost-dark:hover { background: rgba(36,23,16,0.06); }

/* ===========================================================
   Header
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(36,23,16,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.brand-mark--img {
  background: var(--white);
  object-fit: contain;
  padding: 3px;
  border: 1px solid rgba(36,23,16,0.1);
}
.brand-mark--img.brand-mark--light {
  background: var(--white);
  border-color: rgba(255,255,255,0.18);
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--forest);
  line-height: 1.2;
}
.brand-text small { font-weight: 500; font-size: 0.8rem; opacity: .8; }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--saffron);
  transition: width .2s ease;
}
.main-nav a:hover::after { width: 100%; }
.main-nav a.active { color: var(--saffron); }
.main-nav a.active::after { width: 100%; background: var(--saffron); }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--forest);
  border-radius: 2px;
}

/* ===========================================================
   Inner page hero (About / Programs / Impact / Team / Contact)
   =========================================================== */
.page-hero {
  background: var(--forest);
  color: var(--white);
  padding: 70px 0 50px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 0%, rgba(217,164,65,0.22), transparent 50%);
  pointer-events: none;
}
.page-hero h1 {
  position: relative;
  color: var(--white);
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  margin: 0;
}
.page-hero h1 .mark::after { background: var(--saffron); opacity: .65; }

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  position: relative;
  background: var(--forest);
  color: var(--white);
  overflow: hidden;
  padding-top: 100px;
}
.hero-photos {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image:
    linear-gradient(100deg, rgba(31,58,46,0.95) 0%, rgba(31,58,46,0.86) 38%, rgba(31,58,46,0.68) 60%, rgba(31,58,46,0.84) 100%),
    url("assets/1.jpg"),
    url("assets/2.jpg");
  background-position: center, left center, right center;
  background-size: cover, 52% 100%, 52% 100%;
  background-repeat: no-repeat, no-repeat, no-repeat;
}
.hero-texture {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 10%, rgba(217,164,65,0.25), transparent 45%),
    radial-gradient(circle at 8% 85%, rgba(194,84,27,0.28), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding-bottom: 80px;
  max-width: 880px;
}
.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  color: var(--white);
  margin-bottom: 0.45em;
}
.hero-title .mark::after { background: var(--saffron); opacity: .65; }
.hero-sub {
  font-size: 1.15rem;
  color: var(--cream-2);
  max-width: 620px;
  margin-bottom: 2em;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-bottom-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.14);
}
.hero-stat {
  padding: 26px 0 30px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid rgba(255,255,255,0.14);
}
.hero-stat:last-child { border-right: none; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold);
}
.hero-stat .lbl {
  font-size: 0.85rem;
  color: var(--cream-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===========================================================
   About grid (asymmetric mosaic)
   =========================================================== */
.about { background: var(--paper); padding: 90px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
}
.about-card { padding: 46px 38px; border-radius: var(--radius); }
.about-card--dark {
  grid-row: 1 / 3;
  background: var(--forest);
  color: var(--white);
}
.about-card--dark h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}
.about-text { color: var(--cream-2); max-width: 50ch; }

.about-card--mid {
  background: var(--forest-2);
  color: var(--white);
}
.about-card--mid h3 { color: var(--white); font-size: 1.3rem; }

.about-card--accent {
  background: var(--saffron);
  color: var(--white);
}
.about-card--accent h3 { color: var(--white); font-size: 1.3rem; }
.about-card--accent .eyebrow { color: rgba(255,255,255,0.85); }

/* ===========================================================
   Goal statement band
   =========================================================== */
.goal {
  background: var(--cream);
  padding: 70px 0;
  text-align: center;
  border-top: 1px solid rgba(36,23,16,0.08);
  border-bottom: 1px solid rgba(36,23,16,0.08);
}
.goal .eyebrow { justify-content: center; }
.goal .eyebrow::after { display: none; }
.goal-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  max-width: 820px;
  margin: 0 auto;
  color: var(--forest);
}

/* ===========================================================
   Programs
   =========================================================== */
.programs { padding: 100px 0; background: var(--paper); }
.programs .section-title { margin-bottom: 50px; }

.program-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-bottom: 70px;
}
.program-card {
  background: var(--white);
  border: 1px solid rgba(36,23,16,0.08);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(36,23,16,0.08);
}
.program-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.program-icon svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--saffron);
  stroke-width: 2.2;
}
.program-card h3 {
  font-size: 1.15rem;
  color: var(--forest);
  margin-bottom: 10px;
}
.program-card p { font-size: 0.92rem; color: #5a5048; margin: 0; }

.feature-rows { border-top: 1px solid rgba(36,23,16,0.14); }
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.8fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid rgba(36,23,16,0.14);
  align-items: start;
}
.feature-label h3 { font-size: 1.5rem; color: var(--forest); margin: 0; }
.feature-text { color: #5a5048; margin: 0; }
.feature-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--forest);
  font-size: 0.92rem;
}
.feature-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 12px; height: 2px;
  background: var(--saffron);
}

/* ===========================================================
   Impact / stats
   =========================================================== */
.impact { background: var(--cream); padding: 90px 0; }
.impact .eyebrow { justify-content: center; }
.impact .eyebrow::after { display: none; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(36,23,16,0.14);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 30px;
}
.stat-box {
  padding: 36px 24px;
  border-right: 1px solid rgba(36,23,16,0.14);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-box:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--saffron);
}
.stat-lbl {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stats-note {
  font-size: 0.8rem;
  color: #8a7f72;
  margin-top: 16px;
  text-align: center;
}

/* ===========================================================
   Quote
   =========================================================== */
.quote-section { background: var(--forest); padding: 100px 0; }
.quote-wrap { max-width: 760px; margin: 0 auto; text-align: center; }
.quote-section blockquote {
  font-family: var(--font-mark);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--white);
  margin: 0 0 28px;
  line-height: 1.4;
}
.quote-attribution {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

/* ===========================================================
   Team
   =========================================================== */
.team-cta { padding: 100px 0; background: var(--paper); }
.team-grid { max-width: 760px; }
.team-text { color: #5a5048; }

/* ===========================================================
   Contact
   =========================================================== */
.contact { background: var(--cream); padding: 100px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}
.contact-sub { color: #5a5048; max-width: 46ch; }
.contact-details { margin-top: 36px; display: flex; flex-direction: column; gap: 20px; }
.contact-detail { display: flex; flex-direction: column; gap: 4px; }
.cd-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--saffron);
}
.cd-value { font-size: 0.98rem; color: var(--ink); font-weight: 500; }
.cd-value a { text-decoration: underline; }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid rgba(36,23,16,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--forest); }
.req { color: var(--saffron); }
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1.5px solid rgba(36,23,16,0.18);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--saffron);
  background: var(--white);
}
.form-status { margin: 14px 0 0; font-size: 0.9rem; font-weight: 600; min-height: 1.2em; color: var(--forest); }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer { background: var(--ink); color: var(--cream-2); padding: 70px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand-mark--light { background: var(--gold); color: var(--ink); }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-org { font-family: var(--font-display); font-weight: 600; color: var(--white); margin-top: 10px; }
.footer-tagline { font-family: var(--font-mark); color: var(--gold); font-size: 1.2rem; margin: 0; }
.footer-regd { font-size: 0.78rem; color: #9a8f80; margin-top: 6px; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 0.92rem;
  color: #c9bfb0;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding: 22px 28px;
  font-size: 0.8rem;
  color: #8a7f72;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
}
.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-legal-links a {
  color: #9a8f80;
  font-size: 0.8rem;
}
.footer-legal-links a:hover { color: var(--gold); }
.footer-bottom-sep {
  display: none;
}
@media (min-width: 601px) {
  .footer-bottom-sep { display: inline; }
}

/* ===========================================================
   Legal pages (Terms & Conditions / Privacy Policy)
   =========================================================== */
.legal-content { background: var(--paper); padding: 80px 0 100px; }
.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 100px;
  background: var(--white);
  border: 1px solid rgba(36,23,16,0.1);
  border-radius: var(--radius);
  padding: 24px;
}
.legal-toc h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--saffron);
  margin: 0 0 14px;
}
.legal-toc ol {
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-toc li {
  counter-increment: toc;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.legal-toc li a {
  display: flex;
  gap: 8px;
}
.legal-toc li a::before {
  content: counter(toc);
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--forest);
  font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
}
.legal-toc li a:hover { color: var(--saffron); }

.legal-updated {
  font-size: 0.85rem;
  color: var(--saffron);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.legal-intro {
  color: #5a5048;
  max-width: 64ch;
  margin-bottom: 40px;
}
.legal-section { margin-bottom: 40px; padding-top: 6px; }
.legal-section h2 {
  font-size: 1.5rem;
  color: var(--forest);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.legal-section h2 .num {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--saffron);
  font-weight: 700;
}
.legal-section p, .legal-section li {
  color: #4a4138;
  font-size: 0.97rem;
}
.legal-section ul, .legal-section ol.legal-list {
  margin: 0 0 1em;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-section ul li, .legal-section ol.legal-list li {
  position: relative;
  padding-left: 22px;
}
.legal-section ul li::before {
  content: "";
  position: absolute; left: 0; top: 0.6em;
  width: 10px; height: 2px;
  background: var(--saffron);
}
.legal-section ol.legal-list { counter-reset: ll; }
.legal-section ol.legal-list li { counter-increment: ll; }
.legal-section ol.legal-list li::before {
  content: counter(ll) ".";
  position: absolute; left: 0; top: 0;
  font-weight: 700;
  color: var(--saffron);
  width: auto; height: auto; background: none;
}
.legal-section a.inline-link {
  color: var(--saffron);
  text-decoration: underline;
}
.legal-callout {
  background: var(--cream);
  border-left: 3px solid var(--saffron);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 18px;
}
.legal-contact-box {
  background: var(--forest);
  color: var(--cream-2);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-top: 10px;
}
.legal-contact-box h3 { color: var(--white); font-size: 1.2rem; }
.legal-contact-box p { color: #c9bfb0; margin-bottom: 4px; }
.legal-contact-box a { color: var(--gold); text-decoration: underline; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card--dark { grid-row: auto; }
  .program-cards { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-box:nth-child(2) { border-right: none; }
  .stat-box { border-bottom: 1px solid rgba(36,23,16,0.14); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-bottom-row { grid-template-columns: 1fr; }
  .hero-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.14); }
}

@media (max-width: 600px) {
  .program-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 90px; }
  .about-card { padding: 32px 24px; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    padding: 20px 28px;
    gap: 16px;
    border-bottom: 1px solid rgba(36,23,16,0.1);
  }
  .nav-cta { display: none; }
}