:root {
  --bg: #f4efe9;
  --surface: #fffdf9;
  --surface-strong: #f1e9df;
  --text: #1c1f22;
  --muted: #5a5a5a;
  --accent: #b77842;
  --accent-dark: #8a5a35;
  --navy: #1b2b39;
  --shadow: 0 22px 45px rgba(19, 18, 18, 0.12);
  --radius: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  /* guard against sideways scroll without breaking the sticky header
     (overflow-x: hidden would turn body into a scroll container) */
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Keep anchored sections clear of the sticky header on every device */
section[id],
main[id] {
  scroll-margin-top: 96px;
}

.section {
  padding: 110px 0;
}

.alt-section {
  background: var(--surface-strong);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.15rem, 6vw, 5.2rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.45rem, 2.2vw, 2.3rem);
  margin-bottom: 0.8rem;
}

p {
  margin-top: 0;
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(249, 244, 237, 0.96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(28, 30, 30, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 56px;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.25s ease;
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
  transform: translateY(-1px);
}

.brand-text {
  display: grid;
  gap: 0.24rem;
  line-height: 1;
  padding-left: 0.95rem;
  border-left: 1px solid rgba(183, 123, 75, 0.35);
}

.brand-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--navy);
  white-space: nowrap;
}

.brand-tag {
  font-family: "Inter", sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--navy);
  font-weight: 600;
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(29,42,55,0.14);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.7rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 900px;
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #131d27 0%, var(--navy) 48%, #27415a 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(219, 181, 122, 0.18), transparent 40%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  align-items: center;
  min-height: 760px;
  padding: 80px 0 100px;
  color: white;
}

.hero-copy {
  max-width: 720px;
}

.hero-copy .eyebrow,
.hero-copy .lead,
.hero-copy .hero-meta {
  color: rgba(255,255,255,0.9);
}

.hero-copy h1,
.hero-copy h2,
.hero-copy h3 {
  color: white;
}

.lead {
  max-width: 600px;
  font-size: 1.12rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.96rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 18px 32px rgba(143, 93, 53, 0.22);
}

.button-secondary {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
  color: white;
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 1rem;
}

.hero-card {
  max-width: 350px;
  justify-self: end;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.24);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  color: white;
  box-shadow: var(--shadow);
}

.card-badge {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-card .theme {
  font-size: 1.2rem;
  color: #f4d9a5;
  font-weight: 600;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.65rem;
  color: rgba(255,255,255,0.9);
}

.card-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 1.5rem 0;
}

.about-wrap {
  display: block;
}

.about-copy {
  max-width: 920px;
}

.feature-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-list strong {
  display: block;
  color: var(--navy);
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.mission-quote {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.4rem;
  border-left: 4px solid var(--accent);
  background: rgba(183, 120, 66, 0.08);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--navy);
}

.section-heading {
  max-width: 620px;
  margin-bottom: 2.5rem;
}

.narrow {
  max-width: 540px;
}

.ministry-tabs {
  display: grid;
  gap: 1.5rem;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tab-button {
  padding: 0.8rem 1.1rem;
  border: 1px solid rgba(27,35,38,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: transparent;
  color: white;
  box-shadow: 0 12px 26px rgba(138, 90, 53, 0.2);
}

.tab-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(27,35,38,0.08);
  padding: 2rem 1.6rem;
  box-shadow: 0 16px 32px rgba(28,22,18,0.04);
}

.programme-wrap {
  display: grid;
  gap: 1.5rem;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
}

.giving-wrap {
  display: grid;
  gap: 1.5rem;
}

.giving-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 2rem;
}

.bank-card {
  background: var(--surface);
  border: 1px solid rgba(27,35,38,0.08);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(40,30,20,0.05);
  padding: 2rem 1.5rem;
}

.bank-card p {
  margin-bottom: 0.6rem;
}

.info-card {
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(27,35,38,0.08);
  box-shadow: 0 14px 30px rgba(40,30,20,0.05);
}

.icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(183, 123, 75, 0.1);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.2rem;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 16px 32px rgba(28, 22, 18, 0.08);
  background: var(--surface-strong);
}

.prayer-wrap {
  display: grid;
  gap: 1.5rem;
}

.prayer-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(27,35,38,0.08);
  box-shadow: 0 20px 34px rgba(28, 22, 18, 0.06);
}

.prayer-form {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.prayer-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--navy);
}

