/* IPC Florida — motion layer
   Smooth page transitions, scroll-linked effects, staggered reveals and micro-interactions.
   Everything switches off for visitors who prefer reduced motion. */

/* Cross-page transitions (View Transitions API, Chrome/Edge/Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .35s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: vt-in .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px) scale(.99); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.site-header { view-transition-name: header; }

/* Scroll progress bar */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold-d), var(--gold-2), #fff6dc); box-shadow: 0 0 12px rgba(232,205,138,.7); }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* Header hides on scroll down, returns on scroll up */
.site-header { transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .3s; }
.site-header.hide { transform: translateY(-100%); }

/* Hero: slow Ken Burns, floating light, letter-by-letter title */
.hero.has-bg { background-image: none !important; }
.hero-bg { position: absolute; inset: -6% -2%; z-index: -2; background: linear-gradient(180deg,rgba(7,17,31,.55),rgba(7,17,31,.35) 35%,rgba(7,17,31,.92)), var(--bg) center/cover no-repeat;
  animation: kenburns 24s ease-in-out infinite alternate; will-change: transform; }
@keyframes kenburns { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.14) translate3d(-1.5%,-1%,0); } }
.motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.motes i { position: absolute; bottom: -10px; width: var(--s,4px); height: var(--s,4px); border-radius: 50%; background: radial-gradient(circle,#fff6dc,rgba(232,205,138,0) 70%);
  left: var(--x); opacity: 0; animation: rise var(--d,14s) linear var(--delay,0s) infinite; }
@keyframes rise { 10% { opacity: .9; } 90% { opacity: .6; } to { transform: translate3d(var(--dx,20px), -105vh, 0); opacity: 0; } }
.split-letters { display: inline-block; }
.split-letters .ch { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(4deg); filter: blur(8px);
  animation: letter .9s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(.25s + var(--i) * 45ms); }
.split-letters .sp { display: inline-block; width: .28em; }
@keyframes letter { to { opacity: 1; transform: none; filter: none; } }
.hero h1 .ch { color: #fff; text-shadow: 0 0 0 rgba(232,205,138,0); }
.hero h1 .ch { animation: letter .9s cubic-bezier(.2,.7,.2,1) forwards, glint 6s ease-in-out infinite; animation-delay: calc(.25s + var(--i) * 45ms), calc(2s + var(--i) * 90ms); }
@keyframes glint { 0%,85%,100% { color: #fff; text-shadow: 0 0 0 rgba(232,205,138,0); } 90% { color: var(--gold-2); text-shadow: 0 0 24px rgba(232,205,138,.8); } }

/* Load-in for hero pieces (separate from scroll reveals) */
.hero .reveal, .page-hero .eyebrow, .page-hero h1, .page-hero .lead, .app-hero-in > * { animation: rise-in 1s cubic-bezier(.2,.7,.2,1) both; }
.hero .reveal:nth-child(2), .page-hero h1 { animation-delay: .15s; }
.hero .reveal:nth-child(3), .page-hero .lead { animation-delay: .35s; }
.hero .reveal:nth-child(4) { animation-delay: .55s; }
.hero-times.reveal { animation-delay: .8s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(30px); filter: blur(6px); } }
.page-hero { overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: inherit; animation: kenburns 26s ease-in-out infinite alternate; z-index: 0; }
.page-hero-in { position: relative; z-index: 1; }

/* Scroll reveals: variants */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1), filter 1s; filter: blur(4px); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal[data-anim="left"] { transform: translateX(-50px); }
.reveal[data-anim="right"] { transform: translateX(50px); }
.reveal[data-anim="zoom"] { transform: scale(.92); }
.reveal.in[data-anim] { transform: none; }

/* Image wipe reveal */
.split-media img, .visit-photo, .ministry-img img { clip-path: inset(0 0 100% 0 round var(--r)); transition: clip-path 1.3s cubic-bezier(.7,0,.2,1) .15s, transform 1.6s cubic-bezier(.2,.7,.2,1); transform: scale(1.12); }
.in .split-media img, .split-media.in img, .visit-card.in .visit-photo { clip-path: inset(0 0 0 0 round var(--r)); transform: scale(1); }
.split-media::before { transition: transform 1.2s cubic-bezier(.2,.7,.2,1) .4s, opacity 1s .4s; transform: translate(-1.2rem,-1.2rem); opacity: 0; }
.split-media.in::before { transform: none; opacity: 1; }
.badge-float { transition: transform 1s cubic-bezier(.2,.7,.2,1) .7s, opacity 1s .7s; }
.split-media:not(.in) .badge-float { opacity: 0; transform: translateY(20px) scale(.9); }

/* Scroll-linked word highlight on the big quote */
.quote .w { color: rgba(11,26,51,.16); transition: color .35s; }
.quote .w.lit { color: var(--navy); }
.quote .w.lit.gold { color: var(--gold-d); }

/* Marquee */
.marquee { overflow: hidden; background: var(--ink); color: var(--gold-2); border-block: 1px solid rgba(232,205,138,.18); padding: 1.1rem 0; }
.marquee-track { display: flex; width: max-content; gap: 3rem; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font: 500 clamp(1.3rem,2.4vw,1.9rem)/1 var(--serif); white-space: nowrap; display: inline-flex; align-items: center; gap: 3rem; }
.marquee span::after { content: "✦"; font-size: .7em; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Gold button shine + magnetic */
.btn { position: relative; overflow: hidden; will-change: transform; }
.btn-gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%); transform: translateX(-120%); }
.btn-gold:hover::after { transform: translateX(120%); transition: transform .8s cubic-bezier(.2,.7,.2,1); }

/* 3D tilt cards */
.tilt { transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.tilt .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.28), transparent 45%); opacity: 0; transition: opacity .3s; }
.tilt:hover .glare { opacity: 1; }
.pstep { background-size: 112% !important; transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .4s, background-size 1.2s cubic-bezier(.2,.7,.2,1) !important; }
.pstep:hover { background-size: 122% !important; }

