body.is-loading .showcase {
  pointer-events: none;
}

.showcase {
  width: calc(100vw + 240px);
  height: 100vh;
  display: flex;
  overflow: hidden;
  background: var(--bg-main);
  margin-left: -120px;
}

.easter-egg {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  animation: bubblun-idle 4.8s ease-in-out infinite;
}

.service-card.service-card--secret {
  overflow: visible;
}

.service-card--secret .easter-egg {
  position: absolute;
  right: 12px;
  bottom: -3px;
  z-index: 3;
}

.easter-egg-art {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.75));
  transform: translateY(0) rotate(0deg) scale(1);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.easter-egg:hover .easter-egg-art {
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.8));
  transform: translateY(-3px) rotate(-4deg) scale(1.08);
}

.easter-egg:active {
  animation: none;
}

.easter-egg:active .easter-egg-art {
  animation: bubblun-click 0.34s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.easter-egg:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
  background: rgba(0, 0, 0, 0.25);
}

@keyframes bubblun-idle {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-1px) rotate(1deg);
  }
}

@keyframes bubblun-click {
  0% {
    transform: translateY(-3px) scale(1.08);
  }
  45% {
    transform: translateY(2px) scale(0.94, 1.04);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .easter-egg,
  .easter-egg-art {
    animation: none;
    transition: none;
  }
}

.panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  transform: skewX(-12deg);
  margin-left: -52px;
  transition:
    flex 0.45s ease,
    filter 0.45s ease;
  cursor: pointer;
}

.panel:first-child {
  margin-left: 0;
}

.panel:last-child {
  margin-right: -90px;
}

body.show-lines .panel-3,
body.open-lines .panel-3,
body.is-revealing .panel-3 {
  z-index: 25;
}

.splash-panel-line {
  position: absolute;
  top: -25vh;
  width: 1px;
  height: 150vh;
  background: rgba(255, 255, 255, 0.38);
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: center;
  transition:
    transform 1.15s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 1s ease;
}

.splash-panel-line-left {
  left: 1px;
}

.splash-panel-line-right {
  right: 1px;
}

body.show-lines .splash-panel-line {
  opacity: 1;
  transform: scaleY(1);
}

body.open-lines .splash-panel-line-left {
  transform: scaleY(1) translateY(-95vh);
  opacity: 0.65;
}

body.open-lines .splash-panel-line-right {
  transform: scaleY(1) translateY(95vh);
  opacity: 0.65;
}

body.has-loaded .splash-panel-line {
  display: none;
}

.panel::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 12;
  background: var(--bg-main);
  pointer-events: none;
  transition:
    transform 1.65s cubic-bezier(0.76, 0, 0.24, 1);
  transition-delay: var(--splash-delay, 0ms);
}

body.has-loaded .panel::before {
  display: none;
}

body.is-loading .panel::before {
  transform: translateY(0);
}

body.is-loading.is-revealing .panel:nth-child(odd)::before {
  transform: translateY(-105%);
}

body.is-loading.is-revealing .panel:nth-child(even)::before {
  transform: translateY(105%);
}

body.is-loading.is-revealing .panel-3::before {
  transform: translateY(-105%);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 11;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

body.show-lines .panel::after,
body.is-revealing .panel::after {
  opacity: 1;
}

body.has-loaded .panel::after {
  opacity: 0;
}

.panel-inner {
  width: 150%;
  height: 100%;
  margin-left: -25%;
  transform: skewX(12deg) scale(1);
  background-size: cover;
  background-position: center;
  position: relative;
  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

body.is-loading .panel-inner {
  filter: brightness(0.38) grayscale(1);
  transform: skewX(12deg) scale(1.08);
}

body.is-loading.is-revealing .panel-inner {
  filter: brightness(0.8) grayscale(0.55);
  transform: skewX(12deg) scale(1.02);
  transition:
    filter 1.75s cubic-bezier(0.76, 0, 0.24, 1),
    transform 1.75s cubic-bezier(0.76, 0, 0.24, 1);
  transition-delay: var(--splash-delay, 0ms);
}

.panel-1 .panel-inner {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.8)),
    url("https://images.unsplash.com/photo-1573164713988-8665fc963095?auto=format&fit=crop&w=2200&q=95");
  background-position: 42% center;
}

