/* Homepage Lousy Outages signal whale — cinematic Vancouver night flyover. */

.home-lo-flyover {
  --fly-green: #4ade80;
  --fly-cyan: #58c7ff;
  --fly-magenta: #df77ff;
  --fly-yellow: #ffb300;
  --fly-red: #ff6b6b;
  --fly-text: #d7e8df;
  --fly-muted: #8eaa9b;
  --fly-border: rgba(94, 234, 160, 0.18);
  --fly-scene-h: clamp(7.25rem, 18vw, 10rem);
  --fly-pass-duration: 14s;

  position: relative;
  width: min(92vw, 920px);
  margin: 0 auto;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  color: var(--fly-text);
}

.home-lo-flyover__module {
  overflow: hidden;
  border: 1px solid var(--fly-border);
  border-radius: 10px;
  background:
    radial-gradient(ellipse 130% 90% at 50% 115%, rgba(88, 199, 255, 0.08), transparent 58%),
    radial-gradient(circle at 14% 18%, rgba(223, 119, 255, 0.05), transparent 40%),
    linear-gradient(180deg, rgba(6, 12, 18, 0.96) 0%, rgba(3, 6, 12, 0.98) 100%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.home-lo-flyover__scene-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.home-lo-flyover__scene-link:hover .home-lo-flyover__banner-skin,
.home-lo-flyover__scene-link:focus-visible .home-lo-flyover__banner-skin {
  border-color: rgba(88, 199, 255, 0.42);
  box-shadow:
    0 0 18px rgba(88, 199, 255, 0.16),
    inset 0 0 0 1px rgba(74, 222, 128, 0.12);
}

.home-lo-flyover__scene-link:focus-visible {
  outline: 2px solid var(--fly-cyan);
  outline-offset: -2px;
}

.home-lo-flyover__scene {
  position: relative;
  height: var(--fly-scene-h);
  overflow: hidden;
  border-bottom: 1px solid rgba(88, 199, 255, 0.08);
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(18, 32, 52, 0.55), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 110%, rgba(88, 199, 255, 0.1), transparent 55%),
    radial-gradient(circle at 18% 22%, rgba(223, 119, 255, 0.06), transparent 38%),
    linear-gradient(180deg, #010308 0%, #050b14 38%, #03060d 72%, #010205 100%);
  box-shadow: inset 0 -24px 36px rgba(88, 199, 255, 0.04);
}

.home-lo-flyover__sky {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.home-lo-flyover__star,
.home-lo-flyover__signal {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.home-lo-flyover__star {
  width: 2px;
  height: 2px;
  color: #c8e8ff;
  animation: homeLoWhaleStarTwinkle 4.6s ease-in-out infinite;
}

.home-lo-flyover__star--1 { top: 10%; left: 8%; animation-delay: 0s; }
.home-lo-flyover__star--2 { top: 18%; left: 24%; animation-delay: 0.6s; opacity: 0.35; }
.home-lo-flyover__star--3 { top: 6%; left: 48%; animation-delay: 1.2s; }
.home-lo-flyover__star--4 { top: 22%; left: 64%; animation-delay: 1.8s; opacity: 0.4; }
.home-lo-flyover__star--5 { top: 12%; left: 82%; animation-delay: 0.3s; }
.home-lo-flyover__star--6 { top: 30%; left: 38%; animation-delay: 2.4s; opacity: 0.3; width: 1px; height: 1px; }
.home-lo-flyover__star--7 { top: 8%; left: 92%; animation-delay: 3.1s; opacity: 0.45; width: 1px; height: 1px; }

.home-lo-flyover__signal {
  width: 3px;
  height: 3px;
  color: var(--fly-green);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.55);
  animation: homeLoWhaleSignalPulse 2.4s ease-in-out infinite;
}

.home-lo-flyover__signal--1 { top: 34%; left: 14%; animation-delay: 0.15s; }
.home-lo-flyover__signal--2 { top: 42%; left: 44%; animation-delay: 0.9s; opacity: 0.7; }
.home-lo-flyover__signal--3 { top: 28%; left: 76%; animation-delay: 1.6s; }

.home-lo-flyover--hot .home-lo-flyover__signal {
  color: var(--fly-yellow);
  box-shadow: 0 0 8px rgba(255, 179, 0, 0.5);
}

.home-lo-flyover--down .home-lo-flyover__signal,
.home-lo-flyover--bad .home-lo-flyover__signal {
  color: var(--fly-red);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.45);
}

.home-lo-flyover__horizon {
  position: absolute;
  right: 0;
  bottom: 38%;
  left: 0;
  height: 42%;
}

.home-lo-flyover__mountains {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  background:
    linear-gradient(155deg, transparent 36%, rgba(8, 18, 28, 0.94) 36%),
    linear-gradient(142deg, transparent 46%, rgba(12, 24, 36, 0.9) 46%),
    linear-gradient(168deg, transparent 28%, rgba(6, 14, 22, 0.96) 28%),
    linear-gradient(125deg, transparent 58%, rgba(10, 20, 30, 0.88) 58%);
  opacity: 0.94;
  mask-image: linear-gradient(180deg, transparent 0%, #000 55%);
}

.home-lo-flyover__skyline {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 62%;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(88, 199, 255, 0.1) 14%,
      rgba(88, 199, 255, 0.22) 18%,
      rgba(88, 199, 255, 0.08) 21%,
      transparent 25%,
      rgba(223, 119, 255, 0.08) 38%,
      rgba(223, 119, 255, 0.18) 41%,
      transparent 45%,
      rgba(88, 199, 255, 0.14) 58%,
      rgba(88, 199, 255, 0.26) 62%,
      transparent 67%,
      rgba(74, 222, 128, 0.1) 80%,
      rgba(74, 222, 128, 0.16) 84%,
      transparent 90%
    );
  mask-image: linear-gradient(180deg, transparent 0%, #000 78%);
  opacity: 0.78;
}

/* Coastal water — bay, shimmer, harbour glow */
.home-lo-flyover__water {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 42%;
  pointer-events: none;
}

.home-lo-flyover__bay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 120% at 22% 0%, rgba(88, 199, 255, 0.06), transparent 52%),
    linear-gradient(180deg, transparent 0%, rgba(2, 8, 16, 0.55) 18%, rgba(1, 4, 10, 0.92) 100%);
  clip-path: polygon(0 38%, 8% 32%, 18% 36%, 32% 28%, 48% 34%, 62% 26%, 78% 32%, 92% 24%, 100% 30%, 100% 100%, 0 100%);
}

.home-lo-flyover__waterline {
  position: absolute;
  right: 0;
  top: 26%;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(88, 199, 255, 0.12) 12%,
    rgba(88, 199, 255, 0.28) 35%,
    rgba(223, 119, 255, 0.18) 55%,
    rgba(88, 199, 255, 0.22) 78%,
    transparent 100%
  );
  opacity: 0.65;
}

