.groups-page {
  background: var(--paper-deep);
}

.groups-page.dialog-open {
  overflow: hidden;
}

.groups-hero {
  min-height: 820px;
  height: 100svh;
  position: relative;
  display: flex;
  align-items: end;
  overflow: hidden;
  background: #0c1517;
  color: var(--white);
}

.groups-hero-media,
.groups-hero-shade,
.groups-hero-lines {
  position: absolute;
  inset: 0;
}

.groups-hero-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.groups-hero-shot {
  background-position: center;
  background-size: cover;
  filter: saturate(0.78) contrast(1.04);
}

.groups-hero-shot + .groups-hero-shot {
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.groups-hero-shot-one {
  background-image: url("assets/bstl-donate-volunteers.webp");
  background-position: center 39%;
}

.groups-hero-shot-two {
  background-image: url("assets/bstl-donate-worship.webp");
  background-position: center 32%;
}

.groups-hero-shot-three {
  background-image: url("assets/bstl-donate-media.webp");
  background-position: center 43%;
}

.groups-hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 14, 16, 0.96) 0%, rgba(7, 14, 16, 0.83) 38%, rgba(7, 14, 16, 0.4) 73%, rgba(7, 14, 16, 0.28) 100%),
    linear-gradient(0deg, rgba(7, 14, 16, 0.93) 0%, rgba(7, 14, 16, 0.2) 57%, rgba(7, 14, 16, 0.35) 100%);
}

.groups-hero-lines {
  background:
    linear-gradient(90deg, transparent 33.27%, rgba(255, 255, 255, 0.1) 33.33%, transparent 33.4%, transparent 66.6%, rgba(255, 255, 255, 0.1) 66.66%, transparent 66.73%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 100% 25%;
  pointer-events: none;
}

.groups-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 80px;
  padding-top: 145px;
  padding-bottom: clamp(68px, 8vh, 100px);
}

.groups-hero-copy {
  max-width: 1050px;
}

.groups-hero h1 {
  margin-top: 26px;
  font-size: clamp(4.9rem, 8vw, 9rem);
  line-height: 0.82;
}

.groups-hero h1 em {
  color: var(--gold-light);
}

.groups-hero-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin-top: 34px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.75;
}

.groups-hero-copy .button {
  margin-top: 34px;
}

.groups-hero-stats {
  min-width: 230px;
  display: grid;
  gap: 20px;
  flex: 0 0 auto;
}

.groups-hero-stats > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 17px;
  align-items: end;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.groups-hero-stats strong {
  color: var(--coral);
  font: 400 4.8rem/0.74 var(--serif);
  letter-spacing: -0.08em;
}

