/* ==========================================================================
   Crónicas de Belleza · effects.css
   Flores vivas, ramitas flotantes, pétalos 3D, cursor dorado y accesibilidad.
   ========================================================================== */

/* ---------- Dibujos de flores (los coloca ornaments.js) ---------- */
.orn { display: block; }
.orn svg { width: 100%; height: auto; }

/* Cada florecita se mece a su ritmo (--t y --d vienen en el dibujo) */
.cfl {
  transform-box: fill-box;
  transform-origin: center;
  animation: cbreathe var(--t, 3.6s) ease-in-out var(--d, 0s) infinite alternate;
  transition: scale .6s cubic-bezier(.3, 1.6, .5, 1), rotate .6s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes cbreathe { from { transform: none; } to { transform: rotate(14deg) scale(1.08); } }
.book-card:hover .cfl, .pack:hover .cfl { scale: 1.28; rotate: 20deg; }
.skip .cfl { animation-duration: var(--t, 3.6s) !important; animation-delay: var(--d, 0s) !important; }

/* Flores que se apartan al rozarlas con el ratón (interactions.js) */
.fx, .float svg { transition: rotate .7s cubic-bezier(.3, 1.7, .45, 1), scale .7s cubic-bezier(.3, 1.7, .45, 1); }

/* ---------- Ramitas flotantes con parallax (scroll.js) ---------- */
.float { position: absolute; z-index: 1; pointer-events: none; }
.sway { transform-origin: 50% 90%; animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
.skip .sway { animation-duration: 7s !important; }

.float--1  { left: -30px;               top: 120px;  width: 200px; }
.float--2  { left: calc(100% - 190px);  top: 90px;   width: 170px; }
.float--3  { left: calc(100% - 140px);  top: 560px;  width: 130px; }
.float--4  { left: 40px;                top: 720px;  width: 110px; }
.float--5  { left: calc(100% - 220px);  top: 1400px; width: 210px; }
.float--6  { left: -20px;               top: 1750px; width: 150px; }
.float--7  { left: calc(100% - 150px);  top: 2350px; width: 140px; }
.float--8  { left: -40px;               top: 2700px; width: 220px; }
.float--9  { left: calc(100% - 170px);  top: 3300px; width: 150px; }
.float--10 { left: 30px;                top: 3900px; width: 130px; }
.float--11 { left: calc(100% - 130px);  top: 4500px; width: 120px; }

/* ---------- Pétalos 3D (three/petals.js) ---------- */
.petals {
  position: fixed;
  left: 0; top: 0;
  z-index: 30;
  width: 100%;
  height: 100vh;
  max-height: 1200px;
  opacity: 0;
  pointer-events: none;
}
.play .petals { animation: fade 2s ease 8.2s forwards; }

/* ---------- Cursor dorado (solo con ratón) ---------- */
.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 60;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: width .35s, height .35s, margin .35s, background .35s, opacity .35s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-big { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: rgba(217, 184, 113, .14); }
@media (pointer: coarse) { .cursor { display: none; } }

/* Elementos que aparecen al hacer scroll */
.reveal { will-change: transform, opacity; }

/* ---------- Quien prefiere menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site *, .site *::before, .site *::after {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    transition-duration: 1ms !important;
  }
  .cfl, .marquee__track { animation: none !important; }
}