.home-lo-flyover__shimmer {
  position: absolute;
  inset: 28% 0 0;
  background:
    repeating-linear-gradient(100deg,
      transparent 0,
      transparent 18px,
      rgba(88, 199, 255, 0.03) 18px,
      rgba(88, 199, 255, 0.03) 19px
    ),
    linear-gradient(180deg, transparent 0%, rgba(88, 199, 255, 0.04) 40%, rgba(74, 222, 128, 0.03) 100%);
  opacity: 0.55;
  animation: homeLoWaterShimmer 5.5s ease-in-out infinite;
}

.home-lo-flyover__harbour-glow {
  position: absolute;
  right: 12%;
  bottom: 8%;
  width: 28%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 179, 0, 0.08) 0%, rgba(88, 199, 255, 0.05) 45%, transparent 72%);
  opacity: 0.7;
  animation: homeLoHarbourPulse 3.8s ease-in-out infinite;
}

.home-lo-flyover__track {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/*
 * Whale leads, banner trails.
 * DOM: orca → tether → banner. Position anchors on the orca (left edge),
 * so the whale enters the scene first when moving left-to-right.
 */
.home-lo-flyover__craft {
  position: absolute;
  top: 22%;
  left: -36%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: homeLoWhalePass var(--fly-pass-duration) linear infinite;
  will-change: left;
}

.home-lo-flyover__orca {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 34px;
  filter: drop-shadow(0 0 8px rgba(88, 199, 255, 0.28));
  animation: homeLoWhaleFace var(--fly-pass-duration) linear infinite;
}

.home-lo-flyover__tether {
  flex: 0 0 auto;
  width: clamp(1.25rem, 3vw, 2rem);
  height: 1px;
  background: linear-gradient(90deg, rgba(88, 199, 255, 0.55), rgba(88, 199, 255, 0.12));
  box-shadow: 0 0 6px rgba(88, 199, 255, 0.2);
  animation: homeLoTetherFade var(--fly-pass-duration) linear infinite;
}

.home-lo-flyover__banner-skin {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  max-width: min(72vw, 28rem);
  padding: 0.32rem 0.62rem;
  border: 1px solid rgba(88, 199, 255, 0.26);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(4, 12, 18, 0.92);
  box-shadow:
    0 0 14px rgba(88, 199, 255, 0.1),
    inset 0 0 0 1px rgba(74, 222, 128, 0.07);
}

.home-lo-flyover__banner-text {
  color: #f1f7f4;
  font-size: clamp(0.62rem, 1.15vw, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.home-lo-flyover--hot .home-lo-flyover__banner-skin {
  border-color: rgba(255, 179, 0, 0.34);
  box-shadow:
    0 0 16px rgba(255, 179, 0, 0.12),
    inset 0 0 0 1px rgba(255, 107, 107, 0.08);
}

.home-lo-flyover--down .home-lo-flyover__banner-skin,
.home-lo-flyover--bad .home-lo-flyover__banner-skin {
  border-color: rgba(255, 107, 107, 0.36);
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.14);
}

/* Pixel-inspired signal whale — side profile, default facing right. */
.home-lo-flyover__orca-fluke,
.home-lo-flyover__orca-body,
.home-lo-flyover__orca-belly,
.home-lo-flyover__orca-patch,
.home-lo-flyover__orca-dorsal,
.home-lo-flyover__orca-head,
.home-lo-flyover__orca-eye,
.home-lo-flyover__orca-spray {
  position: absolute;
  image-rendering: pixelated;
}

.home-lo-flyover__orca-fluke {
  bottom: 8px;
  left: 0;
  width: 12px;
  height: 14px;
  background:
    linear-gradient(135deg, #0a1018 0%, #0a1018 48%, transparent 48%),
    linear-gradient(225deg, #0a1018 0%, #0a1018 48%, transparent 48%);
  transform: rotate(-8deg);
}

.home-lo-flyover__orca-body {
  bottom: 10px;
  left: 8px;
  width: 34px;
  height: 16px;
  border-radius: 2px 10px 8px 4px;
  background: linear-gradient(180deg, #121820 0%, #060a10 100%);
  box-shadow:
    inset 0 -3px 0 rgba(255, 255, 255, 0.06),
    inset 0 2px 0 rgba(255, 255, 255, 0.04);
}

.home-lo-flyover__orca-belly {
  bottom: 10px;
  left: 14px;
  width: 22px;
  height: 6px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(220, 232, 244, 0.18), rgba(220, 232, 244, 0.06));
}

.home-lo-flyover__orca-patch {
  top: 12px;
  left: 34px;
  width: 10px;
  height: 7px;
  border-radius: 50% 40% 40% 50%;
  background: linear-gradient(180deg, #eef4fb 0%, #c8d8ea 100%);
  box-shadow: 0 0 6px rgba(200, 220, 240, 0.35);
}

.home-lo-flyover__orca-dorsal {
  top: 2px;
  left: 22px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 12px solid #0a1018;
  filter: drop-shadow(0 0 4px rgba(88, 199, 255, 0.15));
}

.home-lo-flyover__orca-head {
  top: 10px;
  right: 0;
  width: 18px;
  height: 14px;
  border-radius: 0 50% 45% 0;
  background: linear-gradient(180deg, #141c26 0%, #060a10 100%);
  box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.05);
}

.home-lo-flyover__orca-eye {
  top: 14px;
  right: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #57f3ff;
  box-shadow:
    0 0 6px rgba(87, 243, 255, 0.75),
    0 0 12px rgba(87, 243, 255, 0.35);
  animation: homeLoWhaleEyePulse 2s ease-in-out infinite;
}

.home-lo-flyover__orca-spray {
  top: 6px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 199, 255, 0.35) 0%, transparent 70%);
  opacity: 0.55;
  animation: homeLoWhaleSpray 2.4s ease-in-out infinite;
}

.home-lo-flyover--hot .home-lo-flyover__orca-eye {
  background: var(--fly-yellow);
  box-shadow: 0 0 8px rgba(255, 179, 0, 0.65);
}

.home-lo-flyover--down .home-lo-flyover__orca-eye,
.home-lo-flyover--bad .home-lo-flyover__orca-eye {
  background: var(--fly-red);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.55);
}

.home-lo-flyover__readout {
  display: grid;
  gap: 0.38rem;
  padding: 0.72rem 0.92rem 0.82rem;
}

.home-lo-flyover__report {
  margin: 0;
  color: var(--fly-muted);
  font-size: clamp(0.68rem, 1.05vw, 0.8rem);
  line-height: 1.45;
}

.home-lo-flyover__cta {
  justify-self: start;
  margin-top: 0.08rem;
  color: #74d9c4;
  font-size: clamp(0.64rem, 0.98vw, 0.74rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.16s ease;
}

.home-lo-flyover__cta:hover,
.home-lo-flyover__cta:focus-visible {
  color: var(--fly-cyan);
  outline: none;
}

/* LTR pass: whale faces right, banner trails rightward. RTL pass: whale flips left. */
@keyframes homeLoWhalePass {
  0% {
    left: -36%;
    top: 22%;
  }
  12% {
    top: 19%;
  }
  24% {
    top: 23%;
  }
  47% {
    left: 108%;
    top: 20%;
  }
  50% {
    left: 108%;
    top: 22%;
  }
  62% {
    top: 19%;
  }
  74% {
    top: 23%;
  }
  97% {
    left: -36%;
    top: 20%;
  }
  100% {
    left: -36%;
    top: 22%;
  }
}

@keyframes homeLoWhaleFace {
  0%, 49% {
    transform: scaleX(1);
  }
  50%, 100% {
    transform: scaleX(-1);
  }
}

@keyframes homeLoTetherFade {
  0%, 49% {
    background: linear-gradient(90deg, rgba(88, 199, 255, 0.55), rgba(88, 199, 255, 0.12));
  }
  50%, 100% {
    background: linear-gradient(90deg, rgba(88, 199, 255, 0.12), rgba(88, 199, 255, 0.55));
  }
}

@keyframes homeLoWaterShimmer {
  0%, 100% { opacity: 0.42; transform: translateX(0); }
  50% { opacity: 0.62; transform: translateX(6px); }
}

@keyframes homeLoHarbourPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

@keyframes homeLoWhaleStarTwinkle {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.78; }
}

@keyframes homeLoWhaleSignalPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 0.95; }
}