.groups-hero-stats span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.59rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.groups-paths {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.groups-paths-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.groups-paths a {
  min-height: 170px;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  gap: 7px 14px;
  align-content: center;
  padding: 30px;
  border-left: 1px solid var(--line);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.groups-paths a:last-child {
  border-right: 1px solid var(--line);
}

.groups-paths a:hover {
  z-index: 1;
  background: var(--ink-soft);
  color: var(--white);
  transform: translateY(-8px);
}

.groups-paths a > span {
  grid-row: 1 / 3;
  color: #a98655;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.groups-paths strong {
  align-self: end;
  font: 400 1.55rem/1.1 var(--serif);
  letter-spacing: -0.035em;
}

.groups-paths small {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.45;
}

.groups-paths a:hover small {
  color: rgba(255, 255, 255, 0.6);
}

.groups-directory {
  background: var(--paper-deep);
}

.groups-directory-heading {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 68px;
}

.groups-directory-heading h2 {
  max-width: 900px;
  margin-top: 24px;
  font-size: clamp(4.3rem, 6.8vw, 7.3rem);
  line-height: 0.88;
}

.groups-directory-heading h2 em {
  color: #9b7950;
}

.groups-directory-heading > p {
  max-width: 430px;
  justify-self: end;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.groups-filter {
  position: sticky;
  z-index: 18;
  top: 84px;
  display: flex;
  gap: 8px;
  margin-bottom: 19px;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(240, 235, 234, 0.92);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}

.groups-filter::-webkit-scrollbar {
  display: none;
}

.groups-filter button {
  min-height: 46px;
  flex: 0 0 auto;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.groups-filter button:hover {
  border-color: rgba(84, 106, 114, 0.36);
}

.groups-filter button.is-active {
  background: var(--ink-soft);
  color: var(--white);
}

.groups-results {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: right;
  text-transform: uppercase;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  gap: 18px;
}

.group-card {
  grid-column: span 4;
  min-height: 410px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.group-card-featured {
  grid-column: span 8;
  min-height: 465px;
}

.group-card[hidden] {
  display: none;
}

.group-card::before {
  content: "";
  width: 320px;
  height: 320px;
  position: absolute;
  z-index: -1;
  right: -210px;
  top: -210px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.1;
  transition: transform 0.45s ease;
}

.group-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(145deg, transparent 55%, rgba(252, 130, 108, 0.12));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.group-card:hover {
  z-index: 2;
  border-color: transparent;
  box-shadow: 0 30px 65px rgba(44, 63, 68, 0.17);
  transform: translateY(-8px);
}

.group-card:hover::before {
  transform: scale(1.45);
}

.group-card:hover::after {
  opacity: 1;
}

.group-card-ink {
  border-color: var(--ink-soft);
  background: var(--ink-soft);
  color: var(--white);
}

.group-card-gold {
  border-color: #c6a16c;
  background: #c6a16c;
  color: #19282c;
}

.group-card-coral {
  border-color: var(--gold-light);
  background: var(--gold-light);
  color: #2f474e;
}

.group-card-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.group-card-top span:first-child {
  opacity: 0.75;
}

.group-card-mark {
  position: absolute;
  right: 24px;
  top: 58px;
  color: currentColor;
  font: 400 clamp(5.2rem, 7.5vw, 8.5rem)/1 var(--serif);
  letter-spacing: -0.09em;
  opacity: 0.08;
  pointer-events: none;
}

.group-card-content {
  display: grid;
  gap: 17px;
  margin-top: auto;
  padding-top: 92px;
}

.group-card-content strong {
  max-width: 640px;
  font: 400 clamp(2.35rem, 3.5vw, 4.1rem)/0.95 var(--serif);
  letter-spacing: -0.055em;
}

.group-card-content > span {
  max-width: 520px;
  font-size: 0.75rem;
  line-height: 1.65;
  opacity: 0.74;
}

.group-card-content small {
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.5;
  opacity: 0.62;
  text-transform: uppercase;
}

.group-card-action {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid currentColor;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.65;
  text-transform: uppercase;
}

.group-card-action::after {
  content: "+";
  margin-left: auto;
  font: 400 1.45rem/1 var(--serif);
  transition: transform 0.25s ease;
}

.group-card:hover .group-card-action::after {
  transform: rotate(90deg);
}

.groups-cta {
  position: relative;
  overflow: hidden;
  background: var(--ink-soft);
  color: var(--white);
}

.groups-cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.groups-cta h2 {
  margin-top: 25px;
  font-size: clamp(4.4rem, 7.4vw, 8rem);
  line-height: 0.85;
}

.groups-cta h2 em {
  color: var(--gold-light);
}

.groups-cta-inner > p:not(.eyebrow) {
  max-width: 590px;
  margin: 31px auto 0;
  color: rgba(255, 255, 255, 0.63);
  font-size: 0.82rem;
  line-height: 1.75;
}

.groups-cta .button {
  margin-top: 34px;
}

.groups-cta-orbit {
  width: min(75vw, 940px);
  aspect-ratio: 1;
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 90px rgba(255, 255, 255, 0.018), 0 0 0 180px rgba(255, 255, 255, 0.012);
  transform: translate(-50%, -50%);
}

.group-dialog {
  width: min(1180px, calc(100% - 42px));
  height: min(900px, calc(100svh - 42px));
  max-width: none;
  max-height: min(900px, calc(100svh - 42px));
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--white);
  color: var(--ink-soft);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.38);
}

.group-dialog::backdrop {
  background: rgba(5, 12, 14, 0.82);
  backdrop-filter: blur(9px);
}

.group-dialog-layout {
  display: grid;
  grid-template-columns: 0.36fr 0.64fr;
  height: 100%;
  min-height: 0;
}

.group-dialog-close {
  width: 48px;
  height: 48px;
  position: absolute;
  z-index: 3;
  right: 21px;
  top: 21px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(84, 106, 114, 0.24);
  border-radius: 50%;
  background: rgba(251, 250, 248, 0.88);
  color: var(--ink-soft);
  cursor: pointer;
  backdrop-filter: blur(9px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.group-dialog-close:hover {
  background: var(--gold-light);
  transform: rotate(8deg);
}

.group-dialog-close span {
  width: 17px;
  height: 1px;
  position: absolute;
  background: currentColor;
}

.group-dialog-close span:first-child { transform: rotate(45deg); }
.group-dialog-close span:last-child { transform: rotate(-45deg); }

.group-dialog-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 58px 44px 46px;
  overflow: hidden;
  background: var(--ink-soft);
  color: var(--white);
}

.group-dialog-aside::before {
  content: "";
  width: 430px;
  height: 430px;
  position: absolute;
  right: -260px;
  top: -250px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(255, 255, 255, 0.018), 0 0 0 128px rgba(255, 255, 255, 0.012);
}

.group-dialog-aside > p {
  position: relative;
  color: var(--gold-light);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.group-dialog-aside > strong {
  margin-top: 50px;
  color: rgba(255, 255, 255, 0.11);
  font: 400 clamp(8rem, 14vw, 13rem)/0.75 var(--serif);
  letter-spacing: -0.12em;
}

.group-dialog-aside dl {
  display: grid;
  gap: 0;
  margin: auto 0 0;
}

.group-dialog-aside dl > div {
  display: grid;
  gap: 7px;
  padding: 19px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.group-dialog-aside dt {
  color: var(--gold-light);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.group-dialog-aside dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.71rem;
  line-height: 1.5;
}

.group-dialog-content {
  min-width: 0;
  min-height: 0;
  padding: 70px clamp(38px, 6vw, 80px) 62px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.group-dialog-content h2 {
  max-width: 700px;
  margin-top: 20px;
  font-size: clamp(3.5rem, 5.8vw, 6.4rem);
  line-height: 0.87;
}

.group-dialog-lead {
  max-width: 690px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.75;
}

.group-dialog-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 38px;
  margin-top: 42px;
  border-top: 1px solid var(--line);
}

.group-dialog-sections section {
  padding: 28px 0 25px;
  border-bottom: 1px solid var(--line);
}

.group-dialog-sections h3 {
  margin-bottom: 13px;
  font: 700 0.62rem var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.group-dialog-sections p,
.group-dialog-sections li {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

.group-dialog-sections ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.group-dialog blockquote {
  margin: 34px 0 0;
  padding: 25px 0 0 28px;
  border-left: 3px solid var(--gold);
  color: var(--ink-soft);
  font: 400 1.42rem/1.35 var(--serif);
}

.group-dialog blockquote:empty {
  display: none;
}

.group-dialog-content > .button {
  margin-top: 34px;
}

@media (max-width: 1100px) {
  .groups-hero-inner {
    align-items: start;
    flex-direction: column;
    justify-content: end;
    gap: 45px;
  }

  .groups-hero-stats {
    width: min(100%, 530px);
    grid-template-columns: 1fr 1fr;
  }

  .groups-paths-grid {
    grid-template-columns: 1fr 1fr;
  }

  .groups-paths a:nth-child(2) {
    border-right: 1px solid var(--line);
  }

  .groups-paths a:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .group-card {
    grid-column: span 6;
  }

  .group-card-featured {
    grid-column: span 12;
  }

  .group-dialog-layout {
    grid-template-columns: 0.32fr 0.68fr;
  }

  .group-dialog-aside {
    padding-inline: 30px;
  }
}

@media (max-width: 780px) {
  .groups-hero {
    min-height: 760px;
  }

  .groups-hero-media {
    grid-template-columns: 1fr 1fr;
  }

  .groups-hero-shot-three {
    display: none;
  }

  .groups-hero-shade {
    background:
      linear-gradient(0deg, rgba(7, 14, 16, 0.96) 5%, rgba(7, 14, 16, 0.51) 63%, rgba(7, 14, 16, 0.42) 100%),
      linear-gradient(90deg, rgba(7, 14, 16, 0.7), rgba(7, 14, 16, 0.18));
  }

  .groups-hero-inner {
    padding-top: 112px;
    padding-bottom: 48px;
  }

  .groups-hero h1 {
    font-size: clamp(3.45rem, 14vw, 5.1rem);
    line-height: 0.9;
  }

  .groups-hero-copy > p:not(.eyebrow) {
    margin-top: 24px;
    font-size: 0.82rem;
  }

  .groups-hero-stats {
    gap: 14px;
  }

  .groups-hero-stats > div {
    grid-template-columns: 62px 1fr;
  }

  .groups-hero-stats strong {
    font-size: 3.5rem;
  }

  .groups-paths-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .groups-paths a,
  .groups-paths a:nth-child(2),
  .groups-paths a:last-child {
    min-height: 114px;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .groups-paths a:hover {
    transform: none;
  }

  .groups-directory-heading {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-bottom: 44px;
  }

  .groups-directory-heading h2 {
    font-size: clamp(3.4rem, 13vw, 5rem);
  }

  .groups-directory-heading > p {
    justify-self: start;
  }

  .groups-filter {
    top: 72px;
    width: calc(100% + 36px);
    margin-left: -18px;
    padding-inline: 18px;
    border-right: 0;
    border-left: 0;
  }

  .groups-results {
    text-align: left;
  }

  .groups-grid {
    grid-template-columns: 1fr;
  }

  .group-card,
  .group-card-featured {
    grid-column: auto;
    min-height: 360px;
    padding: 24px;
  }

  .group-card:hover {
    transform: none;
  }

  .group-card-content {
    padding-top: 70px;
  }

  .group-card-content strong {
    font-size: clamp(2.5rem, 11vw, 3.6rem);
  }

  .groups-cta h2 {
    font-size: clamp(3.5rem, 14vw, 5.4rem);
  }

  .group-dialog {
    width: 100%;
    height: 100svh;
    max-height: 100svh;
    margin: 0;
  }

  .group-dialog-layout {
    height: 100%;
    min-height: 0;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .group-dialog-close {
    position: fixed;
    right: 16px;
    top: 16px;
  }

  .group-dialog-aside {
    min-height: 330px;
    padding: 42px 25px 30px;
  }

  .group-dialog-aside > strong {
    margin-top: 40px;
    font-size: 8rem;
  }

  .group-dialog-aside dl {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: auto;
  }

  .group-dialog-aside dl > div {
    align-content: start;
  }

  .group-dialog-content {
    padding: 48px 24px 60px;
    overflow: visible;
  }

  .group-dialog-content h2 {
    font-size: clamp(3.3rem, 14vw, 5rem);
  }

  .group-dialog-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .groups-hero {
    min-height: 720px;
  }

  .groups-hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .groups-hero-stats > div {
    grid-template-columns: 55px 1fr;
    padding-top: 13px;
  }

  .groups-hero-stats strong {
    font-size: 3rem;
  }

  .group-card {
    min-height: 340px;
  }

  .group-dialog-aside dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .group-dialog-aside {
    min-height: 485px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .group-card,
  .group-card::before,
  .group-card::after,
  .group-card-action::after,
  .groups-paths a {
    transition: none;
  }
}
