/* ==========================================================================
   Mother of Mercy House — static rebuild
   Design tokens taken from the live site (motherofmercyhouse.org)
   ========================================================================== */

/* --- Fonts -----------------------------------------------------------------
   The live site uses AeonikTRIAL-*.ttf — the *trial* cut of Aeonik, which is
   not licensed for public web use. Figtree is a free, near-identical geometric
   grotesque used here as the default.

   If MoMH licenses Aeonik, drop the .woff2 files into assets/fonts/ and
   uncomment the @font-face block below; everything else picks it up.
--------------------------------------------------------------------------- */
/*
@font-face { font-family:"Aeonik"; src:url("../fonts/Aeonik-Light.woff2") format("woff2");   font-weight:300; font-display:swap; }
@font-face { font-family:"Aeonik"; src:url("../fonts/Aeonik-Regular.woff2") format("woff2"); font-weight:400; font-display:swap; }
@font-face { font-family:"Aeonik"; src:url("../fonts/Aeonik-Bold.woff2") format("woff2");    font-weight:700; font-display:swap; }
*/

:root {
  /* Brand palette — sampled from the live site */
  --navy:        #1e2845;
  --navy-deep:   #161e35;
  --yellow:      #f8d849;
  --blue:        #70aae8;
  --blue-soft:   #8dbcee;
  --cream:       #f2efec;
  --white:       #ffffff;
  --grey:        #69727d;
  --grey-line:   #d8dce2;

  --font: "Aeonik", "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: 24px;

  --radius-btn: 6px;
  --shadow-card: 0 14px 40px rgba(22, 30, 53, .14);

  --section-y: clamp(56px, 7vw, 104px);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy); color: var(--yellow);
  padding: 12px 20px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

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

/* --- Layout helpers ------------------------------------------------------- */
.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--navy  { background: var(--navy);  color: var(--white); }
.section--blue  { background: var(--blue);  color: var(--navy); }
.section--yellow{ background: var(--yellow);color: var(--navy); }
.section--cream { background: var(--cream); }

.grid-2 {
  display: grid; gap: clamp(32px, 5vw, 72px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
}

.lede { font-size: clamp(16px, 1.6vw, 18px); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  padding: 13px 26px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease,
              border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--navy   { background: var(--navy); color: var(--yellow); }
.btn--navy:hover { background: var(--navy-deep); box-shadow: var(--shadow-card); }

.btn--white  { background: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--yellow); }

.btn--outline-navy {
  background: transparent; color: var(--navy);
  border-color: var(--navy); border-radius: 50px;
  padding: 17px 46px; font-size: 16px;
}
.btn--outline-navy:hover { background: var(--navy); color: var(--yellow); }

.btn--outline-white {
  background: transparent; color: var(--white); border-color: var(--white);
}
.btn--outline-white:hover { background: var(--white); color: var(--navy); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 60;
  background: transparent;
}
.site-header--solid { position: relative; background: var(--blue); }

.header-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 104px;
  width: min(100% - 40px, 1320px); margin-inline: auto;
}
.brand { flex: none; display: block; }
.brand img { width: 84px; height: 84px; border-radius: 50%; }

.nav { margin-left: auto; }
.nav ul {
  display: flex; align-items: center; gap: clamp(16px, 2vw, 30px);
  list-style: none; margin: 0; padding: 0;
}
.nav a {
  text-decoration: none;
  font-size: 15px; font-weight: 700;
  color: var(--white);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav a:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.nav a[aria-current="page"] { color: var(--yellow); border-bottom-color: var(--yellow); }

.socials { display: flex; align-items: center; gap: 16px; margin-left: 6px; }
.socials a { color: var(--white); display: grid; place-items: center; transition: color .18s ease, transform .18s ease; }
.socials a:hover { color: var(--yellow); transform: translateY(-2px); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }

/* Mobile toggle */
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; padding: 10px; cursor: pointer; color: var(--white);
}
.nav-toggle svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

@media (max-width: 980px) {
  .header-inner { min-height: 88px; }
  .brand img { width: 68px; height: 68px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy);
    margin: 0;
    display: none;
    box-shadow: var(--shadow-card);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 16px; }
  .nav a {
    display: block; padding: 14px 28px; border-bottom: 0;
    border-left: 3px solid transparent; font-size: 16px;
  }
  .nav a:hover, .nav a[aria-current="page"] { border-bottom: 0; border-left-color: var(--yellow); }
  .socials { margin-left: 16px; }
}
@media (max-width: 480px) {
  .socials { display: none; }
}

