/* =========================================================
   HERO LIQUID WRAP
========================================================= */
.hero-liquid-wrap {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hero-liquid-wrap,
.hero-liquid-wrap * {
  box-sizing: border-box;
}

/* =========================================================
   HERO CHAT CONTAINER
========================================================= */
.hero-chat {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 800px; /* promeni po potrebi */
  overflow: hidden;
  isolation: isolate;
  background: #121212;
  border-radius: inherit;
}

/* =========================================================
   LIQUID INTERACTION
========================================================= */
.liquid::before {
  transform:
    scale(calc(1.08 - (var(--p, 0) * 0.28)))
    rotate(calc(-7deg + (var(--p, 0) * 10deg)));
  opacity: calc(.95 - (var(--p, 0) * .42));
}

.liquid::after {
  transform: scale(calc(1.18 - (var(--p, 0) * 0.38)));
  opacity: calc(.90 - (var(--p, 0) * .58));
}

/* =========================================================
   LIQUID BASE
========================================================= */
.liquid {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: .42;

  transform: translate3d(0,0,0) scale(1);
  transform-origin: center center;

  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout style paint;

  border-radius:
    42% 58% 63% 37% /
    38% 41% 59% 62%;

  background:
    radial-gradient(55% 48% at 18% 30%,
      rgba(165, 245, 255, .78) 0%,
      rgba(96, 198, 212, .52) 30%,
      rgba(96, 198, 212, .14) 62%,
      rgba(96, 198, 212, 0) 100%),

    radial-gradient(46% 42% at 76% 28%,
      rgba(135, 232, 243, .72) 0%,
      rgba(96, 198, 212, .40) 32%,
      rgba(96, 198, 212, .12) 68%,
      rgba(96, 198, 212, 0) 100%),

    radial-gradient(58% 50% at 70% 72%,
      rgba(96, 198, 212, .56) 0%,
      rgba(96, 198, 212, .24) 42%,
      rgba(96, 198, 212, .08) 70%,
      rgba(96, 198, 212, 0) 100%),

    radial-gradient(52% 44% at 26% 76%,
      rgba(140, 240, 250, .42) 0%,
      rgba(96, 198, 212, .20) 36%,
      rgba(96, 198, 212, .06) 72%,
      rgba(96, 198, 212, 0) 100%);

  filter: blur(26px);
  -webkit-filter: blur(26px);

  animation: liquidMorph 9s ease-in-out infinite alternate;
}

.liquid::before,
.liquid::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  border-radius: inherit;
  will-change: transform, opacity, border-radius;
}

.liquid::before {
  background:
    radial-gradient(48% 42% at 24% 52%,
      rgba(190, 250, 255, .42) 0%,
      rgba(96, 198, 212, .22) 36%,
      rgba(96, 198, 212, .06) 70%,
      rgba(96, 198, 212, 0) 100%),

    radial-gradient(42% 38% at 74% 58%,
      rgba(150, 240, 248, .30) 0%,
      rgba(96, 198, 212, .16) 42%,
      rgba(96, 198, 212, 0) 100%),

    radial-gradient(28% 26% at 52% 22%,
      rgba(210, 255, 255, .28) 0%,
      rgba(96, 198, 212, .10) 56%,
      rgba(96, 198, 212, 0) 100%);

  filter: blur(22px);
  -webkit-filter: blur(22px);
  opacity: .95;
  transform: scale(1.08) rotate(-7deg);
  animation: liquidMorphInner 11s ease-in-out infinite alternate;
}

.liquid::after {
  inset: -14%;
  background:
    radial-gradient(62% 58% at 36% 42%,
      rgba(96, 198, 212, .24) 0%,
      rgba(96, 198, 212, .10) 40%,
      rgba(96, 198, 212, 0) 100%),

    radial-gradient(54% 48% at 72% 64%,
      rgba(96, 198, 212, .18) 0%,
      rgba(96, 198, 212, .08) 44%,
      rgba(96, 198, 212, 0) 100%);

  filter: blur(40px);
  -webkit-filter: blur(40px);
  opacity: .9;
  transform: scale(1.18);
}

