:root {
  --brand: #3f97b5;
  --brand-dark: #337991;
  --brand-light: #66acc4;
  --ink: #000000;
  --text: #333333;
  --muted: #8c9ca1;
  --line: #bfcfd4;
  --soft: #f6f6f6;
  --white: #ffffff;
  --radius: 0.5rem;
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.14);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus {
  top: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn--primary {
  background: var(--brand);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--brand-dark);
}
.btn--outline-light {
  border-color: var(--white);
  color: var(--white);
}
.btn--outline-light:hover {
  background: var(--white);
  color: var(--ink);
}
.btn--outline {
  border-color: var(--brand);
  color: var(--brand);
}
.btn--outline:hover {
  background: var(--brand);
  color: var(--white);
}
.btn--sm {
  padding: 0.6rem 1.3rem;
  font-size: 0.875rem;
}
.btn:focus-visible,
.chip:focus-visible,
.nav a:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
}

/* Top bar */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 2rem 0;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}
.topbar.is-scrolled {
  background: rgba(17, 24, 27, 0.94);
  padding: 0.85rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.topbar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.topbar__logo img {
  height: 60px;
  width: auto;
  transition: height 0.3s;
}
.topbar.is-scrolled .topbar__logo img {
  height: 48px;
}

.nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.nav__item {
  position: relative;
}
.nav__link {
  display: block;
  color: var(--white);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.nav__link:hover,
.nav__link.is-active {
  background: rgba(255, 255, 255, 0.12);
}
.nav__link--give {
  background: var(--brand);
  font-weight: 600;
  padding-inline: 1.3rem;
}
.nav__link--give:hover {
  background: var(--brand-dark);
}
.sub-toggle {
  display: none;
}
.sub {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.sub a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 0.35rem;
}
.sub a:hover {
  background: var(--soft);
  color: var(--brand);
}
.has-sub:hover .sub,
.has-sub:focus-within .sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  background: #1a2226;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.55) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: 8rem 1.5rem 4rem;
}
.hero__title {
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Feature cards */
.features {
  padding: 5rem 0;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  position: relative;
  min-height: 25em;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: #2b3438 var(--card-img) top center / cover no-repeat;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.78) 100%);
  transition: background 0.3s;
}
.card:hover::before {
  background: linear-gradient(180deg, rgba(63, 151, 181, 0.15) 0%, rgba(0, 0, 0, 0.85) 100%);
}
.card__title {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.card p {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  opacity: 0.95;
}
.card .btn {
  align-self: flex-start;
}

/* Section titles */
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-bottom: 1rem;
}
.section-title--center {
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 0.75rem;
}

/* Ask About Church Info */
.ask {
  background: var(--soft);
  padding: 5rem 0;
  border-top: 1px solid #eceff0;
  border-bottom: 1px solid #eceff0;
}
.ask__inner {
  max-width: 900px;
}
.ask__head {
  text-align: center;
  margin-bottom: 2rem;
}
.ask__lead {
  margin: 0 auto;
  max-width: 620px;
  color: #555;
}
.ask__field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: calc(var(--radius) + 0.25rem);
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ask__field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(63, 151, 181, 0.18);
}
.ask__icon {
  width: 22px;
  height: 22px;
  color: var(--muted);
  flex-shrink: 0;
}
.ask__field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.25rem;
  background: transparent;
  color: var(--ink);
}
.ask__field input::placeholder {
  color: #9aa6aa;
}
.ask__submit[disabled] {
  opacity: 0.7;
  cursor: progress;
}
.ask__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}
.chip {
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.ask__status {
  margin-top: 1.75rem;
}
.ask__status:empty {
  display: none;
}
.notice {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
}
.notice--warn {
  border-left-color: #c98a1b;
}
.notice strong {
  color: var(--ink);
}
.notice p {
  margin: 0.15rem 0 0;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
  margin-top: 3px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.ask__results {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.result {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecee;
}
.result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.result__source {
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.result h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.result p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}
.result__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.result__links a {
  text-decoration: none;
}
.result__links a:hover {
  text-decoration: underline;
}

/* Come Journey With Us */
.journey {
  padding: 6rem 0;
}
.journey__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.journey__intro {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
.journey__text p {
  margin: 0 0 1.25rem;
}
.journey__text .btn {
  margin-top: 0.5rem;
}
.journey__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* You're Invited */
.invited {
  background: var(--brand);
  color: var(--white);
  padding: 5.5rem 0;
}
.invited .section-title {
  color: var(--white);
}
.invited__lead {
  text-align: center;
  font-size: 1.1rem;
  margin: 0 0 3rem;
}
.invited__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.service {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.service h3 {
  font-size: 1.5rem;
}
.service ul {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  flex: 1;
}
.service li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e6ecee;
}
.service li strong {
  color: var(--brand-dark);
  white-space: nowrap;
}
.service .btn {
  align-self: flex-start;
}

/* What's Coming Up */
.upcoming {
  padding: 5rem 0;
}
.upcoming__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Contact bar */
.contact {
  background: #11181b;
  color: var(--white);
  padding: 3.5rem 0;
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.contact__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  color: #d9e4e7;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 1rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.contact__item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.contact__item svg {
  width: 30px;
  height: 30px;
  color: var(--brand-light);
  margin-bottom: 0.35rem;
}
.contact__label {
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

/* Footer */
.footer {
  background: #0b1012;
  color: var(--muted);
  padding: 2rem 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.social {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}
.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  transition: background 0.2s;
}
.social a:hover {
  background: var(--brand);
}
.social svg {
  width: 20px;
  height: 20px;
}
.footer__copy {
  margin: 0;
  font-size: 0.85rem;
}

/* Tablet */
@media (max-width: 1100px) {
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 2;
  }
  .nav {
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 18, 0.98);
    padding: 6.5rem 1.5rem 2rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
  }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-width: 520px;
    margin: 0 auto;
  }
  .nav__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav__link {
    flex: 1;
    font-size: 1.15rem;
    padding: 0.9rem 0.25rem;
  }
  .nav__link:hover,
  .nav__link.is-active {
    background: none;
    color: var(--brand-light);
  }
  .nav__link--give {
    flex: none;
    width: 100%;
    margin: 1rem 0;
    text-align: center;
    padding: 0.9rem;
    background: var(--brand);
  }
  .nav__item:last-child {
    border-bottom: 0;
  }
  .sub-toggle {
    display: block;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
  }
  .sub-toggle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: translate(-50%, -70%) rotate(45deg);
    transition: transform 0.2s;
  }
  .sub-toggle[aria-expanded="true"]::before {
    transform: translate(-50%, -30%) rotate(-135deg);
  }
  .sub,
  .has-sub:hover .sub,
  .has-sub:focus-within .sub {
    position: static;
    width: 100%;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0.75rem 0.75rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .sub.is-open {
    display: block;
  }
  .sub a {
    color: #c9d6da;
    font-size: 1rem;
  }
  .sub a:hover {
    background: none;
    color: var(--brand-light);
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features__grid .card:last-child {
    grid-column: 1 / -1;
  }
  .contact__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .journey__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .journey__media {
    order: -1;
  }
  .invited__grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .topbar {
    padding: 1rem 0;
  }
  .topbar__logo img {
    height: 46px;
  }
  .topbar.is-scrolled .topbar__logo img {
    height: 40px;
  }
  .features,
  .ask,
  .upcoming {
    padding: 3.5rem 0;
  }
  .journey,
  .invited {
    padding: 4rem 0;
  }
  .features__grid {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 21em;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  .ask__field {
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
  }
  .ask__submit {
    width: 100%;
  }
  .service {
    padding: 1.75rem;
  }
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

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