.prayer-form input,
.prayer-form textarea {
  width: 100%;
  border: 1px solid rgba(29,42,55,0.14);
  border-radius: 12px;
  background: white;
  padding: 0.9rem 1rem;
  color: var(--text);
}

.prayer-form input:focus,
.prayer-form textarea:focus {
  outline: 2px solid rgba(183,123,75,0.2);
  border-color: rgba(183,123,75,0.45);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.6rem;
  border: 1px solid rgba(27,35,38,0.08);
  box-shadow: 0 20px 34px rgba(28, 22, 18, 0.06);
}

.contact-form {
  display: grid;
  gap: 1.2rem;
  background: var(--surface);
  padding: 1.8rem;
  border-radius: var(--radius);
  border: 1px solid rgba(27,35,38,0.08);
  box-shadow: 0 20px 34px rgba(28, 22, 18, 0.06);
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--navy);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(29,42,55,0.14);
  border-radius: 12px;
  background: white;
  padding: 0.9rem 1rem;
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(183,123,75,0.2);
  border-color: rgba(183,123,75,0.45);
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.site-footer {
  background: #171d24;
  color: rgba(255,255,255,0.75);
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.2rem;
}

.footer-links a {
  display: inline-block;
  padding: 0.3rem 0;
}

/* ==========================================================================
   Responsive layout
   1100 = small laptops | 900 = tablets in portrait & below
   700 = large phones   | 560 = phones          | 400 = small phones
   The programme / giving / gallery grids are fluid (auto-fit), so tablets get
   2-3 columns instead of collapsing straight to a single column.
   ========================================================================== */

@media (max-width: 1100px) {
  .nav-wrap {
    gap: 0.75rem;
  }

  .site-nav {
    gap: 1.1rem;
    font-size: 0.95rem;
  }

  .brand-name {
    font-size: 1.22rem;
  }
}

/* ---------- Tablets (iPad portrait, iPad mini, Android tablets) ---------- */
@media (max-width: 900px) {
  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    padding: 0.55rem;
    background: #fffdf9;
    border: 1px solid rgba(27, 35, 38, 0.08);
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(19, 18, 18, 0.18);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 1.02rem;
    color: var(--navy);
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(183, 123, 75, 0.1);
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 2.25rem;
    padding: 64px 0 72px;
  }

  .hero-card {
    justify-self: stretch;
    max-width: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section {
    padding: 88px 0;
  }

  .section-heading {
    margin-bottom: 2rem;
  }

  /* 16px minimum stops iOS Safari from zooming when a field gets focus */
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

/* ---------- Large phones / small tablets in portrait -------------------- */
@media (max-width: 700px) {
  .section {
    padding: 72px 0;
  }

  .hero-inner {
    padding: 48px 0 60px;
    gap: 1.8rem;
  }

  .lead {
    font-size: 1.05rem;
    margin-bottom: 1.6rem;
  }

  .hero-meta {
    font-size: 0.95rem;
  }

  .hero-card,
  .prayer-box,
  .contact-form,
  .contact-card,
  .bank-card,
  .info-card,
  .tab-panel {
    padding: 1.5rem 1.25rem;
  }

  .button {
    padding: 0.85rem 1.3rem;
  }

  .footer-wrap {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ---------- Phones ------------------------------------------------------ */
@media (max-width: 560px) {
  .container {
    width: min(var(--container), calc(100% - 1.5rem));
  }

  .tab-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab-button {
    padding: 0.8rem 0.9rem;
    font-size: 0.92rem;
  }

  .hero-actions {
    gap: 0.75rem;
  }

  .mission-quote {
    padding: 1rem 1.1rem;
  }

  /* Photo wall: two neat columns on phones (one huge image per row looked wrong) */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-logo {
    height: 46px;
  }

  .brand-text {
    padding-left: 0.7rem;
    gap: 0.2rem;
  }

  .brand-name {
    font-size: 1.06rem;
  }

  .brand-tag {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
  }
}

/* ---------- Small phones (iPhone SE and similar) ------------------------ */
@media (max-width: 400px) {
  .hero-actions .button {
    width: 100%;
  }

  .hero-inner {
    padding: 40px 0 52px;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand-logo {
    height: 40px;
  }

  .brand-text {
    padding-left: 0.6rem;
    gap: 0.16rem;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .brand-tag {
    font-size: 0.53rem;
    letter-spacing: 0.16em;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
    padding: 0.6rem;
  }
}

/* ---------- Respect reduced-motion preferences -------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
