/* =========================================================
   CareHut Foundation — site styles
   Colours come from the logo: leaf green, thatch orange, earth brown.
   ========================================================= */
:root {
  --green-800: #2f5f17;
  --green-700: #3f7d20;
  --green-600: #4f962a;
  --green-500: #8dc63f;
  --green-50: #f2f8ea;
  --accent: #d9862b;
  --accent-600: #c0721c;
  --brown-900: #2a2321;
  --brown-800: #4e4542;
  --ink: #2a2321;
  --text: #3d3634;
  --muted: #6b625e;
  --line: #e8e2da;
  --bg: #ffffff;
  --bg-soft: #f8f5f0;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(42, 35, 33, 0.10);
  --shadow-sm: 0 4px 14px rgba(42, 35, 33, 0.08);
  --container: 1200px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon--fill { fill: currentColor; stroke: none; }

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--green-700);
  color: var(--white);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .85em 1.5em;
  border-radius: 6px;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn--primary { background: var(--green-700); color: var(--white); }
.btn--primary:hover { background: var(--green-800); }
.btn--outline { border-color: var(--green-700); color: var(--green-700); background: var(--white); }
.btn--outline:hover { background: var(--green-700); color: var(--white); }
.btn--accent { background: var(--accent); color: var(--white); }
.btn--accent:hover { background: var(--accent-600); }
.btn--light { border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--brown-900); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  color: var(--green-700);
}
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--brown-900);
  color: var(--white);
  font-size: .85rem;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  flex-wrap: wrap;
}
.topbar__group { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 8px; }
.topbar .icon { color: var(--green-500); }
.topbar a:hover { color: var(--green-500); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--brown-900);
  font-size: 14px;
  transition: background .2s, color .2s;
}
.socials a:hover { background: var(--green-500); }

/* ---------- Header / nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(42, 35, 33, .06);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 56px; width: 56px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__text strong { font-size: 1.15rem; color: var(--brown-800); font-weight: 700; }
.logo__text small { font-size: .72rem; color: var(--accent); font-weight: 600; letter-spacing: .03em; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  color: var(--ink);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--green-600);
  transform: scaleX(0);
  transition: transform .2s;
}
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--green-700); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green-700);
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  place-items: center;
}

/* ---------- Home hero carousel ---------- */
/* Slides share one grid cell, so the carousel is as tall as its tallest slide */
.carousel {
  position: relative;
  display: grid;
  overflow: hidden;
  background: var(--brown-900);
}
.slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility .9s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide__media {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  transform: scale(1.06);
  transition: transform 7s ease-out;
}
.slide.is-active .slide__media { transform: scale(1); }
.slide__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(42, 35, 33, .9) 0%, rgba(42, 35, 33, .65) 45%, rgba(42, 35, 33, .15) 100%);
}
.slide .container { position: relative; padding-top: 70px; padding-bottom: 150px; }
.slide__content { max-width: 580px; color: var(--white); }
.slide__content .eyebrow { color: var(--green-500); }
.slide__title { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 800; color: var(--white); margin: 0; }
.bar { display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--accent); margin: 22px 0; }
.slide__content p { font-size: 1.05rem; opacity: .92; }
.slide__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

.carousel__arrow {
  position: absolute;
  top: calc(50% - 60px);
  z-index: 3;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  transition: background .2s;
}
.carousel__arrow:hover,
.carousel__arrow:focus-visible { background: var(--green-700); }
.carousel__arrow--prev { left: 20px; }
.carousel__arrow--next { right: 20px; }
.carousel__dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 104px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.carousel__dot {
  width: 12px; height: 12px;
  padding: 0;
  border: 2px solid var(--white);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: width .3s, background .3s;
}
.carousel__dot.is-active { width: 32px; background: var(--white); }

/* ---------- Features strip ---------- */
.features {
  position: relative;
  z-index: 2;
  margin-top: -80px;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 10px;
}
.feature {
  display: flex;
  gap: 14px;
  padding: 0 20px;
  border-left: 1px solid var(--line);
}
.feature:first-child { border-left: 0; }
.feature__icon { font-size: 40px; color: var(--green-600); }
.feature h3 { font-size: .95rem; margin-bottom: 4px; color: var(--brown-800); }
.feature p { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.5; }

