/* ==========================================================================
   Higher Ground Women's Recovery Residence — hgwrr.org
   Static rebuild by ONNA Web Design (2026). Same look as the former
   WordPress/Astra/Elementor site, without the page builder.
   Units: rem for type and layout spacing, em for padding that should scale
   with its own text (buttons), px for borders/shadows.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Raleway"; src: url("/fonts/raleway-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("/fonts/raleway-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/source-sans-pro-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/source-sans-pro-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/source-sans-pro-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/source-sans-pro-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Design tokens ---------- */
:root {
  /* Brand colors from the original theme */
  --teal: #2a9d8f;          /* original brand teal (decorative use only) */
  --teal-dark: #1f7f74;     /* darkened so white button text / links pass 4.5:1 */
  --teal-darker: #18665d;   /* hover */
  --cream: #fff7c0;         /* active nav item */
  --pink: #fa7c92;          /* links on dark photo backgrounds */
  --crimson: #b2364b;       /* bottom footer bar */
  --ink: #212121;           /* headings */
  --text: #373737;          /* body text */
  --white: #ffffff;
  --page-bg: #fafeff;       /* very light blue tint, as on the old site */
  --line: #e3e8ea;

  --font-head: "Raleway", sans-serif;
  --font-body: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;

  --wrap: 80rem;            /* 1280px content width */
  --gutter: 1.25rem;
  --section-y: 5rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 1.25rem;
}
h1 { font-size: 3.4rem; line-height: 1.2; }
h2 { font-size: 2.6rem; line-height: 1.3; }
h3 { font-size: 2rem;   line-height: 1.4; }
h4 { font-size: 1.25rem; line-height: 1.4; }
p, ul, ol { margin: 0 0 1.25rem; }
a { color: var(--teal-dark); }
/* Body-text links are underlined: the teal is under 3:1 against the gray body text */
.prose a:not(.btn), .intro-card a:not(.btn) { text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--teal-darker); }
:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 2px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(52rem + 2 * var(--gutter)); }
/* Readable line length sitewide: long paragraphs and lists stop at 52rem (about 100 characters per line).
   In centered sections the text block is centered but the text itself stays left-aligned. */
.section .wrap > p, .prose > p, .prose > ul, .prose > ol, .footer-cta p { max-width: 52rem; }
.section .wrap:not(.prose) > p, .footer-cta p { margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.section { padding: var(--section-y) 0; }
.section-flush-top { padding-top: 0; }  /* section that continues the one above it */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--white); color: var(--ink); padding: 0.75rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--teal-dark);
  padding: 0.75em 1.25em;
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn:hover, .btn:focus-visible { background: var(--teal-darker); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.kicker {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.75rem;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 5.625rem;
}
.logo img { width: 12.5rem; height: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: center; }
.main-nav a, .submenu-toggle {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  padding: 0 1rem;
  line-height: 5rem;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--cream); }
.has-submenu { position: relative; display: flex; align-items: center; }
.has-submenu > a { padding-right: 0.25rem; }
.submenu-toggle {
  background: none; border: 0; cursor: pointer; padding: 0 0.75rem 0 0.25rem; line-height: 1;
}
.submenu-toggle svg { width: 0.75rem; height: 0.75rem; transition: transform 0.2s; }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 15rem;
  background: var(--text); padding: 0.5rem 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: none;
}
.submenu.open, .has-submenu:hover .submenu, .has-submenu:focus-within .submenu { display: block; }
.submenu a { line-height: 1.4; padding: 0.7rem 1.25rem; font-weight: 600; text-transform: none; }
.menu-toggle { display: none; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: 42.5rem;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 7rem 0 9rem;
  color: var(--white);
  overflow: hidden;
}
.hero-media, .band-media { position: absolute; inset: 0; z-index: -2; }
.hero-media picture, .band-media picture { display: block; height: 100%; }
.hero-media img, .band-media img { width: 100%; height: 100%; object-fit: cover; }
/* Home hero: show more of the house by moving the photo up within the frame */
.hero-media img { object-position: center 75%; }
.hero::after, .page-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(0, 0, 0, 0.35);
}
.hero, .page-band { isolation: isolate; }
.hero h1 { color: var(--white); margin-bottom: 1.75rem; }

/* ---------- Inner page title band ---------- */
.page-band {
  position: relative;
  min-height: 25rem;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 6.5rem 0 3rem;
}
.page-band::after { background: rgba(0, 0, 0, 0.45); }
.page-band h1 { color: var(--white); margin: 0; }
/* Title band extras: accent line + breadcrumb trail */
.band-rule {
  display: block; width: 4.5rem; height: 3px; margin: 1.1rem auto 1rem;
  background: var(--cream); border-radius: 2px;
}
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0;
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--white);
}
.breadcrumb li + li::before { content: "\203A"; margin: 0 0.65rem; color: var(--cream); font-weight: 700; }
.breadcrumb a { color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.5); }
.breadcrumb a:hover, .breadcrumb a:focus-visible { color: var(--cream); border-bottom-color: var(--cream); }
.breadcrumb [aria-current="page"] { color: var(--cream); }

