/* ===== Variables ===== */
:root {
  --color-bg: #f8f6f2;
  --color-bg-hero: #1a2f2a;
  --color-text: #2c2c2c;
  --color-text-muted: #5a5a5a;
  --color-accent: #b8860b;
  --color-accent-soft: #d4a84b;
  --color-card: #fff;
  --color-border: #e8e4dc;
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
  --site-header-height: calc(var(--space-sm) * 2 + 44px + 2px);
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
* {
  -webkit-tap-highlight-color: transparent;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
html {
  scroll-behavior: smooth;
  background: var(--color-bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: #f8f6f2;
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(55vw, 260px);
}
.nav {
  justify-self: center;
  display: flex;
  gap: var(--space-md);
}
.nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s;
}
.nav a:hover { color: var(--color-accent); }
.nav a.active,
.logo.active { color: var(--color-accent); font-weight: 600; }
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-backdrop {
  display: none;
}
.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-toggle:hover {
  background: var(--color-accent);
  color: #fff;
}
.site-header--nav-open .nav-toggle {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 20px;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.site-header--nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header--nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-header--nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.lang-toggle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-toggle:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ===== SPA views ===== */
.view {
  display: none;
  opacity: 0;
}
.view.active {
  display: block;
  opacity: 0;
}
.view.active.view-fade-in {
  opacity: 1;
  transition: opacity 0.45s ease;
}
.view.active.view-fade-out {
  opacity: 0;
  transition: opacity 0.28s ease;
}

.view-page .page-wrap {
  min-height: 100vh;
  padding: calc(80px + var(--space-xl)) 0 var(--space-xl);
}
.view-page .page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--color-bg-hero);
  margin: 0 0 var(--space-lg);
  text-align: center;
}
.view-page .about-page {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.view-page .section-intro {
  margin-bottom: var(--space-lg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(80px + var(--space-xl)) var(--space-lg) var(--space-xl);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg-hero);
  background-image:
    linear-gradient(180deg, rgba(15, 31, 27, 0.34) 0%, rgba(15, 31, 27, 0.46) 100%),
    url("Images/crossonahill-bw.jpg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
.hero-content {
  position: relative;
  text-align: center;
}
.hero-title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.hero-name {
  display: block;
  font-size: clamp(2.7rem, 6vw, 4.25rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
}
.hero-tagline {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--color-accent-soft);
  margin-top: 0.35em;
  letter-spacing: 0.04em;
}
.hero-sub {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
}
.hero-cta { margin-top: var(--space-md); }
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  background: var(--color-accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(184, 134, 11, 0.35);
}

/* ===== Container ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== Section common ===== */
.services,
.about,
.ministries {
  padding: var(--space-xl) 0;
}
.who-we-are {
  padding: clamp(4.5rem, 10vw, 6.75rem) 0;
  min-height: clamp(380px, 48vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  background-color: #0f1f1b;
  background-image:
    linear-gradient(180deg, rgba(15, 31, 27, 0.78) 0%, rgba(15, 31, 27, 0.88) 100%),
    url("Images/IMG_9170.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.who-we-are .container {
  position: relative;
}
.who-we-are .section-title {
  color: #fff;
}
.who-we-are .about-lead {
  color: #fff;
}
.who-we-are .about-content p {
  color: rgba(255, 255, 255, 0.9);
}
.who-we-are .about-faith a {
  color: var(--color-accent-soft);
  border-bottom-color: rgba(212, 168, 75, 0.6);
}
.who-we-are .about-faith a:hover {
  color: #fff;
  border-bottom-color: #fff;
}
.where-we-are {
  padding: var(--space-xl) 0;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
}
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin: 0 auto var(--space-lg);
}
.join-card {
  text-align: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
}
.join-card h3 {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-bg-hero);
}
.join-card p {
  margin: 0;
  color: var(--color-text-muted);
}
.join-card a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
}
.join-card a:hover {
  color: var(--color-bg-hero);
  border-bottom-color: var(--color-bg-hero);
}
.giving-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
}
.who-copy {
  max-width: 760px;
}
.map-embed {
  max-width: 900px;
  margin: var(--space-lg) auto 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--color-bg-hero);
  margin: 0 0 var(--space-sm);
  text-align: center;
}
.section-intro {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
  font-size: 1.1rem;
}

/* ===== Services ===== */
.services {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
}
.service-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}
.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s, transform 0.25s;
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.service-main { border-top: 4px solid var(--color-bg-hero); }
.service-mandarin { border-top: 4px solid var(--color-accent); }
.service-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}
.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-bg-hero);
  margin: 0 0 var(--space-xs);
}
.service-card .lang {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text-muted);
}
.service-card p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.98rem;
}
.service-time {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ===== About ===== */
.about-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.about-lead {
  font-size: 1.2rem;
  color: var(--color-bg-hero);
  font-weight: 500;
  margin: 0 0 var(--space-sm);
}
.about-content p {
  color: var(--color-text-muted);
}
.about-content p:last-of-type { margin: 0; }
.about-faith {
  margin-top: var(--space-md);
  font-size: 1rem;
}
.about-faith a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
  transition: color 0.2s, border-color 0.2s;
}
.about-faith a:hover {
  color: var(--color-bg-hero);
  border-bottom-color: var(--color-bg-hero);
}

