/*
Theme Name: tsukimidai
Theme URI: http://enjoyworks.jp/
Description: WordPressテーマ
Version: 1.1
Author: enjoyworks
Author URI: http://enjoyworks.jp/
*/

/* 押下中はさらに強制（ロック） */
html.cursor-locked, html.cursor-locked * {
  cursor:
    url("../img/asterisk-icon.png") 4 4,
    auto !important;
}

/* ----------------- map -----------------*/

  /* マップ領域では選択やドラッグ自体を抑止（カーソル剥がれ低減） */
  .map-wrap { 
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    overflow-x: auto; /* 横スクロール許可 */
    overflow-y: hidden;
  }

  .map-wrap object,
  .map-wrap svg,
  .map-wrap img {
    -webkit-user-drag: none;
  }
    
  .residents-map__pc {
    display: block;
    width: 100%;
    height: auto;
    cursor: url("../img/asterisk-icon.png") 4 4, auto;
  }

  /* SVGの表示比率を維持して高さがゼロにならないようにする */
  .map-wrap object.residents-map__pc {
    aspect-ratio: 819 / 567; /* SVGの実寸比に合わせる */
  }
  
  .map-tooltip {
    position: absolute;
    padding: 4px 8px;
    background: rgba(0,0,0,.85);
    color: var(--base-color);
    font-size: 12px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
    display: none;
    line-height: 1.2;
  }

  .map-tooltip[data-show="1"] { 
    display: block !important; 
  }

