/* ============================================================
   Smart21Brain — Games hub hero
   Two-column hero: copy on the left, an alpha-keyed video of the
   Smart21Brain mascot on the right. The hero's own backdrop is a
   full-bleed looping video (.hero-bg-video) instead of the flat
   brand gradient other .hero-plain sections use — just a thin dark
   wash on top (below) so the white copy stays readable over it.
   Mouse movement gently "spins" the mascot by scrubbing the clip;
   a rAF easing loop keeps that scrub smooth instead of jumping
   between frames.
   ============================================================ */

.hero.hero-plain.s21hero-video.hero-game-bg::before {
  background: linear-gradient(115deg, rgba(6,20,15,.72) 10%, rgba(8,45,33,.5) 45%, rgba(8,45,33,.35) 100%);
}

.hero.hero-plain.s21hero-video {
  padding: 3rem 0 2.5rem;
}
@media (min-width: 768px) {
  .hero.hero-plain.s21hero-video {
    min-height: 82vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 3rem;
  }
}

.s21hero-video__grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
}
@media (min-width: 768px) {
  .s21hero-video__grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.s21hero-video__text {
  width: 100%;
  max-width: 720px;
  text-align: center;
}
@media (min-width: 768px) {
  .s21hero-video__text { flex: 1 1 100%; text-align: left; }
}

.s21hero-video__crumb {
  font-size: .85rem;
  margin-bottom: .9rem;
}
.s21hero-video__crumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.s21hero-video__crumb a:hover { color: #fff; }
.s21hero-video__crumb .sep { color: rgba(255,255,255,.45); margin: 0 .4rem; }

/* Intro label — sits above the typewriter line */
.s21hero-video__intro {
  pointer-events: none;
  user-select: none;
  margin: 0 0 1.4rem;
  font-size: clamp(18px, 4vw, 26px);
  line-height: 1.3;
  font-weight: 400;
  color: #fff;
}

.s21hero-video__type {
  margin: 0 0 1.4rem;
  color: #fff;
  font-size: clamp(18px, 4vw, 26px);
  line-height: 1.35;
  font-weight: 400;
  min-height: 54px;
}
.s21hero-video__cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #fff;
  vertical-align: middle;
  margin-left: 2px;
  animation: s21hero-blink 1s step-end infinite;
}
.s21hero-video__cursor.is-done { display: none; }
@keyframes s21hero-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.s21hero-video__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1);
}
@media (min-width: 768px) {
  .s21hero-video__pills { justify-content: flex-start; }
}
.s21hero-video__pills.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.s21hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  padding: .3em 1.1em;
  margin: 0 .2em .4em 0;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease;
  cursor: pointer;
}
@media (min-width: 576px) {
  .s21hero-pill { font-size: 15px; padding: .3em 1.25em; }
}
.s21hero-pill--white {
  background: #fff;
  color: #0F1712;
  border-color: rgba(0,0,0,.1);
}
.s21hero-pill--white:hover {
  background: var(--s21-primary-dark);
  color: #fff;
}
.s21hero-pill--outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
  gap: .5rem;
}
@media (min-width: 576px) {
  .s21hero-pill--outline { gap: .65rem; }
}
.s21hero-pill--outline:hover {
  background: #fff;
  color: #0F1712;
}
.s21hero-pill--outline .s21hero-pill__email {
  text-decoration: underline;
  text-underline-offset: 1px;
}
.s21hero-pill--outline svg { flex-shrink: 0; }

/* ---------- Figure: the mascot herself, in front of the hero background ---------- */
.s21hero-video__figure {
  position: relative;
  width: 100%;
  max-width: 340px;
  display: flex;
  justify-content: center;
  animation: s21hero-figure-in .9s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .15s;
}
@media (min-width: 768px) {
  .s21hero-video__figure { flex: 0 1 380px; max-width: 380px; }
}
@keyframes s21hero-figure-in {
  from { opacity: 0; transform: translateY(28px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (min-width: 768px) {
  @keyframes s21hero-figure-in {
    from { opacity: 0; transform: translateX(36px) scale(.94); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
  }
}

/* Soft grounding shadow so she reads as standing in the scene, not pasted on it */
.s21hero-video__glow {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 62%;
  height: 10%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,.38) 0%, rgba(0,0,0,0) 72%);
  filter: blur(2px);
  z-index: 1;
}

.s21hero-video__media {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-image: url('../images/illustrations/games-hero-girl-sprite.png');
  background-repeat: no-repeat;
  background-size: 500% 500%;
  background-position: 0% 0%;
  filter: drop-shadow(0 22px 28px rgba(0,0,0,.32));
  animation: s21hero-float 4.6s ease-in-out infinite;
  animation-delay: 1.05s;
}
@keyframes s21hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .s21hero-video__cursor { animation: none; opacity: 1; }
  .s21hero-video__pills { transition: none; }
  .s21hero-video__figure { animation: none; opacity: 1; transform: none; }
  .s21hero-video__media { animation: none; }
}
