@charset "UTF-8";

/* 見出しだけを分離して重ねる。座標は元画像の表示サイズを基準にした百分率。 */
.section-heading-layer {
  position: absolute;
  z-index: 2;
  left: var(--heading-x);
  top: var(--heading-y);
  width: var(--heading-width);
  margin: 0;
  line-height: 0;
  pointer-events: none;
}

.callback-heading,
.contact-heading {
  position: relative;
}

.heading-reveal__content {
  display: block;
  transform-origin: center center;
}

.section-heading-layer img {
  width: 100%;
  height: auto;
}

/* 拡大中もページ自体には横スクロールを発生させない。 */
.callback,
.contact,
.company-logos,
.area,
.faq {
  overflow-x: clip;
}

/* JSが準備した見出しだけを待機状態にする。JS無効時は最初から表示。 */
[data-heading-reveal][data-reveal-state='pending'] > .heading-reveal__content {
  opacity: 0;
  transform: scale(1.8);
}

[data-heading-reveal][data-reveal-state='playing'] > .heading-reveal__content {
  animation: heading-zoom-in 450ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes heading-zoom-in {
  from {
    opacity: 0;
    transform: scale(1.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* CTAは左から急行し、少し行き過ぎてからブレーキをかけて止まる。 */
[data-heading-motion='arrival'][data-reveal-state='pending'] > .heading-reveal__content {
  transform: translate3d(-115%, 0, 0) skewX(-10deg) scaleX(1.03);
}

[data-heading-motion='arrival'][data-reveal-state='playing'] > .heading-reveal__content {
  animation: cta-arrival-brake 850ms both;
}

@keyframes cta-arrival-brake {
  0% {
    opacity: 0;
    transform: translate3d(-115%, 0, 0) skewX(-10deg) scaleX(1.03);
    animation-timing-function: cubic-bezier(0.12, 0.72, 0.15, 1);
  }
  14% {
    opacity: 0.55;
  }
  52% {
    opacity: 1;
    transform: translate3d(4%, 0, 0) skewX(5deg) scaleX(0.97);
    animation-timing-function: cubic-bezier(0.18, 0.75, 0.3, 1);
  }
  75% {
    transform: translate3d(-0.8%, 0, 0) skewX(-1.5deg) scaleX(1.01);
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(0) scaleX(1);
  }
}

@media (max-width: 767px) {
  .section-heading-layer {
    left: var(--heading-x-sp);
    top: var(--heading-y-sp);
    width: var(--heading-width-sp);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-heading-reveal] > .heading-reveal__content {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  [data-heading-reveal] > .heading-reveal__content {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
