/* =========================================================
   Project / Hero（トップページのみ）
   ========================================================= */
.p-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  padding-top: var(--header-h);
}

.p-hero__bg { position: absolute; inset: 0; pointer-events: none; }

.p-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.p-hero__content {
  position: relative;
  z-index: 2;                /* スクリム(1)より前面に */
  max-width: 760px;
  margin: 0 auto;            /* 中央寄せ */
  padding: 80px 24px;
  text-align: center;
}
.p-hero__content .p-hero__actions { justify-content: center; margin-bottom: 0; }
.p-hero__content .p-hero__subcopy { margin-left: auto; margin-right: auto; }

.p-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 20px;
  margin-bottom: 28px;
}
.p-hero__tag-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.p-hero__title {
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 24px;
  font-weight: 300;
  font-style: italic;
}

.p-hero__subcopy {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 24px;
}

.p-hero__desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 900px;
  margin-bottom: 40px;
  line-height: 1.75;
}

.p-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.p-hero__stats {
  display: flex;
  align-items: center;
  gap: 0;
}

/* ── Hero Works Columns（実績を全面背景に縦スクロール）──── */
/* 画面いっぱいに実績サムネイルの縦カラムを斜めに流し、その上に
   スクリム（暗幕）＋中央のタイトルを重ねる没入型ファーストビュー */
.p-hero__columns {
  position: absolute;
  inset: -20% -10%;          /* 斜め回転で四隅が空かないよう外側へ広げる */
  z-index: 0;
  display: flex;
  gap: 16px;
  transform: rotate(-9deg) scale(1.3);
  pointer-events: none;
}
.p-hero__column { flex: 1; overflow: hidden; }
.p-hero__column-track {
  display: flex;
  flex-direction: column;
  gap: 16px;
  will-change: transform;
}
/* 隣り合うカラムを上下反対方向に流し、速度も変えて有機的に見せる */
.p-hero__column:nth-child(odd)  .p-hero__column-track { animation: hero-col-up   40s linear infinite; }
.p-hero__column:nth-child(even) .p-hero__column-track { animation: hero-col-down 48s linear infinite; }
.p-hero__column:nth-child(2) .p-hero__column-track { animation-duration: 52s; }
.p-hero__column:nth-child(3) .p-hero__column-track { animation-duration: 60s; }
.p-hero__column:nth-child(4) .p-hero__column-track { animation-duration: 44s; }
.p-hero__column:nth-child(5) .p-hero__column-track { animation-duration: 56s; }

.p-hero__tile {
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.p-hero__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 暗幕：中央を少し明るく残しつつ全体を暗くしてタイトルを読みやすく */
.p-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(8,8,16,0.55) 0%, rgba(8,8,16,0.86) 70%),
    rgba(8,8,16,0.35);
}

/* 同じ並びを2回出力しているので、-50% でちょうど1周期＝シームレスにループ */
@keyframes hero-col-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
@keyframes hero-col-down {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0); }
}

@media (max-width: 768px) {
  .p-hero__columns { transform: rotate(-9deg) scale(1.5); gap: 12px; }
  /* スマホでは3カラム目以降を隠して2カラム構成に */
  .p-hero__column:nth-child(n+3) { display: none; }
}

/* 動きを抑える設定のユーザーには自動スクロールを止める */
@media (prefers-reduced-motion: reduce) {
  .p-hero__column-track { animation: none !important; }
}

.p-hero__scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.p-hero__scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--border-hover);
  border-radius: 12px;
  position: relative;
}
.p-hero__scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--text);
  border-radius: 2px;
  animation: scroll-dot 2s infinite;
}
@keyframes scroll-dot {
  0% { top: 6px; opacity: 1; }
  100% { top: 20px; opacity: 0; }
}

@media (max-width: 768px) {
  .p-hero__title { font-size: clamp(2.5rem, 10vw, 3rem); }
}
@media (max-width: 480px) {
  .p-hero__actions { flex-direction: column; }
}
