:root {
  --navy: #0d3b4d;
  --navy-light: #15566b;
  --deep: #092b3a;
  --gold: #e6b65b;
  --gold-dark: #c49243;
  --cream: #f8f5ee;
  --white: #fff;
  --ink: #18313c;
  --muted: #687980;
  --line: #e5e5df;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(15, 40, 50, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 40, 50, 0.12);
  --shadow-lg: 0 20px 50px rgba(9, 30, 40, 0.22);
  --header-h: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.eyebrow {
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero h1,
.how-it-works h2,
.business-banner h2,
.section-heading h2 {
  font-family: "Playfair Display", serif;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(248, 245, 238, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #eceae3;
}

.header-inner {
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.4px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  font-size: 15px;
  margin-right: 6px;
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

.menu-toggle.open span {
  background: transparent;
}

.menu-toggle.open span::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.open span::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 14px 20px 20px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-menu a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
}

.nav-cta {
  background: var(--navy);
  color: #fff !important;
  padding: 13px 16px !important;
  border-radius: var(--radius-sm);
  text-align: center;
  border-bottom: none !important;
  margin-top: 8px;
}

.install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: #382a0d;
  border: 0;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font: 700 14px "DM Sans";
  cursor: pointer;
  margin-top: 8px;
}

.install-button[hidden] {
  display: none !important;
}

@media (min-width: 860px) {
  .site-header {
    height: 76px;
  }

  .header-inner {
    padding: 0 clamp(24px, 6vw, 94px);
  }

  .menu-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 26px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-menu a {
    font-size: 14px;
    padding: 0;
    border-bottom: 0;
  }

  .nav-cta,
  .install-button {
    padding: 11px 16px !important;
    margin-top: 0;
  }
}

/* ---------- iOS install tip ---------- */

.ios-install-tip {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  background: var(--navy);
  color: #eaf2f3;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 1.4;
  max-width: 420px;
  margin: 0 auto;
}

.ios-install-tip[hidden] {
  display: none !important;
}

.ios-install-tip button {
  margin-left: auto;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--navy);
  color: #fff;
  padding: 44px 20px 40px;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  width: 550px;
  height: 550px;
  border: 1px solid rgba(230, 182, 91, 0.25);
  border-radius: 50%;
  right: -300px;
  top: -300px;
  box-shadow: 0 0 0 52px rgba(230, 182, 91, 0.04), 0 0 0 105px rgba(230, 182, 91, 0.035);
}

.hero-copy {
  max-width: 660px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(32px, 8vw, 63px);
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin: 0;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero-text {
  font-size: 16px;
  line-height: 1.55;
  max-width: 530px;
  color: #d6e0e2;
  margin: 16px 0 0;
}

.search-panel {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 16px;
  max-width: 1050px;
  position: relative;
  z-index: 2;
  margin: 26px auto 0;
  box-shadow: var(--shadow-lg);
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.search-field {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  width: 100%;
  color: var(--gold-dark);
  font-size: 20px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  font: 500 16px "DM Sans";
  color: var(--ink);
}

.location-button {
  background: none;
  border: 0;
  color: var(--navy);
  font: 600 13px "DM Sans";
  cursor: pointer;
  white-space: nowrap;
  padding: 4px 0;
  align-self: flex-end;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
}

.filters .primary-button {
  grid-column: span 2;
}

.filters label {
  border: 1px solid #dedfda;
  border-radius: var(--radius-sm);
  padding: 8px 11px;
}

.filters label span {
  display: block;
  color: #7a888d;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.filters select {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  font: 600 13px "DM Sans";
  color: var(--ink);
  outline: 0;
  margin-top: 2px;
}

.primary-button,
.light-button {
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--gold);
  padding: 14px 19px;
  color: #253640;
  font: 700 14px "DM Sans";
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-button:hover,
.light-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.primary-button span {
  font-size: 18px;
}

@media (min-width: 640px) {
  .filters {
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
  }

  .filters .primary-button {
    grid-column: span 4;
  }
}

@media (min-width: 860px) {
  .hero {
    padding: 70px clamp(24px, 8vw, 128px) 64px;
    min-height: 405px;
  }

  .search-row {
    flex-direction: row;
    align-items: center;
    padding-bottom: 15px;
  }

  .location-button {
    align-self: center;
  }

  .search-panel {
    padding: 18px;
    margin: 42px auto -120px;
  }

  .filters {
    grid-template-columns: repeat(4, 1fr) auto;
  }

  .filters .primary-button {
    grid-column: auto;
    padding: 0 19px;
  }
}

/* ---------- Directory / results ---------- */

.directory {
  padding: 48px 20px 56px;
  max-width: 1500px;
  margin: auto;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-heading h2 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.6px;
  margin: 0;
  color: var(--navy);
}

.result-count {
  color: var(--muted);
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.church-list {
  display: grid;
  gap: 12px;
  order: 2;
}

.church-card {
  background: #fff;
  border: 1px solid #e5e6e0;
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 13px;
  align-items: start;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.church-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.church-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf1ef;
  color: var(--navy);
  font-size: 21px;
}

.church-main h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--navy);
}

.verified-mark {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--gold);
  color: #382a0d;
  font-size: 9px;
  vertical-align: middle;
}

.church-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  color: #37626e;
  background: #edf4f2;
  padding: 4px 8px;
  border-radius: 99px;
}

