/* New Covenant Ministries website: the home page banner.
   The star travels across the sky and stands still in the corner ("the star ... went before them, till it came and
   stood", Matthew 2:9), and the church's name is burned into the page as if by the finger of God (Exodus 31:18). */

/* ---------- the star */
.hero--sky > .wrap { pointer-events: none; }
.hero--sky > .wrap > * { pointer-events: auto; }
.star-rise { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero--sky.js-star .star-rise { animation: none; opacity: 0; will-change: transform, opacity; }
.star-halo { position: absolute; inset: -45%; border-radius: 50%; background: radial-gradient(circle, rgb(255 236 180 / 38%) 0%, rgb(240 201 106 / 14%) 30%, transparent 62%); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.18); opacity: .7; } }
.star-rays--x { inset: 16%; rotate: 45deg; animation: spinBack 26s linear infinite, glow 3s ease-in-out infinite .8s; opacity: .8; }
@keyframes spinBack { from { rotate: 45deg; } to { rotate: -315deg; } }
.star-glint { position: absolute; left: -110%; right: -110%; top: 50%; height: 2px; margin-top: -1px; background: linear-gradient(90deg, transparent, rgb(255 246 220 / 90%) 45%, #fff 50%, rgb(255 246 220 / 90%) 55%, transparent); transform: scaleX(.15); opacity: 0; animation: glint 7s ease-in-out 5s infinite; }
@keyframes glint { 0%, 80%, 100% { transform: scaleX(.15); opacity: 0; } 88% { transform: scaleX(1); opacity: 1; } 94% { transform: scaleX(.6); opacity: .4; } }
.star-burst { position: absolute; inset: 35%; border-radius: 50%; border: 2px solid rgb(255 240 200 / 90%); box-shadow: 0 0 30px 10px rgb(255 230 160 / 60%), inset 0 0 20px rgb(255 240 200 / 70%); opacity: 0; pointer-events: none; }
.star-rise.burst .star-burst { animation: burst 1.3s cubic-bezier(.1, .6, .3, 1); }
.star-rise.burst .star-core { animation: flash 1.3s ease-out, glow 4s ease-in-out infinite 1.3s; }
@keyframes burst { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(5); } }
@keyframes flash { 0% { box-shadow: 0 0 30px 14px #fff, 0 0 90px 40px #f6d77a, 0 0 200px 90px rgb(240 201 106 / 60%); } }
/* the beams of light only shine once the star has come to rest */
.hero--sky.js-star .beams::before { animation: spin 90s linear infinite; opacity: 0; transition: opacity 2.5s ease; }
.hero--sky.js-star.arrived .beams::before { opacity: 1; }

/* ---------- the name, burned into the page */
.hero-title.burn span { animation: none; }
.hero-title.burn .bw { display: inline-block; white-space: nowrap; }
.hero-title.burn .ch { display: inline-block; }
.hero--sky.js-burn .hero-title .ch { opacity: 0; }
.hero--sky.js-burn .hero-title .ch.lit { animation: sear 2.2s cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes sear {
  0% { opacity: 0; color: #fff; transform: scale(1.25) translateY(-.04em); filter: blur(3px); text-shadow: 0 0 4px #fff, 0 0 14px #ffe08a, 0 0 30px #ff9a1f, 0 0 60px #ff4d00; }
  10% { opacity: 1; filter: none; transform: scale(1.06); color: #fff8e1; text-shadow: 0 0 3px #fff, 0 0 12px #ffd36b, 0 0 26px #ff8a00, 0 0 48px #ff4d00; }
  35% { color: #ffd9a0; text-shadow: 0 0 2px #ffe7b8, 0 0 10px #ff9a1f, 0 0 22px rgb(255 77 0 / 70%); transform: none; }
  70% { color: #fff3dc; text-shadow: 0 0 6px rgb(255 154 31 / 55%), 0 0 16px rgb(255 77 0 / 25%); }
  100% { opacity: 1; color: #fff; transform: none; text-shadow: 0 0 14px rgb(240 201 106 / 28%); }
}
/* once written, the letters glow faintly, like embers, for a moment */
.hero-title.burn.done .ch { animation: embers 3.5s ease-in-out forwards; opacity: 1; }
@keyframes embers { 0% { text-shadow: 0 0 14px rgb(240 201 106 / 28%); } 40% { text-shadow: 0 0 18px rgb(255 154 31 / 55%), 0 0 4px rgb(255 220 150 / 60%); } 100% { text-shadow: 0 0 10px rgb(240 201 106 / 18%); } }

/* the point of fire that does the writing, with sparks and smoke */
.fire-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.finger-fire { position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; margin: -1.2rem 0 0 -1.2rem; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #fff 0 10%, #fff2c4 18%, #ffc35a 34%, rgb(255 120 20 / 70%) 52%, rgb(255 60 0 / 25%) 64%, transparent 72%);
  mix-blend-mode: screen; transition: opacity .3s ease; will-change: transform; }
.finger-fire::before { content: ""; position: absolute; inset: -60%; border-radius: 50%; background: radial-gradient(circle, rgb(255 170 60 / 35%), transparent 60%); animation: flicker .09s steps(2) infinite alternate; }
.finger-fire::after { content: ""; position: absolute; left: 30%; right: 30%; top: -55%; height: 80%; border-radius: 50% 50% 40% 40%; background: linear-gradient(to top, rgb(255 190 80 / 85%), rgb(255 90 0 / 0%)); filter: blur(2px); animation: tongue .14s ease-in-out infinite alternate; transform-origin: bottom; }
.finger-fire.on { opacity: 1; }
@keyframes flicker { from { transform: scale(.92); opacity: .8; } to { transform: scale(1.08); opacity: 1; } }
@keyframes tongue { from { transform: scaleY(.8) skewX(-6deg); } to { transform: scaleY(1.15) skewX(6deg); } }
.spark { position: absolute; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: #ffe39a; box-shadow: 0 0 6px 2px rgb(255 160 40 / 80%); animation: spark var(--t, .9s) cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.smoke { position: absolute; width: 1.4rem; height: 1.4rem; margin: -.7rem; border-radius: 50%; background: radial-gradient(circle, rgb(230 230 225 / 32%), transparent 70%); filter: blur(3px); animation: smoke 2.4s ease-out forwards; }
@keyframes smoke { from { transform: translate(0, 0) scale(.6); opacity: .9; } to { transform: translate(var(--dx), -4.5rem) scale(3); opacity: 0; } }

/* the rest of the banner arrives after the name is written */
.hero--sky.js-burn .wrap > div > :not(.eyebrow):not(.hero-title) { opacity: 0; transform: translateY(14px); animation: none; transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.hero--sky.js-burn .next-card { opacity: 0; transform: translateY(20px); transition: opacity 1s ease .5s, transform 1s cubic-bezier(.2, .7, .2, 1) .5s; }
.hero--sky.js-burn.burned .wrap > div > :not(.eyebrow):not(.hero-title), .hero--sky.js-burn.burned .next-card { opacity: 1; transform: none; }
.hero--sky.js-burn.burned .wrap > div > :nth-child(4) { transition-delay: .25s; }
.hero--sky.js-burn.burned .wrap > div > :nth-child(5) { transition-delay: .45s; }
.hero--sky.js-burn.burned .wrap > div > :nth-child(6) { transition-delay: .7s; }
.burn-verse { margin: .2rem 0 1.1rem !important; font: italic 500 1.05rem/1.4 var(--font-head) !important; color: #f6c27a !important; }
.burn-verse span { font: 600 .82rem var(--font-body); font-style: normal; color: rgb(255 255 255 / 60%); margin-left: .35rem; }

/* reduced motion (html.calm, set by the page's script) */
  .calm .star-halo, .calm .star-rays--x, .calm .star-glint, .calm .finger-fire::before, .calm .finger-fire::after { animation: none !important; }
  .calm .fire-layer { display: none; }


/* ---------- the visitor's own pause / play button for the banner's motion */
.motion-toggle { position: absolute; left: 1rem; bottom: 1rem; z-index: 4; border: 1px solid rgb(255 255 255 / 30%); background: rgb(0 0 0 / 25%); color: rgb(255 255 255 / 80%); font: 600 .78rem var(--font-body); padding: .45rem .85rem; border-radius: 999px; cursor: pointer; backdrop-filter: blur(4px); }
.motion-toggle:hover { color: #fff; border-color: rgb(255 255 255 / 60%); }