/* ==========================================================================
   Home hero — background video
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--navy);
  text-align: center;
  padding: 150px 0 90px;
}
.hero__video {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  background: var(--navy);

  /* The subtitles were cropped out of the video file itself during encoding,
     so no CSS zoom is needed. --hero-zoom is here purely for framing: raise it
     slightly if you ever want a tighter shot. */
  --hero-zoom: 1;
}
.hero__video video {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;                          /* fills the hero at any aspect */
  object-position: center 42%;                /* favour faces over pavement */
  transform: translate(-50%, -50%) scale(var(--hero-zoom));
  border: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(22,30,53,.55) 0%, rgba(22,30,53,.25) 45%, rgba(22,30,53,.7) 100%);
}
.hero__content { position: relative; z-index: 2; }
.hero__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--yellow); margin: 0 0 14px;
}
.hero__title {
  font-size: clamp(38px, 6.4vw, 78px);
  color: var(--yellow);
  margin: 0 0 30px;
  line-height: 1.02;
  text-shadow: 0 3px 26px rgba(0,0,0,.35);
}
.hero__title span { display: block; }

/* ==========================================================================
   Inner page hero
   ========================================================================== */
.page-hero {
  position: relative;
  padding: clamp(70px, 9vw, 120px) 0 clamp(96px, 11vw, 150px);
  text-align: center;
  color: var(--white);
  /* CSS gradient first so the band still reads correctly if the PNG is missing */
  background:
    url("../img/header-gradient.png") center / cover no-repeat,
    linear-gradient(105deg, var(--navy) 0%, #24345c 42%, #3f6bab 74%, var(--blue) 100%);
  overflow: hidden;
}
/* First content section after a page hero sits closer to the curve */
.page-hero + .section { padding-top: clamp(34px, 4vw, 56px); }
.page-hero__title {
  font-size: clamp(34px, 5.2vw, 62px);
  margin: 0 0 22px;
  letter-spacing: .005em;
}
.page-hero p { max-width: 720px; margin-inline: auto; opacity: .95; }
/* white curve at the bottom, mirroring the Elementor shape divider */
.page-hero__curve {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2;
  width: 100%; height: clamp(48px, 6vw, 90px); display: block;
}
.page-hero__curve path { fill: var(--white); }

/* ==========================================================================
   Blue "blob" heading — the light-blue organic shape from the live site
   ========================================================================== */
.blob {
  position: relative;
  display: grid; place-items: center;
  min-height: clamp(230px, 26vw, 330px);
  padding: 40px clamp(24px, 5vw, 60px);
  isolation: isolate;
}
.blob::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue);
  border-radius: 58% 42% 46% 54% / 52% 48% 52% 48%;
}
.blob h2 {
  margin: 0; text-align: center;
  font-size: clamp(30px, 3.6vw, 48px);
  color: var(--navy);
  letter-spacing: .01em;
}
.blob--on-navy h2 { color: var(--navy); }

/* ==========================================================================
   Home sections
   ========================================================================== */
.who p { font-size: clamp(15px, 1.5vw, 17px); }

.check-us .arrow {
  width: 128px; margin-top: 22px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
}

/* Responsive video embeds */
.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden;
  background: #000; box-shadow: var(--shadow-card);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-grid {
  display: grid; gap: clamp(18px, 2.4vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 42px;
}

/* WHAT WE DO list */
.do-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px 44px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.do-list li { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 17px; }
.do-list .dot {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: var(--navy);
  display: grid; place-items: center;
}
.do-list .dot svg { width: 17px; height: 17px; fill: currentColor; }

/* Podcast */
.podcast { text-align: center; }
.podcast__mic { width: min(280px, 70%); margin: 0 auto 6px; }
.podcast h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
.podcast p { max-width: 640px; margin-inline: auto; }

/* ==========================================================================
   Programs page
   ========================================================================== */
/* Band holding the jump links — symmetric padding so the pills sit centred */
.prog-nav-band { padding-block: clamp(38px, 4.6vw, 64px); }

