/* ==========================================================================
   DZSTVN enhancement layer: animation, interaction and mobile polish.
   Loaded on every page after the original styles. Removing the two
   injected tags restores the original site exactly.
   ========================================================================== */
:root {
  --fx-red: #c1121f;
  --fx-red-deep: #8a0000;
  --fx-ink: #0a0a0a;
  --fx-ease: cubic-bezier(.22, 1, .36, 1);
  --fx-ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- Scroll progress bar ---------- */
.fx-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100000;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--fx-red-deep), var(--fx-red), #ff4d4d);
  box-shadow: 0 0 12px rgba(193, 18, 31, .6);
  pointer-events: none;
}

/* ---------- Intro loader (first visit per session) ---------- */
html.fx-intro { background: #0a0a0a; }
html.fx-intro body { visibility: hidden; }
.fx-loader {
  position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center;
  background: var(--fx-ink);
  transition: clip-path .9s var(--fx-ease), visibility 0s .9s;
  clip-path: inset(0 0 0 0);
}
.fx-loader.is-done { clip-path: inset(0 0 100% 0); visibility: hidden; }
.fx-loader__word {
  display: flex; gap: .08em; font: 800 clamp(2.4rem, 9vw, 5rem)/1 Manrope, system-ui, sans-serif;
  letter-spacing: .12em; color: var(--fx-red);
}
.fx-loader__word span {
  display: inline-block; opacity: 0; transform: translateY(60%) rotate(8deg);
  animation: fx-letter .7s var(--fx-ease) forwards;
}
.fx-loader__bar {
  position: absolute; bottom: 18%; left: 50%; width: min(220px, 50vw); height: 2px;
  transform: translateX(-50%); background: #222; overflow: hidden;
}
.fx-loader__bar::after {
  content: ""; position: absolute; inset: 0; background: var(--fx-red);
  transform-origin: 0 50%; animation: fx-load 1.1s var(--fx-ease) forwards;
}
@keyframes fx-letter { to { opacity: 1; transform: none; } }
@keyframes fx-load { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Page transitions ---------- */
html.fx-ready body { animation: fx-page-in .6s var(--fx-ease) both; }
html.fx-leaving body { opacity: 0; transform: translateY(-8px); transition: opacity .28s ease, transform .28s ease; }
@keyframes fx-page-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Scroll reveals (only hidden once JS is running) ---------- */
html.fx-ready .fx-reveal {
  opacity: 0; transform: translate3d(0, 40px, 0);
  transition: opacity .9s var(--fx-ease), transform .9s var(--fx-ease);
  transition-delay: var(--fx-delay, 0s);
}
html.fx-ready .fx-reveal.fx-left  { transform: translate3d(-48px, 0, 0); }
html.fx-ready .fx-reveal.fx-right { transform: translate3d(48px, 0, 0); }
html.fx-ready .fx-reveal.fx-zoom  { transform: scale(.92); }
html.fx-ready .fx-reveal.is-in { opacity: 1; transform: none; }

/* Image wipe reveal */
/* (clip the children, not the observed wrapper: a fully clipped target never "intersects") */
html.fx-ready .fx-wipe > img { clip-path: inset(0 0 100% 0); transform: scale(1.15); transition: clip-path 1.2s var(--fx-ease), transform 1.6s var(--fx-ease); transition-delay: var(--fx-delay, 0s); }
html.fx-ready .fx-wipe.is-in > img { clip-path: inset(0 0 0 0); transform: none; }

/* Split headings: words rise in */
.fx-split .fx-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.fx-split .fx-w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--fx-ease); transition-delay: calc(var(--i) * 70ms); }
.fx-split.is-in .fx-w > span { transform: none; }

/* Eyebrow labels: animated accent line */
.fx-eyebrow { position: relative; }
.fx-eyebrow::before {
  content: ""; display: inline-block; width: 0; height: 2px; margin-right: 0;
  vertical-align: middle; background: currentColor; transition: width .8s var(--fx-ease) .2s, margin .8s var(--fx-ease) .2s;
}
.fx-eyebrow.is-in::before { width: 28px; margin-right: 10px; }

