/* =====================================================================
   J&M UPGRADE LAYER — loaded AFTER style.css. Delete the <link> to revert.
   ===================================================================== */
:root {
  --navy-deep: #06173d;
  --gold-soft: #e8cf7a;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --ease-out: cubic-bezier(0.22, 0.8, 0.24, 1);
}

/* ---------- scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform: scaleX(0); transform-origin: left; z-index: 1001; pointer-events: none;
}

/* ---------- header: frosted glass that tightens on scroll ---------- */
header {
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(11, 45, 116, 0.06);
  transition: box-shadow 0.4s ease;
}
/* glass lives on a pseudo-layer: backdrop-filter on <header> itself would trap the fixed mobile menu */
header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  transition: background 0.4s ease;
}
header.is-scrolled { box-shadow: 0 10px 30px rgba(6, 23, 61, 0.10); }
header.is-scrolled::before { background: rgba(255, 255, 255, 0.92); }
html, body { overflow-x: clip; }
nav { transition: padding 0.4s var(--ease-out); }
header.is-scrolled nav { padding-top: 8px; padding-bottom: 8px; }
.nav-links a { position: relative; }
@media (min-width: 951px) {
  .nav-links a:not(.btn)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: var(--gold); transform: scaleX(0); transform-origin: left;
    transition: transform 0.35s var(--ease-out);
  }
  .nav-links a:not(.btn):hover::after, .nav-links a.active::after { transform: scaleX(1); }
}

/* ---------- buttons: soft sheen on hover ---------- */
.btn { position: relative; overflow: hidden; transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background 0.3s ease; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg); transition: left 0.7s var(--ease-out);
}
.btn:hover::after { left: 130%; }
.btn-gold:hover { box-shadow: 0 10px 24px rgba(212, 175, 55, 0.45); }
.btn-blue:hover { box-shadow: 0 10px 24px rgba(11, 45, 116, 0.35); }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; text-align: left; justify-content: flex-start;
  padding: 110px 24px 70px;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(212, 175, 55, 0.22), transparent 60%),
    radial-gradient(700px 500px at 5% 95%, rgba(46, 96, 200, 0.35), transparent 60%),
    linear-gradient(135deg, var(--navy-deep) 0%, #0b2d74 100%);
}
.hero::before { /* slow-drifting photo under the colour wash */
  content: ""; position: absolute; inset: -4%; z-index: -2;
  background: url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1600&q=80") center/cover;
  opacity: 0.22; animation: kenburns 28s ease-in-out infinite alternate;
}
.hero::after { /* fine grid texture */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -2%); } }

.hero-box { max-width: 1100px; width: 100%; margin: 0 auto; animation: none; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1.06; margin-bottom: 22px; max-width: 20ch;
  text-wrap: balance;
}
.hero h1::after { /* gold rule that draws itself in */
  content: ""; display: block; height: 3px; width: 120px; margin-top: 22px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transform-origin: left;
  animation: drawLine 1.1s 0.9s var(--ease-out) both;
}
@keyframes drawLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero p { font-size: clamp(1rem, 1.6vw, 1.3rem); max-width: 56ch; min-height: 4.2em; opacity: 0.88; line-height: 1.55; }
.hero .actions a { font-size: 0.85rem; padding: 16px 30px; }
.hero .actions .btn-blue { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.hero .actions .btn-blue:hover { background: rgba(255, 255, 255, 0.12); }

.hero-offer {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  padding: 8px 18px 8px 8px; border-radius: 999px; text-decoration: none; color: #fff; font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(232, 207, 122, 0.5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.3s ease;
}
.hero-offer:hover { background: rgba(255, 255, 255, 0.16); }
.hero-offer b { background: var(--gold); color: #111; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; }

/* the one orchestrated page-load sequence */
.hero-box > * { animation: heroIn 0.9s var(--ease-out) backwards; }
.hero-box > :nth-child(1) { animation-delay: 0.15s; }
.hero-box > :nth-child(2) { animation-delay: 0.35s; }
.hero-box > :nth-child(3) { animation-delay: 0.6s; }
.hero-box > :nth-child(4) { animation-delay: 0.8s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } }

/* ---------- section titles + backgrounds ---------- */
.title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(2.3rem, 4.6vw, 3.4rem); position: relative; padding-bottom: 22px; margin-bottom: 22px;
}
.title::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 64px; height: 3px; margin-left: -32px;
  background: var(--gold); transform: scaleX(0); transition: transform 0.9s 0.2s var(--ease-out);
}
.title.in::after, html:not(.js-reveal) .title::after { transform: scaleX(1); }
section { padding: 96px 24px; }
#about, #events { background: #fff; }
#testimonials { background: linear-gradient(180deg, var(--navy-deep), #0b2d74); }
#testimonials .title { color: #fff; }
#testimonials .section-intro { color: rgba(255, 255, 255, 0.75); }

