@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100..125,600..800&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --friends-cream: #f6f4eb;
  --friends-paper: #fffef8;
  --friends-stone: #e8e6db;
  --friends-line: #c9c5b8;
  --friends-forest: #2c4231;
  --friends-forest-deep: #2a3d2d;
  --friends-charcoal: #2a2a2d;
  --friends-clay: #7a4f38;
  --friends-sage: #b6d9b3;
  --friends-muted: #514e47;
  --display-font: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body-font: "PT Serif", Georgia, serif;
  color: var(--friends-charcoal);
  background: var(--friends-cream);
  font-family: var(--body-font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgb(232 230 219 / 56%) 1px, transparent 1px),
    var(--friends-cream);
  background-size: min(8vw, 88px) 100%;
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: var(--friends-cream);
  background: var(--friends-charcoal);
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  width: min(1380px, calc(100% - 64px));
  min-height: 124px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid var(--friends-line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(250px, 20vw, 292px);
  height: auto;
  object-fit: contain;
}

.brand-section {
  padding-left: 22px;
  border-left: 1px solid var(--friends-line);
  color: var(--friends-clay);
  font-family: var(--display-font);
  font-size: 11px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.privacy-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--friends-forest);
  font-family: var(--display-font);
  font-size: 10px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.privacy-label span {
  position: relative;
  width: 9px;
  height: 9px;
  background: var(--friends-forest);
}

.privacy-label span::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgb(44 66 49 / 38%);
  content: "";
}

main {
  width: min(1380px, calc(100% - 64px));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: 408px;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  margin: 34px 0 0;
  overflow: hidden;
  color: var(--friends-stone);
  background: var(--friends-forest-deep);
}

.hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 4.5vw, 64px) clamp(36px, 5.5vw, 78px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--friends-clay);
  font-family: var(--display-font);
  font-size: 10px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--friends-sage);
}

h1,
h2,
h3,
.resource-copy strong {
  font-family: var(--display-font);
  font-stretch: 112%;
  font-style: normal;
  font-weight: 750;
  letter-spacing: -0.048em;
  line-height: 0.95;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 4vw, 60px);
  text-wrap: balance;
}

h1 em {
  color: var(--friends-sage);
  font-family: var(--body-font);
  font-size: 0.86em;
  font-weight: 400;
  letter-spacing: -0.03em;
  text-transform: none;
}

.hero-description {
  max-width: 650px;
  margin: clamp(14px, 1.5vw, 22px) 0 0;
  color: var(--friends-stone);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.5;
}

.hero-mark {
  position: relative;
  display: grid;
  min-height: 100%;
  place-items: center;
  overflow: hidden;
  border-left: 1px solid rgb(232 230 219 / 20%);
  background:
    linear-gradient(rgb(42 42 45 / 92%), rgb(42 42 45 / 92%)),
    repeating-linear-gradient(-45deg, transparent 0 18px, rgb(246 244 235 / 9%) 18px 19px);
}

.hero-mark::before,
.hero-mark::after {
  position: absolute;
  width: 1px;
  height: 180%;
  background: rgb(232 230 219 / 13%);
  content: "";
  transform: rotate(38deg);
}

.hero-mark::before {
  left: 18%;
}

.hero-mark::after {
  right: 18%;
}

.hero-mark img {
  z-index: 1;
  width: clamp(72px, 7vw, 96px);
  height: auto;
}

.hero-mark span,
.hero-mark small {
  position: absolute;
  z-index: 1;
  color: var(--friends-stone);
  font-family: var(--display-font);
  font-size: 9px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-mark span {
  top: 24px;
  left: 24px;
}

.hero-mark small {
  right: 24px;
  bottom: 24px;
}

.directory-tools {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  align-items: end;
  gap: 28px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  margin-bottom: 64px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--friends-line);
  background: rgb(246 244 235 / 94%);
  backdrop-filter: blur(14px);
}

.search-control > span:first-child {
  display: block;
  margin-bottom: 9px;
  color: var(--friends-clay);
  font-family: var(--display-font);
  font-size: 10px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.search-field {
  position: relative;
  display: flex;
  height: 54px;
  align-items: center;
  border: 1px solid var(--friends-charcoal);
  background: var(--friends-paper);
}

.search-field:focus-within {
  outline: 2px solid var(--friends-sage);
  outline-offset: 2px;
}

.search-field svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-left: 17px;
  fill: var(--friends-forest);
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 56px 0 12px;
  border: 0;
  outline: 0;
  color: var(--friends-charcoal);
  background: transparent;
  font-size: 15px;
}

