/*
 * Zero Next One BASE NIIKAPPU
 * Approved motion implementation: Sec07-Sec09 v1.3.0
 *
 * JavaScript owns one-shot reveal timing. This file provides only the
 * structural layers, composited interaction states, and reduced-motion safety.
 */

/* --------------------------------------------------------------------------
   Sec07: memory fragments
   -------------------------------------------------------------------------- */
.page-top .p-scenes-card,
.page-top .p-scenes-card__head,
.page-top .p-scenes-card__text,
.page-top .p-scenes-card__thumb {
  transform-origin: center center;
}

.page-top .p-scenes__button,
.page-top .p-scenes__button span[aria-hidden="true"] {
  transition:
    transform 300ms var(--motion-ease-hover),
    color 300ms var(--motion-ease-standard),
    border-color 300ms var(--motion-ease-standard),
    background-color 300ms var(--motion-ease-standard),
    opacity 300ms var(--motion-ease-standard);
}

/* The four scene cards are informational, not links. Do not imply clicking. */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .page-top .p-scenes-card:hover .p-scenes-card__thumb-img {
    transform: none;
  }

  .page-top .p-scenes__button:hover,
  .page-top .p-scenes__button:focus-visible {
    transform: translateY(-2px);
  }

  .page-top .p-scenes__button:hover span[aria-hidden="true"],
  .page-top .p-scenes__button:focus-visible span[aria-hidden="true"] {
    transform: translateX(5px);
  }
}

/* --------------------------------------------------------------------------
   Sec08: quiet information board
   -------------------------------------------------------------------------- */
.page-top .p-news__list {
  position: relative;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
}

.page-top .p-news__motion-rule {
  position: absolute;
  left: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 1px;
  pointer-events: none;
  transform: scaleX(1);
  transform-origin: left center;
  background: rgba(74, 55, 32, 0.24);
}

.page-top .p-news__motion-rule--top {
  top: 0;
}

.page-top .p-news__motion-rule--bottom {
  bottom: 0;
  background: rgba(74, 55, 32, 0.21);
}

.page-top .p-news__archive-link,
.page-top .p-news-card__link,
.page-top .p-news-card__arrow {
  transition-duration: 300ms;
}

/* --------------------------------------------------------------------------
   Sec09: quiet decision
   -------------------------------------------------------------------------- */
.page-top .p-ending::before {
  opacity: 0 !important;
}

.page-top .p-ending__motion-bg,
.page-top .p-ending__motion-bg-image,
.page-top .p-ending__motion-shade {
  position: absolute;
  pointer-events: none;
}

.page-top .p-ending__motion-bg {
  inset: -2.5%;
  z-index: 0;
  overflow: hidden;
  transform-origin: center center;
}

.page-top .p-ending__motion-bg-image {
  inset: 0;
  background-image: url("../img/top/sec09/sec09_bg_final_cta_sp.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center top;
  transform-origin: center center;
}

.page-top .p-ending__motion-shade {
  inset: 0;
  z-index: 2;
  opacity: 0.025;
  background:
    linear-gradient(
      180deg,
      rgba(4, 10, 14, 0.08) 0%,
      rgba(4, 10, 14, 0.02) 42%,
      rgba(4, 10, 14, 0.16) 100%
    );
}

.page-top .p-ending__inner {
  z-index: 3;
}

.page-top .p-ending__button,
.page-top .p-ending__faq-link,
.page-top .p-ending__button span[aria-hidden="true"],
.page-top .p-ending__faq-link span[aria-hidden="true"] {
  transition-duration: 300ms;
}

@media (min-width: 768px) {
  .page-top .p-ending__motion-bg-image {
    background-image: url("../img/top/sec09/sec09_bg_final_cta_pc.png");
    background-size: cover;
    background-position: 52% center;
  }

  .page-top .p-ending__motion-shade {
    background:
      radial-gradient(
        ellipse at 50% 42%,
        rgba(8, 15, 18, 0.34) 0%,
        rgba(8, 15, 18, 0.18) 38%,
        rgba(8, 15, 18, 0) 72%
      ),
      linear-gradient(
        180deg,
        rgba(9, 16, 20, 0.04) 0%,
        rgba(9, 16, 20, 0.02) 55%,
        rgba(9, 16, 20, 0.18) 100%
      );
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .page-top .p-ending__button--primary:hover,
  .page-top .p-ending__button--primary:focus-visible {
    transform: translateY(-2px);
  }

  .page-top .p-ending__button--primary:hover span[aria-hidden="true"],
  .page-top .p-ending__button--primary:focus-visible span[aria-hidden="true"],
  .page-top .p-ending__button--secondary:hover span[aria-hidden="true"],
  .page-top .p-ending__button--secondary:focus-visible span[aria-hidden="true"] {
    transform: translateX(5px);
  }

  .page-top .p-ending__faq-link:hover span[aria-hidden="true"],
  .page-top .p-ending__faq-link:focus-visible span[aria-hidden="true"] {
    transform: translate(5px, -1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-top .p-scenes-card,
  .page-top .p-scenes-card__head,
  .page-top .p-scenes-card__text,
  .page-top .p-scenes-card__thumb,
  .page-top .p-scenes__button,
  .page-top .p-scenes__button span[aria-hidden="true"],
  .page-top .p-news__motion-rule,
  .page-top .p-news__archive-link,
  .page-top .p-news-card,
  .page-top .p-news-card__link,
  .page-top .p-news-card__arrow,
  .page-top .p-ending__motion-bg,
  .page-top .p-ending__motion-bg-image,
  .page-top .p-ending__motion-shade,
  .page-top .p-ending__button,
  .page-top .p-ending__faq-link,
  .page-top .p-ending__button span[aria-hidden="true"],
  .page-top .p-ending__faq-link span[aria-hidden="true"] {
    animation: none !important;
    transition-duration: 0ms !important;
    transform: none !important;
  }

  .page-top .p-news__motion-rule {
    opacity: 1 !important;
  }

  .page-top .p-ending__motion-shade {
    opacity: 0.025 !important;
  }
}
