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

:root {
  --banner-width: 160px;
  --banner-height: 600px;
  --headline-color: #2F458A;
}

* {
  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: #e8e6e3;
  cursor: default;
}

.frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.frame.is-visible {
  opacity: 1;
  visibility: visible;
}

.frame-one-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.frame-one-content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 257px;
  background: linear-gradient(to bottom, #eeecea, #ffffff 25%, #ffffff);
}

.frame-one-headline {
  position: absolute;
  top: 104px;
  left: 50%;
  width: 176px;
  margin: 0;
  color: var(--headline-color);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 25px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.5px;
  text-align: center;
  transform: translateX(-50%) scaleX(0.9);
}

.frame-one-headline sup {
  position: relative;
  top: 1px;
  font-size: 60%;
  line-height: 0;
}

.frame-one-eyes {
  position: absolute;
  top: 257px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 100%;
  height: auto;
}

.frame-one.is-visible .frame-one-eyes {
  animation: eyes-slide-up 900ms ease-out both;
}

@keyframes eyes-slide-up {
  from { transform: translate(-50%, calc(var(--banner-height) - 257px)); }
  to { transform: translate(-50%, 0); }
}

/* Frame two appears after five seconds; only its live promotional text fades. */
.shared-details {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background: linear-gradient(to bottom, #eeecea, #ffffff 20%, #ffffff 62%, #e8e6e3 78%);
}

.frame-two-logo {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 129.4px;
  height: auto;
  transform: translateX(-50%);
}

.frame-two-text {
  position: absolute;
  top: 128px;
  left: 0;
  width: 100%;
  color: #833B89;
  font-family: "Poppins", Arial, sans-serif;
  text-align: center;
}

.frame-two-headline,
.frame-two-copy,
.frame-two-condition {
  opacity: 0;
}

.frame-two.is-visible .frame-two-headline {
  animation: frame-two-text-fade 900ms ease-out forwards;
}

.frame-two.is-visible .frame-two-copy,
.frame-two.is-visible .frame-two-condition {
  animation: frame-two-text-fade 900ms ease-out 900ms forwards;
}

@keyframes frame-two-text-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.frame-two-headline {
  margin: 0;
  font-size: 28px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -1px;
}

.frame-two-copy {
  position: relative;
  top: -6px;
  margin: 16px 0 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 400;
  letter-spacing: -0.6px;
}

.frame-two-condition {
  margin: -5px 0 0;
  color: #2F458A;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
}

.frame-two-condition sup {
  position: relative;
  top: -6.3px;
  font-size: 11px;
  font-weight: 400;
  line-height: 0;
  vertical-align: baseline;
}

.isi {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 134px;
  border-top: 1px solid #808080;
  background: #ffffff;
  color: #333333;
  cursor: default;
}

.isi-content {
  height: 100%;
  overflow-y: scroll;
  padding: 7px 4px 7px 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5px;
  line-height: 13px;
  scrollbar-width: thin;
  scrollbar-color: #777777 #eeeeee;
  overscroll-behavior: contain;
}

.isi-content::-webkit-scrollbar { width: 3px; }
.isi-content::-webkit-scrollbar-track { background: #eeeeee; }
.isi-content::-webkit-scrollbar-thumb { background: #777777; border-radius: 2px; min-height: 12px; }
@supports selector(::-webkit-scrollbar) {
  .isi-content { scrollbar-width: auto; scrollbar-color: auto; }
}
.isi h2 { margin: 0 0 5px; font-size: 10.5px; 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 a { color: #2F458A; }
.isi img[src="kedrion-logo.png"] { width: 44px; height: auto; }

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

/* One persistent logo and ISI panel serve frames two and three. */
.shared-details.is-visible { opacity: 1; visibility: visible; }
.frame-two,
.frame-three { pointer-events: none; }

.frame-three-text {
  position: absolute;
  top: 125px;
  left: 0;
  width: 100%;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.6px;
  text-align: center;
  opacity: 0;
}

.frame-three.is-visible .frame-three-text,
.frame-three.is-visible .frame-three-footnote {
  animation: frame-two-text-fade 900ms ease-out forwards;
}

.frame-three-headline {
  margin: 0;
  color: #2F458A;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.frame-three-copy {
  margin: 10px 0 0;
  color: #833B89;
  font-size: 20px;
  line-height: 26px;
  font-weight: 400;
}

.frame-three-text sup {
  position: relative;
  top: -0.5em;
  font-size: 11px;
  line-height: 0;
  vertical-align: baseline;
}

.frame-three-copy sup {
  top: -6.3px;
}

.frame-three-cta {
  cursor: pointer;
  position: absolute;
  top: 320px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 31.66px;
  pointer-events: auto;
}

.frame-three-cta img { display: block; width: 100%; height: auto; }

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

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

.shared-details.is-visible .frame-two-logo {
  animation: logo-pop 800ms ease-in-out;
}

/* Keep the centered logo within the narrow banner while it grows. */
@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-footnote {
  position: absolute;
  bottom: 138px;
  left: 4px;
  margin: 0;
  color: #2F458A;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 12px;
  opacity: 0;
}

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