/* ---------- Hero ---------- */
.hero-section { overflow: hidden; }
.hero-section .hero-bg {
  animation: fx-kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes fx-kenburns { from { transform: scale(1.06); } to { transform: scale(1.18) translate(-1.5%, -1%); } }
.hero-section .hero-content { will-change: transform, opacity; }
.hero-section h1 .fx-ch {
  display: inline-block; opacity: 0; transform: translateY(.6em) rotateX(-70deg); transform-origin: 50% 100%;
  animation: fx-ch-in .9s var(--fx-ease) forwards; animation-delay: calc(.25s + var(--i) * 45ms);
}
@keyframes fx-ch-in { to { opacity: 1; transform: none; } }
.hero-section h1 { perspective: 600px; text-shadow: 0 10px 40px rgba(0, 0, 0, .55); }
.hero-section .hero-content > p,
.hero-section .hero-buttons,
.hero-section .hero-nav { opacity: 0; animation: fx-rise 1s var(--fx-ease) forwards; }
.hero-section .hero-content > p { animation-delay: .9s; letter-spacing: .5em; animation-name: fx-track; }
.hero-section .hero-buttons { animation-delay: 1.1s; }
.hero-section .hero-nav { animation-delay: 1.3s; animation-name: fx-fade; } /* keeps its own translateX(-50%) centring */
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fx-track { from { opacity: 0; letter-spacing: .9em; } to { opacity: 1; letter-spacing: .3em; } }
.hero-nav a { transition: transform .35s var(--fx-ease-back), background-color .3s, box-shadow .3s; }
.hero-nav a:hover { transform: translateY(-4px) scale(1.12); box-shadow: 0 8px 22px rgba(193, 18, 31, .45); }

.fx-scroll-cue {
  position: absolute; right: 28px; bottom: 28px; z-index: 3;
  width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, .55); border-radius: 14px;
  opacity: 0; animation: fx-rise 1s var(--fx-ease) 1.6s forwards; cursor: pointer; background: none; padding: 0;
}
.fx-scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff; animation: fx-wheel 1.8s ease-in-out infinite;
}
@keyframes fx-wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-height: 640px), (max-width: 900px) { .fx-scroll-cue { display: none; } }

/* ---------- Marquee ticker ---------- */
.fx-marquee {
  position: relative; overflow: hidden; background: var(--fx-red-deep); color: #fff;
  border-block: 1px solid rgba(255, 255, 255, .08);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.fx-marquee__track { display: flex; width: max-content; animation: fx-marquee 38s linear infinite; }
.fx-marquee:hover .fx-marquee__track { animation-play-state: paused; }
.fx-marquee__item {
  display: flex; align-items: center; gap: 28px; padding: 16px 28px 16px 0; white-space: nowrap;
  font: 700 clamp(.8rem, 1.6vw, 1rem)/1 Manrope, sans-serif; letter-spacing: .28em; text-transform: uppercase;
}
.fx-marquee__item a { color: inherit; text-decoration: none; transition: color .25s; }
.fx-marquee__item a:hover { color: #ffb3b3; }
.fx-marquee__item i { font-style: normal; opacity: .55; }
@keyframes fx-marquee { to { transform: translateX(-50%); } }

/* ---------- Header: hide on scroll down, glass on scroll ---------- */
.dv-pill-header { transition: transform .45s var(--fx-ease), opacity .45s var(--fx-ease); }
html.fx-hide-header .dv-pill-header { transform: translateY(-130%); opacity: 0; }
.dv-pill-header.dv-scrolled .dv-pill-nav,
.dv-pill-header .dv-pill-nav { -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }

/* LISTEN pill: live equalizer */
.dv-pill-cta { display: inline-flex !important; align-items: center; gap: 8px; position: relative; overflow: hidden; }
.fx-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.fx-eq i { display: block; width: 2px; height: 100%; background: currentColor; border-radius: 1px; transform-origin: 50% 100%; animation: fx-eq 1s ease-in-out infinite; }
.fx-eq i:nth-child(2) { animation-delay: -.3s; } .fx-eq i:nth-child(3) { animation-delay: -.6s; } .fx-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes fx-eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* Shine sweep on primary buttons */
.hero-btn, .dv-chapter-btn, .dv-pill-cta, .dzf-btn, .dcp-submit, .dzcp-submit { position: relative; overflow: hidden; isolation: isolate; }
.hero-btn::after, .dv-chapter-btn::after, .dv-pill-cta::after, .dzf-btn::after, .dzcp-submit::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--fx-ease);
}
.hero-btn:hover::after, .dv-chapter-btn:hover::after, .dv-pill-cta:hover::after, .dzf-btn:hover::after, .dzcp-submit:hover::after { transform: translateX(120%); }
.fx-magnetic { transition: transform .35s var(--fx-ease); will-change: transform; }

