/*
 * VioleTita Temazcal — capa de efectos
 * Incluye este archivo DESPUÉS de los estilos principales:
 * <link rel="stylesheet" href="fx.css">
 */

:root {
  --fx-violet-glow: rgba(155, 63, 178, .48);
  --fx-ember-glow: rgba(184, 36, 57, .38);
  --fx-ivory-glow: rgba(255, 248, 238, .42);
}

/* Fondo vivo y halos ambientales */
body {
  background-size: 125% 125%, 180% 180%;
  animation: fx-background-drift 16s ease-in-out infinite alternate;
}

body::before {
  animation: fx-orbit-left 18s ease-in-out infinite alternate;
}

body::after {
  animation: fx-orbit-right 22s ease-in-out infinite alternate;
}

main::before,
main::after {
  position: fixed;
  z-index: -1;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow:
    8vw 16vh 0 -.08rem rgba(255, 248, 238, .42),
    19vw 69vh 0 -.12rem rgba(255, 248, 238, .34),
    31vw 24vh 0 -.13rem rgba(184, 36, 57, .48),
    47vw 82vh 0 -.1rem rgba(255, 248, 238, .35),
    64vw 18vh 0 -.12rem rgba(255, 248, 238, .4),
    78vw 72vh 0 -.08rem rgba(155, 63, 178, .55),
    92vw 34vh 0 -.13rem rgba(255, 248, 238, .3);
  content: "";
  opacity: .55;
  pointer-events: none;
  animation: fx-embers-up 13s linear infinite;
}

main::after {
  transform: translateY(38vh) scale(.72);
  filter: blur(.4px);
  animation-delay: -6.5s;
  animation-duration: 17s;
}

/* Tarjeta con respiración luminosa */
.shell {
  animation:
    reveal .8s cubic-bezier(.2, .8, .2, 1) both,
    fx-shell-glow 7s ease-in-out .85s infinite;
}

.shell::before {
  animation: fx-dome-breathe 8s ease-in-out infinite;
}

.shell::after {
  position: absolute;
  z-index: 0;
  top: -25%;
  left: -70%;
  width: 42%;
  height: 150%;
  transform: rotate(18deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, .46),
    transparent
  );
  content: "";
  pointer-events: none;
  animation: fx-card-shine 8s ease-in-out 1.5s infinite;
}

.brand,
.rule,
nav,
footer {
  position: relative;
  z-index: 1;
}

/* Logotipo: flotación, pulso y aro giratorio */
.logo-frame {
  isolation: isolate;
  animation:
    breathe 5s ease-in-out infinite,
    fx-logo-shadow 5s ease-in-out infinite;
}

.logo-frame::before {
  position: absolute;
  z-index: 0;
  inset: -.72rem;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 18%,
    rgba(116, 44, 140, .62) 27%,
    transparent 36% 65%,
    rgba(184, 36, 57, .55) 75%,
    transparent 84% 100%
  );
  content: "";
  opacity: .72;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: fx-halo-spin 12s linear infinite;
}

.logo-frame::after {
  animation: fx-ring-pulse 3.2s ease-out infinite;
}

.logo {
  position: relative;
  z-index: 1;
  transition: filter .35s ease, transform .35s ease;
}

.logo-frame:hover .logo {
  transform: scale(1.025);
  filter: saturate(1.1) contrast(1.03);
}

/* Entrada del título */
h1 {
  animation: fx-title-in .85s cubic-bezier(.16, 1, .3, 1) .12s both;
}

.eyebrow {
  animation: fx-letter-breathe 5s ease-in-out 1s infinite alternate;
}

/* Separador y fuego */
.rule::before,
.rule::after {
  background-size: 200% 100%;
  animation: fx-line-flow 4s ease-in-out infinite alternate;
}

.flame {
  transform-origin: 55% 75%;
  animation: fx-flame 1.25s ease-in-out infinite alternate;
}

/* Botones: destello y respuesta al tacto/puntero */
.link {
  isolation: isolate;
  will-change: transform;
}

.link::before {
  position: absolute;
  z-index: -1;
  top: -35%;
  left: -55%;
  width: 32%;
  height: 170%;
  transform: rotate(20deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, .75),
    transparent
  );
  content: "";
  opacity: 0;
  pointer-events: none;
}

.link:not(.soon):hover::before,
.link:not(.soon):focus-visible::before {
  animation: fx-button-shine .72s ease-out;
}

.link:not(.soon):hover .icon,
.link:not(.soon):focus-visible .icon {
  animation: fx-icon-pop .48s cubic-bezier(.2, .9, .3, 1.35);
}

.link:not(.soon):hover .arrow,
.link:not(.soon):focus-visible .arrow {
  animation: fx-arrow-nudge .72s ease-in-out infinite alternate;
}