.prog-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 0;                       /* no bottom margin: it would collapse out of the band */
  padding: 0; list-style: none;
}
.prog-nav a {
  display: block; text-decoration: none;
  font-size: 12.5px; font-weight: 700; letter-spacing: .05em;
  padding: 10px 17px; border-radius: 50px;
  background: var(--cream); color: var(--navy);
  border: 1.5px solid var(--grey-line);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.prog-nav a:hover { background: var(--navy); color: var(--yellow); border-color: var(--navy); }

.program {
  padding-block: clamp(46px, 5.5vw, 78px);
  scroll-margin-top: 110px;
}
.program--navy { background: var(--navy); color: var(--white); }
.program--navy h2 { color: var(--yellow); }
.program h2 { font-size: clamp(24px, 2.8vw, 36px); letter-spacing: .03em; margin-bottom: 20px; }
.program img { border-radius: 12px; box-shadow: var(--shadow-card); }
.program--flip .grid-2 > :first-child { order: 2; }
@media (max-width: 720px) {
  .program--flip .grid-2 > :first-child { order: 0; }
}

.quote-block {
  font-style: italic; font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75; color: var(--navy);
  border-left: 4px solid var(--yellow); padding-left: 26px; margin: 0;
}
.quote-block cite { display: block; font-style: normal; font-weight: 700; margin-top: 14px; font-size: 15px; }
.rounded-photo { border-radius: 14px; box-shadow: var(--shadow-card); }

/* Shape-masked cut-outs (transparent WebP). No radius or box-shadow — both are
   rectangular and would draw a box around an organic shape. A soft drop-shadow
   follows the alpha channel instead. */
.cutout {
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 10px 22px rgba(22, 30, 53, .16));
}

/* ==========================================================================
   Services page — accordion
   ========================================================================== */
.accordion { max-width: 900px; margin-inline: auto; }
.accordion details {
  border: 1.5px solid var(--grey-line);
  border-radius: 10px;
  margin-bottom: 14px;
  background: var(--white);
  overflow: hidden;
}
.accordion details[open] { border-color: var(--blue); box-shadow: 0 8px 26px rgba(30,40,69,.08); }
.accordion summary {
  cursor: pointer; list-style: none;
  padding: 20px 56px 20px 24px;
  font-weight: 700; font-size: clamp(16px, 1.8vw, 19px);
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: 24px; top: 50%;
  width: 11px; height: 11px; margin-top: -7px;
  border-right: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy);
  transform: rotate(45deg); transition: transform .22s ease;
}
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.accordion summary:hover { background: var(--cream); }
.accordion .acc-body { padding: 0 24px 24px; }
.accordion .acc-body p { font-size: 15.5px; }