/* ----------------- section -----------------*/
.section-heading {
  font-family: var(--text-en);
  font-size: clamp(60px, 8vw, 110px);
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

/* mv */
.sec--mv {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.sec--mv .logo {
  padding-bottom: 100px;
  padding-left: 20px;
  width: 100%;
  max-width: 763px;
  animation: fadeIn 0.7s ease forwards;
}

.scroll-prompt {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: bold;
  font-family: var(--text-en);
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.scroll-prompt::after {
  animation: toScroll 2s infinite;
  content: "";
  position: absolute;
  bottom: -85px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 1px;
  height: 70px;
  background-color: var(--main-color);
}

@keyframes toScroll {
  0% {
    transform: scale(1, 0);
    transform-origin: 0 0;
  }
  50% {
    transform: scale(1, 1);
    transform-origin: 0 0;
  }
  51% {
    transform: scale(1, 1);
    transform-origin: 0 100%;
  }
  100% {
    transform: scale(1, 0);
    transform-origin: 0 100%;
  }
}

/* .residents-map__pc { display: none; }
.residents-map__sp { display: block; } */
.residents-map svg,
.residents-map img { width: 100%; height: auto; display: block; }

.residents-map .sec--residents__linkBtn {
  display: block;
}

@media (min-width: 1024px) {
  .residents-map .sec--residents__linkBtn {
    display: none;
  }
}

/* SPは横スクロール前提で広く見せる */
@media (max-width: 1023px) {
  /* 初期表示は画面幅(100vw)にし、中央に配置 */
  .map-wrap { overflow: visible; }
  .map-wrap object.residents-map__pc,
  .map-wrap svg.residents-map__pc {
    width: 100vw;
    max-width: 100vw;
    display: block;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

/* さらに小さい端末では transform ベースで中央寄せ */
@media (max-width: 767px) {
  .map-wrap object.residents-map__pc,
  .map-wrap svg.residents-map__pc {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    margin-right: 0;
  }
}

/* residents */
.sec--residents {}

.residents__map {
  display: block;
  width: 100%;
  margin-bottom: 45px;
  min-width: 360px;
}

@media (max-width: 430px) {
  .residents__map {
    width: 100vw;
    display: block;
    margin: 0 -32px 45px;
    max-width: none;
  }
}

.residents__cardContainer {
  margin: 0 auto 27px;
}


.sec--residents__linkBtn {
  text-align: right;
  max-width: 1143px;
}

.sec--residents__linkBtn a {
  display: inline-block;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  color: var(--main-color);
  padding-left: 96px;
  position: relative;
}

.sec--residents__linkBtn a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: inline-block;
  width: 80px;
  height: 3px;
  background-color: var(--main-color);
}

@media (min-width: 768px) {
  .residents__map {
    margin-bottom: 80px;
  }

  .sec--residents__linkBtn a {
    font-size: 24px;
  }

  .sec--residents__linkBtn a::after {
    transition: all 0.2s ease-in-out;
  }

    .sec--residents__linkBtn a:hover {
    color: var(--color-accent);
    transition: all 0.2s ease-in-out;
  }

  .sec--residents__linkBtn a:hover::after {
    background-color: var(--color-accent);
  }
}

/* news-events */
.sec--news-events {
  position: relative;
  padding-bottom: 100px;
}

.sec--news-events__flexContainer {
  display: flex;
  flex-direction: column-reverse;
}

.sec--news-events__flexContainer .section-heading {
    margin-bottom: 35px;
  }

.sec--news-events__flexContainer .section-heading .small-text {
  display: inline-block;
  font-size: clamp(40px, 4.5vw, 80px);
  margin-left: clamp(9px, 1.5vw, 17px);
}

@media (min-width: 768px) {
  .sec--news-events {
    padding: 0 30px;
  }

  .sec--news-events__flexContainer {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .sec--news-events__flexContainer .section-heading {
    padding-top: clamp(40px, 4.5vw, 70px);
    padding-left: clamp(16px, 1.5vw, 30px);
  }
  
}

@media (min-width: 992px) {
  .sec--news-events {
    padding: 0 60px;
  }
}

@media (min-width: 1300px) {
  .sec--news-events {
    padding: 0 94px;
  }
}

/* news-events スライド */
.sec--news-events .slide-container {
  border: 3px solid var(--main-color);
  position: relative;
}
.sec--news-events .swiper {
  width: 100%;
  height: 276px;
  
}

.sec--news-events .slide-media {
  width: 100%;
  height: 276px;
}

.sec--news-events .slide-media a:hover {
  opacity: 0.7;
}

.sec--news-events .swiper-slide {
  width: 100%;
  overflow: hidden;
}

.sec--news-events .swiper-controller {
  position: absolute;
  bottom: -28px;
  right: 20px;
  width: 114px;
  height: 56px;
  background-color: var(--main-color);
  z-index: 10;
}

/* デフォルト矢印を非表示に */
.sec--news-events .swiper-button-prev::after,
.sec--news-events .swiper-button-next::after {
  display: none;
}

.sec--news-events .swiper-controller .swiper-button-prev,
.sec--news-events .swiper-controller .swiper-button-next {
  width: 22px;
  height: 22px;
  background-size: cover;
  background-repeat: no-repeat;
  margin: 0; /* SwiperCSS打ち消し */
  transform: translateY(-50%);
}

.sec--news-events .swiper-controller .swiper-button-prev {
  background-image: url("../img/slide-prev-icon.svg");
  left: 22px;
}

.sec--news-events .swiper-controller .swiper-button-next {
  background-image: url("../img/slide-next-icon.svg");
  right: 22px;
}

.sec--news-events .swiper-button-lock {
  /* スライドが一枚だけでも矢印はグレーアウトで表示させる */
  display: block !important;
  opacity: 0.3;
  pointer-events: none;
  cursor: not-allowed;
}

.sec--news-events .slide-media {
  position: relative;
  overflow: hidden;
}

.sec--news-events .slide-media img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* スライド キャプション*/
.sec--news-events__ul {
  position: absolute;
  bottom: 0;
  left: 0;
  padding-left: 0;
}

.sec--news-events__caption {
  list-style-type: none;
  font-weight: bold;
}

.sec--news-events__caption a {
  color: var(--main-color);
  text-decoration: none;
}

.sec--news-events__caption a:hover {
  opacity: 0.7;
}

.sec--news-events__caption time {
  display: block;
  font-family: var(--text-en);
  font-size: 12px;
  line-height: 1;
  margin-bottom: 10px;
}

.sec--news-events__caption span {
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 0.5em;
  text-decoration-skip-ink: none;
  text-underline-offset: -0.25em;
}

.sec--news-events__caption.hidden {
  display: none;
}


@media (min-width: 768px) {
  .sec--news-events .swiper {
    width: 350px;
    height: 350px;
  }

  .sec--news-events .slide-media {
    width: 350px;
    height: 350px;
  }

  .sec--news-events .swiper-controller {
    right: 40px;
  }

  .sec--news-events__ul {

    left: 50%;
    padding-left: 75px;
  }

  .sec--news-events__caption time {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .sec--news-events__caption span {
    font-size: 20px;
  }
}

@media (min-width: 992px) {
  .sec--news-events .swiper {
    width: 480px;
    height: 480px;
  }

  .sec--news-events .slide-media {
    width: 480px;
    height: 480px;
  }

  .sec--news-events__ul {
    bottom: 80px;
    left: 55%;
  }
}

@media (min-width: 1300px) {
  .sec--news-events .swiper {
    width: 553px;
    height: 553px;
  }

  .sec--news-events .slide-media {
    width: 553px;
    height: 553px;
  }

  .sec--news-events__ul {
    left: 50%;
  }

}

/* /スライド */

/*  FOR RENT  */
.sec--for-rent__heading {
  display: flex;
  justify-content: end;
}

.sec--for-rent__heading .section-heading {
  text-align: left;
}

.sec--for-rent__ul {
  margin-top: 2.5rem;
  padding: 0;
  perspective: 1500px;
}

.sec--for-rent__link {
  margin-bottom: 1.5rem;
  list-style: none;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 2;
  border: solid 3px var(--main-color);
}

.sec--for-rent__link:last-of-type {
  margin-bottom: 0;
}

.sec--for-rent__link a {
  transition: all .2s ease-in-out;
}

.sec--for-rent__link a:hover {
  filter: contrast(120%);
  transform: scale(1.05);
}

.sec--for-rent__img {
  display: block;
  width: 100%;
  transition: all .2s ease-in-out;
}

.sec--for-rent__link a:hover > .sec--for-rent__img {
  transform: scale(1.05);
}

.sec--for-rent__tag {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1;
  color: var(--main-color);
  position: absolute;
  top: -3px;
  left: -3px;
  border: 3px solid var(--main-color);
  padding: 11px 22px;
}

.sec--for-rent__tag.rent {
  background-color: var(--color-accent);
}
.sec--for-rent__tag.sold {
  color: var(--base-color);
  background-color: var(--main-color);
}
.sec--for-rent__tag.comin-soon {
  background-color: var(--base-color);
}

@media (min-width: 768px) {
  .sec--for-rent {
    display: flex;
    justify-content: space-between;
    padding: 0 94px;
  }

  .sec--for-rent__ul {
    margin-top: 0;
    width: 50%;
  }

  .sec--for-rent__link {
    margin-bottom: 3rem;
  }

  .sec--for-rent__tag {
    font-size: 1.125rem;
  }
}

/* ACCESS */
.sec--access {
  margin-bottom: 140px;
}

.sec--access .section-heading {
  margin-bottom: 36px;
}

.sec--access__map {
  max-width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 2px solid var(--main-color);
  position: relative;
}

.sec--access__map::before,
.sec--access__map::after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.sec--access__map::before {
  width: 100%;
  height: 100%;
  border: 8px solid #fff;
}

.sec--access__map::after {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border: 4px solid var(--main-color);
}

.sec--access__mapInner {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
}

.sec--access__map iframe {
  width: 100%;
  height: 100%; 
  border: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
}

.sec--access__textContainer {
  margin: 36px 0;
}

.sec--access__text {
  margin-bottom: 26px;
}

.sec--access__text--border {
  text-align: center;
  padding: 30px;
  border: 4px solid var(--main-color);
}

.sec--access__subHeading {
  font-size: 18px;
  margin-bottom: 8px;
}

.sec--access__text p {
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
}

.sec--access__text--border p {
  display: inline-block;
}

.sec--access hr {
  border: none;
  height: 2px;
  background-color: var(--main-color);
  margin-bottom: 32px;
}

.sec--access__link {
  text-underline-offset: 5px;
}

@media (min-width: 768px) {
  .sec--access {
    padding: 0 94px;
    margin-bottom: 160px;
  }
  .sec--access .section-heading {
    margin-bottom: 27px;
  }

  .sec--access__textContainer {
    margin: 56px 0;
  }

  .sec--access__text {
    margin-bottom: 32px;
  }

  .sec--access__text--border {
    padding: 60px;
  }

  .sec--access__subHeading {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .sec--access__text p {
    font-size: 20px;
  }
}

.map-modal {
  display: none;
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(180px, 50vw, 304px);
  padding: 16px;
  background: var(--main-color);
  color: var(--base-color);
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
  z-index: 1000;
  min-width: 210px;
}

.map-modal__inner {
  position: relative;
  background: rgba(0,0,0,0.9);
  color: var(--base-color);
}

.map-modal[aria-hidden="false"] { display: block; }
.map-modal__title {
  font-size: 0.8em;
  padding-bottom: 10px;
  color: var(--base-color);
  text-align: center;
}
.map-modal__desc {
  font-size: 0.75em;
  color: var(--base-color);
  text-align: justify;
  line-height: 1.5;
}

.map-modal__close {
  display: none;
}

/* === スマホ専用閉じるボタン === */
@media (hover: none) and (pointer: coarse) {
  .map-modal__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    transition: background 0.2s, color 0.2s;
  }

  .map-modal__close::before {
    content: "×";
    display: block;
    transform: translate(0.5px, 0.5px);
  }

  .map-modal__close:hover,
  .map-modal__close:focus {
    background: rgba(255,255,255,0.2);
  }
}