/* ---- Owls + speech bubbles ---- */

.owl-flock {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.owl-fly {
  position: absolute;
  will-change: transform;
}

.owl-with-speech {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: max-content;
}

.owl-with-speech--owl-left {
  flex-direction: row;
}

.owl-with-speech--owl-right {
  flex-direction: row;
}

.owl-fly img {
  display: block;
  width: 110px;
  height: auto;
  flex-shrink: 0;
  opacity: 0.55;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.5));
  animation: owl-bob 3.5s ease-in-out infinite;
}

.owl-fly-1 img,
.owl-fly-3 img {
  transform: scaleX(-1);
}

/* Speech bubble — width hugs the sentence */
.owl-speech {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.68rem, 1.1vw, 0.82rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  background: rgba(10, 25, 47, 0.92);
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  border-radius: 12px;
  padding: 0.4rem 0.6rem;
  margin: 0;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  flex-shrink: 0;
  animation: owl-bob 3.5s ease-in-out infinite;
}

.owl-speech em {
  font-style: normal;
  color: var(--gold);
}

.owl-speech-left::after,
.owl-speech-right::after,
.owl-speech-hero::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(10, 25, 47, 0.92);
  border-right: 1px solid rgba(var(--gold-rgb), 0.35);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.35);
  transform: rotate(-45deg);
}

.owl-speech-left::after {
  right: -4px;
  top: 50%;
  margin-top: -4px;
}

.owl-speech-right::after {
  left: -4px;
  top: 50%;
  margin-top: -4px;
  transform: rotate(135deg);
}

.owl-fly-1 { top: 10%; animation: owl-path-1 42s linear infinite; }
.owl-fly-2 { top: 44%; animation: owl-path-2 56s linear infinite; animation-delay: -22s; }
.owl-fly-3 { top: 68%; animation: owl-path-3 48s linear infinite; animation-delay: -34s; }

.owl-fly-2 img { width: 95px; }
.owl-fly-3 img { width: 85px; opacity: 0.45; }

@keyframes owl-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.owl-fly-1 img,
.owl-fly-3 img {
  animation-name: owl-bob-flip;
}

@keyframes owl-bob-flip {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50% { transform: scaleX(-1) translateY(-10px); }
}

@keyframes owl-path-1 {
  0% { transform: translate(108vw, 0); }
  100% { transform: translate(-14vw, 20px); }
}

@keyframes owl-path-2 {
  0% { transform: translate(-16vw, 0); }
  100% { transform: translate(110vw, -18px); }
}

@keyframes owl-path-3 {
  0% { transform: translate(106vw, -12px); }
  100% { transform: translate(-12vw, 16px); }
}

/* Hero owl + speech */
.hero-owl {
  position: absolute;
  right: 2%;
  top: 22%;
  z-index: 2;
  width: auto;
  max-width: none;
  pointer-events: none;
}

.owl-with-speech-hero {
  align-items: flex-end;
  gap: 0.45rem;
}

.hero-owl-img {
  width: clamp(130px, 16vw, 200px);
  height: auto;
  flex-shrink: 0;
  display: block;
  animation: owl-hero-float 7s ease-in-out infinite;
  filter: drop-shadow(0 20px 48px rgba(0, 0, 0, 0.55));
  opacity: 1;
}

.owl-speech-hero {
  font-size: clamp(0.78rem, 1.35vw, 0.95rem);
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
  margin-bottom: 2rem;
  animation: owl-hero-float 7s ease-in-out infinite;
}

.owl-speech-hero::after {
  right: -4px;
  top: 50%;
  margin-top: -4px;
  bottom: auto;
}

@keyframes owl-hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

main,
.site-footer {
  position: relative;
  z-index: 2;
}

@media (max-width: 960px) {
  .hero-owl {
    right: -2%;
    top: 18%;
  }
  .owl-speech-hero {
    font-size: 0.72rem;
  }
  .owl-fly .owl-speech {
    font-size: 0.65rem;
    padding: 0.35rem 0.5rem;
  }
  .owl-fly img { opacity: 0.4; }
}

@media (max-width: 600px) {
  .hero-owl { display: none; }
  .owl-fly-2 { display: none; }
  .owl-speech {
    white-space: normal;
    max-width: 42vw;
    width: max-content;
    font-size: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .owl-fly,
  .hero-owl,
  .hero-owl-img,
  .owl-fly img,
  .owl-speech,
  .owl-speech-hero {
    animation: none !important;
  }
  .owl-fly-1 img,
  .owl-fly-3 img {
    transform: scaleX(-1);
  }
}
