@import url("https://fonts.googleapis.com/css2?family=Karla:wght@400;700&display=swap");

:root {
  --surface: #e2ece2;
  --blue: #3976ff;
  --orange: #ee7b42;
  --text: #101010;
  --banner-bg-image: url("assets/images/scene-01.jpg");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 728px;
  height: 90px;
  overflow: hidden;
  font-family: "Karla", sans-serif;
}

.banner {
  position: relative;
  width: 728px;
  height: 90px;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  background: #24445e;
}

.image-layer {
  position: absolute;
  background-image: linear-gradient(90deg, rgba(13, 40, 60, 0.62) 0%, rgba(13, 40, 60, 0.3) 38%, rgba(13, 40, 60, 0.1) 100%), var(--layer-image, var(--banner-bg-image));
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  opacity: 0;
  transition: opacity 900ms ease;
  animation: bgBreath 10s ease-in-out 700ms infinite alternate;
  width: 50%;
  right: 0;
  top: 0;
  bottom: 0;
  filter: brightness(0.6);
}

.image-layer.is-crossfade {
  z-index: 0;
}

.content-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 430px;
  height: 90px;
  padding: 8px 20px 8px 16px;
  z-index: 2;
  background: transparent;
  opacity: 0;
  transform: translateX(-80px) rotate(25deg);
  transition: opacity 750ms cubic-bezier(0.22, 1, 0.36, 1), transform 750ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: cardDrift 0s ease-in-out 2100ms infinite;
}

.content-card::before {
  content: "";
  position: absolute;
  inset: -34px -12px -70px -38px;  background: var(--surface);
  border-radius: 10px;
  transform: rotate(15deg);
  z-index: -1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.logo,
.title,
.body,
.cta-button {
  opacity: 0;
  transform: translateY(8px);
}

.logo {
  position: absolute;
  top: 36px;
  right: 80px;
  z-index: 1;
  transition: opacity 400ms ease 850ms, transform 400ms ease 850ms;
}

.logo img {
  width: 80px;
  height: auto;
  display: block;
  filter: invert(1);
}

.content {
  position: relative;
  z-index: 1;
  margin-left: 0px;
  margin-right: 90px;
  margin-top: 4px;
  animation: contentDrift 0s ease-in-out 2000ms infinite;
}

.eyebrow {
  font-family: "Rany", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--orange);
  white-space: nowrap;
}

.title {
  margin: 4px 0 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.2px;
  transition: opacity 450ms cubic-bezier(0.22, 1, 0.36, 1) 950ms, transform 450ms cubic-bezier(0.22, 1, 0.36, 1) 950ms;
  animation: titleGlow 7s ease-in-out 2300ms infinite;
}

.title span:last-child {
  color: var(--blue);
}

.body {
  margin: 0;
  color: var(--text);
  font-size: 9px;
  line-height: 1.15;
  max-height: 20px;
  overflow: hidden;
  transition: opacity 450ms cubic-bezier(0.22, 1, 0.36, 1) 1050ms, transform 450ms cubic-bezier(0.22, 1, 0.36, 1) 1050ms;
}

.cta-button {
  position: absolute;
  top: 50%;
  right: 0px;
  transform: translateY(-50%);
  z-index: 2;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ff8f58 0%, var(--orange) 52%, #dc642c 100%);
  color: #fff;
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(238, 123, 66, 0.28);
  transition:
    transform 190ms ease,
    filter 190ms ease,
    box-shadow 190ms ease,
    opacity 450ms cubic-bezier(0.22, 1, 0.36, 1) 1150ms;
  animation:
    ctaPulse 2.8s ease-in-out 2400ms infinite,
    /* ctaFloat 7s ease-in-out 2300ms infinite; */
}

.cta-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 8%, rgba(255, 255, 255, 0.4) 42%, transparent 72%);
  transform: translateX(-140%);
  pointer-events: none;
}

.cta-button:hover {
  animation-play-state: paused;
  transform: translateY(-50%) scale(1.03);
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(238, 123, 66, 0.42);
}

.cta-button:hover::before {
  animation: ctaShine 700ms ease-out 1;
}

.cta-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.banner.banner-ready .image-layer.is-visible {
  opacity: 1;
}

.banner.banner-ready .content-card {
  opacity: 1;
  transform: translateX(0);
}

.banner.banner-ready .logo,
.banner.banner-ready .title,
.banner.banner-ready .body,
.banner.banner-ready .cta-button {
  opacity: 1;
  transform: translateY(0);
}

@keyframes bgBreath {
  0% {
    transform: scale(1.04) translateX(0);
  }
  100% {
    transform: scale(1.08) translateX(-4px);
  }
}

@keyframes cardDrift {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(2px) translateY(-1px);
  }
}

@keyframes contentDrift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

@keyframes titleGlow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(57, 118, 255, 0);
  }
  45% {
    text-shadow: 0 1px 8px rgba(57, 118, 255, 0.16);
  }
}

@keyframes ctaPulse {
  0%,
  65%,
  100% {
    box-shadow: 0 0 0 0 rgba(238, 123, 66, 0);
  }
  78% {
    box-shadow: 0 0 0 6px rgba(238, 123, 66, 0.2);
  }
}

@keyframes ctaFloat {
  0%,
  100% {
    transform: translateY(-50%);
  }
  50% {
    transform: translateY(calc(-50% - 1px));
  }
}

@keyframes ctaShine {
  0% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(140%);
  }
}