@keyframes homeLoWhaleEyePulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes homeLoWhaleSpray {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@media (max-width: 720px) {
  .home-lo-flyover {
    --fly-scene-h: 5.75rem;
    --fly-pass-duration: 17s;
  }

  .home-lo-flyover__craft {
    top: 18%;
  }

  .home-lo-flyover__orca {
    width: 48px;
    height: 28px;
  }

  .home-lo-flyover__orca-body {
    width: 28px;
    height: 14px;
  }

  .home-lo-flyover__banner-text {
    font-size: 0.58rem;
  }

  .home-lo-flyover__banner-skin {
    max-width: min(68vw, 22rem);
  }

  .home-lo-flyover__readout {
    padding: 0.62rem 0.72rem 0.72rem;
  }
}

@media (max-width: 520px) {
  .home-lo-flyover {
    --fly-scene-h: 5.25rem;
    --fly-pass-duration: 20s;
  }

  .home-lo-flyover__banner-text {
    font-size: 0.54rem;
  }

  .home-lo-flyover__orca {
    width: 42px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-lo-flyover {
    --fly-pass-duration: 0s;
  }

  .home-lo-flyover__craft,
  .home-lo-flyover__orca,
  .home-lo-flyover__orca-eye,
  .home-lo-flyover__orca-spray,
  .home-lo-flyover__star,
  .home-lo-flyover__signal,
  .home-lo-flyover__shimmer,
  .home-lo-flyover__harbour-glow {
    animation: none !important;
  }

  .home-lo-flyover__craft {
    left: 50%;
    transform: translateX(-48%);
  }

  .home-lo-flyover__orca {
    transform: scaleX(1);
  }

  .home-lo-flyover__scene {
    display: block;
  }
}
