/* Intro and product sections: default desktop layout. */

.intro {
  --intro-tagline-width: 38vw;
  --intro-orb-width: 42vw;
  position: relative;
  height: 200svh;
  overflow: visible;
  font-size: clamp(0.7rem, 0.49vw, 1rem);
  background: #9fd5fa;
}

.intro__stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: visible;
  background: #9fd5fa;
}

.intro__artwork-stage {
  position: sticky;
  top: 0;
  z-index: 3;
  width: 100%;
  height: 100svh;
  margin-top: -100svh;
  overflow: visible;
  pointer-events: none;
}

.intro__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro__artwork-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro__background,
.intro__tower,
.intro__tagline,
.intro__orb,
.intro__orb > img {
  position: absolute;
}

.intro__background {
  z-index: 0;
  top: auto;
  right: 0;
  bottom: 0;
  left: -5%;
  width: 110%;
  max-width: none;
  height: 112%;
  object-fit: cover;
  object-position: center bottom;
}

.intro__tower {
  z-index: 1;
  bottom: -2em;
  left: 0;
  width: 64.3em;
  height: auto;
  transform-origin: left bottom;
  will-change: transform, opacity;
}

.intro__tagline {
  z-index: 3;
  position: absolute;
  top: calc(var(--header-height) + 9vh);
  left: 14%;
  width: var(--intro-tagline-width);
  height: 25.9vw;
  aspect-ratio: 765 / 521;
  overflow: hidden;
  pointer-events: none;
  will-change: transform, opacity;
}

.intro__tagline-light {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: hidden;
  mix-blend-mode: screen;
  -webkit-mask-image: url("../images/section-1/tagline-ldp.png");
  mask-image: url("../images/section-1/tagline-ldp.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.intro__tagline-light::before {
  position: absolute;
  top: -35%;
  left: 0;
  width: 20%;
  height: 170%;
  background: linear-gradient(125deg, transparent 0%, rgba(255, 255, 255, 0.04) 18%, rgba(255, 255, 255, 0.2) 36%, rgba(255, 255, 255, 0.68) 50%, rgba(255, 255, 255, 0.2) 64%, rgba(255, 255, 255, 0.04) 82%, transparent 100%);
  content: "";
  filter: blur(0.32em);
  opacity: 0;
  transform: translate3d(-180%, 0, 0) skewX(-18deg);
  animation: tagline-light-sweep 4.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform, opacity;
}

.intro__tagline-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes tagline-light-sweep {
  0%, 18% { opacity: 0; transform: translate3d(-180%, 0, 0) skewX(-18deg); }
  28% { opacity: 0.65; }
  62% { opacity: 0.65; }
  76%, 100% { opacity: 0; transform: translate3d(620%, 0, 0) skewX(-18deg); }
}

.intro__orb {
  z-index: 3;
  right: 0;
  bottom: clamp(12vh, calc(71.6vh - 33.52vw), 46vh);
  width: var(--intro-orb-width);
  aspect-ratio: 1179 / 941;
  transform-origin: center;
  will-change: transform, opacity;
}

.intro__orb > img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.intro__orb-light {
  z-index: 0;
  transform: none;
}

.intro__orb-center {
  z-index: 1;
}

.intro__orb-products {
  z-index: 2;
}

.intro__scroll-hint,
.scene__scroll-hint {
  position: absolute;
  bottom: 2.2em;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8em;
  color: rgba(24, 53, 80, 0.76);
  font-size: 1.2em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.intro__scroll-hint {
  z-index: 7;
}

.scene__scroll-hint {
  z-index: 10;
}

.intro__scroll-hint i,
.scene__scroll-hint i {
  display: block;
  width: 1.2em;
  height: 1.2em;
  border-right: 0.15em solid currentColor;
  border-bottom: 0.15em solid currentColor;
  transform: rotate(45deg);
  animation: scroll-cue 1.4s ease-in-out infinite;
}

.scene,
.scene__stage {
  position: relative;
  min-height: 100svh;
}

.scene {
  --content-left: 4%;
  --content-right: 51%;
  --title-secondary-correction: 1;
  --title-final-gap: 1em;
  overflow: visible;
  font-size: 0.652vw;
  background: #dcefff;
}

.scene--left {
  --content-left: 51%;
  --content-right: 4%;
}

.intro + .scene {
  z-index: 4;
  margin-top: -100svh;
}

.scene__transition-cloud {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 30;
  width: 100%;
  max-width: none;
  height: auto;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.scene__stage {
  width: 100%;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.scene__content {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scene__background,
.scene__island,
.scene__character,
.scene__title,
.scene__detail {
  position: absolute;
}

.scene__background {
  z-index: -3;
  top: -6%;
  right: 0;
  left: 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center;
}

.scene__hero {
  position: absolute;
  inset: 0;
}

.scene__island-group {
  --opening-title-top: 0%;
  --opening-primary-left: -7%;
  --opening-secondary-left: 60%;
  --opening-secondary-drop: 0%;
  --island-bottom: 1em;
  --island-height: 55em;
  --island-ratio: 1.165;
  z-index: 2;
  position: absolute;
  bottom: -13em;
  left: 50%;
  width: 64em;
  max-width: none;
  transform: translateX(-50%);
}

.scene__island {
  position: relative;
  width: 100%;
  max-width: none;
  transform-origin: center 70%;
  will-change: transform, opacity;
}

.scene--right .scene__island-group {
  width: 72em;
}

#atocib .scene__island-group {
  --opening-title-top: -2%;
  --opening-primary-left: -4%;
  --opening-secondary-left: 62%;
  --opening-secondary-drop: 11%;
  --island-height: 53.4em;
  --island-ratio: 1.404;
  bottom: 1em;
  width: 75em;
}

#haxium .scene__island-group {
  --opening-title-top: 2%;
  --opening-primary-left: -8%;
  --opening-secondary-left: 65%;
  --opening-secondary-drop: 13%;
  --island-height: 61.3em;
  --island-ratio: 1.109;
  bottom: 1em;
  width: 68em;
}

#haxium {
  --title-secondary-correction: 0.96;
}

#haxium .scene__detail {
  top: calc(var(--header-height) + 22vh);
}

#bocalex .scene__island-group {
  --opening-title-top: 5%;
  --opening-primary-left: -23%;
  --opening-secondary-left: 67%;
  --opening-secondary-drop: 23%;
  --island-height: 60.8em;
  --island-ratio: 1.036;
  bottom: 1em;
  width: 63em;
}

