/* Pantalla de carga TecFish */
#tf-loader {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: #001b4b6e;
  transition: opacity .6s ease, visibility .6s ease;
  overflow: hidden;
}

div#tf-logo {
    width: 15%;
}
#tf-loader.tf-hide { opacity: 0; visibility: hidden; }

.tf-logo-wrap {
  position: relative;
  width: min(50vw, 240px);
  animation: tf-float 3.2s ease-in-out infinite;
}
.tf-logo-wrap img { width: 100%; height: auto; display: block; position: relative; z-index: 2; }

@keyframes tf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.tf-bubble {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(120,170,225,.35) 60%, rgba(47,120,191,.25));
  border: 1px solid rgba(47,120,191,.45);
  opacity: 0;
  animation: tf-rise var(--dur) ease-in infinite;
  animation-delay: var(--delay);
}
.tf-mouth {
  z-index: 3;
  margin: 0;
  animation-name: tf-rise-mouth;
  animation-timing-function: ease-out;
}
.tf-ambient { position: absolute; inset: 0; z-index: 0; }

/* Burbujas que salen de la boca: arrancan centradas en el punto de la boca */
@keyframes tf-rise-mouth {
  0%   { transform: translate(-50%, -50%) scale(.35); opacity: 0; }
  12%  { opacity: .95; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% - var(--rise))) scale(1); opacity: 0; }
}

@keyframes tf-rise {
  0%   { transform: translate(0, 0) scale(.5); opacity: 0; }
  15%  { opacity: .95; }
  100% { transform: translate(var(--dx), calc(var(--rise) * -1)) scale(1); opacity: 0; }
}

.tf-bar {
  position: relative; z-index: 2;
  width: min(44vw, 180px); height: 4px; margin-top: 22px;
  background: #e3ecf7; border-radius: 4px; overflow: hidden;
}
.tf-bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: #2f78bf; border-radius: 4px;
  animation: tf-slide 1.3s ease-in-out infinite;
}
@keyframes tf-slide {
  0%   { left: -40%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tf-logo-wrap, .tf-bubble { animation: none; }
}
