/* =========================================================
   04. STYLE
   楽しい七五三にするために
   /assets/css/shichigosan/04-style.css

   お宮参りページ「選ばれている理由」と同じ設計
========================================================= */

html {
  scroll-behavior: smooth;
}

#yp-shichigosan-style {
  scroll-margin-top: 120px;
}

.yp-shichigosan-style,
.yp-shichigosan-style * {
  box-sizing: border-box;
}

.yp-shichigosan-style {
  width: 100%;
  margin: 0;
  padding: 96px 0 0;
  background: #ffffff;
  color: #2f2a24;
  overflow: hidden;
}

/* =========================================================
   見出しエリア
========================================================= */

.yp-shichigosan-style .yp-selected-reasons__inner {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
}

.yp-shichigosan-style .yp-selected-reasons__head {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(320px, 1fr);
  gap: 54px;
  align-items: start;
  margin-bottom: 64px;
}

.yp-shichigosan-style .yp-selected-reasons__title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.yp-shichigosan-style h2,
.yp-shichigosan-style h3 {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: 0 !important;
}

.yp-shichigosan-style h2::before,
.yp-shichigosan-style h2::after,
.yp-shichigosan-style h3::before,
.yp-shichigosan-style h3::after {
  display: none !important;
  content: none !important;
}

.yp-shichigosan-style .yp-selected-reasons__label,
.yp-shichigosan-style .yp-selected-reasons__sub-label,
.yp-shichigosan-style .yp-selected-reasons__lead p,
.yp-shichigosan-style .yp-selected-reasons__number,
.yp-shichigosan-style .yp-selected-reasons__detail-number {
  background: none !important;
  box-shadow: none !important;
}

.yp-shichigosan-style .yp-selected-reasons__label::before,
.yp-shichigosan-style .yp-selected-reasons__label::after,
.yp-shichigosan-style .yp-selected-reasons__sub-label::before,
.yp-shichigosan-style .yp-selected-reasons__sub-label::after,
.yp-shichigosan-style .yp-selected-reasons__lead p::before,
.yp-shichigosan-style .yp-selected-reasons__lead p::after {
  display: none !important;
  content: none !important;
}

.yp-shichigosan-style .yp-selected-reasons__label {
  margin: 0 0 18px;
  color: #8a7458;
  font-family: "Times New Roman", "Yu Mincho", "YuMincho", serif;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.18em;
}

.yp-shichigosan-style .yp-selected-reasons__title {
  margin: 0;
  color: #26343d;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1.22;
  letter-spacing: 0.13em;
  font-weight: 400;
}

.yp-shichigosan-style .yp-selected-reasons__sub-label {
  margin: 18px 0 0;
  color: #7a878f;
  font-family: "Times New Roman", "Yu Mincho", "YuMincho", serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

.yp-shichigosan-style .yp-selected-reasons__lead p {
  margin: 0;
  color: #5d6971;
  font-size: 15px;
  line-height: 2.15;
  letter-spacing: 0.04em;
}

/* =========================================================
   写真メニュー
   PC：上段3列・下段2列
========================================================= */

.yp-shichigosan-style .yp-selected-reasons__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(380px, 42vh);
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  line-height: 0;
}

.yp-shichigosan-style .yp-selected-reasons__item {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  background: #ffffff;
  color: #ffffff;
  isolation: isolate;
  opacity: 1;
  transform: translateY(0);
  margin: 0;
  padding: 0;
  line-height: 0;
}

/* 上段3列 */
.yp-shichigosan-style .yp-selected-reasons__item--play,
.yp-shichigosan-style .yp-selected-reasons__item--shy,
.yp-shichigosan-style .yp-selected-reasons__item--natural {
  grid-column: span 2;
}

/* 下段2列 */
.yp-shichigosan-style .yp-selected-reasons__item--shrine,
.yp-shichigosan-style .yp-selected-reasons__item--fun {
  grid-column: span 3;
}

.yp-shichigosan-style .yp-selected-reasons__button {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  appearance: none;
  line-height: 0;
}

.yp-shichigosan-style .yp-selected-reasons__button picture,
.yp-shichigosan-style .yp-selected-reasons__button img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
  vertical-align: top;
}