.tag.gold {
  color: #735316;
  background: #fbf0d5;
}

.card-action {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.distance {
  color: var(--muted);
  font-size: 12px;
}

.details-link {
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.map-card {
  min-height: 220px;
  background: #d9e6df;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  order: 1;
}

.map-pattern {
  position: absolute;
  inset: 0;
  background: linear-gradient(25deg, transparent 46%, #fcf8ed 47% 51%, transparent 52%),
    linear-gradient(-35deg, transparent 45%, #adc9c0 46% 49%, transparent 50%),
    repeating-linear-gradient(110deg, transparent 0 50px, #bed7cd 51px 54px, transparent 55px 120px);
  opacity: 0.9;
}

.map-pin {
  position: absolute;
  background: var(--navy);
  color: var(--gold);
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px #20404a55;
}

.map-pin::first-letter {
  transform: rotate(45deg);
}

.pin-one {
  left: 35%;
  top: 25%;
}

.pin-two {
  right: 25%;
  top: 45%;
  background: #bc8540;
}

.pin-three {
  left: 51%;
  bottom: 22%;
}

.you-are-here {
  position: absolute;
  top: 53%;
  left: 39%;
  font-size: 11px;
  font-weight: 700;
  color: #325967;
}

.you-are-here span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b9cc0;
  border: 2px solid white;
}

.map-copy {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: #fffffff2;
  border-radius: var(--radius-sm);
  padding: 11px;
}

.map-copy strong,
.map-copy small {
  display: block;
}

.map-copy strong {
  font-size: 13px;
  color: var(--navy);
}

.map-copy small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 3px;
}

@media (min-width: 860px) {
  .directory {
    padding: 80px clamp(24px, 8vw, 128px) 70px;
  }

  .section-heading h2 {
    font-size: 34px;
    letter-spacing: -0.9px;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  }

  .church-list {
    order: 1;
  }

  .map-card {
    order: 2;
    min-height: 385px;
  }

  .church-card {
    grid-template-columns: 52px 1fr auto;
    padding: 18px 19px;
    align-items: center;
  }

  .church-icon {
    width: 52px;
    height: 52px;
    font-size: 23px;
  }

  .church-main h3 {
    font-size: 16px;
  }

  .card-action {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-end;
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
    text-align: right;
  }

  .distance {
    display: block;
    font-size: 11px;
    margin-bottom: 10px;
  }
}

/* ---------- How it works ---------- */

.how-it-works {
  text-align: center;
  background: #e8efeb;
  padding: 50px 20px;
}

.how-it-works .eyebrow {
  margin-bottom: 11px;
}

.how-it-works h2 {
  font-size: 26px;
  letter-spacing: -0.6px;
  margin: 0;
  color: var(--navy);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 930px;
  margin: 34px auto 0;
  text-align: left;
}

.steps article {
  position: relative;
  padding-left: 57px;
}

.steps span {
  position: absolute;
  left: 0;
  top: -4px;
  width: 37px;
  height: 37px;
  border: 1px solid var(--gold);
  color: #9a742e;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 12px "DM Sans";
}

.steps h3 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 16px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (min-width: 760px) {
  .how-it-works {
    padding: 70px clamp(24px, 8vw, 128px);
  }

  .how-it-works h2 {
    font-size: 34px;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 43px;
  }
}

/* ---------- Business banner ---------- */

.business-banner {
  background: var(--gold-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 40px 20px;
}

.business-banner .eyebrow {
  color: #fff1cd;
}

.business-banner h2 {
  color: #fff;
  font-size: 24px;
  margin: 0;
}

.business-banner p:not(.eyebrow) {
  max-width: 620px;
  color: #fff9e8;
  line-height: 1.5;
  font-size: 14px;
  margin: 11px 0 0;
}

.light-button {
  background: #fff;
  color: var(--navy);
  padding: 14px 19px;
  white-space: nowrap;
}

@media (min-width: 760px) {
  .business-banner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 53px clamp(24px, 8vw, 128px);
  }

  .business-banner h2 {
    font-size: 31px;
  }
}

/* ---------- Footer ---------- */

footer {
  padding: 28px 20px;
  background: var(--deep);
  color: #d8e5e3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

footer .brand {
  color: #fff;
}

footer p,
footer small {
  font-size: 12px;
  margin: 0;
}

footer small {
  width: 100%;
  color: #9bb2b8;
}

@media (min-width: 760px) {
  footer {
    padding: 34px clamp(24px, 8vw, 128px);
    flex-wrap: nowrap;
    gap: 24px;
  }

  footer small {
    width: auto;
    margin-left: auto;
  }
}
