/* Cosmic Christ Fellowship — brand aligned with logo */
:root {
  --ccf-navy: #001f3f;
  --ccf-navy-deep: #00152e;
  --ccf-gold: #e6c35c;
  --ccf-gold-bright: #fbc02d;
  --ccf-cream: #fdf5e6;
  --ccf-cream-soft: rgba(253, 245, 230, 0.85);
  --ccf-muted: rgba(253, 245, 230, 0.55);
  --ccf-construction-banner-h: 2.75rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: "Montserrat", system-ui, sans-serif;
  background: var(--ccf-navy);
  color: var(--ccf-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 5.5rem;
}

body.has-construction-banner {
  padding-top: calc(var(--ccf-construction-banner-h) + 56px);
}

.construction-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  min-height: var(--ccf-construction-banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(180deg, var(--ccf-gold-bright) 0%, #e6a800 100%);
  color: var(--ccf-navy);
  font-weight: 800;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 2px solid rgba(0, 31, 63, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body.has-construction-banner .navbar.fixed-top {
  top: var(--ccf-construction-banner-h);
}

.navbar {
  background: linear-gradient(180deg, var(--ccf-navy-deep) 0%, rgba(0, 31, 63, 0.97) 100%);
  border-bottom: 1px solid rgba(230, 195, 92, 0.25);
}

.nav-logo {
  border-radius: 8px;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  color: var(--ccf-gold);
  text-transform: uppercase;
}

.navbar .nav-link {
  color: var(--ccf-cream-soft) !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.5rem 0.85rem !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--ccf-gold) !important;
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0a2a52 0%, var(--ccf-navy) 55%, var(--ccf-navy-deep) 100%);
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  max-width: min(280px, 75vw);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.text-gold {
  color: var(--ccf-gold) !important;
}

.text-cream {
  color: var(--ccf-cream);
}

.text-cream-soft {
  color: var(--ccf-cream-soft);
  line-height: 1.75;
}

.text-muted-custom {
  color: var(--ccf-muted) !important;
}

.letter-space {
  letter-spacing: 0.2em;
}

.tagline {
  font-style: italic;
  color: var(--ccf-gold);
  opacity: 0.95;
}

.btn-gold {
  --bs-btn-color: var(--ccf-navy);
  --bs-btn-bg: var(--ccf-gold-bright);
  --bs-btn-border-color: var(--ccf-gold-bright);
  --bs-btn-hover-color: var(--ccf-navy);
  --bs-btn-hover-bg: #ffd54f;
  --bs-btn-hover-border-color: #ffd54f;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.75rem;
}

.section-title {
  color: var(--ccf-gold);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.35rem;
}

.section-angled {
  background: linear-gradient(165deg, var(--ccf-navy) 0%, #0d2847 50%, var(--ccf-navy) 100%);
}

.bg-navy-deep {
  background: var(--ccf-navy-deep);
}

.border-gold {
  border-color: rgba(230, 195, 92, 0.45) !important;
}

.border-gold-subtle {
  border-color: rgba(230, 195, 92, 0.2) !important;
}

.belief-pill {
  background: rgba(0, 31, 63, 0.5);
  border: 1px solid rgba(230, 195, 92, 0.35);
  border-radius: 12px;
}

.form-control-ccf {
  background: rgba(0, 21, 46, 0.6);
  border: 1px solid rgba(230, 195, 92, 0.35);
  color: var(--ccf-cream);
}

.form-control-ccf:focus {
  background: rgba(0, 21, 46, 0.85);
  border-color: var(--ccf-gold);
  color: var(--ccf-cream);
  box-shadow: 0 0 0 0.2rem rgba(230, 195, 92, 0.2);
}

.form-control-ccf::placeholder {
  color: var(--ccf-muted);
}

/* Decorative stars (subtle) */
.stars {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(230, 195, 92, 0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 85% 30%, rgba(230, 195, 92, 0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(253, 245, 230, 0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 70% 70%, rgba(230, 195, 92, 0.3) 0%, transparent 100%);
  opacity: 0.9;
}

.footer-logo {
  opacity: 0.95;
  border-radius: 6px;
}

/* ----- Layout & skip link ----- */
main#main-content {
  flex: 1 0 auto;
}

main#main-content:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 2000;
  padding: 0.6rem 1.1rem;
  background: var(--ccf-gold-bright);
  color: var(--ccf-navy);
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.site-header .navbar {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.brand-text-long {
  font-size: clamp(0.72rem, 1.5vw, 0.95rem);
  max-width: 14rem;
  line-height: 1.25;
}

@media (min-width: 992px) {
  .brand-text-long {
    max-width: none;
  }
}

.navbar .nav-link-lg {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  text-transform: none;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.btn-outline-gold {
  --bs-btn-color: var(--ccf-gold);
  --bs-btn-border-color: rgba(230, 195, 92, 0.65);
  --bs-btn-hover-bg: rgba(230, 195, 92, 0.15);
  --bs-btn-hover-border-color: var(--ccf-gold);
  --bs-btn-hover-color: var(--ccf-cream);
  --bs-btn-focus-shadow-rgb: 230, 195, 92;
  font-weight: 600;
}

.a11y-toolbar .btn-group .btn {
  min-width: 2.5rem;
}

.a11y-label {
  color: var(--ccf-muted);
  letter-spacing: 0.08em;
}

.a11y-fab-wrap {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1060;
}

.a11y-fab {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.a11y-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.65rem);
  width: min(92vw, 260px);
  padding: 0.9rem;
  border-radius: 10px;
  background: rgba(0, 21, 46, 0.96);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

body.high-contrast .a11y-panel {
  background: #000;
  border-color: #ffcc00 !important;
}

.letter-space-sm {
  letter-spacing: 0.1em;
}

/* ----- Font scale (WCAG-friendly) ----- */
html.font-scale-sm {
  font-size: 93.75%;
}

html.font-scale-md {
  font-size: 100%;
}

html.font-scale-lg {
  font-size: 112.5%;
}

/* ----- High contrast ----- */
body.high-contrast {
  --ccf-navy: #000000;
  --ccf-navy-deep: #0a0a0a;
  --ccf-gold: #ffcc00;
  --ccf-gold-bright: #ffcc00;
  --ccf-cream: #ffffff;
  --ccf-cream-soft: #f0f0f0;
  --ccf-muted: #c8c8c8;
  background: #000;
  color: #fff;
}

body.high-contrast .navbar {
  background: #000;
  border-bottom: 2px solid #ffcc00;
}

body.high-contrast .btn-outline-gold {
  --bs-btn-color: #ffcc00;
  --bs-btn-border-color: #ffcc00;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: #000;
}

body.high-contrast .form-control-ccf {
  background: #0a0a0a;
  border-color: #ffcc00;
  color: #fff;
}

body.high-contrast .carousel-indicators [data-bs-target] {
  background-color: #ffcc00;
}

body.high-contrast .carousel-control-prev-icon,
body.high-contrast .carousel-control-next-icon {
  filter: invert(1);
}

/* ----- User-toggled reduced motion ----- */
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}

html.reduce-motion {
  scroll-behavior: auto;
}

/* ----- Hero ----- */
.hero-home {
  min-height: min(88vh, 900px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(251, 192, 45, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(13, 40, 71, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 15% 70%, rgba(230, 195, 92, 0.12) 0%, transparent 45%),
    linear-gradient(165deg, #0a2a52 0%, var(--ccf-navy) 45%, var(--ccf-navy-deep) 100%);
  pointer-events: none;
}

.hero-photo {
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(230, 195, 92, 0.35);
}

.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(230, 195, 92, 0.35);
  display: block;
}

.hero-photo-1 {
  background-image:
    linear-gradient(145deg, rgba(0, 31, 63, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 30% 40%, rgba(253, 245, 230, 0.35) 0%, transparent 45%),
    linear-gradient(180deg, #1a3a66 0%, #0d2847 100%);
}

.hero-photo-2 {
  background-image:
    radial-gradient(circle at 70% 30%, rgba(251, 192, 45, 0.45) 0%, transparent 50%),
    linear-gradient(200deg, #0d2847 0%, #001f3f 100%);
}

.hero-photo-3 {
  background-image:
    linear-gradient(90deg, rgba(230, 195, 92, 0.15) 0%, transparent 40%, rgba(251, 192, 45, 0.12) 100%),
    linear-gradient(180deg, #122a4a 0%, #00152e 100%);
}

.mission-card {
  background: rgba(0, 21, 46, 0.35);
}

.mission-icon {
  flex-shrink: 0;
}

/* ----- Program cards (CSS visuals — replace with photos in /assets when available) ----- */
.bg-program-card {
  background: rgba(0, 21, 46, 0.45);
}

.post-content-preview {
  max-height: 8.5rem;
  overflow: hidden;
}

.post-content-preview p,
.post-content-preview ul,
.post-content-preview ol {
  margin-bottom: 0.5rem;
}

.post-content-preview > :last-child {
  margin-bottom: 0;
}

.post-content-preview--admin {
  max-height: 6.5rem;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote {
  margin-bottom: 1rem;
}

.post-content > :last-child {
  margin-bottom: 0;
}

.program-card-visual {
  border-bottom: 1px solid rgba(230, 195, 92, 0.25);
}

.program-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-bottom: 1px solid rgba(230, 195, 92, 0.25);
  display: block;
}

.program-card-visual-1 {
  background:
    radial-gradient(circle at 50% 80%, rgba(251, 192, 45, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, #1e3a5f 0%, #0a1f3d 100%);
}

.program-card-visual-2 {
  background:
    radial-gradient(circle at 40% 50%, rgba(253, 245, 230, 0.2) 0%, transparent 50%),
    linear-gradient(135deg, #0d2847 0%, #1a4a6e 100%);
}

.program-card-visual-3 {
  background:
    radial-gradient(circle at 70% 40%, rgba(230, 195, 92, 0.25) 0%, transparent 45%),
    linear-gradient(180deg, #122a4a 0%, #00152e 100%);
}

/* ----- Resource carousel ----- */
.resource-slide {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.resource-slide-1 {
  background: linear-gradient(135deg, #0d2847 0%, #1a3f66 50%, #0a1f3d 100%);
}

.resource-slide-2 {
  background: linear-gradient(135deg, #122a4a 0%, #0d2847 50%, #00152e 100%);
}

.resource-slide-3 {
  background: linear-gradient(135deg, #1a3a5f 0%, #0d2847 50%, #001f3f 100%);
}

.carousel-indicators [data-bs-target] {
  background-color: var(--ccf-gold);
  opacity: 0.45;
}

.carousel-indicators .active {
  opacity: 1;
}

.event-card {
  background: rgba(0, 21, 46, 0.4);
}

/* ----- Testimonials ----- */
.testimonial-card {
  background: rgba(0, 21, 46, 0.35);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(230, 195, 92, 0.45);
}

.testimonial-avatar-1 {
  background: linear-gradient(135deg, #5c6bc0, #3949ab);
}

.testimonial-avatar-2 {
  background: linear-gradient(135deg, #00897b, #00695c);
}

.testimonial-avatar-3 {
  background: linear-gradient(135deg, #fb8c00, #ef6c00);
}

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  background: var(--ccf-navy-deep);
}

.link-cream {
  color: var(--ccf-cream-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-cream:hover,
.link-cream:focus {
  color: var(--ccf-gold);
}

.map-embed iframe {
  border: 0;
  width: 100%;
  height: 100%;
}

.video-embed {
  background: rgba(0, 21, 46, 0.6);
}

.video-embed iframe {
  border: 0;
  width: 100%;
  height: 100%;
}

.social-list a {
  margin-right: 0.5rem;
}

/* ----- Focus visibility (keyboard) ----- */
a:focus-visible,
button:focus-visible,
.form-control-ccf:focus-visible,
.navbar .nav-link:focus-visible {
  outline: 3px solid var(--ccf-gold-bright);
  outline-offset: 2px;
}

body.high-contrast a:focus-visible,
body.high-contrast button:focus-visible {
  outline-color: #fff;
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .carousel-item,
  .carousel-fade .active.carousel-item-start,
  .carousel-fade .active.carousel-item-end {
    transition: none;
  }

  .skip-link {
    transition: none;
  }
}