.yp-shichigosan-style .yp-selected-reasons__button picture {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.yp-shichigosan-style .yp-selected-reasons__button img {
  object-fit: cover;
  object-position: center center;
  background: #ffffff;
}

.yp-shichigosan-style .yp-selected-reasons__button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.03) 42%,
      rgba(0, 0, 0, 0.18) 100%
    );
  pointer-events: none;
}

.yp-shichigosan-style .yp-selected-reasons__item.is-active .yp-selected-reasons__button::before {
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.05) 40%,
      rgba(0, 0, 0, 0.28) 100%
    );
}

.yp-shichigosan-style .yp-selected-reasons__item.is-active .yp-selected-reasons__button {
  outline: 2px solid rgba(255, 255, 255, 0.86);
  outline-offset: -8px;
}

.yp-shichigosan-style .yp-selected-reasons__button:focus-visible {
  outline: 3px solid rgba(138, 116, 88, 0.9);
  outline-offset: -6px;
}

.yp-shichigosan-style .yp-selected-reasons__top {
  position: absolute;
  top: 34px;
  left: 28px;
  z-index: 5;
  line-height: 1;
}

.yp-shichigosan-style .yp-selected-reasons__number {
  display: block;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.96);
  font-family: "Times New Roman", "Yu Mincho", "YuMincho", serif;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.16em;
}

.yp-shichigosan-style .yp-selected-reasons__item-title {
  display: block;
  color: #ffffff;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.2;
  letter-spacing: 0.12em;
  font-weight: 400;
}

.yp-shichigosan-style .yp-selected-reasons__cue {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  font-family: "Times New Roman", "Yu Mincho", "YuMincho", serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(2px);
  animation: ypShichigosanStyleCuePulse 1.8s ease-in-out infinite;
}

.yp-shichigosan-style .yp-selected-reasons__cue::after {
  content: attr(data-pc);
}

.yp-shichigosan-style .yp-selected-reasons__cue-dot {
  position: relative;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.yp-shichigosan-style .yp-selected-reasons__cue-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  animation: ypShichigosanStyleCueRing 1.8s ease-in-out infinite;
}

@keyframes ypShichigosanStyleCuePulse {
  0% {
    opacity: 0.42;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-2px);
  }

  100% {
    opacity: 0.42;
    transform: translateY(0);
  }
}

@keyframes ypShichigosanStyleCueRing {
  0% {
    opacity: 0.8;
    transform: scale(0.72);
  }

  70% {
    opacity: 0;
    transform: scale(1.35);
  }

  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

/* =========================================================
   詳細本文
========================================================= */

.yp-shichigosan-style .yp-selected-reasons__detail {
  width: min(1120px, calc(100% - 56px));
  margin: 56px auto 0;
  padding: 0 0 96px;
  scroll-margin-top: 90px;
}

.yp-shichigosan-style .yp-selected-reasons__detail-panel {
  display: none;
  opacity: 0;
  transform: translateY(14px);
}

.yp-shichigosan-style .yp-selected-reasons__detail-panel.is-active {
  display: block;
  animation: ypShichigosanStyleDetailFade 520ms ease forwards;
}

.yp-shichigosan-style .yp-selected-reasons__detail-number {
  margin: 0 0 16px;
  color: #8a7458;
  font-family: "Times New Roman", "Yu Mincho", "YuMincho", serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.18em;
}

.yp-shichigosan-style .yp-selected-reasons__detail-panel h3 {
  margin: 0 0 26px;
  color: #26343d;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.55;
  letter-spacing: 0.08em;
  font-weight: 400;
}

.yp-shichigosan-style .yp-selected-reasons__detail-image {
  width: min(760px, 100%);
  margin: 0 0 30px;
  overflow: hidden;
  background: #f7f4ee;
}

.yp-shichigosan-style .yp-selected-reasons__detail-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
}

.yp-shichigosan-style .yp-selected-reasons__detail-panel p:not(.yp-selected-reasons__detail-number) {
  max-width: 860px;
  margin: 0;
  color: #5d6971;
  font-size: 15px;
  line-height: 2.15;
  letter-spacing: 0.04em;
}

.yp-shichigosan-style .yp-selected-reasons__detail-panel p + p {
  margin-top: 18px;
}

@keyframes ypShichigosanStyleDetailFade {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   詳細下 写真メニュー
========================================================= */

.yp-shichigosan-style .yp-selected-reasons__detail-nav-wrap {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid rgba(38, 52, 61, 0.12);
}

.yp-shichigosan-style .yp-selected-reasons__detail-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  background: #ffffff;
  line-height: 0;
}

