/* === Hero section === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 14rem;
  padding-bottom: var(--space-3xl);
  overflow: hidden;
  background-color: #0e0e0e;
  background-image:
    linear-gradient(108deg, rgba(10, 8, 12, 0.88) 0%, rgba(10, 8, 12, 0.72) 34%, rgba(10, 8, 12, 0.3) 60%, rgba(10, 8, 12, 0.76) 100%),
    radial-gradient(ellipse 1200px 450px at 8% 35%, rgba(228, 54, 99, 0.30), transparent),
    linear-gradient(180deg, rgba(14, 14, 14, 0) 72%, rgba(14, 14, 14, 0.16) 100%),
    url("/landing/images/hero-background-msu.png");
  background-image:
    linear-gradient(108deg, rgba(10, 8, 12, 0.88) 0%, rgba(10, 8, 12, 0.72) 34%, rgba(10, 8, 12, 0.3) 60%, rgba(10, 8, 12, 0.76) 100%),
    radial-gradient(ellipse 1200px 450px at 8% 35%, rgba(228, 54, 99, 0.30), transparent),
    linear-gradient(180deg, rgba(14, 14, 14, 0) 72%, rgba(14, 14, 14, 0.16) 100%),
    image-set(
      url("/landing/images/hero-background-msu-1920.webp") type("image/webp"),
      url("/landing/images/hero-background-msu.png") type("image/png")
    );
  background-position: center, center, center, center bottom;
  background-repeat: no-repeat;
  background-size: auto, auto, auto, cover;
}

.hero::before {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -12%;
  width: min(58vw, 920px);
  height: clamp(240px, 28vw, 420px);
  background: radial-gradient(
    ellipse at 24% 76%,
    rgba(228, 54, 99, 0.18) 0%,
    rgba(228, 54, 99, 0.11) 28%,
    rgba(228, 54, 99, 0.04) 52%,
    transparent 76%
  );
  filter: blur(16px);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(120px, 15vw, 220px);
  background: linear-gradient(180deg, rgba(13, 12, 15, 0) 0%, rgba(13, 12, 15, 0.05) 56%, rgba(13, 12, 15, 0.22) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero__characters video,
.hero__characters img {
  -webkit-mask-image: linear-gradient(to bottom, white 65%, transparent 95%);
  mask-image: linear-gradient(to bottom, white 65%, transparent 95%);
}

/* === Main hero grid === */
.hero__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

/* === Left column (text) === */
.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero__super {
  font-family: var(--font-label);
  font-size: var(--text-label-md);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
}

.hero__title {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--on-surface-bright);
  isolation: isolate;
}

.hero__title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.18em;
}

