/* ==========================================================
   KingsCollection — interactive effects (see js/effects.js)
   ========================================================== */

/* ---------- Liquid cursor (only over logos) ---------- */
@media (hover: hover) and (pointer: fine) {
  img[src*="logo"]:not(.mini-logo) { cursor: none; }
}

.liquid-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: 9999;
  pointer-events: none;
  visibility: hidden;
}
.liquid-cursor.on { visibility: visible; }
.liquid-cursor__shape {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  transform: translate(-50%, -50%);
  /* white ↔ black, gold stays gold (filter defined in js/effects.js) */
  backdrop-filter: url(#kc-smart-invert);
  -webkit-backdrop-filter: url(#kc-smart-invert);
  border-radius: 50%;
  transition: scale .25s;
  animation: liquidMorph 3.2s ease-in-out infinite;   /* wobbling liquid blob */
}
.liquid-cursor.press .liquid-cursor__shape { scale: .8; }
@keyframes liquidMorph {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  25%      { border-radius: 63% 37% 41% 59% / 58% 36% 64% 42%; }
  50%      { border-radius: 37% 63% 52% 48% / 62% 57% 43% 38%; }
  75%      { border-radius: 55% 45% 35% 65% / 40% 62% 38% 60%; }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-light));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 300;
  pointer-events: none;
}

/* ---------- Magnetic buttons ---------- */
.btn, .verse-fab, .v360-chip { transition: background .25s, color .25s, border-color .25s, translate .25s var(--ease), transform .25s var(--ease); }

/* ---------- 3D tilt + gold sheen on product cards ---------- */
.card-top { transition: transform .35s var(--ease); transform-style: preserve-3d; }
.card-top.tilting { transition: transform .08s linear; }
.card-media::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(201,162,77,.22), transparent 55%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card-top.tilting .card-media::after { opacity: 1; }
.card-media { position: relative; }

/* ---------- Hero parallax ---------- */
.hero-logo { transition: translate .6s var(--ease); }

/* ---------- Page transitions ----------
   Switching pages shows the same verse-rain screen as the entrance
   (.intro--loader, built in js/features.js). Until it appears, the new
   page is kept hidden on black so nothing flashes. */
html.kc-loading { background: #000; }
html.kc-loading body { visibility: hidden; }

.intro--loader .intro-logo { animation: logoFloat 6s ease-in-out infinite; }
.intro--loader .intro-halo { animation: haloPulse 4s ease-in-out infinite; }
.intro--loader .intro-name,
.intro--loader .intro-tag { animation: none; }
.intro--fade-in { animation: fadeIn .25s var(--ease); }
.intro--fade-in .intro-logo { animation: logoPop .35s var(--ease), logoFloat 6s ease-in-out .35s infinite; }
/* shorter exit for the page-switch loader */
.intro.intro--loader { transition: opacity .45s var(--ease) .05s, visibility .45s .05s; }
.intro.intro--loader.leaving .intro-logo { animation: logoOut .5s var(--ease) forwards; }
@keyframes logoPop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .liquid-cursor__shape { animation: none !important; }
}

/* ==========================================================
   Entrance — falling Bible verses with the logo in the middle
   ========================================================== */
.intro {
  position: fixed; inset: 0; z-index: 500;
  background: radial-gradient(ellipse at 50% 45%, #1a1a1a 0%, #0a0a0a 55%, #000 100%);
  color: var(--white);
  overflow: hidden;
  transition: opacity .9s var(--ease) .2s, visibility .9s .2s;
}
.intro-rain { position: absolute; inset: 0; }
/* darkens the middle so the logo always stands out over the verses */
.intro-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 38% 46% at 50% 50%, rgba(0,0,0,.92) 0%, rgba(0,0,0,.6) 55%, transparent 100%);
  pointer-events: none;
}
.intro-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 1rem;
}
.intro-halo {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,77,.28) 0%, rgba(201,162,77,.08) 40%, transparent 70%);
  animation: haloPulse 4s ease-in-out infinite, fadeIn 1.6s .2s both;
  pointer-events: none;
}
.intro-logo {
  position: relative;
  height: min(240px, 32vh);
  width: auto;
  filter: drop-shadow(0 0 24px rgba(255,255,255,.25)) drop-shadow(0 0 60px rgba(201,162,77,.45));
  animation: logoIn 1.6s var(--ease) both, logoFloat 6s ease-in-out 1.6s infinite;
}
.intro-name {
  position: relative;
  margin: 1.6rem 0 .3rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: .32em;
  padding-left: .32em;
  animation: nameIn 1.4s var(--ease) .7s both;
}
.intro-name span { color: var(--gold); }
.intro-tag {
  position: relative;
  margin: 0 0 2rem;
  color: var(--grey-300);
  font-size: .78rem;
  letter-spacing: .5em;
  padding-left: .5em;
  text-transform: uppercase;
  animation: fadeUp 1s var(--ease) 1.3s both;
}
.intro-enter { position: relative; animation: fadeUp 1s var(--ease) 1.8s both; }
.intro-enter:hover { background: transparent; color: var(--gold); border-color: var(--gold); }
.intro-skip {
  position: absolute; right: 1.5rem; bottom: 1.5rem;
  background: none; border: 0;
  color: var(--grey-500);
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  animation: fadeIn 1s 2.2s both;
}
.intro-skip:hover { color: var(--gold); }

/* leaving: verses rush down, logo rises and brightens, screen fades */
.intro.leaving { opacity: 0; visibility: hidden; }
.intro.leaving .intro-logo { animation: logoOut 1s var(--ease) forwards; }
.intro.leaving .intro-name, .intro.leaving .intro-tag, .intro.leaving .intro-enter, .intro.leaving .intro-skip { animation: fadeOut .4s forwards; }

@keyframes logoIn { from { opacity: 0; transform: translateY(40px) scale(.85); filter: blur(8px); } to { opacity: 1; transform: none; } }
@keyframes logoFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes logoOut { to { opacity: 0; transform: scale(1.35); filter: brightness(2) drop-shadow(0 0 80px rgba(201,162,77,.9)); } }
@keyframes nameIn { from { opacity: 0; letter-spacing: .9em; filter: blur(6px); } to { opacity: 1; } }
@keyframes haloPulse { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

@media (max-width: 520px) {
  .intro-halo { width: 280px; height: 280px; }
  .intro-name { letter-spacing: .18em; padding-left: .18em; }
  .intro-tag { letter-spacing: .35em; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-logo, .intro-halo, .intro-name, .intro-tag, .intro-enter, .intro-skip { animation: none !important; }
}
