/*
  ここにある内容

  --- col-1 ---
    ● hero section

  --- col-2 ---
    ● main-title
    ● posts-section

  ※ タイルそのもののデザインは tile__front-and-search.css に記載

*/


/* ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍   col-1   ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ */

.hero-slide {
  position: absolute;
  width: 730px;
  height: clamp(540px, 65dvh, 702px);
  bottom: 0px;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 1280px) and (max-height: 830px) {
  .hero-slide {
    top: 290px;
    bottom: auto;
  }
}

.hero-figure {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: fadeSlide 25s ease-in-out infinite;
}

.hero-figure:nth-child(1) { animation-delay: 0s; }
.hero-figure:nth-child(2) { animation-delay: 5s; }
.hero-figure:nth-child(3) { animation-delay: 10s; }
.hero-figure:nth-child(4) { animation-delay: 15s; }
.hero-figure:nth-child(5) { animation-delay: 20s; }

.hero-figure img {
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
}

@keyframes fadeSlide {
  0% { opacity: 0; }
  5% { opacity: 1; }
  20% { opacity: 1; }
  27% { opacity: 0; }
  100% { opacity: 0; }
}


/* ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍   col-2   ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ */

.main-title {
  position: absolute;
  top: 3.7cqw;
  right: 5.7cqw;
  display: grid;
  gap: 2cqw;
  text-align: right;
}

.main-title h1 {
  font-size: calc(32 * 100cqw / 700);
}

.main-title p,
.main-title .byline {
  font-size: calc(16 * 100cqw / 700);
}


/* ----------------   posts section   ---------------- */

.posts-section {
  margin-top: 23cqw;
  width: 94.6cqw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.6cqw;
  row-gap: 2.7cqw;
}

.posts-section > * {
  --tile-transY: 0px;      /* 平常時のYオフセット */
  --tile-scale: 1;         /* 平常時のスケール */
  transform: translateY(var(--tile-transY)) scale(var(--tile-scale));
  transform-origin: center center;
  transition: transform 0.2s ease;
  will-change: transform;
}

.posts-section > *:nth-child(even) {
  --tile-transY: -20cqw;
}





/* ▦ ▥ ▤ ▦ ▥ ▤ ▦   M: 幅500〜1279px（タブレットなど）   ▦ ▥ ▤ ▦ ▥ ▤ ▦ */

@media (min-width: 500px) and (max-width: 1279px) {

  .hero-slide {
    width: 100%;
    height: 540px;
    overflow: hidden;
  }

  .hero-figure img {
    width: 100%;
    height: 100%;
  }

}


/* ▦ ▥ ▤ ▦ ▥ ▤ ▦   S: 幅499px 以下（スマホなど）   ▦ ▥ ▤ ▦ ▥ ▤ ▦ */

@media (max-width: 499px) {

  .hero-slide {
    width: 100%;
    height: calc(70vh - 80px);
    height: calc(70svh - 80px);
    overflow: hidden;
  }


  /* - - - - - - - - - - - - - - - - - - - - */

  .main-title{
    top: 7cqw;
    right: 7cqw;
    gap: 3cqw;
  }

  .main-title h1 {
    font-size: calc(32 * 100cqw / 400);
  }

  .main-title p,
  .main-title .byline {
    font-size: calc(16 * 100cqw / 400);
  }

  .posts-section {
    margin-top: 41cqw;
    width: 92cqw;
    grid-template-columns: 1fr;
    row-gap: 4cqw;
  }

  .posts-section > *:nth-child(even) {
    --tile-transY: 0px;
  }

}