/* ---------- Home: intro card overlapping the hero ---------- */
.intro { margin-top: -6.25rem; position: relative; z-index: 2; }
.intro-card {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--white);
  border: 1px solid var(--line);
}
.intro-text { padding: 3.125rem; }
.intro-text h2 { font-size: 2.6rem; }
.intro-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 26rem; }

/* ---------- Home: steps (photo with overlapping text panel) ---------- */
.step-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 3rem 0; }
.step-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.step-card-body {
  position: relative; margin: -3.5rem 1.25rem 0;
  background: var(--white); padding: 1.75rem 1.5rem 1.5rem;
  border-top: 4px solid var(--teal-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.step-card-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; }
.step-card-head .step-num { flex: none; width: 3.1rem; height: 3.1rem; margin: 0; font-size: 1.45rem; }
.step-card-head .kicker { margin: 0 0 0.15rem; }
.step-card-head h3 { font-size: 1.3rem; margin: 0; }
.step-card p { font-size: 0.95rem; }
.step-card a:not(.btn) { text-decoration: underline; text-underline-offset: 0.15em; }

/* ---------- Content (inner pages) ---------- */
.prose h2 { margin-top: 0; }
.prose h3, .prose h4 { margin-top: 2rem; }
.prose li { margin-bottom: 0.4rem; }
.policy h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.policy > h2:first-child { margin-top: 0; }
.policy h3 { font-size: 1.35rem; margin-top: 2rem; }
.policy h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
/* What to Bring: numbered checklist */
.bring-list { list-style: none; counter-reset: bring; padding: 0; margin: 1.75rem 0; }
.bring-list li {
  counter-increment: bring; position: relative;
  padding: 0.9rem 1rem 0.9rem 3.75rem; margin: 0 0 0.6rem;
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal-dark);
  font-size: 1.05rem;
}
.bring-list li::before {
  content: counter(bring); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-dark); color: var(--white); font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
}
.bring-note { font-weight: 600; }
.print-link { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.prose .effective { font-size: 0.95rem; }

/* Events */
.event { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2.5rem; align-items: start; }
.event-img { border: 0.5rem solid var(--white); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }

/* Become Our Guest: numbered steps as alternating photo/text rows */
.guest-steps { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 4rem; }
.guest-step { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.guest-step:nth-child(even) .guest-step-photo { order: 2; }
.guest-step-photo img { width: 100%; aspect-ratio: 600 / 464; object-fit: cover; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; margin-bottom: 1rem; border-radius: 50%;
  background: var(--teal-dark); color: var(--white);
  font-family: var(--font-head); font-weight: 600; font-size: 1.75rem; line-height: 1;
}
.guest-step-text .kicker { margin-bottom: 0.25rem; }
.guest-step-text h3 { margin-bottom: 1rem; }
.guest-ready { margin-top: 4.5rem; }
.guest-ready p { margin-bottom: 1.5rem; }

/* Contact */
.contact-list { list-style: none; padding: 0; font-size: 1.1rem; }
.contact-list li { margin-bottom: 0.5rem; }

/* Meet the Board */
.founder { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 1.5rem; align-items: start; }
.founder img { border: 1px solid var(--line); }
.founder .kicker { margin-bottom: 0.25rem; }
.board-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 1.5rem; }
.member img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 1rem; }
.member h3 { font-size: 1.15rem; text-align: center; margin-bottom: 0.75rem; }
.member p { font-size: 0.95rem; }

/* Read-more dialogs (founder, board members) */
.bio-dialog {
  width: min(48rem, calc(100vw - 2rem));
  max-height: calc(100vh - 4rem);
  border: 0; padding: 2.5rem; overflow-y: auto;
  color: var(--text);
}
.bio-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.bio-dialog h2 { font-size: 1.8rem; padding-right: 2.5rem; }
.dialog-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2.75rem; height: 2.75rem;
  background: none; border: 0; cursor: pointer;
  font-size: 2rem; line-height: 1; color: var(--ink);
}