.resource-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 16px; }
.resource-list li {
  padding: 16px 18px; border-radius: 8px; background: var(--cream);
  font-size: 15px; line-height: 1.6;
}
.resource-list strong { display: block; margin-bottom: 3px; }
.resource-list a { color: #1d5fa8; word-break: break-word; }

/* ==========================================================================
   Team page
   ========================================================================== */
.team-grid {
  display: grid; gap: clamp(20px, 2.6vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.flip { perspective: 1400px; }
.flip__inner {
  position: relative; width: 100%; min-height: 430px;
  transform-style: preserve-3d; transition: transform .65s cubic-bezier(.4,.2,.2,1);
  border-radius: 14px;
}
.flip:hover .flip__inner,
.flip:focus-within .flip__inner,
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }

.flip__face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.flip__front {
  background: var(--navy) center / cover no-repeat;
  justify-content: flex-end;
  box-shadow: var(--shadow-card);
}
.flip__front .caption {
  width: 100%;
  background: linear-gradient(180deg, rgba(22,30,53,0) 0%, rgba(22,30,53,.92) 62%);
  color: var(--white); padding: 60px 20px 22px; text-align: center;
  min-height: 108px; display: flex; flex-direction: column; justify-content: flex-end;
}
.flip__front .caption strong { display: block; font-size: 18px; }
.flip__front .caption span { font-size: 13.5px; color: var(--yellow); }

.flip__back {
  background: var(--navy); color: var(--white);
  transform: rotateY(180deg);
  padding: 24px; overflow-y: auto;
}
.flip__back h3 { color: var(--yellow); font-size: 18px; margin-bottom: 4px; }
.flip__back .role { font-size: 13px; color: var(--blue); margin: 0 0 12px; font-weight: 700; }
.flip__back p { font-size: 13.2px; line-height: 1.6; }

.flip-hint { text-align: center; font-weight: 700; color: var(--grey); margin-bottom: 34px; }

.partner-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: center; justify-items: center;
}
.partner-grid a, .partner-grid div {
  display: grid; place-items: center; padding: 16px;
  width: 100%; min-height: 130px;
  background: var(--white); border-radius: 12px;
  border: 1px solid var(--grey-line);
  transition: transform .2s ease, box-shadow .2s ease;
}
.partner-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.partner-grid img { max-height: 96px; width: auto; object-fit: contain; }

/* ==========================================================================
   Support page
   ========================================================================== */
.support-card {
  background: var(--white); border-radius: 14px; padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--grey-line);
}
.needs-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 34px; }
.needs-list li { break-inside: avoid; padding: 6px 0 6px 22px; position: relative; font-size: 15.5px; }
.needs-list li::before { content: "•"; position: absolute; left: 4px; color: var(--blue); font-weight: 700; }
@media (max-width: 620px) { .needs-list { columns: 1; } }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid {
  display: grid; gap: clamp(28px, 4vw, 56px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}
.info-block { margin-bottom: 30px; }
.info-block h3 {
  font-size: 13px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px;
}
.info-block p, .info-block address { font-style: normal; margin: 0; font-size: 16.5px; line-height: 1.6; }
.info-block a { color: var(--navy); }

.map-embed {
  width: 100%; aspect-ratio: 16 / 10; border: 0;
  border-radius: 14px; box-shadow: var(--shadow-card); margin-top: 8px;
}

/* Forms */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; margin-bottom: 6px; color: var(--grey);
}
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--navy);
  padding: 12px 14px; background: var(--white);
  border: 1.5px solid var(--grey-line); border-radius: 8px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(112,170,232,.25);
}

/* Newsletter strip (underline style, matching the live site) */
.newsletter { text-align: left; }
.newsletter h2 { font-size: clamp(22px, 2.4vw, 30px); }
.newsletter p { max-width: 560px; }
.newsletter form {
  display: flex; flex-wrap: wrap; gap: 22px 30px; align-items: flex-end;
  margin-top: 34px;
}
.newsletter .nl-field { flex: 1 1 220px; }
.newsletter .nl-field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--navy);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--navy);
  padding: 10px 2px;
}
.newsletter .nl-field input::placeholder { color: rgba(30,40,69,.7); }
.newsletter .nl-field input:focus { outline: 0; border-bottom-width: 3px; }
.newsletter .btn { flex: none; }

.form-note { font-size: 13.5px; margin-top: 16px; }

/* Honeypot — off-screen, never shown, never announced. Bots fill it, people don't. */
.hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.form-status {
  font-weight: 700; font-size: 15px; margin-top: 14px;
  flex-basis: 100%;                 /* claim its own row inside the newsletter flex row */
}
.form-status:empty { display: none; }
/* Dark enough to clear 4.5:1 on white, cream AND the light blue newsletter
   strip (5.3:1 and 5.0:1 there respectively) */
.form-status.is-ok { color: #0a3a20; }
.form-status.is-error { color: #6b1119; }
.form-status a { color: inherit; }

/* On the navy volunteer/dark strips the status needs lighter tones */
.section--navy .form-status.is-ok { color: #8fe0b4; }
.section--navy .form-status.is-error { color: #ff9ba3; }

button[type="submit"][disabled] { opacity: .6; cursor: progress; transform: none; }

/* Volunteer strip */
.volunteer { text-align: center; padding-block: clamp(38px, 4.5vw, 58px); }
.volunteer h2 { font-size: clamp(22px, 2.4vw, 30px); color: var(--white); }
.volunteer p { max-width: 640px; margin-inline: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--yellow); color: var(--navy); padding: 20px 0; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
}
.site-footer p { margin: 0; font-size: 14.5px; font-weight: 500; }
.site-footer .socials a { color: var(--navy); }
.site-footer .socials a:hover { color: var(--white); }

/* ==========================================================================
   Motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
