/* ==========================================================================
   T&S Corporate Site - Custom Styles
   Tailwind CSS で表現しにくい部分のみここに記述
   ========================================================================== */

/* ---- スクロールフェードイン ---- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* 子要素を順番にフェードインさせる */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-in-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.fade-in-stagger.is-visible > *:nth-child(3) { transition-delay: 0.24s; }
.fade-in-stagger.is-visible > *:nth-child(4) { transition-delay: 0.36s; }
.fade-in-stagger.is-visible > *:nth-child(5) { transition-delay: 0.48s; }

/* 動きを減らす設定のユーザーにはアニメーションを無効化 */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- ヒーロー：斜めパネル（PCのみ） ---- */
@media (min-width: 1024px) {
  .hero-panel {
    transform: skewX(-8deg);
    overflow: hidden;
  }
  .hero-panel > .hero-panel-inner {
    transform: skewX(8deg) scale(1.25);
  }
}

/* ---- 縦書きテキスト ---- */
.vertical-text {
  writing-mode: vertical-rl;
  letter-spacing: 0.35em;
}

/* ---- 画像ホバー（ゆっくりズーム） ---- */
.img-zoom img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.img-zoom:hover img {
  transform: scale(1.06);
}

/* ---- 矢印リンクのホバー ---- */
.arrow-link .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.arrow-link:hover .arrow {
  transform: translateX(6px);
}

/* ---- カルーセル：スクロールバー非表示 ---- */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ===== Hero slow zoom (Ken Burns) ===== */
@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.hero-zoom-slow {
  animation: hero-zoom 18s ease-in-out infinite alternate;
  transform-origin: 80% 35%;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .hero-zoom-slow { animation: none; }
}

/* ===== ページ読み込みフェード ===== */
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
body { animation: page-fade 0.6s ease-out both; }

/* ===== 矢印ホバー ===== */
.arrow-link .arrow { display: inline-block; transition: transform 0.3s ease; }
.arrow-link:hover .arrow { transform: translateX(5px); }

/* ===== ヘッダーのスクロール追従（下で隠れ、上で出る） ===== */
header.site-header { transition: transform 0.35s ease; }
header.site-header.nav-hidden { transform: translateY(-100%); }

/* ===== トップへ戻るボタン ===== */
.to-top-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #1a1a1a; background: rgba(237, 235, 231, 0.92); color: #1a1a1a;
  font-size: 16px; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.to-top-btn.show { opacity: 1; pointer-events: auto; }

/* ===== スマホ固定お問い合わせボタン ===== */
.sp-contact-btn {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 40;
  background: #1a1a1a; color: #fff;
  padding: 13px 40px; font-size: 12px; letter-spacing: 0.25em; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
@media (min-width: 1024px) { .sp-contact-btn { display: none; } }

/* ===== 取引先マーキー ===== */
.marquee-wrap { overflow: hidden; }
.marquee-track { display: flex; width: max-content; align-items: center; animation: marquee 45s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== 見出しリビール ===== */
.h-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s ease; }
.h-reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .marquee-track { animation: none; flex-wrap: wrap; }
  .h-reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== ライトボックス（画像クリックで拡大） ===== */
.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(20, 19, 18, 0.9); cursor: zoom-out;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; box-shadow: 0 12px 48px rgba(0,0,0,.5); }
.lightbox .lightbox-close {
  position: absolute; top: 16px; right: 24px;
  color: #fff; font-size: 32px; line-height: 1; font-family: serif;
}