/* ---------- Cards: tilt, glare, zoom ---------- */
.fx-tilt { transform-style: preserve-3d; transition: transform .5s var(--fx-ease), box-shadow .5s var(--fx-ease); will-change: transform; }
html.fx-ready .fx-tilt.is-tilting { transition: transform .08s linear, box-shadow .3s; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(193, 18, 31, .25); }
.fx-glare { position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .22), transparent 55%); mix-blend-mode: soft-light; }
.fx-tilt.is-tilting .fx-glare { opacity: 1; }

.dv-music__cover, .dst-card, .dv-watch__thumb, .dzn51-grid a, .dv-chapter-artwork { overflow: hidden; }
.dv-music__cover img, .dst-card img, .dv-watch__thumb img, .dzn51-grid img, .dv-story__image img {
  transition: transform 1.1s var(--fx-ease), filter .6s ease !important;
}
.dv-music__card:hover .dv-music__cover img, .dst-card:hover img, .dv-watch__thumb:hover img, .dzn51-grid a:hover img { transform: scale(1.08); }
.dv-watch__thumb:hover img { filter: brightness(.75); }

/* Play button: pulse ring */
.dv-watch__play { position: relative; }
.dv-watch__play::before, .dv-watch__play::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6);
  animation: fx-ring 2.4s var(--fx-ease) infinite; pointer-events: none;
}
.dv-watch__play::after { animation-delay: 1.2s; }
@keyframes fx-ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }

/* Lyrics list: slide + red index */
.dv-words__track { transition: padding-left .4s var(--fx-ease), background-color .4s, color .3s; }
.dv-words__track:hover { padding-left: 14px; background: linear-gradient(90deg, rgba(193, 18, 31, .14), transparent); }
.dv-words__track:hover .dv-words__num { color: var(--fx-red); }

/* Underline sweep for text links */
.dv-music__viewall, .dv-watch__viewall, .dst-viewall, .dv-words__cta, .dv-story__cta, .dv-chapter-link, .dzf-link {
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat;
  background-size: 0% 1px; background-position: 0 100%; transition: background-size .45s var(--fx-ease), color .3s;
}
.dv-music__viewall:hover, .dv-watch__viewall:hover, .dst-viewall:hover, .dv-words__cta:hover, .dv-story__cta:hover, .dv-chapter-link:hover, .dzf-link:hover { background-size: 100% 1px; }

/* Story quote: soft glow */
.dv-story__quote { position: relative; }

/* Cursor spotlight (desktop only, added by JS) */
.fx-spot {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: 9990;
  pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .6s; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(193, 18, 31, .11), transparent 62%);
  will-change: transform;
}
.fx-spot.is-on { opacity: 1; }

/* Back to top: lifted above the TrivaNexus chat launcher (bottom-right) */
.generate-back-to-top { bottom: 96px !important; }
.generate-back-to-top { transition: transform .4s var(--fx-ease-back), background-color .3s !important; }
.generate-back-to-top:hover { transform: translateY(-4px) scale(1.08); }

/* Newsletter input focus */
.dzf-input { transition: box-shadow .3s, transform .3s var(--fx-ease); }
.dzf-input:focus { box-shadow: 0 0 0 3px rgba(193, 18, 31, .45); }

/* ---------- Mobile: swipe carousels ---------- */
@media (max-width: 760px) {
  .dst-grid, .fx-carousel {
    display: flex !important; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 16px 8px; margin-inline: -16px;
    overscroll-behavior-x: contain;
  }
  .dst-grid::-webkit-scrollbar, .fx-carousel::-webkit-scrollbar { display: none; }
  .dst-grid > *, .fx-carousel > * { flex: 0 0 78%; scroll-snap-align: center; max-width: 78%; }
  .dst-card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; height: auto; }
  .fx-dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; }
  .fx-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 4px; background: #444; transition: width .35s var(--fx-ease), background-color .35s; cursor: pointer; }
  .fx-dots button.is-active { width: 22px; background: var(--fx-red); }
  .hero-section h1 { word-break: normal; }
}
@media (min-width: 761px) { .fx-dots { display: none; } }

/* Tap feedback on touch devices */
@media (hover: none) {
  .dv-music__card:active, .dst-card:active, .dv-watch__thumb:active, .hero-btn:active, .dv-chapter-btn:active { transform: scale(.97); transition: transform .15s; }
}

/* ---------- Reduced motion: keep it calm ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html.fx-ready .fx-reveal, html.fx-ready .fx-wipe > img, .fx-split .fx-w > span, .hero-section h1 .fx-ch { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .fx-marquee__track { animation: none; }
  .fx-loader, .fx-spot { display: none; }
}