.yp-shichigosan-style .yp-selected-reasons__nav-button {
  position: relative;
  display: block;
  width: 100%;
  height: 96px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
  line-height: 0;
}

.yp-shichigosan-style .yp-selected-reasons__nav-button picture,
.yp-shichigosan-style .yp-selected-reasons__nav-button img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: top;
}

.yp-shichigosan-style .yp-selected-reasons__nav-button img {
  object-fit: cover;
  object-position: center 58%;
  transition: transform 360ms ease, opacity 360ms ease;
}

.yp-shichigosan-style .yp-selected-reasons__nav-button span {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 3;
  color: #ffffff;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.yp-shichigosan-style .yp-selected-reasons__nav-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.36) 100%
    );
  pointer-events: none;
}

.yp-shichigosan-style .yp-selected-reasons__nav-button.is-active {
  outline: 2px solid #8a7458;
  outline-offset: -2px;
  z-index: 2;
}

.yp-shichigosan-style .yp-selected-reasons__nav-button.is-active img {
  opacity: 0.9;
  transform: scale(1.04);
}

.yp-shichigosan-style .yp-selected-reasons__nav-button:hover img {
  transform: scale(1.04);
}

.yp-shichigosan-style .yp-selected-reasons__scroll-hint {
  display: none;
}

/* =========================================================
   HOVER
========================================================= */

