/* Bethel Children Ministry — public website styles.
   Colours come from Site settings in the admin area (see the <style> block in the page head). */

:root {
  --ink: #1E1630;
  --muted: #40364F;
  --line: #E2DAEE;
  --white: #FFFFFF;
  --head: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(30px, 4vw, 42px); }
h3 { font-size: 26px; }
p { margin: 0; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 12px 18px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(.94); transform: translateY(-1px); }
.btn-lg { min-height: 52px; padding: 12px 30px; }
.btn-accent, .btn-accent:hover { background: var(--accent); color: var(--on-accent); }
.btn-primary, .btn-primary:hover { background: var(--primary); color: var(--on-primary); }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 60px; height: 60px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 22px; }
.brand-tag { font-size: 14px; color: #564D66; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.site-nav a:not(.btn) { padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--ink); border-bottom: 3px solid transparent; }
.site-nav a:not(.btn):hover { color: var(--primary); }
.site-nav a.current { color: var(--primary); font-weight: 700; border-bottom-color: var(--accent); }
.nav-toggle { display: none; align-items: center; gap: 8px; min-height: 46px; padding: 8px 14px; font: inherit; font-weight: 700; color: var(--ink); background: var(--primary-pale); border: 0; border-radius: 12px; cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .site-nav { flex-direction: column; align-items: stretch; width: 100%; padding-bottom: 8px; }
  .site-nav a:not(.btn) { border-bottom: 1px solid var(--line); padding: 14px 4px; }
  .site-nav .btn { margin-top: 10px; }
  .brand img { width: 48px; height: 48px; }
  .brand-name { font-size: 19px; }
  .brand-tag { font-size: 13px; }
  body { font-size: 17px; }
}

/* Hero slideshow */
.hero { position: relative; background: var(--primary-dark); color: #fff; overflow: hidden; }
.hero-slides { display: grid; }
.hero-slide { grid-area: 1 / 1; position: relative; display: flex; align-items: center; min-height: clamp(460px, 70vh, 640px); opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; z-index: 1; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 8, 44, .88) 0%, rgba(20, 8, 44, .68) 45%, rgba(20, 8, 44, .25) 100%); }
.hero-content { position: relative; width: 100%; padding-top: 64px; padding-bottom: 112px; }
.hero-text { max-width: 620px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero h1, .hero-title { font-family: var(--head); font-weight: 700; font-size: clamp(38px, 6vw, 66px); line-height: 1.05; margin: 0; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hero-body { font-size: clamp(18px, 2.2vw, 21px); color: #F1EAFB; }
.hero-verse { font-style: italic; font-size: 17px; color: var(--accent); }
.hero-controls { position: absolute; left: 0; right: 0; bottom: 24px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; }
.hero-btn { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 255, 255, .8); border-radius: 50%; background: rgba(20, 8, 44, .55); color: #fff; cursor: pointer; }
.hero-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.hero-dots { display: flex; align-items: center; gap: 2px; }
.hero-dot { width: 32px; height: 46px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.hero-dot::before { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; background: transparent; transition: background .2s, transform .2s; }
.hero-dot.is-active::before { background: var(--accent); border-color: var(--accent); transform: scale(1.2); }
.hero .icon-play, .hero.is-paused .icon-pause { display: none; }
.hero.is-paused .icon-play { display: block; }

@media (max-width: 760px) {
  .hero-shade { background: linear-gradient(180deg, rgba(20, 8, 44, .55) 0%, rgba(20, 8, 44, .86) 100%); }
  .hero-slide { align-items: flex-end; min-height: 520px; }
  .hero-content { padding-top: 40px; padding-bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slide, .hero-slide.is-active { transition: none; }
  .btn { transition: none; }
}

/* Page banner (About, Contact) */
.page-banner { background: var(--primary); color: var(--on-primary); padding: 64px 0; }
.page-banner .wrap { display: flex; flex-direction: column; gap: 14px; }
.page-banner h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; max-width: 820px; }
.page-banner p { font-size: clamp(18px, 2.2vw, 21px); max-width: 640px; opacity: .92; }
.page-banner .eyebrow { color: var(--accent); }

/* Sections */
.band { padding: clamp(56px, 8vw, 96px) 0; }
.band-tight { padding-bottom: 0; }
.band-pale { background: var(--primary-pale); }
.band-accent { background: var(--accent); color: var(--on-accent); }
.band-primary { background: var(--primary); color: var(--on-primary); padding: 64px 0; }
.eyebrow { font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.band-accent .eyebrow { color: inherit; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); }
.split-text .section-head, .split-narrow .section-head { margin-bottom: 0; }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; }
.split-top { align-items: flex-start; }
.split > * { flex: 1 1 380px; min-width: 0; }
.split-narrow { flex: 1 1 300px; }
.split-text { display: flex; flex-direction: column; gap: 22px; }
.photo { width: 100%; height: 380px; object-fit: cover; border-radius: 24px; }
.photo-tall { height: 460px; border-radius: 32px 120px 32px 32px; }
.text-link { align-self: flex-start; font-weight: 700; padding: 10px 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.cards-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.card { background: var(--white); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.band:not(.band-pale) .card { background: var(--primary-pale); }
.card p { color: var(--muted); }
.card-icon { color: var(--primary); display: inline-flex; }
.card-big { padding: 40px; gap: 16px; }
.card-big h2 { font-size: 34px; }
.card.card-accent { background: var(--accent); color: var(--on-accent); }
.card-accent p, .card-accent .card-icon { color: inherit; }
.card-photo { padding: 0; overflow: hidden; gap: 0; }
.card-photo img { width: 100%; height: 260px; object-fit: cover; }
.card-body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 8px; }
.role { font-weight: 700; color: var(--primary) !important; }

.num { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 24px; }

/* Core values */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.values-grid li { border: 2px solid var(--line); border-radius: 24px; padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.values-rows { margin: 0; padding: 0; list-style: none; flex: 2 1 480px; }
.values-rows li { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.values-rows li:last-child { border-bottom: 0; }
.value-text { display: flex; flex-direction: column; gap: 4px; }
.value-name { font-family: var(--head); font-weight: 700; font-size: 25px; line-height: 1.2; }
.value-note { color: var(--muted); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.gallery img { width: 100%; height: 280px; object-fit: cover; border-radius: 24px; }

/* Mission */
.mission { max-width: 960px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.mission p { font-family: var(--head); font-weight: 600; font-size: clamp(25px, 3.4vw, 38px); line-height: 1.25; }

/* Call to action */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-row h2 { font-size: clamp(28px, 3.6vw, 38px); }
.cta-row p { opacity: .92; margin-top: 6px; }

/* About facts */
.facts { display: flex; flex-wrap: wrap; gap: 16px; }
.fact { flex: 1 1 170px; background: var(--primary-pale); border-radius: 20px; padding: 20px 24px; display: flex; flex-direction: column; color: var(--muted); }
.fact-value { font-family: var(--head); font-weight: 700; font-size: 36px; line-height: 1.1; color: var(--primary); }

/* Contact */
.contact-details h2, .contact-form h2 { font-size: clamp(28px, 3.6vw, 38px); }
.detail { display: flex; gap: 16px; align-items: flex-start; }
.detail > div { display: flex; flex-direction: column; color: var(--muted); }
.detail strong { color: var(--ink); }
.detail a { padding: 4px 0; }
.detail-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--primary-pale); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.detail-icon svg { width: 26px; height: 26px; }
.map { width: 100%; height: 280px; border: 0; border-radius: 24px; }
.contact-form { background: var(--primary-pale); border-radius: 24px; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 110px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.field-row { display: flex; flex-wrap: wrap; gap: 20px; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); width: 100%; min-height: 48px; padding: 12px 16px; border: 2px solid #7C6E94; border-radius: 12px; background: var(--white); }
.field textarea { resize: vertical; }
.field.has-error input, .field.has-error textarea { border-color: #B3261E; }
.error { color: #8C1D18; font-weight: 700; font-size: 16px; }
.contact-form .btn { align-self: flex-start; }
.notice { padding: 14px 18px; border-radius: 12px; font-weight: 700; }
.notice-ok { background: #DDF3E4; color: #0F4D2A; }
.notice-error { background: #FBE2E0; color: #8C1D18; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.steps .card { background: var(--white); }

/* Footer */
.site-footer { background: var(--primary-dark); color: #EBE1F8; font-size: 16px; padding: 56px 0 28px; }
.footer-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 36px 40px; }
.footer-about { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; }
.footer-name { font-family: var(--head); font-weight: 700; font-size: 22px; color: #fff; }
.footer-motto { font-style: italic; color: var(--accent); }
.footer-links { flex: 0 1 220px; display: flex; flex-direction: column; gap: 2px; }
.footer-head { font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-links a { color: #EBE1F8; padding: 7px 0; overflow-wrap: anywhere; }
.footer-links a:hover { color: #fff; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .22); margin-top: 32px; padding-top: 22px; }

/* Video */
.video-band { padding: clamp(56px, 8vw, 96px) 0; }
.video-band .eyebrow { color: var(--accent); }
.video-band .section-head { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }
.video { position: relative; max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: #000; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { text-align: center; margin-top: 18px; }
.video-link a, .video-link a:hover { color: inherit; padding: 10px 0; display: inline-block; }

@media (max-width: 760px) {
  .photo, .photo-tall { height: auto; aspect-ratio: 3 / 2; }
  .photo-tall { border-radius: 24px 72px 24px 24px; }
}

/* Gallery photos with an optional caption */
.gallery figure { position: relative; margin: 0; }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 6px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; }

/* Gallery page */
.section-more { margin-top: 36px; text-align: center; }
.chips-bar { background: var(--white); border-bottom: 1px solid var(--line); padding: 16px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 999px; background: var(--primary-pale); color: var(--ink); font-weight: 700; text-decoration: none; }
.chip:hover { background: var(--primary); color: var(--on-primary); }
.chip-count { font-size: 14px; font-weight: 600; opacity: .75; }
.band-gallery { padding: clamp(40px, 6vw, 72px) 0; scroll-margin-top: 90px; }
.band-gallery .section-head { margin-bottom: 28px; }
.gallery-link { display: block; border-radius: 24px; overflow: hidden; }
.gallery-link img { transition: transform .25s ease; }
.gallery-link:hover img { transform: scale(1.04); }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15, 6, 34, .94); color: #fff; }
.lightbox::backdrop { background: rgba(15, 6, 34, .94); }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 64px 16px 24px; }
.lightbox img { max-width: min(100%, 1400px); max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 12px; }
.lightbox figcaption { max-width: 760px; text-align: center; font-size: 16px; color: #EBE1F8; }
.lightbox-btn { position: absolute; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 255, 255, .8); border-radius: 50%; background: rgba(20, 8, 44, .7); color: #fff; cursor: pointer; }
.lightbox-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 14px; top: 50%; margin-top: -24px; }
.lightbox-next { right: 14px; top: 50%; margin-top: -24px; }
@media (max-width: 760px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: 14px; margin-top: 0; }
  .lightbox figure { padding-bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-link img { transition: none; } }
/* Keep photos the same size in every group, even when a group has only one or two */
.band-gallery .gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* Favour the upper part of tall photos so faces are not cut off in the small previews */
.gallery img { object-position: center 15%; }
.lightbox-btn[hidden] { display: none; }
.gallery figure .gallery-link { border-radius: 24px; }
