/* Connexions Church Randfontein — shared site styles (Option B: bold & bright, red). */

/* Fonts are hosted with the site (no Google requests — faster, and better for POPIA). Licences in assets/fonts/. */
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
[hidden] { display: none !important; }
/* Giant page headlines scale with the screen so long words (RANDFONTEIN) never overflow. */
.cb-mega { font-size: clamp(56px, 10.5vw, 168px) !important; overflow-wrap: anywhere; }
.cb-h2 { overflow-wrap: anywhere; }
:root {
  --accent: #C8102E;
  --ink: #0B0B0F;
  --body: #3E4456;
  --muted: #5A6072;
  --soft: #F2F4F8;
  --blush: #FDEEEF;
  --display: 'Archivo', 'Arial Narrow', sans-serif;
  --text: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--text); }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { padding-left: 40px; padding-right: 40px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; }
.skip:focus { left: 8px; color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 20px; padding-bottom: 20px; }
.site-logo img { height: 52px; width: auto; display: block; }
.site-links { display: flex; gap: 6px; font-size: 15px; font-weight: 600; background: var(--soft); padding: 6px; border-radius: 999px; }
.site-links a { padding: 10px 16px; border-radius: 999px; }
.site-links a[aria-current="page"] { background: var(--ink); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 700 15px/1 var(--text); border: 2px solid transparent; cursor: pointer; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { color: #fff; }
.btn--red { background: var(--accent); color: #fff; }
.btn--red:hover { color: #fff; filter: brightness(1.06); }
.btn--white { background: #fff; color: var(--ink); }
.btn--line-light { border-color: #4A5063; color: #fff; }
.btn--line-light:hover { color: #fff; border-color: #fff; }
.menu-btn { display: none; width: 48px; height: 48px; border-radius: 999px; border: 0; background: var(--soft); color: var(--ink); align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.menu-btn svg { width: 22px; height: 22px; }
.mobile-menu { display: none; flex-direction: column; gap: 2px; padding: 8px 20px 28px; border-bottom: 1px solid #E6E8EE; background: #fff; }
.mobile-menu a.m-link { padding: 12px 0; border-bottom: 1px solid #F0F1F5; font-family: var(--display); font-stretch: 75%; font-weight: 900; font-size: 34px; text-transform: uppercase; }
.mobile-menu a.m-link:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 16px; min-height: 56px; font-size: 17px; }

/* Type */
.eyebrow { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.mega { margin: 16px 0 0; font-family: var(--display); font-stretch: 65%; font-weight: 900; font-size: clamp(64px, 11vw, 168px); line-height: .84; text-transform: uppercase; }
.h2 { margin: 0; font-family: var(--display); font-stretch: 70%; font-weight: 900; font-size: clamp(44px, 6vw, 80px); line-height: .9; text-transform: uppercase; }
.lede { margin: 0; font-size: 20px; line-height: 1.55; color: var(--body); max-width: 440px; }

/* Page blocks */
.page-hero { padding-top: 56px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-end; }
.section { padding-top: 48px; padding-bottom: 100px; }
.band { background: var(--ink); color: #fff; border-radius: 36px; padding: 64px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center; }
.band .h2 { color: #fff; }
.band p { margin: 16px 0 0; font-size: 18px; color: #B8BECC; }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer — full-bleed ink band, identical on every page */
.site-footer { background: var(--ink); color: #fff; margin-top: 0; }
.footer-inner { padding-top: 44px; padding-bottom: 24px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #FF5A6E; }
.footer-cta { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; align-items: flex-end; padding-bottom: 32px; border-bottom: 1px solid #262A35; }
.footer-eyebrow { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: #FF5A6E; }
.footer-headline { margin-top: 8px; font-family: var(--display); font-stretch: 65%; font-weight: 900; font-size: clamp(40px, 5.2vw, 72px); line-height: .88; text-transform: uppercase; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.site-footer .btn--red:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr auto; gap: 32px; padding: 32px 0; }
.footer-logo { display: inline-block; background: #fff; border-radius: 14px; padding: 8px 12px; }
.footer-logo img { display: block; height: 40px; width: auto; }
.footer-brand p { margin: 12px 0 0; max-width: 300px; font-size: 14px; line-height: 1.55; color: #B8BECC; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
.footer-col a { color: #D9DCE4; }
nav.footer-col { display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: 8px 24px; }
nav.footer-col .footer-h { grid-column: 1 / -1; }
.footer-h { margin: 0 0 2px; font: 700 12px var(--text); text-transform: uppercase; letter-spacing: .14em; color: #8A90A2; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; border: 1.5px solid #4A5063; color: #fff; transition: border-color .2s, background .2s; }
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-app { align-self: flex-start; margin-top: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #4A5063; color: #fff !important; font-weight: 700; font-size: 13px; transition: border-color .2s, background .2s; }
.footer-app:hover { background: var(--accent); border-color: var(--accent); }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; justify-content: space-between; padding-top: 18px; border-top: 1px solid #262A35; font-size: 13px; color: #8A90A2; }
.footer-legal__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.site-footer .footer-legal a { color: #B8BECC; }
.site-footer .footer-legal__links a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; background: #161922; font-weight: 600; transition: background .2s, color .2s; }
.site-footer .footer-legal__links a:hover, .site-footer .footer-legal__links a:focus-visible { background: #262A35; color: #fff; }
.site-footer .footer-legal__links a:last-child { background: transparent; border: 1px solid #333846; margin-left: 6px; }
.site-footer .footer-legal__links a:last-child:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
@media (max-width: 560px) { .footer-legal { flex-direction: column; align-items: flex-start; } .site-footer .footer-legal__links a:last-child { margin-left: auto; } .footer-legal__links { width: 100%; } }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 32px; } }
@media (max-width: 560px) {
  .footer-inner { padding-top: 36px; }
  .footer-grid { grid-template-areas: "brand follow" "visit explore"; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 20px; padding: 28px 0; }
  .footer-brand { grid-area: brand; }
  .footer-grid > :nth-child(2) { grid-area: visit; }
  .footer-grid > :nth-child(3) { grid-area: explore; }
  .footer-grid > :nth-child(4) { grid-area: follow; align-items: flex-end; }
  .footer-grid > :nth-child(4) .footer-h { display: none; }
  .footer-brand p { margin-top: 10px; }
  nav.footer-col { grid-template-columns: 1fr; }
  .footer-actions { width: 100%; }
  .footer-actions .btn { flex: 1 1 0; padding-left: 12px; padding-right: 12px; }
}

/* Header switches to the hamburger menu below 1040px — six links + logo + button don't fit in one row below that. */
@media (max-width: 1040px) {
  .site-links, .site-nav > .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-menu:not([hidden]) { display: flex; }
}
@media (max-width: 760px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-logo img { height: 44px; }
  .band { padding: 40px 28px; border-radius: 28px; }
}

/* Error pages (404.html, 500.html, offline.html) */
.err { padding-top: 56px; padding-bottom: 100px; position: relative; }
.err-code { position: absolute; right: 40px; top: 24px; font-family: var(--display); font-stretch: 62%; font-weight: 900; font-size: clamp(120px, 22vw, 320px); line-height: .8; color: var(--soft); z-index: -1; user-select: none; }
.err .lede { margin-top: 28px; max-width: 560px; }
.err-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.err-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 72px; }
.err-links__title { grid-column: 1 / -1; margin: 0 0 6px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.err-links a { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: 22px; background: var(--soft); transition: transform .2s ease, background .2s ease; }
.err-links a:hover { transform: translateY(-3px); background: var(--blush); color: var(--ink); }
.err-links strong { font-family: var(--display); font-stretch: 75%; font-weight: 900; font-size: 24px; text-transform: uppercase; }
.err-links span { font-size: 15px; color: var(--body); }
@media (max-width: 760px) { .err-code { right: 20px; } .err-links { margin-top: 56px; } }

/* Website forms (assets/forms.js) */
.cxf-status { padding: 12px 16px; border-radius: 14px; background: var(--blush); color: #8E0B21; font-size: 15px; font-weight: 600; line-height: 1.45; }
.cxf-status[hidden] { display: none; }
.cxf-field-error { font-size: 13px; font-weight: 600; color: #B00D27; }
form [aria-invalid="true"] { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(200, 16, 46, .12); }
form[aria-busy="true"] button[type="submit"] { opacity: .7; cursor: progress; }

/* Newsletter sign-up in the footer (shown by cms-render.php only with the Premium newsletter add-on) */
.footer-news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px 32px; align-items: center; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-news[hidden] { display: none; }
.footer-news__text p { margin: 2px 0 0; color: #B8BECC; font-size: 14px; line-height: 1.5; }
.footer-news__row { display: flex; gap: 8px; }
.footer-news__row input { flex: 1; min-width: 0; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 0; font: 400 16px var(--text); color: var(--ink); background: #fff; }
.footer-news__row .btn { flex: none; }
.footer-news__hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.footer-news__status { grid-column: 2; margin: 0; min-height: 1px; font-size: 14px; color: #D7DAE2; }
.footer-news__status.is-ok { color: #4ADE80; }
.footer-news__status.is-error { color: #FF8A93; }
@media (max-width: 760px) { .footer-news { grid-template-columns: minmax(0, 1fr); } .footer-news__status { grid-column: 1; } }

/* Background photo behind a band (Premium builder blocks; Edit pages bands get the same look from cms_bg_style_css).
   The band's own colour shows through the faded photo. Parallax only with a mouse and without reduced motion. */
.cx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-position: center; background-size: cover; background-repeat: no-repeat; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .cx-bg--parallax { background-attachment: fixed; } }

/* Home page "Latest message" play button (assets/listen.js) — only for visitors arriving from outside. */
.cx-listen { position: fixed; right: 20px; bottom: 20px; z-index: 9980; display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 6px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 14px 36px rgba(11,11,15,.32); font-family: var(--text); max-width: min(340px, calc(100vw - 32px)); opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.cx-listen.is-in { opacity: 1; transform: none; pointer-events: auto; }
.cx-listen__play { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 8px 0 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cx-listen__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--accent); color: #fff; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); animation: cx-listen-pulse 2.4s ease-out 1.4s 3; }
.cx-listen__icon svg { margin-left: 3px; }
.cx-listen__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cx-listen__eyebrow { font-family: var(--display); font-stretch: 70%; font-weight: 900; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.cx-listen__title { font-size: 13px; color: #C9CEDA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-listen__play:hover .cx-listen__icon { filter: brightness(1.1); }
.cx-listen__play:focus-visible, .cx-listen__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 999px; }
.cx-listen__close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 999px; background: none; color: #9AA1B2; cursor: pointer; }
.cx-listen__close svg { width: 16px; height: 16px; }
.cx-listen__close:hover { color: #fff; background: rgba(255,255,255,.08); }
html.cxs-bar-open .cx-listen { display: none; }
@keyframes cx-listen-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 14px transparent; } }
@media (max-width: 760px) {
  .cx-listen { right: 16px; bottom: 16px; max-width: calc(100vw - 32px); }
  .cx-listen__icon { width: 44px; height: 44px; }
  body:has(.pwa-banner:not([hidden])) .cx-listen { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-listen { transition: none; transform: none; }
  .cx-listen__icon { animation: none; }
}