/* Gallery */
.gallery { columns: 4 15rem; column-gap: 1.25rem; }
.gallery a { display: block; margin-bottom: 1.25rem; break-inside: avoid; overflow: hidden; }
.gallery img { width: 100%; transition: transform 0.4s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); }
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.9); }
.lightbox figure { margin: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: 3.5rem 4rem; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; background: rgba(0, 0, 0, 0.4); color: var(--white); border: 0; cursor: pointer;
  width: 3rem; height: 3rem; font-size: 1.75rem; line-height: 1;
}
.lightbox .lb-close { top: 0.75rem; right: 0.75rem; }
.lightbox .lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }

/* ---------- Footer ---------- */
.footer-cta {
  position: relative;
  padding: 7.5rem 0;
  color: var(--white);
  text-align: center;
  background-color: #2b3326;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/images/footer-bg.webp");
  background-size: cover;
  background-position: center bottom;
}
/* Footer photo waits until it is near the viewport (see main.js) so it doesn't compete with the hero */
.footer-cta.bg-defer { background-image: none !important; }
.footer-cta h2 { color: var(--white); }
.footer-cta p { margin-bottom: 2rem; }
.footer-cta a:not(.btn) { color: var(--pink); font-weight: 700; text-transform: uppercase; }
.footer-cta a:not(.btn):hover { color: var(--white); }
.footer-bar { background: var(--crimson); color: var(--white); text-align: center; padding: 1.5rem 0; }
.footer-contact {
  font-style: normal; font-size: 1.1rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.75rem;
  padding-bottom: 0.9rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.footer-contact a { text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; font-size: 1rem; }
.footer-links li + li::before { content: "|"; margin: 0 0.6rem; }
.footer-bar a { color: var(--white); text-decoration: none; }
.footer-bar a:hover { text-decoration: underline; color: var(--white); }
/* Copyright on its own charcoal strip below the red bar */
.footer-copy { background: #262626; color: var(--white); text-align: center; padding: 0.85rem 0; }
.footer-copy a { color: var(--white); }
.footer-copy a:hover, .footer-copy a:focus-visible { color: var(--cream); }
.copyright { font-size: 0.9rem; margin: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 921px) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 2.25rem; }
  h2, .intro-text h2 { font-size: 1.875rem; }
  h3 { font-size: 1.5625rem; }
  :root { --section-y: 3.75rem; }

  /* Mobile menu */
  .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; background: none; border: 0; cursor: pointer; color: var(--white);
  }
  .menu-toggle svg { width: 1.75rem; height: 1.75rem; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--text);
    max-height: calc(100vh - 5.625rem); overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { display: block; padding: 0.5rem 0; }
  .main-nav a { line-height: 1.4; padding: 0.8rem 1.5rem; }
  .has-submenu { flex-wrap: wrap; }
  .has-submenu > a { flex: 1; }
  .submenu-toggle { padding: 0.8rem 1.5rem; }
  .submenu { position: static; width: 100%; box-shadow: none; background: rgba(0, 0, 0, 0.15); }
  /* On phones the submenu opens only with its button, not on hover/focus */
  .submenu:not(.open), .has-submenu:hover .submenu:not(.open), .has-submenu:focus-within .submenu:not(.open) { display: none; }
  .submenu.open { display: block; }
  .submenu a { padding-left: 2.5rem; }

  .hero { min-height: 30rem; padding: 7rem 0 8rem; }
  .page-band { min-height: 17.5rem; }
  .intro-card { grid-template-columns: 1fr; }
  .intro-photo img { min-height: 0; aspect-ratio: 3 / 2; }
  .step-cards { grid-template-columns: 1fr; max-width: 37.5rem; margin: 3rem auto; row-gap: 3rem; }
  .event { grid-template-columns: 1fr; }
  .guest-step { grid-template-columns: 1fr; gap: 1.5rem; max-width: 37.5rem; margin: 0 auto; }
  .guest-step:nth-child(even) .guest-step-photo { order: 0; }
  .event-img { max-width: 25rem; margin: 0 auto; }
  .founder { grid-template-columns: 1fr 1fr; }
  .founder-text { grid-column: 1 / -1; }
  .board-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Phone ---------- */
@media (max-width: 544px) {
  h1 { font-size: 2rem; }
  h2, .intro-text h2 { font-size: 1.625rem; }
  h3 { font-size: 1.375rem; }
  .hero { min-height: 25rem; }
  .intro { margin-top: -3rem; }
  .intro-text { padding: 2rem 1.5rem; }
  .board-grid { grid-template-columns: 1fr; max-width: 23.5rem; margin: 0 auto; }
  .footer-cta { padding: 4.5rem 0; background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/images/footer-bg-mobile.webp"); }
  .footer-links { font-size: 1rem; flex-direction: column; gap: 0.35rem; }
  .footer-links li + li::before { content: none; }
  .bio-dialog { padding: 2rem 1.25rem; }
  .lightbox figure { padding: 3.5rem 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