/* ===== Ministries ===== */
.ministries {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}
.ministry-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 720px;
  margin: 0 auto;
}
.ministry-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s;
}
.ministry-card:hover { box-shadow: var(--shadow-hover); }
.ministry-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-bg-hero);
  margin: 0 0 var(--space-sm);
}
.ministry-card p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.98rem;
}
.ministry-card p:last-child { margin: 0; }
.ministry-card a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
  transition: color 0.2s, border-color 0.2s;
}
.ministry-card a:hover {
  color: var(--color-bg-hero);
  border-bottom-color: var(--color-bg-hero);
}
.ministry-contact {
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}
.ministry-contact a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
  transition: color 0.2s;
}
.ministry-contact a:hover { color: var(--color-bg-hero); }

/* ===== Icon Loop ===== */
.icon-loop {
  background: #0f1f1b;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  padding: 0.65rem 0;
}
.icon-loop-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 4rem;
  animation: icon-loop-scroll 45s linear infinite;
}
.icon-loop-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}
.icon-loop-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.icon-loop-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}
@keyframes icon-loop-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Footer ===== */
.site-footer {
  padding: 0;
  text-align: center;
  background: #0f1f1b;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}
/* Marquee strip is first child; text block keeps the padded inset the footer used to have */
.site-footer .container {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}
.site-footer .container > p {
  margin: 0;
}
.footer-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.footer-tagline {
  color: var(--color-accent-soft);
}

/* ===== Responsive (end of file: wins cascade over same-specificity rules above) ===== */
@media (max-width: 768px) {
  .site-header {
    padding: var(--space-sm);
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 99;
    left: 0;
    right: 0;
    top: calc(var(--site-header-height) - 1px);
    bottom: 0;
    background: rgba(26, 47, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }
  .site-header--nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    z-index: 101;
  }
  .logo {
    justify-self: auto;
  }
  .nav-toggle {
    display: flex;
  }
  .nav {
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    top: calc(var(--site-header-height) - 1px);
    bottom: auto;
    max-height: min(70vh, 420px);
    justify-self: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-xs) var(--space-md);
    margin: 0;
    background: #f8f6f2;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease;
  }
  .site-header--nav-open .nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav a {
    font-size: 1.05rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav a:last-child {
    border-bottom: none;
  }
  body.nav-open {
    overflow: hidden;
  }
  .hero {
    padding: calc(var(--site-header-height) + var(--space-lg)) var(--space-md) var(--space-lg);
  }
  .hero-content {
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
    overflow-wrap: break-word;
  }
  .hero-name {
    white-space: normal;
    font-size: clamp(1.7rem, 5.5vw + 0.35rem, 2.6rem);
    line-height: 1.15;
  }
  .hero-tagline {
    font-size: clamp(1.05rem, 3.2vw + 0.4rem, 1.55rem);
    margin-top: 0.5em;
    line-height: 1.35;
    padding-inline: var(--space-xs);
  }
  .hero-sub {
    font-size: clamp(1rem, 2.8vw + 0.35rem, 1.2rem);
    margin-bottom: var(--space-md);
    padding-inline: var(--space-xs);
    line-height: 1.5;
  }
  .services {
    padding: var(--space-lg) 0;
  }
}
@media (max-width: 640px) {
  .join-grid {
    grid-template-columns: 1fr;
  }
  .map-embed iframe {
    height: 320px;
  }
  .service-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .nav-backdrop,
  .nav,
  .nav-toggle-bar {
    transition: none;
  }
}
@media (hover: none), (pointer: coarse) {
  .nav a:hover {
    color: var(--color-text-muted);
  }
  .nav-toggle:hover {
    background: transparent;
    color: var(--color-accent);
  }
  .lang-toggle:hover {
    background: transparent;
    color: var(--color-accent);
  }
  .btn-primary:hover {
    background: var(--color-accent);
    transform: none;
    box-shadow: none;
  }
  .who-we-are .about-faith a:hover {
    color: var(--color-accent-soft);
    border-bottom-color: rgba(212, 168, 75, 0.6);
  }
  .join-card a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent-soft);
  }
  .service-card:hover {
    box-shadow: var(--shadow);
    transform: none;
  }
  .about-faith a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent-soft);
  }
  .ministry-card:hover {
    box-shadow: var(--shadow);
  }
  .ministry-contact a:hover {
    color: var(--color-accent);
  }
  .site-header--nav-open .nav-toggle,
  .site-header--nav-open .nav-toggle:hover,
  .nav-toggle[aria-expanded="true"],
  .nav-toggle[aria-expanded="true"]:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
  }
}
@media (prefers-reduced-motion: reduce) {
  .icon-loop-track {
    animation: none;
  }
}
