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

.hero {
  position: relative;
  height: 45rem;
  min-height: 0;
  overflow: hidden;
  padding-top: 4rem;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(180deg, #bed6fb 64.78%, rgba(190, 214, 251, 0) 100%),
    url("/system_panel/uploads/images/20260812231129447475.svg");
  background-repeat: no-repeat, repeat;
  background-size:
    100% 100%,
    1440px 734px;
  background-blend-mode: multiply;
  content: "";
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: calc(100% - 4rem);
  margin: 0 auto;
}

.hero__image {
  position: absolute;
  display: block;
  height: auto;
  opacity: 0;
  animation: hero-image-appear .8s ease-out forwards, hero-image-float 5s ease-in-out 1s infinite;
}

@keyframes hero-image-appear {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-image-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(calc(var(--hero-float-distance, .75rem) * -1));
  }
}

.hero__image--bluebird { --hero-float-distance: 1rem; animation-delay: .05s, 1.05s; animation-duration: .8s, 5.8s; }
.hero__image--book { --hero-float-distance: .5rem; animation-delay: .13s, 1.6s; animation-duration: .8s, 4.6s; }
.hero__image--balance { --hero-float-distance: .85rem; animation-delay: .21s, 2.2s; animation-duration: .8s, 6.4s; }
.hero__image--newton { --hero-float-distance: .65rem; animation-delay: .29s, 1.3s; animation-duration: .8s, 5.1s; }
.hero__image--atom { --hero-float-distance: .9rem; animation-delay: .37s, 2.8s; animation-duration: .8s, 4.3s; }
.hero__image--square-root { --hero-float-distance: .55rem; animation-delay: .45s, 1.9s; animation-duration: .8s, 6.1s; }
.hero__image--newton-seated { --hero-float-distance: .8rem; animation-delay: .53s, 2.5s; animation-duration: .8s, 5.4s; }
.hero__image--apple { --hero-float-distance: .6rem; animation-delay: .61s, 1.2s; animation-duration: .8s, 4.8s; }
.hero__image--gravity { --hero-float-distance: 1.05rem; animation-delay: .69s, 3.1s; animation-duration: .8s, 6.6s; }
.hero__image--einstein { --hero-float-distance: .7rem; animation-delay: .77s, 1.7s; animation-duration: .8s, 5.6s; }
.hero__image--relativity { --hero-float-distance: .95rem; animation-delay: .85s, 2.4s; animation-duration: .8s, 4.4s; }
.hero__image--teacher {
  animation: hero-image-appear .8s ease-out .93s forwards;
}

.hero h1 {
  position: absolute;
  top: calc(50% - 10rem);
  left: 50%;
  z-index: 1;
  width: 100%;
  margin: 0;
  color: #85A4D2;
  font-family: "Inter", sans-serif;
  font-size: 2.75rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 1.12;
  text-align: center;
  transform: translateX(-50%);
  white-space: normal;
}

/* スマホ用ヒーロー */
.hero__image--bluebird { top: 1.5rem; left: calc(50% - 11rem); width: 34vw; }
.hero__image--book { top: 5rem; left: calc(50% - 2rem); width: 16vw; }
.hero__image--balance { display: none; }
.hero__image--newton { top: 1.75rem; right: auto; left: calc(50% + 2.5rem); width: 34vw; }
.hero__image--atom { top: 8.5rem; right: auto; left: calc(50% + 8.125rem); width: 11vw; }
.hero__image--square-root { bottom: 1rem; left: calc(50% - 11rem); width: 13vw; }
.hero__image--newton-seated { bottom: 5rem; left: calc(50% - 9.75rem); width: 30vw; }
.hero__image--apple { top: 16rem; left: calc(50% - 11rem); width: 12vw; }
.hero__image--gravity { top: 23rem; bottom: auto; left: calc(50% - 10.75rem); width: 17vw; }
.hero__image--einstein { top: 15rem; right: auto; bottom: auto; left: calc(50% + 3.6875rem); width: 30vw; }
.hero__image--relativity { top: 25rem; right: auto; bottom: auto; left: calc(50% + 8.125rem); width: 11vw; }
.hero__image--teacher { right: auto; bottom: 0; left: calc(50% - 3.75rem); width: 64vw; }

.hero__title--desktop {
  display: none;
}

