/* ==========================================================================
   The Mary Grace Hospice Foundation
   Responsive stylesheet. No JavaScript, no external requests.
   Palette and type lifted from the original Wix design.
   ========================================================================== */

/* --- Fonts ------------------------------------------------------------- */
/* Work Sans SemiBold was the only face the old site actually rendered. */
@font-face {
  font-family: 'worksans-semibold';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/z9rX03Xuz9ZNHTMg1_ghGRUOjZSKWg4xBWp_C_qQx0o.woff2') format('woff2');
}
@font-face {
  font-family: 'worksans-semibold';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/4udXuXg54JlPEP5iKO5AmRUOjZSKWg4xBWp_C_qQx0o.woff2') format('woff2');
}

/* --- Tokens ------------------------------------------------------------ */
:root {
  --green-mid:   #739969;  /* footer, nav links, headings on white */
  --green-light: #a5db96;  /* section bands */
  --green-ink:   #26431e;  /* body text on the green bands */
  --ink:         #2f2e2e;  /* body text on white */
  --pink:        #e07adf;  /* tagline accent */
  --white:       #ffffff;
  --rule:        rgba(38, 67, 30, .18);

  --font: 'worksans-semibold', 'Work Sans', -apple-system, BlinkMacSystemFont,
          'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --band-y: clamp(2.5rem, 6vw, 5rem);
  --gap: clamp(1.5rem, 3.5vw, 3rem);
  --radius: 10px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, .94rem + .25vw, 1.125rem);
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-mid); }
a:hover, a:focus-visible { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; text-wrap: balance; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* --- Skip link -------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--white); color: var(--green-ink);
  padding: .75rem 1.25rem; font-weight: 700;
}
.skip:focus { left: 0; }

/* --- Layout primitives ------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* A full-bleed colour band with a centred content column inside. */
.band { padding-block: var(--band-y); }
.band--light { background: var(--green-light); color: var(--green-ink); }
.band--white { background: var(--white); color: var(--ink); }

.band--light h1, .band--light h2, .band--light h3 { color: var(--white); }
.band--white h1, .band--white h2 { color: var(--green-mid); }

/* Text + media, side by side on wide screens, stacked on narrow. */
.split {
  display: grid;
  gap: var(--gap);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 56em) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--text-wide { grid-template-columns: 1.15fr .85fr; }
  .split--media-first > .split__media { order: -1; }
}

/* --- Type scale ------------------------------------------------------- */
.page-title {
  font-size: clamp(1.75rem, 1.15rem + 2.4vw, 2.75rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: .8em;
}
.page-title small {
  display: block;
  font-size: .62em;
  font-weight: 400;
  margin-bottom: .25em;
}
.tagline {
  color: var(--pink);
  font-weight: 700;
  font-size: clamp(1.15rem, .95rem + .9vw, 1.6rem);
  line-height: 1.4;
  text-align: center;
  margin-bottom: 1.2em;
}
.subhead {
  font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem);
  font-weight: 700;
  text-align: center;
}
.lede { font-size: 1.06em; }

/* --- Header ----------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid rgba(115, 153, 105, .25);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem clamp(1rem, 3vw, 2.5rem);
  padding-block: 1rem;
}
.site-logo { flex: 0 0 auto; }
.site-logo img { width: clamp(190px, 22vw, 260px); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem clamp(.7rem, 1.35vw, 1.2rem);
}
.site-nav a {
  display: inline-block;
  padding: .35rem 0;
  color: var(--green-mid);
  text-decoration: none;
  font-size: clamp(.9rem, .86rem + .12vw, 1rem);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { border-bottom-color: var(--green-mid); }
.site-nav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Centre the header stack once the logo and nav can no longer share a row. */
@media (max-width: 47.99em) {
  .site-header__inner { flex-direction: column; text-align: center; }
  .site-nav ul { justify-content: center; }
}

/* --- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--green-mid);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: .7em 2.2em;
  border-radius: var(--radius);
  border: 2px solid var(--green-mid);
}
.btn:hover, .btn:focus-visible {
  background: var(--white);
  color: var(--green-mid);
}
.btn--on-light { border-color: var(--white); }

/* --- Cards (donation options) ----------------------------------------- */
.cards {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 44em) { .cards { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.card h2 {
  color: var(--green-mid);
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem);
  margin: 0;
}
.card p { margin: 0; }
.card__figure { width: 100%; }
.card__figure img { border-radius: var(--radius); width: 100%; object-fit: cover; }

/* --- Team ------------------------------------------------------------- */
.team {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 40em)   { .team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62em)   { .team { grid-template-columns: repeat(3, 1fr); } }

.member__name {
  font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem);
  font-weight: 700;
  margin-bottom: .1em;
}
.member__role {
  display: block;
  font-size: .72em;
  font-weight: 400;
  opacity: .9;
}
.member__portrait {
  width: 96px;
  border-radius: 50%;
  margin-bottom: .75rem;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
}
.member p { font-size: .95em; }

/* --- Figures / galleries ---------------------------------------------- */
figure { margin: 0; }
.figure img { border-radius: var(--radius); width: 100%; }
.figure figcaption { font-size: .85em; margin-top: .5rem; opacity: .85; }

.gallery {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  margin-top: var(--gap);
}
.gallery img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.banner img { border-radius: var(--radius); width: 100%; }

/* --- Prose ------------------------------------------------------------ */
.prose { max-width: 68ch; }
.prose--center { margin-inline: auto; }

/* --- Embedded form ---------------------------------------------------- */
.embed {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(.5rem, 2vw, 1.5rem);
  margin-top: var(--gap);
}
.embed iframe { width: 100% !important; min-width: 0 !important; border: 0; display: block; }

/* --- Callout ---------------------------------------------------------- */
.callout {
  background: var(--white);
  border-left: 5px solid var(--green-mid);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  color: var(--ink);
}

/* --- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--green-mid);
  color: var(--white);
  padding-block: var(--band-y);
  text-align: center;
}
.site-footer h2 {
  color: var(--white);
  font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem);
}
.site-footer a { color: var(--white); }
.site-footer__contact {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem clamp(1rem, 3vw, 2.5rem);
  font-size: 1.05em;
}
.site-footer__legal {
  margin-top: 2rem;
  font-size: .85em;
  opacity: .9;
}

/* --- Utilities -------------------------------------------------------- */
.center { text-align: center; }
.stack > * + * { margin-top: var(--gap); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
