/* New Covenant Ministries website: animation on the pages other than the home page
   (About, Our History, Ministries, Watch, Bible Toolkit, Visit). Not loaded on the home page. */

/* ---------- page header: twinkling sparkles, the title rising in word by word */
.ph-sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.ph-sparkles i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgb(255 240 200 / 70%); opacity: 0; animation: twinkle var(--d) ease-in-out var(--w) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: .9; transform: scale(1); } }
.page-head h1 .pw { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(2deg); filter: blur(4px); animation: wordUp .85s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(.1s + var(--i) * 95ms); }
@keyframes wordUp { to { opacity: 1; transform: none; filter: none; } }
.page-head .eyebrow { animation: eyebrowIn 1s ease both; }
@keyframes eyebrowIn { from { opacity: 0; letter-spacing: .45em; } to { opacity: 1; letter-spacing: .14em; } }
.page-head p { animation: titleIn 1s ease .55s both; }
.page-head .eyebrow::after { content: ""; display: block; width: 3rem; height: 2px; margin-top: .55rem; background: linear-gradient(90deg, #f0c96a, transparent); transform-origin: left; animation: lineIn 1s cubic-bezier(.6, 0, .2, 1) .35s both; }
@keyframes lineIn { from { transform: scaleX(0); } }

/* ---------- things scrolling into view: cards come in one after another, some from the side or growing */
.reveal.from-left { transform: translateX(-28px); }
.reveal.from-right { transform: translateX(28px); }
.reveal.zoom { transform: scale(.94); }
.reveal.in.from-left, .reveal.in.from-right, .reveal.in.zoom { transform: none; }
.reveal { transition-delay: var(--delay, 0s); }

/* ---------- Our History: the timeline fills with gold as you scroll; each year lights up as you reach it */
.timeline { --fill: 0px; }
.timeline::after { content: ""; position: absolute; left: 1.15rem; top: .5rem; width: 2px; height: var(--fill); max-height: calc(100% - 1rem); background: linear-gradient(#f0c96a, var(--gold)); box-shadow: 0 0 10px 1px rgb(240 201 106 / 70%); border-radius: 2px; }
.timeline li::before { z-index: 1; transition: background .4s, transform .4s cubic-bezier(.3, 1.6, .5, 1), box-shadow .4s; }
.timeline li.reached::before { background: var(--gold); transform: scale(1.25); box-shadow: 0 0 0 5px rgb(200 150 45 / 20%); }
.timeline details { transition: box-shadow .3s, border-color .3s, transform .3s; }
.timeline li.reached details { border-color: rgb(200 150 45 / 45%); }
.timeline details:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.timeline details[open] .body { animation: openDown .45s ease; }
@keyframes openDown { from { opacity: 0; transform: translateY(-8px); } }
.year-jump { position: sticky; top: 4.4rem; z-index: 5; background: var(--cream); padding-top: .6rem; }
.year-jump button { transition: background .25s, color .25s, transform .25s; }
.year-jump button.active { background: var(--green-800); border-color: var(--green-800); color: #fff; transform: scale(1.06); }

/* ---------- Ministries: "Learn more" opens smoothly; the month badges flip in */
.min-card details[open] p { animation: openDown .4s ease; }
.min-card { transition: box-shadow .3s; }
.event .mo { transform: perspective(400px) rotateY(90deg); opacity: 0; transition: transform .7s cubic-bezier(.3, 1.4, .5, 1) .15s, opacity .4s .15s; }
.event.in .mo { transform: none; opacity: 1; }

/* ---------- Watch: the live message pulses; the video frames glow */
.live-banner svg { animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.25); } }
.live-banner.is-live { animation: liveGlow 1.8s ease-in-out infinite; }
@keyframes liveGlow { 50% { box-shadow: 0 0 0 4px rgb(198 40 40 / 18%); } }
.player-frame { animation: frameGlow 4s ease-in-out infinite; }
@keyframes frameGlow { 0%, 100% { box-shadow: var(--shadow), 0 0 0 2px rgb(200 150 45 / 15%); } 50% { box-shadow: var(--shadow), 0 0 0 3px rgb(200 150 45 / 55%), 0 0 30px rgb(200 150 45 / 25%); } }

/* ---------- Visit: the form comes alive as you use it */
.form input, .form textarea { transition: border-color .25s, box-shadow .25s, transform .25s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgb(200 150 45 / 18%); transform: translateY(-1px); }
.seg label { transition: background .25s, color .25s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.seg input:checked + label { transform: scale(1.05); }
.btn { position: relative; overflow: hidden; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgb(255 255 255 / 45%); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.map { transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .8s; }

/* ---------- About: the pastors' photos come in growing; the journey cards lift */
.pastor.reveal { transform: scale(.95) translateY(20px); }
.pastor.reveal.in { transform: none; }
.journey li.reveal { transform: translateY(24px) rotate(-1.5deg); }
.journey li.reveal.in { transform: none; }

/* ---------- Bible Toolkit: the toolkit fades into place.
   Only its opacity animates: a moving (transform) or blurred (filter) toolkit would pull the Strong's definition and
   the verse bar, which are pinned to the bottom of the screen, down to the bottom of the page instead. */
.toolkit-block .ect-app { animation: tkFade 1s ease .35s both; }
@keyframes tkFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- the footer's pause / play button */
.motion-toggle--foot { position: static; display: inline-block; margin-top: 1.5rem; background: transparent; color: rgb(255 255 255 / 75%); border: 1px solid rgb(255 255 255 / 25%); font: 600 .8rem var(--font-body); padding: .45rem .9rem; border-radius: 999px; cursor: pointer; }
.motion-toggle--foot:hover { color: #fff; border-color: rgb(255 255 255 / 55%); }

/* ---------- when the visitor pauses the animations */
.calm .ph-sparkles { display: none; }
.calm .page-head h1 .pw, .calm .page-head .eyebrow, .calm .page-head p, .calm .page-head .eyebrow::after, .calm .toolkit-block .ect-app { animation: none !important; opacity: 1; transform: none; filter: none; }
.calm .event .mo { transform: none; opacity: 1; transition: none; }
.calm .live-banner svg, .calm .live-banner.is-live, .calm .player-frame { animation: none !important; }
.calm .reveal.from-left, .calm .reveal.from-right, .calm .reveal.zoom, .calm .pastor.reveal, .calm .journey li.reveal { transform: none; }
.calm .timeline::after { display: none; }