/* Count-up number */
.count { font-variant-numeric: tabular-nums; }

/* Timeline line draws as you scroll */
.timeline::before { transform-origin: top; transform: scaleY(var(--draw,0)); transition: transform .2s linear; }
.timeline li::before { transition: background .4s, transform .4s; }
.timeline li.in::before { background: var(--gold); transform: scale(1.25); }

/* Live badge glow, chips */
.nu-badge.live { box-shadow: 0 0 0 0 rgba(192,57,43,.6); animation: ring 2s infinite; }
@keyframes ring { 70% { box-shadow: 0 0 0 12px rgba(192,57,43,0); } 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); } }
.day.is-today { animation: today-glow 3s ease-in-out infinite; }
@keyframes today-glow { 50% { box-shadow: 0 0 0 1px var(--gold) inset, 0 0 32px -6px rgba(201,162,74,.55); } }

/* Scroll-driven parallax for CTA/featured bands where supported */
@supports (animation-timeline: view()) {
  .cta-band, .featured { background-attachment: scroll !important; animation: band-pan linear both; animation-timeline: view(); }
  @keyframes band-pan { from { background-position: center 30%; } to { background-position: center 70%; } }
  .value, .ecard, .feat-item, .mcard { animation: card-in linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  @keyframes card-in { from { opacity: 0; transform: translateY(40px) scale(.97); } }
}

/* Custom cursor ring (desktop pointers only) */
.cursor { position: fixed; top: 0; left: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid var(--gold); border-radius: 50%; pointer-events: none; z-index: 120;
  transition: width .25s, height .25s, margin .25s, background .25s, opacity .3s; mix-blend-mode: difference; opacity: 0; }
.cursor.on { opacity: .9; }
.cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(232,205,138,.15); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split-letters .ch { opacity: 1 !important; transform: none !important; filter: none !important; }
  .split-media img, .visit-photo { clip-path: none !important; transform: none !important; }
  .quote .w { color: var(--navy) !important; }
  .cursor, .motes { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ===== Header slideshow ===== */
.hero-slider { min-height: min(100svh, 920px); background: var(--ink) !important; isolation: isolate; }
.slides-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.slide-bg { position: absolute; inset: -4%; opacity: 0; transform: scale(1.08);
  background: linear-gradient(180deg, rgba(7,17,31,.6), rgba(7,17,31,.25) 38%, rgba(7,17,31,.94)), linear-gradient(90deg, rgba(7,17,31,.75), transparent 65%), var(--bg) center/cover no-repeat;
  transition: opacity 1.4s cubic-bezier(.4,0,.2,1), transform 1.4s cubic-bezier(.4,0,.2,1); }
.slide-bg.is-active { opacity: 1; transform: scale(1); animation: slide-zoom 9s linear forwards; }
@keyframes slide-zoom { from { transform: scale(1.02); } to { transform: scale(1.12) translate3d(-1%, -1%, 0); } }
.slides-text { display: grid; padding: 7rem 0 2rem; }
.slide { grid-area: 1 / 1; align-self: end; max-width: 880px; visibility: hidden; transition: visibility 0s 1s; }
.slide.is-active { visibility: visible; transition: none; }
.slide > * { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity .6s, transform .6s, filter .6s; }
.slide.is-active > * { opacity: 1; transform: none; filter: none; transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1), filter 1s; }
.slide.is-active > :nth-child(1) { transition-delay: .35s; }
.slide.is-active > :nth-child(2) { transition-delay: .5s; }
.slide.is-active > :nth-child(3) { transition-delay: .7s; }
.slide.is-active > :nth-child(4) { transition-delay: .9s; }
.slide-title { font: 700 clamp(2.6rem, 7.5vw, 5.8rem)/1 "Poppins", var(--sans); letter-spacing: -.02em; color: #fff; margin: 0 0 .2em; }
.hero-slider h1 { margin: 0 0 .1em; }
.slider-ui { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.6rem; }
.dots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .8rem; flex: 1; max-width: 760px; }
.dot { background: none; border: 0; padding: .4rem 0; text-align: left; color: rgba(255,255,255,.55); cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; font: 500 .78rem/1.2 var(--sans); }
.dot-num { font: 600 .8rem/1 var(--sans); letter-spacing: .1em; }
.dot-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-bar { grid-column: 1 / -1; height: 2px; background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden; margin-top: .45rem; }
.dot-bar i { display: block; height: 100%; width: 100%; background: var(--gold-2); transform: scaleX(0); transform-origin: left; }
.dot.is-done .dot-bar i { transform: scaleX(1); }
.dot.is-active { color: #fff; }
.dot.is-active .dot-bar i { animation: dot-fill var(--dur, 7s) linear forwards; }
.hero-slider.paused .dot.is-active .dot-bar i { animation-play-state: paused; }
@keyframes dot-fill { to { transform: scaleX(1); } }
.dot:hover { color: #fff; }
.arrows { display: flex; gap: .5rem; }
.arrow { width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .25s, border-color .25s, transform .25s; }
.arrow:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: scale(1.06); }
.arrow svg { width: 22px; height: 22px; }
.arrow .i-play, .hero-slider.paused .arrow .i-pause { display: none; }
.hero-slider.paused .arrow .i-play { display: block; }
.hero-slider .hero-times { margin-bottom: 2rem; }
@media (max-width: 860px) {
  .hero-slider { min-height: auto; }
  .slides-text { padding: 5.5rem 0 1.5rem; }
  .dot-label { display: none; }
  .dots { gap: .5rem; }
  .arrow { width: 44px; height: 44px; }
  .arrow.prev, .arrow.next { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slide-bg { transition: opacity .01s !important; }
}
