/* ===== イントロオーバーレイ ===== */
.hero-intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.8s ease;
  pointer-events: all;
}
.hero-intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
.hero-intro-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-intro-line {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  line-height: 1.4;
}
.hero-intro-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HERO: ZOON + 集英社 スタイル ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* === 鎖アニメーション（画面横断フロー） === */
.hero-chains {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.8s ease;
}
.hero--phase2 .hero-chains {
  opacity: 0;
  pointer-events: none;
}
.hero-chain {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0,0,0);
  height: auto;
}

/* ターコイズ鎖 */
.hero-chain--turq {
  top: 50%;
  left: -50%;
  width: 400vw;
}

/* オレンジ鎖 */
.hero-chain--orange {
  bottom: -50%;
  left: -50%;
  width: 400vw;
}

/* === ビズちゃんアニメーション背景 === */
.hero-bizchar {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease;
}
.hero--phase2 .hero-bizchar {
  opacity: 0;
}
.hero-bizchar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-bizchar-img.active {
  opacity: 1;
}

/* === 作品カルーセル背景（集英社スタイル3行マーキー） === */
.hero-works-bg {
  position: absolute;
  inset: 0;
  padding-top: 70px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}
.hero--phase2 .hero-works-bg {
  opacity: 1;
  pointer-events: auto;
  z-index: 8;
}
/* Phase 2: ロゴを最前面に表示しつつクリックは漫画に通す */
.hero--phase2 .hero-center {
  z-index: 10;
  pointer-events: none !important;
}
.hero--phase2 .hero-center * {
  pointer-events: none !important;
}
.hero--phase2 .hero-overlay {
  pointer-events: none !important;
}
.hero-works-row {
  display: flex;
  gap: 8px;
  width: max-content;
}
.hero-works-row--1 {
  animation: marqueeLeft 30s linear infinite;
}
.hero-works-row--2 {
  animation: marqueeRight 35s linear infinite;
}
.hero-works-row--3 {
  animation: marqueeLeft 28s linear infinite;
}
.hero-works-row--4 {
  animation: marqueeRight 32s linear infinite;
  display: none;
}
.hero-works-row--5 {
  animation: marqueeLeft 26s linear infinite;
  display: none;
}
@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.hero-works-cover {
  flex-shrink: 0;
  width: 180px;
  height: 250px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-works-cover:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 3;
}
.hero-works-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === ヒーローオーバーレイ・ロゴ・スクロールヒント === */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}
.hero-center {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-center * {
  pointer-events: auto;
}
.hero-logo-main {
  width: 55%;
  max-width: 650px;
  height: auto;
  opacity: 0;
  animation: heroLogoIn 1.5s ease 1s forwards;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.5));
}
@keyframes heroLogoIn {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 1s ease 3s forwards;
}
.hero-scroll-hint .scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: #fff;
  margin: 8px auto 0;
  animation: scrollLine 1.5s ease-in-out infinite;
}
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  100% { opacity: 0.7; transform: translateX(-50%) translateY(0); }
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* === 制作事例モーダル (bizmanga.com/works/ 風 2カラム) === */
.work-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.work-detail-overlay.active {
  display: flex;
}
.work-detail-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: row;
}
.work-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}
.work-detail-close:hover {
  background: rgba(0,0,0,0.8);
}

/* 左カラム: 漫画カルーセル */
.work-detail-left {
  flex: 0 0 45%;
  max-width: 45%;
  display: flex;
  flex-direction: column;
}
.work-detail-carousel-wrap,
.work-detail-carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px 0 0 0;
  background: #f5f5f5;
  aspect-ratio: 3/4;
}
/* 縦スクロールモード時はaspect-ratio解除 */
.work-detail-carousel-wrap:has(.vertical-scroll),
.work-detail-carousel-wrapper:has(.vertical-scroll) {
  aspect-ratio: unset;
  max-height: 70vh;
  overflow-y: auto;
  border-radius: 12px 0 0 12px;
}
.work-detail-carousel {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
}
.work-detail-carousel img {
  width: 100%;
  flex-shrink: 0;
  object-fit: contain;
  background: #f5f5f5;
}
/* 縦スクロールモード */
.work-detail-carousel.vertical-scroll {
  display: block;
  overflow-y: auto;
  max-height: 70vh;
  transition: none;
  height: auto;
}
.work-detail-carousel.vertical-scroll img {
  width: 100%;
  height: auto;
  flex-shrink: unset;
  object-fit: contain;
  display: block;
}
.work-detail-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-radius: 0 0 0 12px;
}
.work-detail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}
.work-detail-dot.active {
  background: #333;
}
.work-detail-nav,
.work-detail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-detail-nav:hover,
.work-detail-arrow:hover { background: rgba(255,255,255,1); }
.work-detail-prev { left: 12px; }
.work-detail-next { right: 12px; }

/* 右カラム: 詳細情報 */
.work-detail-right,
.work-detail-info {
  flex: 1;
  padding: 32px 32px 32px 28px;
  overflow-y: auto;
  max-height: 90vh;
}
.work-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1a1a;
}
.work-detail-category {
  display: inline-block;
  background: #f0f0f0;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 20px;
  color: #555;
}
.work-detail-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.work-detail-section:last-child {
  border-bottom: none;
}
.work-detail-section h4,
.work-detail-section h3,
.work-detail-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.work-detail-section ul,
.work-detail-list {
  list-style: disc inside;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.8;
}
.work-detail-point,
.work-detail-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
}
.work-detail-comment,
.work-detail-quote {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  background: #fafafa;
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 4px;
}
.work-detail-divider {
  height: 0;
  border: none;
}

/* === レスポンシブ === */
@media (max-width: 768px) {
  .hero-bizchar-img {
    width: 100%;
    height: 100%;
    object-position: 65% center;
  }
  .hero-logo-main {
    width: 60%;
  }
  .hero-works-cover {
    width: 120px;
    height: 168px;
  }
  .hero-works-row--4,
  .hero-works-row--5 {
    display: flex;
  }
  .hero-works-bg {
    gap: 5px;
    padding-top: 60px;
  }
  .hero-chain--turq,
  .hero-chain--orange { width: 500vw; }
  /* モーダル: スマホは縦並び */
  .work-detail-content {
    flex-direction: column;
  }
  .work-detail-left {
    flex: none;
    max-width: 100%;
  }
  .work-detail-carousel-wrap,
  .work-detail-carousel-wrapper {
    border-radius: 12px 12px 0 0;
  }
  .work-detail-right,
  .work-detail-info {
    max-height: none;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero-bizchar-img {
    object-position: 70% center;
  }
  .hero-works-cover {
    width: 100px;
    height: 140px;
  }
  .hero-works-bg {
    gap: 4px;
    padding-top: 50px;
  }
  .hero-logo-main {
    width: 70%;
  }
  .hero-intro-line {
    font-size: 24px;
  }
  .work-detail-content {
    max-width: 100%;
  }
  .work-detail-right,
  .work-detail-info {
    padding: 16px;
  }
  .work-detail-title {
    font-size: 1.2rem;
  }
  .work-detail-comment,
  .work-detail-quote {
    font-size: 0.85rem;
    padding: 10px 12px;
  }
}