/* =========================================================
   LIQUID POSITIONS
========================================================= */
.liquid-1 {
  width: 620px;
  height: 250px;
  margin-left: -440px;
  margin-top: -210px;
}

.liquid-2 {
  width: 430px;
  height: 210px;
  margin-left: 120px;
  margin-top: -230px;
}

.liquid-3 {
  width: 640px;
  height: 280px;
  margin-left: -300px;
  margin-top: 10px;
}

.liquid-4 {
  width: 360px;
  height: 180px;
  margin-left: 170px;
  margin-top: 90px;
}

/* =========================================================
   KEYFRAMES
========================================================= */
@keyframes liquidMorph {
  0% {
    border-radius:
      42% 58% 63% 37% /
      38% 41% 59% 62%;
  }
  25% {
    border-radius:
      54% 46% 34% 66% /
      45% 58% 42% 55%;
  }
  50% {
    border-radius:
      36% 64% 57% 43% /
      60% 33% 67% 40%;
  }
  75% {
    border-radius:
      61% 39% 48% 52% /
      35% 63% 37% 65%;
  }
  100% {
    border-radius:
      47% 53% 66% 34% /
      54% 38% 62% 46%;
  }
}

@keyframes liquidMorphInner {
  0% {
    border-radius:
      58% 42% 44% 56% /
      46% 60% 40% 54%;
    transform: scale(1.08) rotate(-7deg);
  }
  50% {
    border-radius:
      41% 59% 60% 40% /
      63% 37% 58% 42%;
    transform: scale(1.14) rotate(4deg);
  }
  100% {
    border-radius:
      64% 36% 46% 54% /
      40% 56% 44% 60%;
    transform: scale(1.10) rotate(-3deg);
  }
}

/* =========================================================
   HOVER STATE
========================================================= */
.hero-chat.is-hovering .liquid {
  transition:
    opacity .45s ease,
    transform .7s cubic-bezier(.22,.61,.36,1),
    filter .45s ease;
  filter: blur(18px);
  -webkit-filter: blur(18px);
}

.hero-chat.is-hovering .liquid::before {
  transition:
    opacity .45s ease,
    transform .7s cubic-bezier(.22,.61,.36,1),
    filter .45s ease;
  opacity: .55;
  transform: scale(.78) rotate(8deg);
  filter: blur(14px);
  -webkit-filter: blur(14px);
}

.hero-chat.is-hovering .liquid::after {
  transition:
    opacity .4s ease,
    transform .7s cubic-bezier(.22,.61,.36,1);
  opacity: .18;
  transform: scale(.68);
}

/* =========================================================
   SAFARI / IOS
========================================================= */
@supports (-webkit-touch-callout: none) {
  .liquid {
    filter: blur(22px);
    -webkit-filter: blur(22px);
  }

  .liquid::before {
    filter: blur(18px);
    -webkit-filter: blur(18px);
  }

  .liquid::after {
    filter: blur(28px);
    -webkit-filter: blur(28px);
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1024px) {
  .hero-chat {
    min-height: 580px;
  }

  .liquid-1 {
    width: 430px;
    height: 180px;
    margin-left: -300px;
    margin-top: -150px;
  }

  .liquid-2 {
    width: 320px;
    height: 150px;
    margin-left: 60px;
    margin-top: -170px;
  }

  .liquid-3 {
    width: 450px;
    height: 200px;
    margin-left: -220px;
    margin-top: 20px;
  }

  .liquid-4 {
    width: 260px;
    height: 130px;
    margin-left: 110px;
    margin-top: 90px;
  }
}

@media (max-width: 767px) {
  .hero-chat {
    min-height: 540px;
  }

  .liquid {
    opacity: .34;
    filter: blur(18px);
    -webkit-filter: blur(18px);
  }

  .liquid-1 {
    width: 250px;
    height: 100px;
    margin-left: -170px;
    margin-top: -100px;
  }

  .liquid-2 {
    width: 180px;
    height: 90px;
    margin-left: 10px;
    margin-top: -105px;
  }

  .liquid-3 {
    width: 270px;
    height: 115px;
    margin-left: -135px;
    margin-top: 5px;
  }

  .liquid-4 {
    width: 150px;
    height: 75px;
    margin-left: 35px;
    margin-top: 65px;
  }
}