@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,800;1,400&display=swap');

:root { --banner-width: 300px; --banner-height: 600px; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.ad {
  position: relative;
  width: var(--banner-width);
  height: var(--banner-height);
  overflow: hidden;
  border: 1px solid #808080;
  background: radial-gradient(ellipse at 50% 48%, #ffffff 35%, #e8e6e3 100%);
}
.banner-frame { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.banner-frame.is-visible { opacity: 1; visibility: visible; }

.frame-one-headline {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 330px;
  margin: 0;
  color: #2F458A;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 30px;
  line-height: 34px;
  font-weight: 500;
  letter-spacing: -0.5px;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%) scaleX(0.93);
}
.frame-one-headline sup {
  position: relative;
  top: 3px;
  font-size: 70%;
  line-height: 0;
}
.frame-one-images {
  position: absolute;
  top: 186px;
  left: 0;
  display: grid;
  grid-template-columns: 150px 150px;
  grid-template-rows: 196px 110px;
  width: 300px;
  height: 306px;
}
.frame-one-image { width: 150px; min-width: 0; height: 100%; overflow: hidden; }
.frame-one-image:first-child { grid-column: 1 / -1; grid-row: 1; width: 299px; }
.frame-one-image:nth-child(2) { grid-column: 2; grid-row: 2; }
.frame-one-image:last-child { grid-column: 1; grid-row: 2; }
.frame-one-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(100%);
}
.frame-one.is-playing .frame-one-image img { animation: image-slide-in 700ms ease-out both; }
.frame-one.is-playing .frame-one-image:nth-child(2) img { animation-delay: 700ms; }
.frame-one.is-playing .frame-one-image:nth-child(3) img { animation-delay: 1400ms; }
@keyframes image-slide-in { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .frame-one.is-playing .frame-one-image img { animation: none; transform: none; }
}

.frame-two-logo { position: absolute; top: 30px; left: 50%; width: 160px; height: auto; transform: translateX(-50%); }
.frame-two-text {
  position: absolute;
  top: 170px;
  left: 12px;
  width: 274px;
  text-align: center;
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.frame-two-headline { color: #2F458A; font-weight: 500; opacity: 0; }
.frame-two-copy { color: #8A3E90; font-weight: 400; opacity: 0; }
.frame-two-text sup {
  position: relative;
  top: -8px;
  font-size: 12px;
  line-height: 0;
  vertical-align: baseline;
}
.frame-two-copy sup { top: -9px; }
.frame-two-footnote {
  position: absolute;
  left: 12px;
  bottom: 138px;
  margin: 0;
  color: #2F458A;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  line-height: 12px;
  font-weight: 400;
}
.frame-two.is-visible .frame-two-headline { animation: frame-two-headline-cycle 5s ease-in-out both; }
.frame-two.is-visible .frame-two-copy { animation: frame-two-copy-cycle 5s ease-in-out both; }
@keyframes frame-two-text-fade { from { opacity: 0; } to { opacity: 1; } }

.isi {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 134px;
  border-top: 1px solid #808080;
  background: #ffffff;
  color: #333333;
}
.isi-content {
  height: 100%;
  overflow-y: scroll;
  padding: 7px 10px 7px 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 13px;
  scrollbar-width: thin;
  scrollbar-color: #777777 #eeeeee;
  overscroll-behavior: contain;
}
.isi-content::-webkit-scrollbar { width: 5px; }
.isi-content::-webkit-scrollbar-track { background: #eeeeee; }
.isi-content::-webkit-scrollbar-thumb { background: #777777; border-radius: 4px; }
@supports selector(::-webkit-scrollbar) {
  .isi-content { scrollbar-width: auto; scrollbar-color: auto; }
}
.isi h2 { margin: 0 0 5px; font-size: 11px; line-height: 13px; font-weight: 700; }
.isi p { margin: 0 0 5px; }
.isi ul { margin: 0 0 5px; padding-left: 13px; }
.isi li { margin-bottom: 5px; }
.isi img[src="kedrion-logo.png"] { width: 44px; height: auto; }

@media (prefers-reduced-motion: reduce) {
  .frame-two.is-visible .frame-two-headline,
  .frame-two.is-visible .frame-two-copy { animation: none; opacity: 1; }
}

/* Keep the same logo and bordered ISI panel visible across the final transition. */
.shared-details { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.shared-details.is-visible { opacity: 1; visibility: visible; }
.frame-two, .frame-three { pointer-events: none; }

.frame-three-content {
  position: absolute;
  top: 175px;
  left: 10px;
  width: 278px;
  text-align: center;
  font-family: "Poppins", Arial, sans-serif;
}
.frame-three-headline {
  margin: 0;
  color: #2F458A;
  font-size: 30px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: -0.5px;
  white-space: nowrap;
  opacity: 0;
}
.frame-three-copy {
  margin: 3px 0 0;
  color: #8A3E90;
  font-size: 24px;
  line-height: 28px;
  font-weight: 400;
  letter-spacing: -0.3px;
  opacity: 0;
}
.frame-three-copy em { font-style: italic; }
.frame-three-copy sup {
  position: relative;
  top: -8.6px;
  font-size: 12px;
  line-height: 0;
  vertical-align: baseline;
}
.frame-three-cta {
  position: absolute;
  top: 380px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 140px;
  opacity: 0;
  pointer-events: auto;
}
.frame-three-cta img { display: block; width: 100%; height: auto; }
.frame-three.is-visible .frame-three-headline { animation: frame-two-text-fade 900ms ease-in-out forwards; }
.frame-three.is-visible .frame-three-copy { animation: frame-two-text-fade 900ms ease-in-out 900ms forwards; }


@media (prefers-reduced-motion: reduce) {
  .frame-three.is-visible .frame-three-headline,
  .frame-three.is-visible .frame-three-copy,
  .frame-three.is-visible .frame-three-cta { animation: none; opacity: 1; }
}

/* Match banner A's logo and yellow CTA entrance reveals. */
.shared-details.is-visible .frame-two-logo {
  animation: logo-pop 800ms ease-in-out;
}

@keyframes logo-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(1); }
  12.5% { opacity: 1; transform: translateX(-50%) scale(1); }
  31.25%, 50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.frame-three.is-visible .frame-three-cta {
  animation: cta-pop 800ms ease-in-out 1800ms both;
}

@keyframes cta-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(1); }
  12.5% { opacity: 1; transform: translateX(-50%) scale(1); }
  31.25%, 50% { opacity: 1; transform: translateX(-50%) scale(1.4); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .shared-details.is-visible .frame-two-logo { animation: none; }
  .frame-three.is-visible .frame-three-cta { animation: none; opacity: 1; }
}

/* Ease out of each five-second frame before the next message appears. */
.frame-one.is-playing { animation: frame-one-exit 5s ease-in-out both; }
@keyframes frame-one-exit {
  0%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes frame-two-headline-cycle {
  0% { opacity: 0; }
  18%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes frame-two-copy-cycle {
  0%, 18% { opacity: 0; }
  36%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

.frame-two.is-visible .frame-two-footnote { animation: frame-two-headline-cycle 5s ease-in-out both; }

@media (prefers-reduced-motion: reduce) {
  .frame-one.is-playing,
  .frame-two.is-visible .frame-two-footnote { animation: none; opacity: 1; }
}
