/* ═══════════════════════════════════════════════════════════
   Elaichai — text reveal engine
   .rv-h   → headings: words rise out of a mask
   .rv-sub → eyebrows / subtitles / body: words fade + rise
   Hidden only while JS is available (html.rv-ready); with JS
   off or blocked the text renders normally.
   ═══════════════════════════════════════════════════════════ */

.rv-ready .rv-h,
.rv-ready .rv-sub { visibility: hidden; }

.rv-h.rv-split,
.rv-sub.rv-split { visibility: visible; }

/* word wrapper — the mask */
.rv-w {
  display: inline-block;
  overflow: hidden;
  padding: 0 0.06em 0.16em;
  margin: 0 -0.06em -0.16em;
}

/* the moving part */
.rv-i {
  display: inline-block;
  transform: translate3d(0, 115%, 0) rotate(3deg);
  transform-origin: 0% 100%;
  will-change: transform;
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: calc(var(--rv-i, 0) * 60ms + var(--rv-lead, 0ms));
}

.rv-h.rv-on .rv-i { transform: translate3d(0, 0, 0) rotate(0deg); }

/* subtitles / smaller copy — softer, faster, no mask */
.rv-sub .rv-w { overflow: visible; padding: 0; margin: 0; }
.rv-sub .rv-i {
  opacity: 0;
  transform: translate3d(0, 0.5em, 0);
  filter: blur(5px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.19, 1, 0.22, 1), filter 0.75s ease;
  transition-delay: calc(var(--rv-i, 0) * 24ms + var(--rv-lead, 0ms));
}
.rv-sub.rv-on .rv-i { opacity: 1; transform: none; filter: blur(0); }

/* hairline that draws itself under a heading */
.rv-rule { display: block; height: 1px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s cubic-bezier(0.19, 1, 0.22, 1) 0.25s; }
.rv-rule.rv-on { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .rv-i { transition: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
  .rv-rule { transition: none !important; transform: none !important; }
}
