/* ==========================================================================
   noir. — custom styles
   Tailwind (CDN) で表現できない部分のみをここに記述しています。
   ========================================================================== */

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Manrope', 'Noto Sans JP', sans-serif;
  overflow: hidden;
  background-color: #000000;
  color: #f3f4f6;
}

/* --------------------------------------------------------------------------
   ビューポート高さユーティリティ
   iOS Safari のアドレスバー出没で 100vh がずれるため dvh を併用する。
   （dvh 非対応ブラウザは直前の vh 指定にフォールバック）
   -------------------------------------------------------------------------- */
.h-screen-dvh {
  height: 100vh;
  height: 100dvh;
}
.max-h-60-dvh {
  max-height: 60vh;
  max-height: 60dvh;
}
.h-viewer {
  height: 50vh;
  height: 50dvh;
}
@media (min-width: 768px) {
  .h-viewer {
    height: 60vh;
    height: 60dvh;
  }
}

/* --- 背景動画のスタイル（クロスフェード・リサイズ防止対応） --- */
#bg-video-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: #111111;
}
.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.bg-video.active {
  opacity: 1;
}
.video-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* カスタムスクロールバー */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* コンテンツ切り替え時のフェードアニメーション */
.fade-enter {
  opacity: 0;
  transform: translateY(15px);
}
.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* --------------------------------------------------------------------------
   グローバルローダー
   ・トップページを開いたとき（.is-intro）：noir. のロゴ（image/logoyoko.png）
     ぼかしからピントが合って現れ、最低3秒表示する（時間は js/main.js の LOADER_INTRO_MS）。
     3秒を過ぎてもまだ読み込み中なら、ゆっくり明滅する。
   ・それ以外：N のマーク（image/logomarkkuro.png）がゆっくり明滅する。
   -------------------------------------------------------------------------- */
#global-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}
#global-loader.loaded {
  opacity: 0;
  visibility: hidden;
}
.loader-brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1);
}
.loader-brand--wordmark {
  width: clamp(200px, 36vw, 440px);
  animation: loader-focus 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.loader-brand--wordmark img {
  animation: loader-breathe 2.4s ease-in-out 3s infinite;
}
.loader-brand--mark {
  display: none;
  width: clamp(44px, 5vw, 60px);
}
.loader-brand--mark img {
  animation: loader-breathe 1.6s ease-in-out infinite;
}
#global-loader:not(.is-intro) .loader-brand--wordmark {
  display: none;
}
#global-loader:not(.is-intro) .loader-brand--mark {
  display: block;
}
@keyframes loader-focus {
  from { opacity: 0; filter: blur(12px); transform: scale(1.03); }
  to   { opacity: 1; filter: blur(0);    transform: scale(1); }
}
@keyframes loader-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  .loader-brand,
  .loader-brand img {
    animation: none;
  }
}

/* ナビゲーションリンクのアニメーション */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: #9ca3af;
  font-style: italic;
}

/* model-viewerの独自スタイル調整 */
model-viewer {
  width: 100%;
  height: 100%;
  outline: none;
}

/* --------------------------------------------------------------------------
   about. 内 法務情報（プライバシーポリシー / 特定商取引法に基づく表記）
   本文の邪魔をしないよう、極小サイズの折りたたみで格納する。
   -------------------------------------------------------------------------- */
.legal-block summary {
  list-style: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.legal-block summary::-webkit-details-marker {
  display: none;
}
.legal-block summary:hover {
  color: #d1d5db;
}
.legal-block summary::before {
  content: '+ ';
}
.legal-block[open] summary::before {
  content: '− ';
}

/* --------------------------------------------------------------------------
   about. の横スライド（about. ⇄ company.）
   -------------------------------------------------------------------------- */
.about-slider {
  position: relative;            /* 各スライドの offsetLeft の基準にする */
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  border-radius: 0.75rem;
}
.about-slider:focus {
  outline: none;
}
.about-slider:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}
.about-slide {
  flex: 0 0 100%;
  display: flex;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.about-card {
  width: 100%;
}
.about-tabs {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.5rem;
}
.about-tab {
  position: relative;
  padding: 0.25rem 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #9ca3af;
  transition: color 0.3s ease;
}
.about-tab::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: #ffffff;
  transition: left 0.3s ease, width 0.3s ease;
}
.about-tab:hover {
  color: #e5e7eb;
}
.about-tab.is-active {
  color: #ffffff;
}
.about-tab.is-active::after {
  left: 0;
  width: 100%;
}
@media (min-width: 768px) {
  .about-tab {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .about-slider {
    scroll-behavior: auto;
  }
}