.hero__title-mark {
  position: relative;
  display: inline-block;
  padding: 0 0.02em 0.02em;
  color: #ffffff;
  background: linear-gradient(115deg, #fff8fb 0%, #ffe3ec 22%, #ffc0d3 44%, #f6729d 72%, #e43663 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow:
    0 0 18px rgba(228, 54, 99, 0.34),
    0 8px 32px rgba(0, 0, 0, 0.48);
  z-index: 0;
}


.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--on-surface);
  max-width: 520px;
  line-height: 1.7;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.hero__cta {
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

/* === Right column (visual) === */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: auto -12% -18% 8%;
  height: clamp(280px, 34vw, 500px);
  background: radial-gradient(
    ellipse at 72% 78%,
    rgba(13, 12, 15, 0.82) 0%,
    rgba(13, 12, 15, 0.58) 34%,
    rgba(13, 12, 15, 0.16) 56%,
    transparent 76%
  );
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

/* Laser grid behind characters */
.hero__visual::before {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    linear-gradient(rgba(228, 54, 99, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(228, 54, 99, 0.35) 1px, transparent 1px);
  background-size: 50px 50px;
  -webkit-mask-image: radial-gradient(ellipse 45% 45% at 50% 50%, black 15%, transparent 65%);
  mask-image: radial-gradient(ellipse 45% 45% at 50% 50%, black 15%, transparent 65%);
  z-index: 0;
  pointer-events: none;
}

.hero__characters {
  position: relative;
  z-index: 1;
  width: 100%;
  transform: scale(1.5);
  transform-origin: center center;
}

.hero__characters picture {
  display: block;
  width: 100%;
}

.hero__characters video,
.hero__characters img {
  width: 100%;
  display: block;
}

/* === Character name labels === */
.hero__character-labels {
  position: absolute;
  bottom: 28%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 8%;
  pointer-events: none;
  z-index: 2;
}

.hero__character-name {
  font-family: var(--font-label);
  font-size: clamp(0.65rem, 1vw, 0.85rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-surface);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  padding: 0.3em 0.7em;
  border-radius: 4px;
  white-space: nowrap;
}

.hero__character-name--left {
  transform: translateX(-5%);
}

.hero__character-name--right {
  transform: translateX(5%);
}

/* === Scattered logos === */
.hero__logos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero__logo {
  position: absolute;
  opacity: 0.5;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.hero__logo:hover {
  opacity: 0.8;
  pointer-events: auto;
}

.hero__logo--1 {
  top: 18%;
  right: 7%;
  width: 120px;
  opacity: 0.22;
  --float-rotate: -8deg;
  --float-duration: 5s;
  --float-delay: 0s;
}

.hero__logo--2 {
  top: 15%;
  left: 5%;
  width: 95px;
  opacity: 0.29;
  --float-rotate: 12deg;
  --float-duration: 4.5s;
  --float-delay: 0.5s;
}

.hero__logo--3 {
  bottom: 20%;
  right: 3%;
  width: 130px;
  opacity: 0.3;
  --float-rotate: -5deg;
  --float-duration: 6s;
  --float-delay: 1s;
}

.hero__logo--5 {
  top: 14%;
  right: 38%;
  width: 82px;
  opacity: 0.2;
  --float-rotate: 9deg;
  --float-duration: 5.75s;
  --float-delay: 0.9s;
}

.hero__logo--6 {
  top: 56%;
  right: 24%;
  width: 110px;
  opacity: 0.36;
  --float-rotate: 11deg;
  --float-duration: 4.8s;
  --float-delay: 1.1s;
}

.hero__logo--7 {
  top: 9%;
  left: 30%;
  width: 72px;
  opacity: 0.18;
  --float-rotate: -14deg;
  --float-duration: 6.3s;
  --float-delay: 0.3s;
}

/* === Math formula overlay === */
.hero__math-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero__formula {
  position: absolute;
  font-family: 'Georgia', serif;
  font-style: italic;
  color: var(--on-surface);
  opacity: 0.03;
  font-size: clamp(1rem, 2vw, 1.5rem);
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .hero__inner {
    transform: translateY(-2.5rem);
  }
}

/* === Responsive === */
@media (max-width: 1023px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    align-items: center;
  }

  .hero__subtitle {
    margin: 0 auto;
  }

  .hero__badges {
    justify-content: center;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__visual {
    max-width: 400px;
    margin: 0 auto;
  }

  .hero__logo--2,
  .hero__logo--7 {
    display: none;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 2.25rem;
    background-position: center, center, center, 58% bottom;
  }

  .hero__logos {
    display: none;
  }

  .hero__inner {
    gap: 0.35rem;
    align-items: start;
  }

  .hero__visual {
    order: -1;
    width: min(100%, 19.5rem);
    margin: 0.35rem auto 0.2rem;
  }

  .hero__visual::before {
    inset: 6% 10% 18%;
    background-size: 16px 16px;
    -webkit-mask-image: radial-gradient(ellipse 58% 54% at 50% 46%, black 36%, transparent 78%);
    mask-image: radial-gradient(ellipse 58% 54% at 50% 46%, black 36%, transparent 78%);
  }

  .hero__visual::after {
    content: none;
  }

  .hero__characters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    max-width: 19.5rem;
    margin: 0 auto;
    transform: scale(1.08);
  }

  .hero__characters video,
  .hero__characters img {
    -webkit-mask-image: linear-gradient(
      to bottom,
      white 0%,
      white 62%,
      rgba(255, 255, 255, 0.98) 72%,
      rgba(255, 255, 255, 0.9) 80%,
      rgba(255, 255, 255, 0.68) 88%,
      rgba(255, 255, 255, 0.34) 95%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      white 0%,
      white 62%,
      rgba(255, 255, 255, 0.98) 72%,
      rgba(255, 255, 255, 0.9) 80%,
      rgba(255, 255, 255, 0.68) 88%,
      rgba(255, 255, 255, 0.34) 95%,
      transparent 100%
    );
  }

  .hero__character-labels {
    position: static;
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding: 0;
    margin-top: -0.85rem;
    margin-bottom: 0.15rem;
    position: relative;
    z-index: 2;
  }

  .hero__content {
    display: grid;
    gap: 0.85rem;
    justify-items: center;
  }

  .hero__title {
    font-size: clamp(2.35rem, 12vw, 3.05rem);
    line-height: 0.98;
  }

  .hero__title-line {
    justify-content: center;
    gap: 0.16em;
  }

  .hero__subtitle {
    order: 3;
    max-width: 22rem;
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .hero__cta {
    order: 2;
    width: 100%;
    margin-top: 0;
  }

  .hero__cta .btn-primary {
    width: 100%;
    max-width: 100%;
    min-height: 3.5rem;
    padding: 1rem 1.25rem;
    white-space: normal;
    text-align: center;
  }

  .hero__badges {
    order: 4;
    width: 100%;
    margin-top: 0;
    gap: 0.5rem;
    justify-content: center;
  }

  .hero__badges .badge {
    padding: 0.55rem 0.95rem;
    font-size: 0.75rem;
  }

  .hero__character-name {
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    padding: 0.32rem 0.62rem;
  }

  .hero__character-name--left,
  .hero__character-name--right {
    transform: none;
  }
}

@media (max-width: 359px) {
  .hero__cta .btn-primary {
    min-height: 3.25rem;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    line-height: 1.25;
  }

  .hero__subtitle {
    font-size: 0.88rem;
  }

  .hero__title {
    font-size: clamp(2.1rem, 11.2vw, 2.45rem);
  }

  .hero__badges .badge {
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
  }
}