@media (min-width: 576px) {
  .hero {
    height: 43rem;
    min-height: 0;
    padding-top: 6rem;
  }

  .hero__content {
    width: 100%;
    min-width: 0;
    min-height: 37rem;
  }

  .hero__image--bluebird { top: 1.5rem; left: calc(50% - 23rem); width: 11rem; }
  .hero__image--book { top: 5.5rem; left: calc(50% - 11rem); width: 6rem; }
  .hero__image--balance { display: block; top: 1rem; left: calc(50% - 3.5rem); width: 5rem; }
  .hero__image--newton { top: 1rem; right: auto; left: calc(50% + 2rem); width: 11.5rem; }
  .hero__image--atom { top: 6rem; right: auto; left: calc(50% + 15rem); width: 4rem; }
  .hero__image--square-root { bottom: 4rem; left: calc(50% - 23rem); width: 5rem; }
  .hero__image--newton-seated { top: 18.5rem; bottom: auto; left: calc(50% - 17.5rem); width: 11rem; }
  .hero__image--apple { top: 19rem; left: calc(50% - 5rem); width: 3.5rem; }
  .hero__image--gravity { top: auto; bottom: 1.5rem; left: calc(50% - 11rem); width: 5rem; }
  .hero__image--einstein { top: auto; right: auto; bottom: 1rem; left: calc(50% - 5rem); width: 11.5rem; }
  .hero__image--relativity { top: auto; right: auto; bottom: 7rem; left: calc(50% + 14rem); width: 3.5rem; }
  .hero__image--teacher { right: auto; bottom: 1rem; left: calc(50% + 4rem); width: 22rem; }

  .hero__title--desktop {
    display: block;
  }

  .hero__title--mobile {
    display: none;
  }

  .hero .hero__title--desktop {
    top: 10.5rem;
    width: auto;
    font-size: 3.75rem;
    line-height: 1.1;
    text-align: left;
    white-space: nowrap;
  }
}

@media (min-width: 1200px) {
  .hero {
    height: auto;
    min-height: 35rem;
    padding-top: 8rem;
  }

  .hero__content {
    width: 100rem;
    max-width: 100%;
    min-width: 75rem;
    min-height: 35rem;
  }

  .hero__image--bluebird { top: 2rem; left: 5%; width: 15.5rem; }
  .hero__image--book { top: 6rem; left: 24.5%; width: 8.75rem; }
  .hero__image--balance { top: .5rem; left: 35.5%; width: 7.5rem; }
  .hero__image--newton { top: 1rem; left: 40%; width: 16rem; }
  .hero__image--atom { top: 6rem; right: 7%; left: auto; width: 5.5rem; }
  .hero__image--square-root { bottom: 5.5rem; left: 5%; width: 7.5rem; }
  .hero__image--newton-seated { top: 15rem; left: 11%; width: 15rem; }
  .hero__image--apple { top: 21rem; left: 31.5%; width: 5rem; }
  .hero__image--gravity { bottom: 2rem; left: 30%; width: 7.5rem; }
  .hero__image--einstein { bottom: 1rem; left: 42%; width: 16rem; }
  .hero__image--relativity { right: 33%; bottom: 8rem; left: auto; width: 5rem; }
  .hero__image--teacher { right: 2%; bottom: 1.5rem; left: auto; width: 31.5rem; }

  .hero .hero__title--desktop {
    top: 11.5rem;
    font-size: 4.75rem;
  }
}

@media (min-width: 1800px) {
  .hero {
    min-height: 42rem;
    padding-bottom: 4rem;
  }

  .hero__content:not([data-gjs-type]):not(:has([data-gjs-type])) {
    transform: scale(1.1);
    transform-origin: center top;
  }
}

@media (min-width: 2200px) {
  .hero {
    min-height: 45rem;
    padding-bottom: 7rem;
  }

  .hero__content:not([data-gjs-type]):not(:has([data-gjs-type])) {
    transform: scale(1.2);
  }
}

/* Smoooth管理画面では、絶対配置のヒーロー素材を全て編集できるよう通常配置で表示する。 */
.hero[data-gjs-type],
.hero:has([data-gjs-type]) {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.hero__content[data-gjs-type],
.hero__content:has([data-gjs-type]),
.hero[data-gjs-type] .hero__content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: 1.5rem;
}

.hero__content[data-gjs-type] .hero__image,
.hero__content:has([data-gjs-type]) .hero__image,
.hero[data-gjs-type] .hero__image {
  animation: none;
  opacity: 1;
  position: relative;
  inset: auto;
  width: 8rem;
}

.hero__content[data-gjs-type] h1,
.hero__content:has([data-gjs-type]) h1,
.hero[data-gjs-type] h1,
.hero h1[data-gjs-type] {
  display: block;
  position: relative;
  inset: auto;
  width: 100%;
  font-size: 2rem;
  opacity: 1;
  transform: none;
  visibility: visible;
}

.hero__content[data-gjs-type] .hero__title--desktop,
.hero__content:has([data-gjs-type]) .hero__title--desktop,
.hero[data-gjs-type] .hero__title--desktop,
.hero .hero__title--desktop[data-gjs-type] {
  display: block;
}

.hero__content[data-gjs-type] .hero__title--mobile,
.hero__content:has([data-gjs-type]) .hero__title--mobile,
.hero[data-gjs-type] .hero__title--mobile,
.hero .hero__title--mobile[data-gjs-type] {
  display: none;
}
