@charset "UTF-8";
/* ================================================================
   p-top : TOPページ専用スタイル
================================================================ */

/* ---------- Hero ---------- */
.p-top-hero {
  position: relative;
  width: 100%;
  /* ヘッダー(固定)+ヒーローの合計が100svhになるよう、ヘッダー分を差し引く。
     ログイン中は管理バーのぶんも差し引く */
  height: calc(100svh - var(--header-height) - var(--admin-bar-height));
  overflow: hidden;
}

.p-top-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-top-hero__band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 8, 8, 0.4);
  padding: 40px 24px;
  text-align: center;
}

.p-top-hero__title {
  color: var(--color-white);
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: clamp(22px, 3.4vw, 40px);
  letter-spacing: 0.06em;
  margin-bottom: 0;
}

.p-top-hero__subtitle {
  color: var(--color-white);
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: clamp(16px, 1.8vw, 36px);
  letter-spacing: 0.08em;
}

@media (min-width: 768px) {
  .p-top-hero {
    height: 640px;
  }
}

@media (min-width: 1440px) {
  .p-top-hero {
    height: 50.3vw;
    max-height: 850px;
  }
}

/* ---------- Section common ---------- */
.p-top-news,
.p-top-works {
  background: var(--color-cream);
  padding: 64px 0 80px;
}

.p-top-works {
  padding-top: 8px;
}

.p-top-section__head {
  padding: 0 24px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .p-top-section__head {
    padding: 0 clamp(24px, 5.7vw, 110px);
    margin-bottom: 44px;
  }
}

/* ---------- News carousel ---------- */
.p-top-news__carousel {
  position: relative;
  --news-card-w: min(calc(86vw - 40px), 460px);
}

@media (min-width: 640px) {
  .p-top-news__carousel {
    --news-card-w: min(90vw, 700px);
  }
}

.p-top-news__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 24px 24px;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .p-top-news__track {
    padding: 4px clamp(60px, 12vw, 230px) 32px;
    gap: 32px;
  }
}

.p-top-news__track::-webkit-scrollbar {
  display: none;
}

.p-top-news__card {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: min(calc(86vw - 40px), 460px);
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 640px) {
  .p-top-news__card {
    flex-direction: row;
    align-items: center;
    width: min(90vw, 700px);
    padding: 36px 40px;
    gap: 32px;
  }

  /* デザイン指定: 左にテキスト、右に画像。
     アイキャッチは正方形にリサイズし、カード端に接しないよう
     上下左右に余白(カードのpaddingぶん)を持たせる。 */
  .p-top-news__card-media {
    order: 2;
  }

  .p-top-news__card-body {
    order: 1;
  }
}

.p-top-news__card-media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.p-top-news__card-textlink {
  display: block;
  color: inherit;
  text-decoration: none;
}

@media (min-width: 640px) {
  .p-top-news__card-media {
    width: 40%;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
  }
}

.p-top-news__card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-top-news__card-body {
  padding: 16px 20px;
  flex: 1;
}

@media (min-width: 640px) {
  .p-top-news__card-body {
    padding: 0;
  }
}

.p-top-news__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .p-top-news__tag {
    margin-bottom: 16px;
  }
}

.p-top-news__tag::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5db85c;
  flex-shrink: 0;
}

.p-top-news__text {
  font-size: 15px;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .p-top-news__text {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 16px;
  }
}

.p-top-news__youtube {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  word-break: break-all;
}

.p-top-news__youtube img {
  width: 26px;
  flex-shrink: 0;
}

.p-top-news__nav {
  display: flex;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.p-top-news__nav-btn {
  pointer-events: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  color: var(--color-white);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: absolute;
  top: 50%;
}

.p-top-news__nav-btn:hover {
  background: var(--color-cream);
  color: var(--color-primary);
}

/* 中央カードの左右の端に、ボタン中心がちょうど乗るように配置 */
.p-top-news__nav-btn--prev {
  left: calc(50% - var(--news-card-w) / 2);
  transform: translate(-50%, -50%);
}

.p-top-news__nav-btn--next {
  left: calc(50% + var(--news-card-w) / 2);
  transform: translate(-50%, -50%);
}

/* ---------- Works ---------- */
.p-top-works__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 24px 16px;
  scrollbar-width: none;
}

/* デザイン指定: 1番目の投稿を中央に、合計5投稿が見える状態
   (両端の投稿はサムネの約25%が見える)。PSDの実測比率(503/1920px)を
   vw換算して踏襲している。 */
@media (min-width: 768px) {
  .p-top-works__track {
    padding: 4px clamp(24px, 7vw, 130px) 16px;
    gap: clamp(12px, 1.9vw, 32px);
  }
}

.p-top-works__track::-webkit-scrollbar {
  display: none;
}

.p-top-works__item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: min(60vw, 260px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

@media (min-width: 768px) {
  .p-top-works__item {
    width: clamp(160px, 26.2vw, 380px);
  }
}

.p-top-works__item a {
  display: block;
  width: 100%;
  height: 100%;
}

.p-top-works__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.p-top-works__item:hover img {
  transform: scale(1.05);
}

.p-top-works__more {
  text-align: center;
  margin-top: 40px;
}