.search-field input::placeholder {
  color: #77736a;
}

.search-field kbd {
  position: absolute;
  right: 14px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--friends-line);
  color: var(--friends-muted);
  background: var(--friends-stone);
  font-family: var(--display-font);
  font-size: 11px;
}

.section-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.section-filter,
#clear-search {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--friends-line);
  border-radius: 0;
  color: var(--friends-muted);
  background: transparent;
  font-family: var(--display-font);
  font-size: 10px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.section-filter:hover,
.section-filter:focus-visible,
#clear-search:hover,
#clear-search:focus-visible {
  border-color: var(--friends-forest);
  color: var(--friends-cream);
  background: var(--friends-forest);
  outline: none;
}

.section-filter[aria-pressed="true"] {
  border-color: var(--friends-charcoal);
  color: var(--friends-cream);
  background: var(--friends-charcoal);
}

.pinned-resources {
  margin: 0 0 76px;
  padding: clamp(28px, 4vw, 46px);
  color: var(--friends-charcoal);
  background: var(--friends-sage);
}

.pinned-resources .resource-card {
  border-color: rgb(42 61 45 / 34%);
}

.section-block {
  display: grid;
  gap: clamp(40px, 4vw, 64px);
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
  padding: 0 0 clamp(64px, 7vw, 96px);
}

.section-block + .section-block {
  padding-top: clamp(44px, 5vw, 72px);
  border-top: 1px solid var(--friends-line);
}

.section-heading {
  align-self: start;
}

.section-heading h2 {
  margin: 0;
  color: var(--friends-forest-deep);
  font-size: clamp(32px, 3vw, 40px);
  line-height: 0.98;
  text-wrap: balance;
}

.section-heading > p,
.compact-heading > p {
  max-width: 34ch;
  margin: 18px 0 0;
  color: var(--friends-muted);
  font-size: 14px;
  line-height: 1.6;
}

