/* ============================================================
   VINCERE — Micro-animations & hover effects
   ============================================================ */

/* ---------- keyframes ---------- */
@keyframes vin-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vin-scale-in {
  from { opacity: 0; transform: scale(0.76); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes vin-rule-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes vin-shimmer {
  from { transform: translateX(-130%); }
  to   { transform: translateX(130%); }
}

/* ---------- shield logo ---------- */
.site-shield {
  display: block;
  pointer-events: none;
  user-select: none;
}
.hero-cover .site-shield    { width: 72px; height: 72px; margin: 0 auto 32px; }
.hero-editorial .site-shield { width: 56px; height: 56px; margin: 0 0 20px; }
.hero-manifesto .site-shield { width: 60px; height: 60px; margin: 0 auto 24px; }
.site-foot .site-shield     { width: 46px; height: 46px; margin: 0 auto 16px; opacity: 0.55; }

/* ---------- hero entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-cover[data-animating]     .site-shield,
  .hero-editorial[data-animating] .site-shield,
  .hero-manifesto[data-animating] .site-shield {
    animation: vin-scale-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 40ms;
  }

  .hero-cover[data-animating]     [data-hero-el],
  .hero-editorial[data-animating] [data-hero-el],
  .hero-manifesto[data-animating] [data-hero-el] {
    animation: vin-rise 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--di, 1) * 115ms + 60ms);
  }

  /* rule: grow from its transform-origin */
  .hero-cover[data-animating]     hr.rule,
  .hero-editorial[data-animating] hr.rule,
  .hero-manifesto[data-animating] hr.rule {
    animation: vin-rule-grow 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--di, 3) * 115ms + 60ms);
  }
  .hero-cover[data-animating] hr.rule,
  .hero-manifesto[data-animating] hr.rule { transform-origin: center; }
  .hero-editorial[data-animating] hr.rule { transform-origin: left center; }

  /* editorial book cover slides in from right */
  .hero-editorial[data-animating] .cover-col {
    animation: vin-rise 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 380ms;
  }
}

/* ---------- scroll reveal ---------- */
[data-reveal].will-reveal,
[data-stagger].will-reveal > * {
  opacity: 0;
  transform: translateY(26px);
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal].will-reveal {
    transition: opacity 0.62s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  }
  [data-stagger].will-reveal > * {
    transition: opacity 0.52s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

[data-reveal].is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

[data-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
[data-stagger].is-visible > *:nth-child(1)  { transition-delay:   0ms; }
[data-stagger].is-visible > *:nth-child(2)  { transition-delay:  95ms; }
[data-stagger].is-visible > *:nth-child(3)  { transition-delay: 180ms; }
[data-stagger].is-visible > *:nth-child(4)  { transition-delay: 255ms; }
[data-stagger].is-visible > *:nth-child(5)  { transition-delay: 325ms; }
[data-stagger].is-visible > *:nth-child(6)  { transition-delay: 390ms; }
[data-stagger].is-visible > *:nth-child(7)  { transition-delay: 450ms; }
[data-stagger].is-visible > *:nth-child(n+8) { transition-delay: 510ms; }

/* rule grow when its section reveals */
.is-visible hr.rule {
  transform-origin: left center;
  animation: vin-rule-grow 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 180ms;
}
.quote-band .is-visible hr.rule,
.scripture  .is-visible hr.rule,
.final-cta  .is-visible hr.rule {
  transform-origin: center;
}

/* ---------- hover: man cards ---------- */
.man-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background  0.22s ease;
}
.man-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(20, 14, 6, 0.1);
  background: rgba(255,255,255,0.72);
}

/* ---------- hover: phase rows ---------- */
.phase-row {
  transition: background 0.22s ease,
              padding-left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
  cursor: default;
}
.phase-row:hover {
  background: rgba(196, 154, 108, 0.07);
  padding-left: 10px;
}
.ph-num { transition: text-shadow 0.28s ease; }
.phase-row:hover .ph-num { text-shadow: 0 0 22px rgba(196, 154, 108, 0.55); }

/* ---------- hover: mini-page previews ---------- */
.previews .preview-item {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}
.previews .preview-item:hover { transform: translateY(-10px) !important; }
.mini-page { transition: box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
.previews .preview-item:hover .mini-page { box-shadow: 0 30px 56px rgba(20, 14, 6, 0.3); }

/* ---------- hover: capture button shimmer ---------- */
.capture button { position: relative; overflow: hidden; }
.capture button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 36%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 64%
  );
  transform: translateX(-130%);
}
.capture button:not(:disabled):hover::after {
  animation: vin-shimmer 0.48s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---------- capture input focus ring ---------- */
.capture input[type="email"] {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.capture input[type="email"]:focus {
  box-shadow: 0 0 0 3px rgba(196, 154, 108, 0.15);
}
.on-dark .capture input[type="email"]:focus {
  box-shadow: 0 0 0 3px rgba(196, 154, 108, 0.22);
}

/* ---------- reduced-motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal].will-reveal,
  [data-stagger].will-reveal > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