.facebook:hover,
.facebook:focus-visible {
  background: linear-gradient(110deg, rgba(255, 255, 255, .82), rgba(116, 44, 140, .08));
}

.instagram:hover,
.instagram:focus-visible {
  background: linear-gradient(110deg, rgba(255, 255, 255, .82), rgba(195, 41, 102, .08));
}

.soon .badge {
  animation: fx-badge-pulse 2.8s ease-in-out infinite;
}

footer {
  animation: fx-footer-in 1s ease-out .55s both;
}

@keyframes fx-background-drift {
  0% { background-position: 50% 0%, 0% 50%; }
  100% { background-position: 45% 8%, 100% 46%; }
}

@keyframes fx-orbit-left {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: .7; }
  100% { transform: translate3d(2.5rem, 2rem, 0) rotate(18deg); opacity: 1; }
}

@keyframes fx-orbit-right {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: .68; }
  100% { transform: translate3d(-3rem, -2rem, 0) scale(1.07); opacity: 1; }
}

@keyframes fx-embers-up {
  0% { transform: translate3d(0, 24vh, 0); opacity: 0; }
  14% { opacity: .58; }
  78% { opacity: .38; }
  100% { transform: translate3d(1.4rem, -58vh, 0); opacity: 0; }
}

@keyframes fx-shell-glow {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 rgba(155, 63, 178, 0); }
  50% { box-shadow: var(--shadow), 0 0 3rem var(--fx-violet-glow); }
}

@keyframes fx-dome-breathe {
  0%, 100% { transform: translateX(-50%) scale(.96); opacity: .7; }
  50% { transform: translateX(-50%) scale(1.045); opacity: 1; }
}

@keyframes fx-card-shine {
  0%, 48% { left: -70%; opacity: 0; }
  56% { opacity: .65; }
  72%, 100% { left: 132%; opacity: 0; }
}

@keyframes fx-logo-shadow {
  0%, 100% { box-shadow: 0 15px 34px rgba(62, 25, 47, .16); }
  50% { box-shadow: 0 20px 42px rgba(116, 44, 140, .3), 0 0 1.8rem var(--fx-ember-glow); }
}

@keyframes fx-halo-spin {
  to { transform: rotate(1turn); }
}

@keyframes fx-ring-pulse {
  0% { transform: scale(.98); opacity: .72; }
  65%, 100% { transform: scale(1.08); opacity: 0; }
}

@keyframes fx-title-in {
  from { transform: translateY(.7rem); opacity: 0; letter-spacing: -.08em; }
  to { transform: translateY(0); opacity: 1; letter-spacing: -.045em; }
}

@keyframes fx-letter-breathe {
  from { letter-spacing: .15em; opacity: .72; }
  to { letter-spacing: .19em; opacity: 1; }
}

@keyframes fx-line-flow {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@keyframes fx-flame {
  0% { rotate: 42deg; transform: scale(.92, 1.05) skew(-2deg); filter: brightness(.95); }
  100% { rotate: 48deg; transform: scale(1.08, .94) skew(3deg); filter: brightness(1.18); }
}

@keyframes fx-button-shine {
  0% { left: -55%; opacity: 0; }
  18% { opacity: .75; }
  100% { left: 125%; opacity: 0; }
}

@keyframes fx-icon-pop {
  0%, 100% { transform: scale(1) rotate(0); }
  45% { transform: scale(1.1) rotate(-4deg); }
  72% { transform: scale(.98) rotate(2deg); }
}

@keyframes fx-arrow-nudge {
  from { transform: translateX(.08rem); opacity: .7; }
  to { transform: translateX(.34rem); opacity: 1; }
}

@keyframes fx-badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(116, 44, 140, 0); }
  50% { transform: scale(1.035); box-shadow: 0 0 0 .38rem rgba(116, 44, 140, .07); }
}

@keyframes fx-footer-in {
  from { transform: translateY(.45rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Los efectos de hover sólo se intensifican cuando existe un puntero preciso. */
@media (hover: hover) and (pointer: fine) {
  nav:has(.link:hover) .link:not(:hover) {
    transform: scale(.985);
    opacity: .72;
  }

  nav .link {
    transition:
      translate .22s ease,
      transform .22s ease,
      opacity .22s ease,
      box-shadow .22s ease,
      border-color .22s ease,
      background .3s ease;
  }
}

/* Accesibilidad: si el sistema reduce el movimiento, todo queda estable. */
@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  body::after,
  main::before,
  main::after,
  .shell,
  .shell::before,
  .shell::after,
  .logo-frame,
  .logo-frame::before,
  .logo-frame::after,
  h1,
  .eyebrow,
  .rule::before,
  .rule::after,
  .flame,
  .link,
  .link::before,
  .link .icon,
  .link .arrow,
  .soon .badge,
  footer {
    animation: none !important;
    transform: none !important;
  }
}