.panel-2 .panel-inner {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.82)),
    url("https://images.unsplash.com/photo-1550751827-4bd374c3f58b?auto=format&fit=crop&w=2200&q=95");
  background-position: center;
}

.panel-3 .panel-inner {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.82)),
    url("https://images.unsplash.com/photo-1770938474431-d1192cac9642?auto=format&fit=crop&w=2200&q=95");
  background-position: center;
}

.panel-4 .panel-inner {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.82)),
    url("https://images.unsplash.com/photo-1676405034160-a389faf8331d?auto=format&fit=crop&w=2200&q=95");
  background-position: center;
}

.panel-5 .panel-inner {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.8)),
    url("../assets/images/queryguard-operations-center.png");
  background-position: center;
}

.panel-6 .panel-inner {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.82)),
    url("https://images.unsplash.com/photo-1581092918056-0c4c3acd3789?auto=format&fit=crop&w=2200&q=95");
  background-position: center;
}

.panel-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.08) 45%, rgba(0,0,0,0.35)),
    radial-gradient(circle at center, transparent 35%, rgba(0,0,0,0.35) 100%);
  z-index: 1;
}

.showcase:hover .panel,
.showcase.has-active .panel {
  filter: grayscale(1) brightness(0.38);
}

.showcase .panel:hover,
.showcase .panel.is-active {
  flex: 1.38;
  filter: grayscale(0) brightness(1);
  z-index: 5;
}

.showcase .panel:hover .panel-inner,
.showcase .panel.is-active .panel-inner {
  transform: skewX(12deg) scale(1.035);
}

.panel-content {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 82%;
  max-width: 430px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 3;
}

.panel-content h2 {
  color: var(--text-main);
  font-size: clamp(1.15rem, 1.8vw, 2rem);
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow: 0 3px 14px rgba(0,0,0,0.75);
  text-wrap: balance;
  overflow-wrap: break-word;
}

.panel-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.75);
}

.panel-tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.45);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.panel:hover .panel-content,
.panel.is-active .panel-content {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.03);
}

.panel:first-child .panel-content {
  left: 56%;
}

.panel:last-child .panel-content {
  left: 33%;
  width: 56%;
  max-width: 260px;
}

.panel:last-child .panel-content h2 {
  font-size: 1.34rem;
}

@media (max-width: 1200px) {
  .panel-content h2 {
    font-size: 1.35rem;
  }

  .panel-content p {
    font-size: 0.82rem;
  }
}

@media (min-width: 901px) and (max-width: 1500px) {
  .panel:last-child .panel-content {
    left: 26%;
    width: 50%;
    max-width: 220px;
  }

  .panel:last-child .panel-content h2 {
    font-size: 1.12rem;
  }
}

@media (max-width: 900px) {
  body.is-loading {
    overflow: auto;
  }

  .showcase {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    height: auto;
  }

  .easter-egg {
    width: 34px;
    height: 34px;
  }

  .easter-egg-art {
    width: 28px;
    height: 28px;
  }

  .panel {
    transform: none;
    margin-left: 0;
    margin-right: 0;
    min-height: 260px;
  }

  .panel:last-child {
    margin-right: 0;
  }

  .splash-panel-line {
    display: none;
  }

  .panel-inner {
    width: 100%;
    height: 260px;
    margin-left: 0;
    transform: none;
  }

  body.is-loading .panel-inner,
  body.is-loading.is-revealing .panel-inner {
    transform: scale(1.05);
  }

  .showcase:hover .panel,
  .showcase.has-active .panel {
    filter: grayscale(0) brightness(1);
  }

  .showcase .panel:hover,
  .showcase .panel.is-active {
    flex: 1;
  }

  .showcase .panel:hover .panel-inner,
  .showcase .panel.is-active .panel-inner {
    transform: scale(1.03);
  }

  .panel-content {
    opacity: 1;
    width: 85%;
    max-width: none;
    top: 50%;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .panel:first-child .panel-content,
  .panel:last-child .panel-content {
    left: 50%;
  }

  .panel-content h2 {
    font-size: 1.45rem;
  }
}