.features--dark { background: var(--brown-900); }
.features--dark .section__title { color: var(--white); }
.features--dark .eyebrow { color: var(--green-500); }
.features--dark .features__grid { background: rgba(255, 255, 255, .05); box-shadow: none; }
.features--dark .feature { border-color: rgba(255, 255, 255, .15); }
.features--dark .feature__icon { color: var(--green-500); }
.features--dark .feature h3 { color: var(--white); }
.features--dark .feature p { color: rgba(255, 255, 255, .8); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); }
.section__title { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.section__head { margin-bottom: 40px; }
.section__head--center { text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__lead { max-width: 640px; color: var(--muted); }
.section__head--center .section__lead { margin: 0 auto; }
.center { text-align: center; margin-top: 36px; }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.split__media--logo img {
  aspect-ratio: auto;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: none;
}
.checklist { list-style: none; padding: 0; margin: 20px 0 30px; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { color: var(--green-600); font-size: 20px; margin-top: 3px; }

/* ---------- Icon cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
  width: 60px; height: 60px;
  margin-bottom: 16px;
  display: grid; place-items: center;
  font-size: 28px;
  color: var(--green-700);
  background: var(--green-50);
  border-radius: 50%;
}
.card h3 { font-size: 1.05rem; }
.card p { font-size: .9rem; color: var(--muted); }
.card .link-arrow { margin-top: auto; }

.give-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding: 30px 34px;
  background: var(--white);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.give-box h3 { margin-bottom: 6px; }
.give-box p { margin: 0; color: var(--muted); }
.give-box__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Activities ---------- */
.activities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.activity {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
/* Awareness images are posters with text, so show them whole rather than cropped */
.activity img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--bg-soft); }
.activity__body { padding: 18px 20px 22px; }
.activity__month {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent-600);
}
.activity h3 { font-size: 1rem; margin: 8px 0 12px; }
.activity__meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.activity__meta li { display: flex; align-items: center; gap: 8px; }
.activity__meta .icon { color: var(--green-600); }

/* ---------- CTA band ---------- */
.cta {
  background: var(--brown-900) center / cover;
  color: var(--white);
  padding: 70px 0;
}
.cta .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta h2 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta p { margin: 0; opacity: .85; }
.cta__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  background: var(--brown-900);
  color: var(--white);
  overflow: hidden;
}
.page-hero__media {
  position: absolute;
  inset: 0 0 0 30%;
  background: center 30% / cover no-repeat;
}
.page-hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--brown-900) 0%, rgba(42, 35, 33, .7) 25%, rgba(42, 35, 33, 0) 60%);
}
.page-hero .container { position: relative; padding-top: 60px; padding-bottom: 60px; }
.page-hero h1 { color: var(--white); font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; margin: 0; }
.page-hero p { max-width: 440px; opacity: .92; }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: .95rem; margin-top: 18px; }
.breadcrumb a:hover { color: var(--green-500); }
.breadcrumb .icon { font-size: 14px; }

/* ---------- About page ---------- */
.mv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mv-card {
  padding: 34px 28px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--green-500);
}
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.goal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.goal img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.goal__body { padding: 22px 24px 26px; }
.goal h3 { font-size: 1.08rem; }
.goal p { font-size: .9rem; color: var(--muted); margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.form {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 110px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: .95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--green-600); background: var(--white); }
.field textarea { min-height: 130px; resize: vertical; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin-top: 12px; font-weight: 600; color: var(--green-700); }

.office {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.office__body { padding: 22px 24px; }
.office h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--green-700); }
.office iframe { width: 100%; height: 280px; border: 0; display: block; }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; }
.info-list .icon { color: var(--green-600); margin-top: 4px; }

/* ---------- Footer ---------- */
.footer {
  background:
    radial-gradient(circle at 20% 0%, rgba(141, 198, 63, .08), transparent 50%),
    var(--brown-900);
  color: rgba(255, 255, 255, .85);
  font-size: .88rem;
  padding-top: 56px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 32px;
}
.footer__logo { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer__logo img { width: 52px; height: 52px; background: var(--white); border-radius: 50%; padding: 4px; }
.footer__logo strong { color: var(--white); font-size: 1.1rem; }
.footer h4 {
  color: var(--white);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}
.footer h4.accent { color: var(--green-500); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a:hover { color: var(--green-500); }
.footer .info-list .icon { color: var(--green-500); }
.footer .socials { margin-top: 18px; }
.footer__bottom {
  margin-top: 44px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
  font-size: .82rem;
  color: rgba(255, 255, 255, .7);
}

/* ---------- Reveal on scroll (only when JS runs, so content never stays hidden) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .activities { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .topbar__address { display: none !important; }
}

@media (max-width: 980px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 24px;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(42, 35, 33, .12);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list > li { border-bottom: 1px solid var(--line); }
  .nav__link { padding: 14px 0; width: 100%; }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: 18px; justify-content: center; }

  .slide { min-height: 540px; }
  .slide .container { padding-top: 50px; padding-bottom: 80px; }
  .slide__media::after { background: linear-gradient(90deg, rgba(42, 35, 33, .88) 0%, rgba(42, 35, 33, .6) 100%); }
  .carousel__arrow { display: none; }
  .carousel__dots { bottom: 28px; }
  .features { margin-top: 0; padding-top: 10px; }
  .features__grid { grid-template-columns: repeat(2, 1fr); gap: 22px 0; }
  .feature:nth-child(odd) { border-left: 0; }

  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .mv-grid, .goals, .cards--3 { grid-template-columns: 1fr; }
  .activities { grid-template-columns: repeat(2, 1fr); }
  .page-hero__media { inset: 0; opacity: .35; }
}

@media (max-width: 720px) {
  .topbar__group--secondary { display: none; }
  .topbar .container { justify-content: center; }
  .topbar__group { gap: 16px; justify-content: center; }
  .section { padding: 64px 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .form { padding: 24px; }
  .form__row { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: 1fr; }
  .feature { border-left: 0; }
  .logo img { height: 46px; width: 46px; }
  .logo__text strong { font-size: 1rem; }
  .give-box { padding: 24px; }
}

@media (max-width: 520px) {
  .activities { grid-template-columns: 1fr; }
  .logo__text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