@media (hover: hover) and (pointer: fine) {
  .yp-shichigosan-style .yp-selected-reasons__button img {
    transition: transform 500ms ease;
  }

  .yp-shichigosan-style .yp-selected-reasons__button:hover img {
    transform: scale(1.02);
  }

  .yp-shichigosan-style .yp-selected-reasons__button:hover .yp-selected-reasons__cue {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media screen and (max-width: 1024px) {
  .yp-shichigosan-style {
    padding-top: 78px;
  }

  .yp-shichigosan-style .yp-selected-reasons__inner {
    width: min(100%, calc(100% - 36px));
  }

  .yp-shichigosan-style .yp-selected-reasons__head {
    grid-template-columns: 230px 1fr;
    gap: 34px;
    margin-bottom: 48px;
  }

  .yp-shichigosan-style .yp-selected-reasons__title {
    font-size: clamp(38px, 5vw, 60px);
  }

  .yp-shichigosan-style .yp-selected-reasons__lead p {
    font-size: 14px;
    line-height: 2;
  }

  .yp-shichigosan-style .yp-selected-reasons__grid {
    grid-auto-rows: minmax(330px, 36vh);
  }

  .yp-shichigosan-style .yp-selected-reasons__top {
    top: 30px;
    left: 24px;
  }

  .yp-shichigosan-style .yp-selected-reasons__number {
    font-size: 15px;
  }

  .yp-shichigosan-style .yp-selected-reasons__cue {
    right: 20px;
    bottom: 20px;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail {
    width: min(100%, calc(100% - 36px));
    margin-top: 46px;
    padding-bottom: 80px;
  }

  .yp-shichigosan-style .yp-selected-reasons__nav-button {
    height: 84px;
  }
}

@media screen and (max-width: 767px) {
  #yp-shichigosan-style {
    scroll-margin-top: 80px;
  }

  .yp-shichigosan-style {
    padding: 58px 0 0;
  }

  .yp-shichigosan-style .yp-selected-reasons__inner {
    width: calc(100% - 20px);
  }

  .yp-shichigosan-style .yp-selected-reasons__head {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 34px;
  }

  .yp-shichigosan-style .yp-selected-reasons__label {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .yp-shichigosan-style .yp-selected-reasons__title {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.4;
    letter-spacing: 0.11em;
  }

  .yp-shichigosan-style .yp-selected-reasons__sub-label {
    margin-top: 10px;
    font-size: 12px;
  }

  .yp-shichigosan-style .yp-selected-reasons__lead p {
    font-size: 13px;
    line-height: 1.95;
  }

  .yp-shichigosan-style .yp-selected-reasons__grid {
    display: block;
  }

  .yp-shichigosan-style .yp-selected-reasons__item {
    min-height: auto;
    height: 82svh;
  }

  .yp-shichigosan-style .yp-selected-reasons__button img {
    object-fit: cover;
    object-position: center center;
  }

  .yp-shichigosan-style .yp-selected-reasons__button::before {
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.08) 36%,
        rgba(0, 0, 0, 0.32) 100%
      );
  }

  .yp-shichigosan-style .yp-selected-reasons__top {
    top: 28px;
    left: 22px;
  }

  .yp-shichigosan-style .yp-selected-reasons__number {
    margin-bottom: 10px;
    font-size: 15px;
  }

  .yp-shichigosan-style .yp-selected-reasons__item-title {
    font-size: clamp(34px, 12vw, 52px);
    letter-spacing: 0.12em;
  }

  .yp-shichigosan-style .yp-selected-reasons__cue {
    right: 20px;
    bottom: 22px;
    padding: 8px 11px;
    font-size: 11px;
    letter-spacing: 0.13em;
  }

  .yp-shichigosan-style .yp-selected-reasons__cue::after {
    content: attr(data-sp);
  }

  .yp-shichigosan-style .yp-selected-reasons__detail {
    width: calc(100% - 40px);
    margin-top: 38px;
    padding-bottom: 70px;
    scroll-margin-top: 70px;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-number {
    margin-bottom: 14px;
    font-size: 16px;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-panel h3 {
    margin-bottom: 20px;
    font-size: clamp(24px, 7.5vw, 34px);
    line-height: 1.55;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-image {
    width: 100%;
    margin-bottom: 24px;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-image img {
    aspect-ratio: 4 / 3;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-panel p:not(.yp-selected-reasons__detail-number) {
    font-size: 13px;
    line-height: 2;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-nav-wrap {
    margin-top: 34px;
    padding-top: 22px;
    overflow: hidden;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-nav::-webkit-scrollbar {
    display: none;
  }

  .yp-shichigosan-style .yp-selected-reasons__nav-button {
    flex: 0 0 33.333333%;
    height: 92px;
    scroll-snap-align: start;
  }

  .yp-shichigosan-style .yp-selected-reasons__nav-button img {
    object-position: center bottom;
  }

  .yp-shichigosan-style .yp-selected-reasons__nav-button span {
    font-size: 11px;
  }

  .yp-shichigosan-style .yp-selected-reasons__scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    color: rgba(92, 83, 73, 0.68);
    font-family: "Times New Roman", "Yu Mincho", "YuMincho", serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-align: center;
    animation: ypShichigosanStyleScrollHint 1.65s ease-in-out infinite;
  }

  .yp-shichigosan-style .yp-selected-reasons__scroll-hint span {
    display: block;
    width: 7px;
    height: 7px;
    border-top: 1px solid rgba(92, 83, 73, 0.7);
    border-right: 1px solid rgba(92, 83, 73, 0.7);
    transform: rotate(45deg);
  }

  .yp-shichigosan-style .yp-selected-reasons__scroll-hint em {
    margin-left: 4px;
    font-style: normal;
    text-transform: uppercase;
  }
}

@media screen and (max-width: 374px) {
  .yp-shichigosan-style .yp-selected-reasons__inner,
  .yp-shichigosan-style .yp-selected-reasons__detail {
    width: calc(100% - 36px);
  }

  .yp-shichigosan-style .yp-selected-reasons__item {
    height: 78svh;
  }

  .yp-shichigosan-style .yp-selected-reasons__top {
    top: 24px;
    left: 18px;
  }

  .yp-shichigosan-style .yp-selected-reasons__cue {
    right: 18px;
    bottom: 18px;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-panel p:not(.yp-selected-reasons__detail-number) {
    font-size: 12.5px;
  }

  .yp-shichigosan-style .yp-selected-reasons__nav-button {
    height: 84px;
  }
}

@keyframes ypShichigosanStyleScrollHint {
  0% {
    opacity: 0.25;
    transform: translateX(-5px);
  }

  50% {
    opacity: 1;
    transform: translateX(5px);
  }

  100% {
    opacity: 0.25;
    transform: translateX(-5px);
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .yp-shichigosan-style .yp-selected-reasons__button img,
  .yp-shichigosan-style .yp-selected-reasons__nav-button img {
    transition: none !important;
  }

  .yp-shichigosan-style .yp-selected-reasons__detail-panel.is-active {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none !important;
  }

  .yp-shichigosan-style .yp-selected-reasons__scroll-hint,
  .yp-shichigosan-style .yp-selected-reasons__cue,
  .yp-shichigosan-style .yp-selected-reasons__cue-dot::after {
    animation: none !important;
    transition: none !important;
  }
}