/* === Redact-Reveal Animation ===
   Ported from site/static/styles.css
   Use: add .redact class to any text element with .anim
   When .anim--visible triggers, bars sweep right revealing text.
   Overrides .anim opacity on elements with .redact so bars are visible before trigger.
*/

/* Elements containing .redact: skip entrance animation, let redact handle reveal */
.anim:has(.redact) {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

/* --- Block redact-reveal (titles, subtitles) --- */
.redact {
  position: relative;
  display: inline-block;
}

.redact__bars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: none;
  z-index: 1;
}

.redact__bar {
  display: block;
  height: 0.65em;
  background: rgba(245, 242, 237, 0.15);
  border-radius: 1px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.redact__bar:nth-child(1) { width: 95%; }
.redact__bar:nth-child(2) { width: 80%; transition-delay: 0.04s; }
.redact__bar:nth-child(3) { width: 60%; transition-delay: 0.08s; }

.redact__content {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Trigger: when parent .anim gets .anim--visible */
.anim--visible .redact__bar,
.anim--visible.redact .redact__bar {
  transform: translateX(30px);
  opacity: 0;
}

.anim--visible .redact__content,
.anim--visible.redact .redact__content {
  opacity: 1;
  transition-delay: 0.2s;
}