#bocalex {
  --title-secondary-correction: 0.96;
}

#atocib,
#haxium,
#bocalex {
  --title-final-gap: 1.5em;
}

/* Hapacol's source artwork has a taller, more compact silhouette than the other islands. */
#hapacol .scene__island-group {
  --opening-title-top: -5%;
  --opening-primary-left: -7%;
  --opening-secondary-left: 60%;
  --opening-secondary-drop: 3%;
  --island-bottom: 14vh;
  --island-height: 53.2em;
  --island-ratio: 1.165;
  bottom: 14vh;
  width: 62em;
}

/*
 * On desktop, size each island from the usable height below the header.
 * The aspect-ratio keeps the group, island and opening titles on one coordinate system.
 */
@media (min-width: 1024px) {
  .scene__island-group,
  .scene--right .scene__island-group,
  #hapacol .scene__island-group,
  #atocib .scene__island-group,
  #haxium .scene__island-group,
  #bocalex .scene__island-group {
    bottom: var(--island-bottom);
    width: auto;
    height: min(
      var(--island-height),
      calc(100svh - var(--header-height) - var(--island-bottom) - 8vh)
    );
    aspect-ratio: var(--island-ratio);
  }

  .scene__island {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* Keep Hapacol's opening title pair grouped around the island instead of the viewport edges. */
#hapacol .scene__title {
  right: 20%;
  left: 20%;
}

.scene__title {
  z-index: 7;
  inset: calc(var(--header-height) + 8vh) 6% auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8em;
  pointer-events: none;
  transform: translateY(-4em);
  will-change: inset, gap;
}

.scene--left .scene__title {
  justify-content: flex-end;
}

.scene--right .scene__title {
  justify-content: flex-start;
}

.scene__title-part {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 9em;
  object-fit: contain;
  will-change: transform, opacity;
}

.scene__title-part--primary {
  transform-origin: right center;
}

.scene__title-part--secondary {
  transform-origin: left center;
}

.scene__character {
  z-index: 5;
  top: var(--header-height);
  bottom: auto;
  width: auto;
  max-width: none;
  height: calc(95svh - var(--header-height));
  opacity: 0;
  object-fit: contain;
  object-position: bottom;
  will-change: transform, opacity;
}

.scene--left .scene__character {
  left: 2em;
}

.scene--right .scene__character {
  right: 2em;
}

.scene__detail {
  z-index: 6;
  top: calc(var(--header-height) + 18vh);
  text-align: center;
}

.scene--left .scene__detail,
.scene--right .scene__detail {
  right: calc(50% + (var(--layout-gutter) / 2));
  left: var(--layout-gutter);
}

.scene--left .scene__detail {
  right: var(--layout-gutter);
  left: calc(50% + (var(--layout-gutter) / 2));
}

.scene__logo {
  width: auto;
  max-width: min(23em, 48%);
  max-height: 7.2em;
  margin: 0 auto 2em;
  opacity: 0;
  object-fit: contain;
}

.scene--left .scene__detail {
  text-align: right;
}

.scene--left .scene__logo {
  margin-right: 0;
  margin-left: auto;
}

.scene--left .scene__copy {
  margin-right: 0;
  margin-left: auto;
}

.scene--right .scene__detail {
  text-align: left;
}

.scene--right .scene__logo {
  margin-right: auto;
  margin-left: 0;
}

.scene--right .scene__copy {
  margin-right: auto;
  margin-left: 0;
}

.scene__copy {
  max-width: 56em;
  margin: 0 auto;
  color: #25445c;
  font-size: 2.1em;
  line-height: 1.55;
  opacity: 0;
}

@keyframes scroll-cue {
  0%, 100% {
    transform: translateY(-0.3em) rotate(45deg);
  }

  50% {
    transform: translateY(0.4em) rotate(45deg);
  }
}
