/* Tiendas — tienda pequeña, bosque, río y hoguera | Motion CSS (mismo sistema sc3/est3) */

.tn3-scene {
  --tn3-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --tn3-fire: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --tn3-loop: 12s;

  position: relative;
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #050a0f;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.12);
}

.tn3-scene--hero {
  max-width: none;
  margin-inline: 0;
  height: 100%;
  min-height: 100%;
}

.tn3-scene__svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 16rem;
}

.tn3-enter,
.tn3-pine,
.tn3-flame-single,
.tn3-nessie,
.tn3-nessie-ring {
  will-change: transform;
}

.tn3-star,
.tn3-moon,
.tn3-shimmer,
.tn3-fire-glow,
.tn3-warm,
.tn3-nessie-eye,
.tn3-scene__glow {
  will-change: transform, opacity;
}

.tn3-enter {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: tn3EnterIn 0.9s var(--tn3-smooth) forwards;
}

.tn3-enter--sky { animation-delay: 0s; }
.tn3-enter--forest { animation-delay: 0.08s; }
.tn3-enter--river { animation-delay: 0.14s; }
.tn3-enter--nessie { animation-delay: 0.18s; }
.tn3-enter--tent { animation-delay: 0.22s; }
.tn3-enter--tent-extra {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: tn3EnterIn 0.9s var(--tn3-smooth) forwards;
}
.tn3-enter--tent-1 { animation-delay: 0.26s; }
.tn3-enter--tent-2 { animation-delay: 0.28s; }
.tn3-enter--tent-3 { animation-delay: 0.34s; }
.tn3-enter--tent-4 { animation-delay: 0.4s; }
.tn3-enter--fire { animation-delay: 0.3s; }

@keyframes tn3EnterIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.tn3-moon {
  transform-origin: 920px 52px;
  transform-box: fill-box;
  animation: tn3MoonPulse 7s var(--tn3-smooth) infinite;
}

.tn3-star {
  transform-origin: center;
  animation: tn3StarTwinkle 3.8s var(--tn3-smooth) infinite;
}

.tn3-star--2 { animation-delay: 0.5s; }
.tn3-star--3 { animation-delay: 1s; }
.tn3-star--4 { animation-delay: 1.5s; }
.tn3-star--5 { animation-delay: 2s; }
.tn3-star--6 { animation-delay: 2.5s; }

@keyframes tn3MoonPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes tn3StarTwinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

.tn3-pine {
  transform-origin: center bottom;
  transform-box: fill-box;
  animation: tn3PineSway 5.5s var(--tn3-smooth) infinite;
}

.tn3-pine--2 { animation-delay: 0.8s; }
.tn3-pine--3 { animation-delay: 1.4s; }
.tn3-pine--4 { animation-delay: 0.4s; }

@keyframes tn3PineSway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(1.2deg);
  }
}

.tn3-shimmer {
  transform-origin: center;
  animation: tn3RiverShimmer 4s var(--tn3-smooth) infinite;
}

@keyframes tn3RiverShimmer {
  0%,
  100% {
    opacity: 0.35;
    transform: translateX(0) scaleX(1);
  }
  50% {
    opacity: 0.85;
    transform: translateX(18px) scaleX(1.08);
  }
}

.tn3-ripple {
  transform-origin: center;
  animation: tn3Ripple 3.2s var(--tn3-smooth) infinite;
}

.tn3-ripple--2 { animation-delay: 1.1s; }

@keyframes tn3Ripple {
  0%,
  100% {
    opacity: 0.15;
    transform: scaleX(0.92);
  }
  50% {
    opacity: 0.45;
    transform: scaleX(1.06);
  }
}

/* Tienda estática — sin animación de movimiento */
.tn3-warm {
  animation: tn3WarmPulse 3.4s var(--tn3-smooth) infinite;
}

@keyframes tn3WarmPulse {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.34;
  }
}

/* Nessie — visible sobre el río, asoma lentamente */
.tn3-nessie {
  transform-origin: 720px 272px;
  transform-box: fill-box;
  animation: tn3NessieBob 10s var(--tn3-smooth) infinite;
}

.tn3-nessie-ring {
  transform-origin: center;
  animation: tn3NessieRing 9s var(--tn3-smooth) infinite;
}

.tn3-nessie-ring--2 {
  animation-delay: 0.4s;
}

.tn3-nessie-eye {
  animation: tn3NessieBlink 6s var(--tn3-smooth) infinite;
}

@keyframes tn3NessieBob {
  0%,
  100% {
    transform: translateY(4px);
  }
  45%,
  55% {
    transform: translateY(-6px);
  }
}

@keyframes tn3NessieRing {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.96);
  }
  45%,
  55% {
    opacity: 0.7;
    transform: scale(1.04);
  }
}

@keyframes tn3NessieBlink {
  0%,
  46%,
  48%,
  100% {
    transform: scaleY(1);
  }
  47% {
    transform: scaleY(0.1);
  }
}

/* Fuego — una sola llama, movimiento muy suave */
.tn3-fire-glow {
  transform-origin: 620px 270px;
  transform-box: fill-box;
  animation: tn3FireGlowSoft 3.2s var(--tn3-smooth) infinite;
}

.tn3-flame-single {
  transform-origin: 620px 276px;
  transform-box: fill-box;
  animation: tn3FlameSoft 2.8s var(--tn3-smooth) infinite;
}

@keyframes tn3FireGlowSoft {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes tn3FlameSoft {
  0%,
  100% {
    transform: scaleY(1) scaleX(1) rotate(0deg);
  }
  33% {
    transform: scaleY(1.025) scaleX(0.99) rotate(-0.6deg);
  }
  66% {
    transform: scaleY(0.985) scaleX(1.01) rotate(0.5deg);
  }
}

.tn3-scene__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  will-change: transform, opacity;
}

.tn3-scene__glow--moon {
  width: 22%;
  height: 55%;
  right: 8%;
  top: 8%;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.18), transparent 70%);
  animation: tn3MoonGlow 7s var(--tn3-smooth) infinite;
}

.tn3-scene__glow--fire {
  width: 22%;
  height: 50%;
  left: 44%;
  top: 32%;
  background: radial-gradient(
    circle,
    rgba(251, 146, 60, 0.28) 0%,
    rgba(234, 88, 12, 0.12) 50%,
    transparent 72%
  );
  animation: tn3FireGlowSoft 3.2s var(--tn3-smooth) infinite;
}

@keyframes tn3MoonGlow {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tn3-enter,
  .tn3-enter--tent-extra,
  .tn3-moon,
  .tn3-star,
  .tn3-pine,
  .tn3-shimmer,
  .tn3-ripple,
  .tn3-warm,
  .tn3-nessie,
  .tn3-nessie-ring,
  .tn3-nessie-eye,
  .tn3-fire-glow,
  .tn3-flame-single,
  .tn3-scene__glow {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
