/**
 * BLOOM Festival - Common CSS
 * 共通スタイルを一箇所に集約
 *
 * 含まれるスタイル:
 * 1. CSS変数（:root）
 * 2. ロゴカード（.logo-card）
 * 3. ヒーローグラデーション（.hero::after, body::before）
 * 4. スクロール時のスタイル変更（body.scrolled）
 * 5. 言語スイッチャー（.lang-switcher）
 * 6. スクロールインジケーター（.scroll-indicator）
 * 7. リンクナビ要素（.linkartists, .linkname, .linkseparate）
 * 8. アニメーション（@keyframes）
 * 9. アクセシビリティ対応（prefers-reduced-motion）
 */

/* ============================================
   1. CSS変数（デフォルト値）
   ============================================ */
:root {
  --grad-left: #95c967;
  --grad-right: #de5f92;
  --grad-height: 120px;
  --card-rotate: -8deg;
  --hero-height: 100vh;
}

/* ============================================
   2. 共通ボディスタイル
   ============================================ */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #ffffff;
}

/* ============================================
   3. ロゴカード
   ============================================ */
.logo-card {
  position: fixed;
  left: 50%;
  top: clamp(0px, calc(3vh - 50px), 70px);
  transform: translateX(-50%);
  z-index: 110;
  box-sizing: border-box;
  width: min(78vw, 500px);
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.6vw, 18px);
  padding: clamp(10px, 2.0vw, 20px) clamp(12px, 3vw, 40px);
  transition: top 0.4s ease, width 0.4s ease, padding 0.4s ease, gap 0.2s ease;
}

.logo-card > a {
  border-bottom: none;
}

.logo-card img {
  display: block;
  max-width: 100%;
  max-height: clamp(32px, 8vw, 100px);
  width: auto;
  height: auto;
  margin: 0;
  transition: max-height 0.4s ease;
  flex: 0 0 auto;
}

.logo-card img,
.logo-card svg {
  transition: max-height 0.3s ease;
}

.logo-card::before {
  content: "";
  position: absolute;
  inset: -100px 0 -10px 0;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow:
    0 18px 50px rgba(0,0,0,0.25),
    0 6px 16px rgba(0,0,0,0.18),
    0 1px 2px rgba(0,0,0,0.15);
  transform: rotate(var(--card-rotate));
  transform-origin: 50% 50%;
  z-index: -1;
  pointer-events: none;
  transition: inset 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

/* ============================================
   4. リンクナビ要素
   ============================================ */
.linkartists {
  display: none;
  font-family: futura-100-latin-ext, sans-serif;
  font-weight: 900;
  font-size: clamp(10px, 2vw, 16px);
  color: #333;
  text-decoration: none;
  padding-left: 8px;
}

.linkname {
  display: none;
  font-family: futura-100-latin-ext, sans-serif;
  font-weight: 900;
  font-size: clamp(10px, 2vw, 16px);
  color: #333;
  text-decoration: none;
}

.linkseparate {
  display: none;
  font-family: futura-100-latin-ext, sans-serif;
  font-weight: 400;
  font-size: clamp(10px, 2vw, 16px);
  color: #333;
}

/* ============================================
   5. ヒーローセクション
   ============================================ */
.hero {
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: var(--grad-height);
  z-index: 100;
  pointer-events: none;
  background: linear-gradient(90deg, var(--grad-left) 0%, var(--grad-right) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  display: none;
  transition: height 0.45s cubic-bezier(.2,.8,.2,1), opacity 0.35s ease;
  will-change: filter;
}

/* ============================================
   6. body::before グラデーション
   ============================================ */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--grad-height);
  z-index: 15;
  pointer-events: none;
  background: linear-gradient(90deg, var(--grad-left) 0%, var(--grad-right) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  transition: height 0.45s cubic-bezier(.2,.8,.2,1), opacity 0.35s ease;
  will-change: filter;
}

/* ============================================
   7. スクロール時のスタイル変更
   ============================================ */
body.scrolled {
  --card-rotate: 0deg;
  --grad-height: 50px;
}

body.scrolled .logo-card {
  text-align: left;
  justify-content: left;
  width: 100%;
  max-width: 100%;
  top: -3px;
  padding: clamp(10px, 2.2vw, 28px) clamp(18px, 3vw, 40px);
  padding-bottom: 0px;
}

body.scrolled .logo-card img {
  display: inline-block;
  max-height: clamp(28px, 50px, 60px);
}

body.scrolled .logo-card img,
body.scrolled .logo-card svg {
  transition: max-height 0.3s ease;
}

body.scrolled .linkartists {
  display: inline-block;
}

body.scrolled .linkname {
  display: inline-block;
}

body.scrolled .linkseparate {
  display: inline-block;
}

body.scrolled .hero::after {
  height: var(--grad-height);
}

/* ============================================
   8. 言語スイッチャー
   ============================================ */
.lang-switcher {
  position: absolute;
  bottom: 32px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 16px;
}

.lang-switcher a {
  margin: 0 8px;
  text-decoration: none;
  color: #333;
}

.lang-switcher a:hover {
  text-decoration: underline;
}

/* ============================================
   9. スクロールインジケーター
   ============================================ */
.scroll-indicator {
  position: fixed;
  left: 50%;
  bottom: 0px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 25;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.scrollbar-text_05 {
  display: inline-block;
  position: absolute;
  bottom: 0;
  padding: 10px 10px 110px;
  color: #010101;
  font-size: 14px;
  font-family: serif;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-lr;
  left: 50%;
  transform: translateX(-50%);
}

.scrollbar_05 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1px;
}

.scrollbar_05::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 100px;
  background: #000000;
  animation: liner 2.5s cubic-bezier(1, 0, 0, 1) infinite;
}

/* ============================================
   10. アニメーション
   ============================================ */
@keyframes liner {
  0% {
    transform: scale(1, 0);
    transform-origin: 0 0;
  }
  30% {
    transform: scale(1, 1);
    transform-origin: 0 0;
  }
  70% {
    transform: scale(1, 1);
    transform-origin: 0 100%;
  }
  100% {
    transform: scale(1, 0);
    transform-origin: 0 100%;
  }
}

@keyframes hueShift {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

body::before,
.hero::after {
  animation: hueShift 20s linear infinite;
  transform: translateZ(0);
}

/* ============================================
   11. アクセシビリティ対応
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  body::before,
  .hero::after {
    animation: none !important;
  }
  .scrollbar_05::after {
    animation: none !important;
  }
}

/* ============================================
   12. モバイル対応
   ============================================ */
@media screen and (max-width: 767px) {
  .linkartists {
    padding-left: 0px;
  }
  .linkname,
  .linkseparate {
    display: none !important;
  }
}