.section-index {
  display: block;
  margin-bottom: 24px;
  color: var(--friends-clay);
  font-family: var(--display-font);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.compact-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.compact-heading h2 {
  font-size: clamp(30px, 4vw, 52px);
}

.compact-heading > p {
  margin: 0 0 4px;
}

.resource-grid {
  display: grid;
  align-items: stretch;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-content-embedded {
  min-width: 0;
  align-self: start;
}

.files-frame {
  display: block;
  width: 100%;
  min-height: 430px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.section-content {
  min-width: 0;
}

.resource-groups {
  display: grid;
  gap: 30px;
}

.resource-group + .resource-group {
  padding-top: 30px;
}

.resource-group-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  color: var(--friends-clay);
  font-family: var(--display-font);
  font-size: 10px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.resource-group-title::after {
  height: 1px;
  flex: 1;
  background: var(--friends-line);
  content: "";
}

.resource-card {
  position: relative;
  min-width: 0;
  min-height: 224px;
  border: 1px solid var(--friends-line);
  background: var(--friends-paper);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.resource-card:hover,
.resource-card:focus-within {
  z-index: 1;
  border-color: var(--friends-forest);
  box-shadow: 12px 12px 0 rgb(44 66 49 / 12%);
  transform: translate(-3px, -3px);
}

.resource-link {
  display: flex;
  height: 100%;
  min-height: 224px;
  flex-direction: column;
  padding: 24px;
  text-decoration: none;
}

.resource-link:focus-visible {
  outline: 3px solid var(--friends-forest);
  outline-offset: -4px;
}

.resource-brand {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--friends-line);
  background: var(--friends-paper);
}

.resource-brand img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.resource-brand img[src*="checkr.svg"] {
  width: 36px;
  height: 20px;
}

.resource-brand img[src*="pushpay.svg"] {
  width: 30px;
  height: 30px;
}

.resource-brand[data-resource-id="thermostat-control"] img {
  width: 40px;
  height: 20px;
}

.resource-brand[data-resource-id="efcer"] {
  background: var(--friends-forest);
}

.resource-brand[data-resource-id="efcer"] img {
  width: 30px;
  height: 30px;
}

.resource-brand img[src*="friends-church-f-logo"] {
  width: 24px;
  height: 34px;
  padding: 4px;
  background: var(--friends-forest);
  object-fit: contain;
}

.brand-fallback {
  display: none;
  color: var(--friends-forest);
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.resource-brand.is-fallback img {
  display: none;
}

.resource-brand.is-fallback .brand-fallback {
  display: block;
}

.resource-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 28px;
}

.resource-meta {
  margin-bottom: 8px;
  color: var(--friends-clay);
  font-family: var(--display-font);
  font-size: 9px;
  font-stretch: 108%;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.resource-copy strong {
  max-width: 100%;
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.resource-description {
  display: block;
  max-width: calc(100% - 34px);
  margin-top: 10px;
  color: var(--friends-muted);
  font-size: 13px;
  line-height: 1.45;
}

.external-arrow {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--friends-forest);
  stroke-linecap: square;
  stroke-width: 1.7;
  transition: transform 160ms ease;
}

.resource-card:hover .external-arrow,
.resource-card:focus-within .external-arrow {
  transform: translate(4px, -4px);
}

.pin-button {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 22px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  color: var(--friends-line);
  background: transparent;
  cursor: pointer;
}

.pin-button:hover,
.pin-button:focus-visible {
  border-color: var(--friends-line);
  color: var(--friends-clay);
  outline: none;
}

.pin-button[aria-pressed="true"] {
  color: var(--friends-clay);
}

.pin-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: miter;
  stroke-width: 1.5;
}

.pin-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.empty-state {
  min-height: 420px;
  margin-bottom: 100px;
  padding: clamp(42px, 7vw, 92px);
  color: var(--friends-stone);
  background: var(--friends-charcoal);
}

.empty-state span {
  color: var(--friends-sage);
  font-family: var(--display-font);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.empty-state h2 {
  max-width: 720px;
  margin: 22px 0 18px;
  font-size: clamp(46px, 7vw, 86px);
}

.empty-state p {
  color: var(--friends-stone);
  font-size: 17px;
}

.empty-state #clear-search {
  margin-top: 22px;
  border-color: var(--friends-sage);
  color: var(--friends-charcoal);
  background: var(--friends-sage);
}

footer {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-top: 30px;
  padding: 48px max(32px, calc((100vw - 1380px) / 2));
  color: var(--friends-stone);
  background: var(--friends-charcoal);
}

footer > div {
  display: flex;
  align-items: center;
  gap: 24px;
}

footer img {
  width: 42px;
  height: auto;
}

footer p {
  margin: 0;
  color: #c5c1b6;
  font-size: 13px;
  line-height: 1.6;
}

footer strong {
  color: var(--friends-cream);
  font-family: var(--display-font);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

footer > p {
  max-width: 420px;
  text-align: right;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.55fr);
  }

  .hero-copy {
    padding: 64px 54px;
  }

  .directory-tools {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .section-filters {
    justify-content: flex-start;
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-block {
    gap: 30px;
    grid-template-columns: 1fr;
  }

  .section-heading {
    max-width: 680px;
  }
}

@media (max-width: 820px) {
  .site-header,
  main {
    width: min(100% - 40px, 1380px);
  }

  .site-header {
    min-height: 106px;
  }

  .brand {
    gap: 18px;
  }

  .brand-logo {
    width: clamp(210px, 31vw, 250px);
  }

  .brand-section {
    padding-left: 18px;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 340px;
    padding: 40px 30px;
  }

  .hero-mark {
    min-height: 150px;
    border-top: 1px solid rgb(232 230 219 / 20%);
    border-left: 0;
  }

  .hero-mark img {
    width: 72px;
  }

  .directory-tools {
    position: relative;
    gap: 20px;
    margin-bottom: 52px;
  }

  .section-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .section-filter {
    flex: 0 0 auto;
  }

  .section-block {
    gap: 32px;
    grid-template-columns: 1fr;
  }

  .section-heading > p {
    max-width: 58ch;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  footer > p {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header,
  main {
    width: min(100% - 28px, 1380px);
  }

  .site-header {
    min-height: 92px;
  }

  .brand-logo {
    width: min(48vw, 190px);
  }

  .brand-section {
    display: none;
  }

  .privacy-label {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .hero {
    margin-top: 14px;
  }

  .hero-copy {
    min-height: 320px;
    padding: 36px 24px;
  }

  h1 {
    font-size: clamp(38px, 11vw, 48px);
    letter-spacing: -0.055em;
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-mark {
    min-height: 120px;
  }

  .hero-mark span {
    top: 20px;
    left: 20px;
  }

  .hero-mark small {
    right: 20px;
    bottom: 20px;
  }

  .directory-tools {
    padding-top: 20px;
  }

  .search-field kbd {
    display: none;
  }

  .search-field input {
    padding-right: 14px;
    font-size: 14px;
  }

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

  .resource-card,
  .resource-link {
    min-height: 214px;
  }

  .compact-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pinned-resources {
    margin-right: -14px;
    margin-left: -14px;
    padding: 28px 14px;
  }

  footer {
    min-height: 0;
    padding: 42px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
