/* ==========================================================================
   Celestial Church — website design system
   Brand: derived from the CCC Ibukun Oluwa Parish logo (indigo lettering,
   sky-blue field, gold accents). Layout language adapted from the Avenix
   church template (condensed uppercase display type, pill buttons with a
   circular arrow, asymmetric-radius cards, tinted section bands).
   Tokens are documented in docs/DESIGN_SYSTEM.md.
   ========================================================================== */

:root {
  /* Brand */
  --primary: #2d2783;          /* Celestial indigo (logo lettering) */
  --primary-dark: #1b1856;
  --primary-light: #4a43b5;
  --secondary: #8ec5ec;        /* Sky blue (logo field) */
  --secondary-soft: #eaf4fc;
  --accent: #e8b13a;           /* Gold (crown / confetti) */
  --accent-dark: #865b00;      /* gold for text on light backgrounds (≥5.3:1) */
  --accent-soft: #fdf3dc;
  --accent-display: #a87510;   /* gold for large headings on light backgrounds (≥3.7:1) */

  /* Neutrals */
  --bg: #ffffff;
  --surface: #f5f8fd;
  --surface-2: #eef2fa;
  --text: #18163f;
  --text-muted: #555a78;
  --border: #dce3f0;

  /* Feedback */
  --success: #1e7f52;
  --success-soft: #e3f4ec;
  --warning: #9a5b00;
  --warning-soft: #fff1d6;
  --error: #b8321a;
  --error-soft: #fde7e2;

  /* Type */
  --font-display: "Fira Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-reading: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --radius-card: 0 0 48px 0;   /* Avenix-style cut corner */
  --shadow-sm: 0 1px 2px rgba(24, 22, 63, .06), 0 2px 8px rgba(24, 22, 63, .05);
  --shadow: 0 10px 30px rgba(24, 22, 63, .10);
  --container: 1240px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Legacy aliases used by older inline styles */
  --primary-color: var(--primary);
  --gray-500: var(--text-muted);
  --gray-100: var(--surface);
  --card-bg: #ffffff;
  --shadow-lg: var(--shadow);
  --text-secondary: var(--text-muted);
  --transition: .25s var(--ease);
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--bg); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-light); }
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--text); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--primary-dark); padding: .6rem 1rem; border-radius: var(--radius-sm); font-weight: 700; z-index: 1000; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.lang-yo { font-feature-settings: "kern"; }