/* ---------- cards ---------- */
.card, .testimonial-card { transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease; border: 1px solid rgba(11, 45, 116, 0.06); }
.card:hover, .testimonial-card:hover { box-shadow: 0 28px 55px rgba(6, 23, 61, 0.16); }
.course-card { position: relative; overflow: hidden; }
.course-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--gold)); transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.course-card:hover::before { transform: scaleX(1); }
.course-card h3 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.pillar { transition: transform 0.4s var(--ease-out); }
.pillar:hover { transform: translateX(8px); }
.about-lead { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.25; }
.promo-banner { background: linear-gradient(110deg, var(--navy-deep), #0b2d74 60%, #14429e); box-shadow: 0 18px 40px rgba(6, 23, 61, 0.25); }

/* ---------- scroll reveals (JS adds .reveal; removed after play so hovers work) ---------- */
html.js-reveal .reveal { opacity: 0; transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
html.js-reveal .reveal.from-up { transform: translateY(40px); }
html.js-reveal .reveal.from-left { transform: translateX(-60px); }
html.js-reveal .reveal.from-right { transform: translateX(60px); }
html.js-reveal .reveal.zoom { transform: scale(0.94); }
html.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
footer { background: var(--navy-deep); border-top: 3px solid var(--gold); letter-spacing: 0.02em; }

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  html.js-reveal .reveal { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
  section { padding: 70px 18px; }
  .hero { padding-top: 100px; }
  .hero h1 { max-width: none; }
}
.hero-offer b { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 600px) { .hero-offer { font-size: 0.82rem; line-height: 1.35; border-radius: 18px; } }

/* ---------- church code field ---------- */
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { padding: 0 22px; }
#codeStatus { min-height: 1.2em; margin: 6px 0 12px; font-weight: 600; }

/* ---------- MOBILE HERO FIXES ---------- */
.hero { min-height: 100vh; min-height: 100svh; }
@media (max-width: 600px) {
  .hero { padding: 96px 20px 56px; align-items: center; }
  .hero::before { inset: 0; animation: none; background-position: 62% center; opacity: 0.16; }
  .hero::after { background-size: 44px 44px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); line-height: 1.1; }
  .hero p { min-height: 0; font-size: 1rem; margin-bottom: 24px; }
  .hero .actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero .actions a { text-align: center; width: 100%; }
  .hero-offer { margin-bottom: 22px; }
}

/* ---------- hero layout safety net ----------
   .hero stacks vertically no matter what, so a stray element can never sit beside the headline */
.hero { flex-direction: column; align-items: center; justify-content: center; }
.hero > * { min-width: 0; max-width: 100%; }
.hero-box { min-width: 0; }
.hero > .hero-offer { align-self: center; width: fit-content; max-width: 1100px; }
@media (max-width: 600px) {
  .hero { align-items: stretch; }
  .hero > .hero-offer { align-self: stretch; width: auto; }
}
@media (max-width: 600px) { .hero > .hero-offer, .hero-offer { display: block; line-height: 1.9; padding: 8px 16px 8px 8px; } .hero-offer b { display: inline-block; margin-right: 8px; } }
.hero-offer .js-deadline { white-space: nowrap; }