/* -------------------------------------------------------- navigation */
.ticker { background: var(--primary-dark); color: #fff; font-size: .9rem; }
.ticker .container { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; padding-top: .45rem; padding-bottom: .45rem; }
.ticker a { color: #fff; text-decoration: none; }
.ticker a:hover { color: var(--accent); }
.ticker-items { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
#main-nav { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--border); transition: box-shadow .3s var(--ease); }
#main-nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--primary); min-width: 0; }
.nav-logo img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--secondary-soft); flex-shrink: 0; }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; }
.logo-text small { display: block; font-size: .72rem; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.nav-links > li > a, .nav-links .dropdown-toggle { display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .8rem; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: .02em; background: none; border: 0; cursor: pointer; }
.nav-links > li > a:hover, .nav-links .dropdown-toggle:hover, .nav-links a.active, .nav-links .dropdown-toggle.active { color: var(--primary); background: var(--secondary-soft); }
.dropdown { position: relative; }
.dropdown-menu { list-style: none; margin: 0; padding: .5rem; position: absolute; left: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s var(--ease); }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu, .dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: .5rem .8rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .97rem; }
.dropdown-menu a:hover, .dropdown-menu a:focus { background: var(--surface); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: .5rem; order: 3; }
.nav-links { order: 2; margin-left: auto; }
.nav-search { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--primary); text-decoration: none; }
.nav-search:hover { background: var(--secondary-soft); }
.nav-search svg { width: 22px; height: 22px; }
.nav-btn-donate, .nav-btn-donate-mobile { background: var(--accent); color: var(--primary-dark) !important; font-weight: 700; }
.nav-btn-donate:hover { background: var(--primary) !important; color: #fff !important; }
.nav-btn-donate-mobile { display: none; padding: .45rem 1rem; border-radius: 999px; text-decoration: none; font-family: var(--font-display); text-transform: uppercase; }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--border); background: #fff; border-radius: 50%; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--primary); transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1080px) {
  .nav-toggle, .nav-btn-donate-mobile { display: inline-flex; }
  .nav-links { position: fixed; inset: 76px 0 0 0; flex-direction: column; align-items: stretch; gap: 0; padding: 1rem var(--gutter) 3rem; background: #fff; overflow-y: auto; transform: translateX(100%); transition: transform .3s var(--ease); visibility: hidden; }
  .nav-links.show { transform: translateX(0); visibility: visible; }
  .nav-links > li { border-bottom: 1px solid var(--border); }
  .nav-links > li > a, .nav-links .dropdown-toggle { width: 100%; justify-content: space-between; padding: .9rem .25rem; border-radius: 0; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 .75rem; max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
  .dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { max-height: 0; }
  .dropdown.open .dropdown-menu { max-height: 600px; padding-bottom: .5rem; }
  .nav-links .nav-btn-donate { margin-top: 1rem; justify-content: center; border-radius: 999px; }
  .logo-text small { display: none; }
}
@media (max-width: 420px) { .nav-btn-donate-mobile { display: none !important; } .logo-text { font-size: 1rem; } }

/* ----------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent; font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; cursor: pointer; line-height: 1.1; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s, transform .2s; min-height: 48px; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent, .btn-secondary { background: var(--accent); color: var(--primary-dark); }
.btn-accent:hover, .btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--accent); color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--primary); padding-left: .5rem; padding-right: .5rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.1rem; }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; min-height: 38px; }
/* Avenix pill with circular arrow */
.btn-arrow { padding-right: .45rem; }
.btn-arrow::after { content: ""; width: 36px; height: 36px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d2783' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / 15px no-repeat; transition: transform .3s var(--ease); flex-shrink: 0; }
.btn-arrow:hover::after { transform: rotate(45deg); }
.btn-accent.btn-arrow::after { background-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E"); }

/* --------------------------------------------------- sections & titles */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-sm { padding: clamp(2.25rem, 5vw, 3.5rem) 0; }
.section-alt { background: var(--surface); }
.section-sky { background: linear-gradient(180deg, var(--secondary-soft), #fff); }
.section-dark { background: var(--primary-dark); color: #e9e8ff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-header, .section-title { max-width: 760px; margin: 0 auto 2.75rem; text-align: center; }
.section-title.left { margin-left: 0; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-size: .95rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: .9rem; }
.eyebrow::before { content: ""; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e8b13a' d='M12 1l2.6 7.9H23l-6.8 4.9 2.6 7.9L12 16.8l-6.8 4.9 2.6-7.9L1 8.9h8.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
.section-dark .eyebrow { color: var(--accent); }
.section-header h2, .section-title h2 { text-transform: uppercase; letter-spacing: .01em; }
.section-header h2 span, .section-title h2 span { color: var(--accent-display); }
.page-hero h1 span, .hero h1 span, .section-dark h2 span, .cta-banner h2 span { color: var(--accent); }
.section-header p, .section-title p { color: var(--text-muted); font-size: 1.08rem; }
.section-dark .section-header p { color: #c8c6f0; }

/* ----------------------------------------------------- page hero */
.page-hero { position: relative; overflow: hidden; background: radial-gradient(1100px 380px at 85% -10%, rgba(142, 197, 236, .45), transparent 60%), linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; padding: clamp(3.25rem, 8vw, 5.5rem) 0 clamp(2.75rem, 6vw, 4.25rem); }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.5px); background-size: 46px 46px; mask-image: linear-gradient(90deg, transparent 40%, #000); opacity: .35; pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; text-transform: uppercase; margin-bottom: .35em; }
.page-hero p { color: #dcdcff; max-width: 680px; font-size: 1.1rem; margin-bottom: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1.25rem 0 0; font-size: .95rem; color: #c8c6f0; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: #c8c6f0; }

/* ----------------------------------------------------- home hero */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(900px 500px at 80% 10%, rgba(142, 197, 236, .55), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(232, 177, 58, .22), transparent 60%), linear-gradient(160deg, #141244 0%, var(--primary) 55%, #3f6fb6 100%); padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(4.5rem, 10vw, 7rem); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1.6px), radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1.4px); background-size: 120px 120px, 53px 53px; background-position: 0 0, 30px 20px; opacity: .45; pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; text-transform: uppercase; font-size: clamp(2.5rem, 6.4vw, 5.2rem); line-height: 1.02; margin-bottom: .4em; }
.hero-lead { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: #e0e3ff; max-width: 620px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }
.hero-emblem { justify-self: center; position: relative; }
.hero-emblem img { width: min(340px, 70vw); border-radius: 50%; box-shadow: 0 0 0 10px rgba(255, 255, 255, .12), 0 0 0 22px rgba(255, 255, 255, .06), 0 30px 60px rgba(0, 0, 0, .35); }
.hero-verse { margin-top: 2rem; padding: 1rem 1.25rem; border-left: 4px solid var(--accent); background: rgba(255, 255, 255, .08); border-radius: 0 var(--radius) var(--radius) 0; max-width: 620px; font-family: var(--font-reading); font-size: 1.05rem; }
.hero-verse cite { display: block; font-family: var(--font-display); font-style: normal; font-weight: 700; color: var(--accent); letter-spacing: .05em; text-transform: uppercase; margin-top: .35rem; font-size: .92rem; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; text-align: center; } .hero-lead, .hero-verse { margin-left: auto; margin-right: auto; } .hero-btns { justify-content: center; } .hero-emblem { order: -1; } .hero-emblem img { width: min(200px, 55vw); } .hero-verse { border-radius: var(--radius); border-left: 0; border-top: 4px solid var(--accent); } }

/* ----------------------------------------------------- home hero slider (admin: Sliders) */
.hero-slider { position: relative; min-height: clamp(560px, 86vh, 860px); overflow: hidden; color: #fff; isolation: isolate;
  background: radial-gradient(900px 500px at 80% 10%, rgba(142, 197, 236, .35), transparent 60%), linear-gradient(160deg, #141244 0%, var(--primary) 60%, #3f6fb6 100%); }
.hero-slider[hidden] { display: none; }
.hs-track { position: absolute; inset: 0; }
.hs-slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity 1s var(--ease), visibility 0s linear 1s; }
.hs-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1s var(--ease), visibility 0s; }
.hs-bg { position: absolute; inset: 0; background-size: cover; background-position: center right; transform: scale(1.001); }
.hs-slide.is-active .hs-bg { animation: hs-zoom 9s ease-out both; }
.hs-slide::after { content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(16, 14, 54, .94) 0%, rgba(22, 19, 74, .82) 34%, rgba(27, 24, 86, .38) 66%, rgba(27, 24, 86, .12) 100%), linear-gradient(0deg, rgba(16, 14, 54, .75) 0%, rgba(16, 14, 54, 0) 32%); }
.hs-content { position: relative; z-index: 1; width: 100%; padding-bottom: 4.5rem; }
.hs-content .eyebrow { color: var(--accent); }
.hs-content h1, .hs-content h2.hs-title { color: #fff; text-transform: uppercase; font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 1.0; margin: 0 0 .35em; max-width: 820px; }
.hs-title span { display: block; color: var(--accent); }
.hs-content p { color: #e4e6ff; font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 600px; margin: 0; }
.hs-content .hero-btns { margin-top: 2rem; justify-content: flex-start; }
.hs-slide.is-active .hs-content > * { animation: hs-rise .9s var(--ease) both; }
.hs-slide.is-active .hs-content > :nth-child(2) { animation-delay: .12s; }
.hs-slide.is-active .hs-content > :nth-child(3) { animation-delay: .24s; }
.hs-slide.is-active .hs-content > :nth-child(4) { animation-delay: .36s; }
@keyframes hs-zoom { from { transform: scale(1.09); } to { transform: scale(1.001); } }
@keyframes hs-rise { from { opacity: 0; transform: translateY(18px); } }
.hs-controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.hs-indicators { display: flex; gap: .9rem; align-items: center; flex: 1; max-width: 560px; }
.hs-ind { flex: 1; min-width: 0; background: none; border: 0; padding: .55rem 0; color: rgba(255, 255, 255, .62); font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-align: left; cursor: pointer; }
.hs-ind .hs-bar { display: block; height: 3px; margin-top: .45rem; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.hs-ind .hs-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.hs-ind[aria-current="true"] { color: #fff; }
.hs-ind[aria-current="true"] .hs-bar i { width: 100%; }
.hero-slider.is-playing .hs-ind[aria-current="true"] .hs-bar i { width: 0; animation: hs-progress var(--hs-interval, 7s) linear forwards; }
@keyframes hs-progress { to { width: 100%; } }
.hs-ind:focus-visible, .hs-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.hs-buttons { display: flex; gap: .5rem; flex-shrink: 0; }
.hs-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); background: rgba(16, 14, 54, .35); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; backdrop-filter: blur(4px); }
.hs-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--primary-dark); }
.hs-btn svg { width: 20px; height: 20px; }
.verse-bar { background: var(--primary-dark); color: #fff; border-top: 1px solid rgba(255, 255, 255, .08); }
.verse-bar .container { display: flex; gap: 1.25rem; align-items: center; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.verse-bar-label { flex-shrink: 0; font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.verse-bar blockquote { margin: 0; font-family: var(--font-reading); font-style: italic; font-size: 1.05rem; color: #e4e6ff; }
.verse-bar cite { font-style: normal; font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem; margin-left: .5rem; }
.verse-bar cite a { color: var(--accent); }
@media (max-width: 900px) {
  .hero-slider { min-height: 640px; }
  .hs-slide { align-items: flex-end; }
  .hs-bg { background-position: 70% center; }
  .hs-slide::after { background: linear-gradient(0deg, rgba(16, 14, 54, .96) 0%, rgba(16, 14, 54, .85) 45%, rgba(27, 24, 86, .3) 80%, rgba(27, 24, 86, .15) 100%); }
  .hs-content { padding-bottom: 7rem; }
  .hs-controls { bottom: 1.25rem; }
  .hs-indicators { gap: .5rem; }
  .hs-ind { font-size: .75rem; }
  .verse-bar .container { flex-direction: column; align-items: flex-start; gap: .4rem; }
}
@media (max-width: 420px) { .hs-ind .hs-num { display: none; } .hs-btn { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .hs-slide.is-active .hs-bg, .hs-slide.is-active .hs-content > * { animation: none; } }

/* --------------------------------------------------------- grids */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.stack > * + * { margin-top: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 2rem; align-items: start; }
.split-toc { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
@media (max-width: 960px) { .split, .split-toc { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------- cards */
.card, .content-card, .event-card, .devotional-card, .prayer-card, .testimony-card, .team-card, .media-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card:hover, .content-card:hover, .event-card:hover, .media-card:hover, a.devotional-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-body, .event-card-body { padding: 1.5rem; }
.card-image, .event-card-image, .media-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card-image img, .event-card-image img, .media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.content-card:hover .card-image img, .event-card:hover img, .media-card:hover img { transform: scale(1.05); }
.card-title, .event-card-title { font-size: 1.3rem; margin-bottom: .4rem; }
.card-title a, .event-card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--primary); }
.card-desc, .event-card-desc { color: var(--text-muted); font-size: .98rem; }
.card-date, .event-card-meta, .event-meta-tag { color: var(--text-muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: .5rem; }
.card-badge { position: absolute; top: 1rem; left: 1rem; background: var(--accent); color: var(--primary-dark); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; padding: .3rem .7rem; border-radius: 999px; }
.card-link, .event-card-btn { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.card-link::after { content: "→"; transition: transform .2s; }
.card-link:hover::after { transform: translateX(4px); }
/* feature card (Avenix service-item: fill on hover) */
.feature-card { position: relative; display: block; padding: 2rem 1.6rem; background: #fff; border-radius: var(--radius-card); border: 1px solid var(--border); color: var(--text); text-decoration: none; overflow: hidden; isolation: isolate; height: 100%; }
.feature-card::before { content: ""; position: absolute; inset: 100% 0 0 0; background: var(--primary); border-radius: 500px 500px 0 0; transition: inset .45s var(--ease), border-radius .45s var(--ease); z-index: -1; }
.feature-card:hover::before, .feature-card:focus-visible::before { inset: 0; border-radius: 0; }
.feature-card:hover, .feature-card:focus-visible { color: #fff; }
.feature-card:hover h3, .feature-card:focus-visible h3 { color: #fff; }
.feature-card:hover p, .feature-card:focus-visible p { color: #dcdcff; }
.feature-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--secondary-soft); color: var(--primary); margin-bottom: 1.25rem; transition: background .3s; }
.feature-icon svg { width: 30px; height: 30px; }
.feature-card:hover .feature-icon { background: var(--accent); color: var(--primary-dark); }
.feature-card h3 { text-transform: uppercase; margin-bottom: .35rem; }
.feature-card p { color: var(--text-muted); margin: 0; font-size: .98rem; }
.feature-card .card-link { margin-top: 1rem; color: inherit; }

/* Event cards & date badge */
.events-list { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.event-date-badge { position: absolute; top: 1rem; left: 1rem; background: #fff; border-radius: var(--radius-sm); text-align: center; padding: .4rem .7rem; box-shadow: var(--shadow-sm); font-family: var(--font-display); line-height: 1; }
.event-day { display: block; font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.event-month { font-size: .8rem; text-transform: uppercase; color: var(--accent-dark); font-weight: 700; }

/* Devotional / prayer / testimony */
.devotional-card, .prayer-card, .testimony-card { padding: 1.5rem; display: block; color: inherit; text-decoration: none; }
.devotional-date { color: var(--accent-dark); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }
.devotional-content, .testimony-content { color: var(--text-muted); }
.testimony-author { margin-top: 1rem; font-weight: 600; color: var(--primary); }

/* Team */
.team-card { text-align: center; padding: 1.75rem 1.25rem; }
.team-avatar { width: 120px; height: 120px; margin: 0 auto 1rem; border-radius: 50%; overflow: hidden; background: var(--secondary-soft); display: grid; place-items: center; font-family: var(--font-display); font-size: 2.2rem; color: var(--primary); }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-role { color: var(--accent-dark); font-family: var(--font-display); text-transform: uppercase; font-weight: 700; font-size: .9rem; }
.team-bio { color: var(--text-muted); font-size: .95rem; }

/* Media */
.media-card { cursor: pointer; }
.media-play-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(transparent, rgba(27, 24, 86, .55)); }
.media-play-overlay::after { content: "▶"; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--primary-dark); font-size: 1.2rem; }
.media-info { padding: 1.1rem 1.25rem; }
.media-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--gutter); opacity: 0; transition: opacity .25s; }
.media-modal.show { opacity: 1; }
.media-modal-overlay { position: absolute; inset: 0; background: rgba(11, 10, 36, .8); }
.media-modal-content { position: relative; width: min(960px, 100%); background: #fff; border-radius: var(--radius); padding: 1.25rem; }
.media-modal-close { position: absolute; top: .5rem; right: .75rem; border: 0; background: none; font-size: 2rem; cursor: pointer; color: var(--text); }
.media-player iframe, .media-player video { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius-sm); }
.media-player audio { width: 100%; }

/* Gallery */
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--surface-2); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-overlay { position: absolute; inset: auto 0 0 0; padding: .75rem; background: linear-gradient(transparent, rgba(27, 24, 86, .8)); color: #fff; font-size: .9rem; }

/* Timeline (history) */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 2rem; border-left: 3px solid var(--secondary); }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-dot { position: absolute; left: calc(-2rem - 10px); top: .35rem; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #fff; }
.timeline-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }

/* Stats & CTA */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.stat-item strong { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--primary); line-height: 1; }
.section-dark .stat-item strong { color: var(--accent); }
.cta-banner { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--primary), var(--primary-light)); color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.cta-banner::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(232, 177, 58, .25); }
.cta-banner h2, .cta-banner h3 { color: #fff; text-transform: uppercase; margin-bottom: .3em; }
.cta-banner p { color: #dcdcff; margin: 0; }
@media (max-width: 720px) { .cta-banner { grid-template-columns: 1fr; text-align: center; } }

/* --------------------------------------------------- forms */
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
label, .form-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.form-control, input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="password"], input[type="number"], input[type="date"], select, textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .9rem; min-height: 48px; transition: border-color .2s, box-shadow .2s; }
.form-control:focus, input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(45, 39, 131, .15); }
textarea.form-control, textarea { min-height: 120px; resize: vertical; }
.form-hint { color: var(--text-muted); font-size: .88rem; margin-top: .3rem; }
.field-error { color: var(--error); font-size: .9rem; margin-top: .3rem; }

/* --------------------------------------------------- search bar */
.search-bar { position: relative; display: flex; align-items: center; }
.search-bar svg { position: absolute; left: 1rem; width: 20px; height: 20px; color: var(--text-muted); pointer-events: none; }
.search-bar input { padding-left: 2.9rem; border-radius: 999px; min-height: 54px; font-size: 1.05rem; box-shadow: var(--shadow-sm); }
.search-bar .search-clear { position: absolute; right: .5rem; border: 0; background: var(--surface-2); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; color: var(--text-muted); }

/* --------------------------------------------------- chips, tabs, segmented */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .5rem; scrollbar-width: thin; }
.chip, .filter-btn { flex-shrink: 0; border: 1.5px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: .45rem 1rem; font: inherit; font-size: .93rem; cursor: pointer; white-space: nowrap; min-height: 40px; }
.chip:hover, .filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.chip[aria-pressed="true"], .chip.active, .filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { border: 0; background: none; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .8rem 1rem; color: var(--text-muted); border-bottom: 3px solid transparent; cursor: pointer; font-size: 1rem; }
.tab-btn.active, .tab-btn[aria-selected="true"], .tab-btn:hover { color: var(--primary); border-color: var(--accent); }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: .5rem 1.15rem; border-radius: 999px; font-family: var(--font-display); font-weight: 700; letter-spacing: .03em; color: var(--text-muted); cursor: pointer; min-height: 40px; font-size: 1rem; }
.segmented button[aria-pressed="true"] { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.segmented button:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

/* --------------------------------------------------- badges & states */
.badge { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .2rem .65rem; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--text-muted); }
.badge-primary { background: var(--secondary-soft); color: var(--primary); }
.badge-gold { background: var(--accent-soft); color: #7a5300; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.notice { border-radius: var(--radius-sm); padding: .85rem 1rem; display: flex; gap: .75rem; align-items: flex-start; background: var(--secondary-soft); color: var(--primary-dark); font-size: .97rem; }
.notice-warning { background: var(--warning-soft); color: #5e3a00; }
.notice-error { background: var(--error-soft); color: #7d2010; }
.notice-success { background: var(--success-soft); color: #12513a; }
.spinner { display: flex; justify-content: center; padding: 3rem 0; }
.spinner-ring { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--secondary-soft); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-line { height: 1rem; margin-bottom: .65rem; }
.empty-state, .error-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); border: 1.5px dashed var(--border); border-radius: var(--radius); background: #fff; }
.empty-state h3, .error-state h3 { color: var(--text); }
.error-state { border-color: #f1c2b8; background: var(--error-soft); color: #7d2010; }
.empty-state .btn, .error-state .btn { margin-top: 1rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: all .3s var(--ease); background: var(--text); color: #fff; padding: .85rem 1.25rem; border-radius: var(--radius-sm); z-index: 2000; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.pagination-btn { border: 1.5px solid var(--border); background: #fff; border-radius: 999px; padding: .5rem 1.2rem; cursor: pointer; font: inherit; min-height: 44px; }
.pagination-btn:disabled { opacity: .45; cursor: not-allowed; }
.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 1.3rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all .3s; z-index: 90; box-shadow: var(--shadow); }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-link { display: inline-flex; gap: .4rem; align-items: center; margin-bottom: 1.5rem; text-decoration: none; font-weight: 600; }
[data-aos] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-aos].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-aos] { opacity: 1; transform: none; } }
.livestream-banner { display: none; background: var(--error); color: #fff; text-align: center; padding: .5rem var(--gutter); font-weight: 600; }
.livestream-banner.active { display: block; }
.livestream-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #fff; margin-right: .5rem; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* --------------------------------------------- worship components */
/* service/time card */
.service-card { display: flex; flex-direction: column; gap: .4rem; height: 100%; padding: 1.5rem; border-radius: var(--radius-card); background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: all .3s var(--ease); }
.service-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card h3 { margin: 0; text-transform: uppercase; font-size: 1.25rem; }
.service-when { font-family: var(--font-display); font-weight: 700; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .05em; font-size: .92rem; }
.service-card.is-today { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), #fff 60%); }
.times-list { list-style: none; padding: 0; margin: 0; }
.times-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px dashed rgba(255, 255, 255, .25); }
.times-list strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; }

/* hymn list + reader */
.hymn-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.hymn-card { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: center; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s; }
.hymn-card:hover, .hymn-card:focus-visible { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.hymn-num { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--secondary-soft); color: var(--primary); font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.hymn-card h3 { font-size: 1.12rem; margin: 0 0 .15rem; }
.hymn-card .alt-title { color: var(--text-muted); font-size: .93rem; margin: 0; }
.hymn-card .snippet { color: var(--text-muted); font-size: .9rem; margin: .25rem 0 0; font-style: italic; }
.reader { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 3rem); }
.reader-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.reader-tools { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border); background: #fff; color: var(--primary); display: inline-grid; place-items: center; cursor: pointer; font-weight: 700; font-family: var(--font-display); text-decoration: none; }
.icon-btn:hover { border-color: var(--primary); }
.icon-btn[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.hymn-title { text-transform: uppercase; margin-bottom: .25rem; }
.verse { font-family: var(--font-reading); font-size: calc(1.2rem * var(--reader-scale, 1)); line-height: 1.75; margin: 0 0 1.6rem; display: grid; grid-template-columns: 2.2rem 1fr; gap: .25rem; }
.verse-num { font-family: var(--font-display); font-weight: 700; color: var(--accent-dark); font-size: calc(1rem * var(--reader-scale, 1)); padding-top: .2rem; }
.verse.refrain { padding: .75rem 1rem; background: var(--secondary-soft); border-radius: var(--radius-sm); font-style: italic; }
.verse .solfa { display: block; font-family: ui-monospace, Menlo, monospace; font-size: .8em; color: var(--text-muted); font-style: normal; }
.reader.night { background: #12112c; border-color: #12112c; color: #ecebff; }
.reader.night .verse-num { color: var(--accent); }
.reader.night .hymn-title, .reader.night h1, .reader.night h2 { color: #fff; }
.reader.night .verse.refrain { background: rgba(142, 197, 236, .12); }
.reader-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* bible */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.book-grid a { display: block; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); background: #fff; font-weight: 500; }
.book-grid a:hover { border-color: var(--primary); color: var(--primary); }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .4rem; }
.chapter-grid a { display: grid; place-items: center; height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--border); text-decoration: none; color: var(--text); background: #fff; }
.chapter-grid a:hover, .chapter-grid a[aria-current="page"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.scripture p { font-family: var(--font-reading); font-size: calc(1.15rem * var(--reader-scale, 1)); line-height: 1.85; margin: 0 0 .65rem; }
.scripture sup { font-family: var(--font-display); color: var(--accent-dark); font-weight: 700; margin-right: .3rem; }
.scripture .hl { background: var(--accent-soft); border-radius: 4px; box-shadow: 0 0 0 3px var(--accent-soft); }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 720px) { .compare-grid { grid-template-columns: 1fr; } }

/* lessons calendar */
.lesson-day { display: grid; grid-template-columns: 86px 1fr; gap: 1.25rem; padding: 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.lesson-day:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.lesson-date { text-align: center; border-radius: var(--radius-sm); background: var(--secondary-soft); padding: .55rem .25rem; font-family: var(--font-display); line-height: 1.05; }
.lesson-date .d { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.lesson-date .m, .lesson-date .w { font-size: .8rem; text-transform: uppercase; font-weight: 700; color: var(--accent-dark); }
.lesson-day.is-today { border-color: var(--accent); background: var(--accent-soft); }
.lesson-refs { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .3rem; }
.lesson-refs span { font-family: var(--font-reading); }

/* order of service steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.step-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--surface-2); color: var(--primary); }
.step-hymn .step-num { background: var(--accent); color: var(--primary-dark); }
.step-prayer .step-num { background: var(--secondary-soft); }
.step-scripture .step-num { background: var(--primary); color: #fff; }
.step-type { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--text-muted); }
.step-body { white-space: pre-line; }
.step-hymnslot { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* devotion walkthrough */
.devotion-stage { max-width: 820px; margin: 0 auto; }
.devotion-progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 1.5rem; }
.devotion-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s var(--ease); }
.devotion-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 5vw, 3rem); min-height: 300px; }
.devotion-card .step-body { font-family: var(--font-reading); font-size: calc(1.25rem * var(--reader-scale, 1)); line-height: 1.8; }
.devotion-controls { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }

/* constitution */
.toc { position: sticky; top: 96px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; max-height: calc(100vh - 120px); overflow-y: auto; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: .45rem .6rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: .95rem; }
.toc a:hover, .toc a[aria-current="true"] { background: var(--secondary-soft); color: var(--primary); }
.const-section { scroll-margin-top: 96px; padding: 2rem 0; border-bottom: 1px solid var(--border); }
.const-section h2 { font-size: clamp(1.4rem, 3vw, 2rem); text-transform: uppercase; }
.const-section p, .clause { font-family: var(--font-reading); font-size: 1.1rem; line-height: 1.8; }
.clause { display: grid; grid-template-columns: 3.2rem 1fr; gap: .5rem; margin-bottom: .8rem; }
.clause-num { font-family: var(--font-display); font-weight: 700; color: var(--accent-dark); }
mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
@media (max-width: 960px) { .toc { position: static; max-height: none; } }

/* notes */
.note-item { padding: 1.1rem 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.note-item h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.note-meta { color: var(--text-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }

/* search results */
.result-group { margin-bottom: 2.25rem; }
.result-group h2 { font-size: 1.35rem; text-transform: uppercase; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.result-list a { display: block; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); background: #fff; }
.result-list a:hover { border-color: var(--primary); }
.result-list small { display: block; color: var(--text-muted); }

/* ---------------------------------------------------------- footer */
.site-footer { background: var(--primary-dark); color: #c8c6f0; padding: clamp(3rem, 7vw, 5rem) 0 0; margin-top: 0; }
.site-footer a { color: #e9e8ff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.25rem; }
.footer-grid h4 { color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-about img { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 1rem; }
.footer-about p { font-size: .97rem; }
.footer-socials { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-socials a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; }
.footer-socials a:hover { background: var(--accent); color: var(--primary-dark); border-color: var(--accent); }
.footer-socials svg { width: 18px; height: 18px; }
.footer-contact li { display: flex; gap: .6rem; }
.footer-bottom { margin-top: 3rem; padding: 1.25rem 0; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; font-size: .9rem; }
.footer-bottom-links { display: flex; gap: 1.25rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------- auth, donate, misc legacy */
.auth-page { min-height: 70vh; display: grid; place-items: center; padding: 3rem var(--gutter); background: var(--surface); }
.auth-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo img { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto .5rem; }
.donate-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.donate-option { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .9rem; text-align: center; cursor: pointer; background: #fff; font: inherit; font-weight: 700; }
.donate-option.active, .donate-option:hover { border-color: var(--primary); background: var(--secondary-soft); color: var(--primary); }
.share-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.rich-content { font-size: 1.05rem; }
.rich-content img { border-radius: var(--radius); margin: 1rem 0; }

/* print: readers and plans */
@media print {
  #main-nav, .site-footer, .back-to-top, .ticker, .reader-tools, .reader-nav, .no-print { display: none !important; }
  .page-hero { background: none; color: #000; padding: 0 0 1rem; }
  .page-hero h1, .page-hero p, .breadcrumb { color: #000; }
  .reader { border: 0; padding: 0; }
}

/* ===================================================== Welcome (Elder in Charge) */
.welcome-section { overflow: hidden; }
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
.welcome-media { position: relative; min-height: 640px; }
@media (min-width: 961px) { .welcome-grid { align-items: start; } .welcome-media { position: sticky; top: 110px; } }
.welcome-photo { position: absolute; margin: 0; overflow: hidden; border-radius: 0 0 120px 0; box-shadow: var(--shadow); background: var(--secondary-soft); }
.welcome-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-photo--back { left: 0; bottom: 0; width: 56%; height: 78%; }
.welcome-photo--front { right: 0; top: 0; width: 62%; height: 84%; border: 10px solid #fff; border-radius: 0 0 140px 0; z-index: 1; }
.welcome-section--no-media .welcome-grid { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.welcome-section--no-media .welcome-media { display: none; }
.welcome-media:has(.welcome-photo--front):not(:has(.welcome-photo--back)) .welcome-photo--front { left: 0; right: auto; width: 82%; height: 100%; border-width: 0; }
.welcome-badge { position: absolute; z-index: 2; left: 6%; top: 8%; display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1.15rem; border-radius: var(--radius-sm); background: var(--primary); color: #fff; box-shadow: var(--shadow); max-width: 60%; }
.welcome-badge strong { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .02em; line-height: 1.2; }
.welcome-badge span { font-size: .82rem; color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.welcome-title { text-transform: uppercase; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.04; margin-bottom: .35em; }
.welcome-title span { display: block; color: var(--accent-display); }
.welcome-location { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-muted); font-weight: 600; margin: -.2rem 0 1.4rem; }
.welcome-location svg { width: 18px; height: 18px; color: var(--accent-dark); flex-shrink: 0; }
.welcome-message p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.75; margin: 0 0 1.05rem; }
.welcome-message p:first-child::first-letter { font-family: var(--font-display); }
.welcome-closing { font-family: var(--font-reading); font-style: italic; font-size: 1.2rem !important; color: var(--primary) !important; border-left: 4px solid var(--accent); padding-left: 1rem; margin-top: 1.4rem !important; }
.welcome-highlights { list-style: none; margin: 1.6rem 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; }
.welcome-highlights li { display: flex; align-items: center; gap: .85rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text); line-height: 1.25; }
.welcome-hl-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-dark); }
.welcome-hl-icon svg { width: 26px; height: 26px; }
.welcome-sign { margin: 1.2rem 0 1.8rem; }
.welcome-blessing { font-weight: 700; color: var(--text); margin: 0 0 .9rem; }
.welcome-signature { display: flex; flex-direction: column; gap: .1rem; margin: 0; padding-top: .9rem; border-top: 1px solid var(--border); }
.welcome-signature-name { font-family: var(--font-reading); font-style: italic; font-size: 1.45rem; color: var(--primary); line-height: 1.2; }
.welcome-signature-title { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
@media (max-width: 960px) {
  .welcome-grid { grid-template-columns: minmax(0, 1fr); }
  .welcome-media { min-height: 0; aspect-ratio: 1 / 1.02; max-width: 560px; width: 100%; margin: 0 auto; }
}
@media (max-width: 520px) {
  .welcome-highlights { grid-template-columns: minmax(0, 1fr); }
  .welcome-photo--front { border-width: 6px; border-radius: 0 0 80px 0; }
  .welcome-photo--back { border-radius: 0 0 70px 0; }
  .welcome-badge { left: 4%; top: 4%; padding: .6rem .8rem; }
  .welcome-badge strong { font-size: .92rem; }
}

/* ===================================================== First-visit pop-up */
.site-popup { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; overflow: hidden; max-width: 100vw; }
.site-popup[hidden] { display: none; }
.site-popup-backdrop { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(16, 14, 38, .62); animation: popup-fade .25s var(--ease); }
.site-popup-dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 0 0 48px 0; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: popup-rise .35s var(--ease); }
.site-popup-dialog:focus { outline: none; }
.site-popup-image { aspect-ratio: 3 / 2; background: var(--primary) center / cover no-repeat; }
.site-popup-body { padding: 1.6rem 1.6rem 1.8rem; }
.site-popup-body h2 { text-transform: uppercase; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.08; margin: 0 0 .6rem; }
.site-popup-body p { color: var(--text-muted); line-height: 1.6; margin: 0 0 1rem; white-space: pre-line; }
.site-popup-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--primary-dark); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.site-popup-close svg { width: 20px; height: 20px; }
.site-popup-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.site-popup-when { display: flex; gap: .9rem; align-items: center; padding: .85rem 1rem; margin: 0 0 1rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); }
.site-popup-date { flex-shrink: 0; text-align: center; min-width: 58px; padding: .35rem .5rem; border-radius: 8px; background: var(--primary); color: #fff; font-family: var(--font-display); line-height: 1.05; }
.site-popup-date b { display: block; font-size: 1.6rem; }
.site-popup-date small { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.site-popup-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.2rem; }
.site-popup-form { display: grid; gap: .9rem; margin-top: .4rem; }
.site-popup-form label { display: block; font-weight: 600; font-size: .95rem; color: var(--text); margin-bottom: .3rem; }
.site-popup-form label .req { color: var(--error); }
.site-popup-form input:not([type=checkbox]), .site-popup-form select, .site-popup-form textarea { width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-size: 1rem; background: #fff; color: var(--text); min-height: 48px; }
.site-popup-form textarea { min-height: 96px; resize: vertical; }
.site-popup-form input:focus, .site-popup-form select:focus, .site-popup-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 39, 131, .15); }
.site-popup-form .is-invalid { border-color: var(--error) !important; }
.site-popup-form .field-error { color: var(--error); font-size: .88rem; margin-top: .25rem; }
.site-popup-check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500 !important; }
.site-popup-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.site-popup-status { padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--error-soft); color: var(--error); font-size: .95rem; }
.site-popup-success { text-align: center; padding: 1rem 0 .5rem; }
.site-popup-success .tick { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.site-popup-success .tick svg { width: 32px; height: 32px; }
html:has(body.popup-open), body.popup-open { overflow: hidden; }
@keyframes popup-fade { from { opacity: 0; } }
@keyframes popup-rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.site-popup-body > .eyebrow { padding-right: 52px; }
.site-popup-image + .site-popup-body > .eyebrow { padding-right: 0; }

/* Admin-entered text (devotionals, articles, events) may contain long links. */
#devotional-section p, .welcome-message p, .site-popup-body p, .card-body p { overflow-wrap: anywhere; }

/* ===================================================== Sign-in / register */
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--bg); }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 4vw, 3.5rem); color: #fff; overflow: hidden; isolation: isolate;
  background: #1b1856 url("/assets/images/login_bg.jpg") center / cover no-repeat; }
.auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(165deg, rgba(20, 18, 68, .86) 0%, rgba(32, 28, 102, .66) 45%, rgba(45, 39, 131, .42) 72%, rgba(134, 91, 0, .38) 100%); }
.auth-brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: #fff; }
.auth-brand img { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.auth-brand strong { display: block; font-family: var(--font-display); font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
.auth-brand span { font-size: .85rem; color: rgba(255, 255, 255, .78); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.auth-visual-body { max-width: 520px; }
.auth-visual .eyebrow { color: var(--accent); }
.auth-visual h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; text-transform: uppercase; margin: 0 0 1.4rem; }
.auth-visual h2 span { color: var(--accent); }
.auth-verse { margin: 0; padding-left: 1.1rem; border-left: 3px solid var(--accent); font-family: var(--font-reading); font-style: italic; font-size: 1.15rem; line-height: 1.6; color: rgba(255, 255, 255, .92); }
.auth-verse cite { display: block; margin-top: .5rem; font-style: normal; font-family: var(--font-display); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.auth-visual-foot { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: rgba(255, 255, 255, .75); }
.auth-visual-foot svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 5vw, 4rem); }
.auth-form-wrap { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-back { display: inline-flex; align-items: center; gap: .35rem; font-size: .92rem; font-weight: 600; color: var(--text-muted); text-decoration: none; margin-bottom: 2rem; }
.auth-back:hover { color: var(--primary); }
.auth-form-wrap h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); text-transform: uppercase; line-height: 1.05; margin: 0 0 .5rem; }
.auth-lead { color: var(--text-muted); margin: 0 0 2rem; }
.auth-field { margin-bottom: 1.15rem; }
.auth-field label { display: block; font-weight: 600; font-size: .95rem; color: var(--text); margin-bottom: .4rem; }
.auth-field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.auth-field-row a { font-size: .88rem; font-weight: 600; }
.auth-input { position: relative; }
.auth-input input { width: 100%; min-height: 52px; padding: .8rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.auth-input input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(45, 39, 131, .12); }
.auth-input input[aria-invalid="true"] { border-color: var(--error); }
.auth-input.has-toggle input { padding-right: 3.25rem; }
.auth-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--text-muted); cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.auth-toggle:hover { color: var(--primary); }
.auth-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.auth-toggle svg { width: 22px; height: 22px; }
.auth-submit { width: 100%; justify-content: center; margin-top: .5rem; }
.auth-alert { display: none; padding: .8rem 1rem; border-radius: 10px; font-size: .93rem; margin-bottom: 1rem; }
.auth-alert.is-error { display: block; background: var(--error-soft); color: var(--error); }
.auth-alert.is-success { display: block; background: var(--success-soft); color: var(--success); }
.auth-switch { margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); }
.auth-switch a { font-weight: 700; }
.auth-success { text-align: center; }
.auth-success .tick { width: 72px; height: 72px; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.auth-success .tick svg { width: 36px; height: 36px; }
.auth-hint { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { min-height: 260px; padding: 1.5rem 1.25rem 3rem; background-image: url("/assets/images/login_bg_800.jpg"); }
  .auth-visual-body .eyebrow, .auth-visual h2 { display: none; }
  .auth-verse { font-size: 1rem; }
  .auth-visual-foot { display: none; }
  .auth-panel { margin-top: -1.75rem; border-radius: 24px 24px 0 0; background: var(--bg); position: relative; padding: 2rem 1.25rem 2.5rem; justify-content: flex-start; }
  .auth-back { margin-bottom: 1.25rem; }
}
