/* ============================================
   BABYMETAL WORLD, LLC
   ============================================ */

:root {
  --bg: #000000;
  --bg-soft: #0a0a0c;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.32);
  --text: #f5f5f7;
  --text-mute: #a8a8b0;
  --text-dim: #6b6b73;
  --accent: #d9d9de;
  --metal-1: #2a2a30;
  --metal-2: #14141a;
  --metal-hi: #6e6e78;

  --cool-1: #cfe6ff;
  --cool-2: #9cc6ee;
  --cool-3: #b9c9e2;
  --cool-4: #b8e6e0;
  --cool-5: #d6e2f0;

  --font-display: 'Cinzel', 'Noto Sans JP', serif;
  --font-body: 'Inter', 'Noto Sans JP', system-ui, sans-serif;

  --maxw: 1200px;
  --pad-x: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(1200px 800px at 50% -10%, rgba(80, 80, 90, 0.18), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(60, 60, 70, 0.12), transparent 60%);
  /* mix-blend-mode: screen は Android (特に AQUOS) で
     固定配置・スクロールと組み合わせるとコンテンツ消失バグを誘発するため削除。
     見た目への影響はほぼ無し（背景が黒のため screen 合成しても加算結果はほぼ同じ）。 */
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* モバイル端末では GPU 合成負荷を軽減（コンテンツ消失バグ対策） */
@media (max-width: 720px) {
  body::after {
    /* SVG ノイズの繰り返し描画はモバイルでは重いため停止 */
    display: none;
  }
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0));
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, background 0.4s ease;
}
/* モバイルでは backdrop-filter が GPU 負荷の主原因になるため停止し、
   代わりに不透明度の高い背景でヘッダーの可読性を担保する */
@media (max-width: 720px) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.88), rgba(0,0,0,0.4));
  }
}
.site-header.scrolled {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.55));
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand img {
  display: block;
  height: clamp(22px, 2.4vw, 30px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.15));
  transition: opacity 0.3s ease;
}
.brand:hover img { opacity: 0.85; }

nav.global {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
nav.global a {
  position: relative;
  padding: 6px 0;
  color: var(--text);
  transition: color 0.3s ease;
}
nav.global a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.35s ease, left 0.35s ease;
}
nav.global a:hover { color: #fff; }
nav.global a:hover::after { width: 100%; left: 0; }

/* ---------- Hamburger (SP only) ---------- */
.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  z-index: 70;
}
.nav-toggle-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 26px;
  height: 1px;
  background: var(--text);
  transform: translate(-50%, -50%);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease, background-color 0.3s ease;
}
.nav-toggle-bar:nth-child(1) { transform: translate(-50%, calc(-50% - 7px)); }
.nav-toggle-bar:nth-child(3) { transform: translate(-50%, calc(-50% + 7px)); }
.nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- SP Nav overlay ---------- */
.sp-nav {
  display: none;
}

@media (max-width: 720px) {
  nav.global { display: none; }

  .nav-toggle { display: block; }

  .site-header { padding: 16px var(--pad-x); }
  .brand img { height: 22px; }

  .sp-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
  }
  .sp-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .sp-nav a {
    position: relative;
    padding: 8px 4px;
    color: var(--text);
    transition: color 0.3s ease, letter-spacing 0.4s ease;
  }
  .sp-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.35s ease, left 0.35s ease;
  }
  .sp-nav a:hover::after,
  .sp-nav a:focus-visible::after { width: 100%; left: 0; }
}

/* ---------- Layout ---------- */
main { position: relative; z-index: 3; }

section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--pad-x);
}

.hero { padding-top: clamp(96px, 11vh, 140px); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.28em;
  text-align: center;
  margin: 0 0 clamp(40px, 6vw, 72px);
  text-transform: uppercase;
  position: relative;
}
.section-title img {
  width: auto;
  height: auto;
  max-height: 85px;
  max-width: 100%;
  object-fit: contain;
}
@media (max-width: 720px) {
  .section-title img { max-height: 64px; }
}
@media (max-width: 480px) {
  .section-title img { max-height: 48px; }
}

#labels .section-title img {
  max-height: 30px;
}
@media (max-width: 720px) {
  #labels .section-title img { max-height: 26px; }
}
@media (max-width: 480px) {
  #labels .section-title img { max-height: 20px; }
}

#labels {
  padding-bottom: clamp(140px, 18vw, 220px);
}

/* ---------- Artists ---------- */
.artists {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 4vw, 56px);
}
@media (max-width: 720px) {
  .artists {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .artist-name {
    font-size: clamp(14px, 4.2vw, 18px);
    letter-spacing: 0.22em;
    margin-top: 14px;
  }
  .artist-card:hover .artist-name {
    letter-spacing: 0.28em;
  }
}

.artist-card {
  position: relative;
  cursor: pointer;
  display: block;
  min-width: 0;
}

.artist-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #050507;
  isolation: isolate;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.5s ease;
}
.artist-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
  filter: saturate(0.92) contrast(1.04);
}
.artist-card:hover .artist-image {
  transform: translateY(-6px);
  border-color: var(--line-strong);
}
.artist-card:hover .artist-image img {
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.06);
}
.artist-image::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.35) 100%);
  z-index: 1;
}

.artist-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 32px);
  letter-spacing: 0.32em;
  text-align: center;
  margin: clamp(20px, 3vw, 36px) 0 0;
  text-transform: uppercase;
  transition: letter-spacing 0.5s ease, text-shadow 0.5s ease;
  position: relative;
  isolation: isolate;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.17),
    0 0 14px rgba(207, 230, 255, 0.15),
    0 0 26px rgba(184, 230, 224, 0.07);
}
.artist-name::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90%;
  height: 180%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse at center,
      rgba(207, 230, 255, 0.28),
      rgba(184, 230, 224, 0.14) 38%,
      transparent 68%);
  filter: blur(6px);
  pointer-events: none;
  z-index: -1;
  animation: artist-name-aura 7s ease-in-out infinite;
}
@keyframes artist-name-aura {
  0%, 100% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  .artist-name::before { animation: none; }
}
/* モバイル端末では GPU 合成負荷軽減のためオーラのアニメーションを停止 */
@media (max-width: 720px) {
  .artist-name::before { animation: none; }
}
.artist-card:hover .artist-name {
  letter-spacing: 0.42em;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.22),
    0 0 18px rgba(207, 230, 255, 0.19),
    0 0 34px rgba(184, 230, 224, 0.10);
}

/* ---------- About + Labels background ---------- */
.about-labels-bg {
  position: relative;
  /* overflow: hidden は Android で内部要素の再合成漏れを誘発するため
     より軽量な clip に変更（hidden に未対応の古いブラウザ用に hidden もフォールバック） */
  overflow: hidden;
  overflow: clip;
}
.about-labels-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(156, 198, 238, 0.14), transparent 60%),
    radial-gradient(700px 400px at 50% 100%, rgba(184, 230, 224, 0.10), transparent 60%);
  z-index: -1;
}
.about-labels-bg > * { position: relative; }
/* 内部の reveal 要素に自前の合成レイヤーを持たせ、
   親レイヤー破棄時のコンテンツ消失を防ぐ */
.about-labels-bg .about-grid,
.about-labels-bg .labels,
.about-labels-bg .section-title {
  transform: translateZ(0);
}

/* ---------- About ---------- */
#about {
  max-width: none;
  padding: clamp(80px, 12vw, 160px) var(--pad-x);
  position: relative;
}

.about-grid {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 18px 28px;
  font-size: 15px;
  line-height: 1.7;
}
@media (max-width: 560px) {
  .about-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .about-grid dt { margin-top: 14px; }
}
.about-grid dt {
  color: var(--text-mute);
  font-weight: 300;
  letter-spacing: 0.08em;
}
.about-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ---------- Labels ---------- */
.labels {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 40px);
}
.label-card {
  width: clamp(220px, 28vw, 280px);
  aspect-ratio: 1 / 1;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0px solid var(--line);
  position: relative;
  overflow: visible;
  padding: 22px;
  transition: none;
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.08),
    0 0 50px rgba(255, 255, 255, 0.05),
    0 0 90px rgba(255, 255, 255, 0.03);
}
.label-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}
.label-card:hover {
  transform: none;
  border-color: var(--line);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.08),
    0 0 50px rgba(255, 255, 255, 0.05),
    0 0 90px rgba(255, 255, 255, 0.03);
}
.label-card:hover img {
  transform: none;
  filter: none;
}

@media (max-width: 720px) {
  .labels {
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
  }
  .label-card {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    max-width: 50%;
    padding: 16px;
  }
}
@media (max-width: 480px) {
  .labels { gap: 8px; }
  .label-card { padding: 10px; }
}

/* ---------- Contact ---------- */
#contact {
  padding: clamp(80px, 12vw, 140px) var(--pad-x);
  text-align: center;
  /* 自前の合成レイヤーを確保し、近傍の重い合成（label-card-glow 等）の
     影響でセクション内コンテンツが消えるのを防ぐ */
  position: relative;
  z-index: 3;
}
#contact .section-title,
#contact .contact-cta {
  transform: translateZ(0);
}

.contact-cta {
  display: flex;
  justify-content: center;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  padding: 18px 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, letter-spacing 0.4s ease;
}
.btn-outline:hover {
  background: var(--text);
  color: #000;
  border-color: var(--text);
  letter-spacing: 0.3em;
}

/* ---------- Footer ---------- */
footer {
  padding: 40px var(--pad-x) 56px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 3;
}

/* ---------- Page Top Button ---------- */
.page-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0.45s ease,
    box-shadow 0.3s ease;
  text-decoration: none;
}
.page-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.page-top:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.50),
    0 3px 8px rgba(0, 0, 0, 0.40);
}
.page-top-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #1a1a1a;
  border-right: 2px solid #1a1a1a;
  transform: rotate(-45deg);
  margin-top: 4px;
}
@media (max-width: 720px) {
  .page-top {
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
  }
  .page-top-icon {
    width: 10px;
    height: 10px;
  }
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
  /* will-change / backface-visibility は意図的に外している。
     常時付与すると Android Chrome 等で GPU レイヤーが大量確保され、
     省電力時のレイヤー破棄でコンテンツが消える事象を誘発するため。
     アニメーション中のみ JS で will-change を付与し、終了後に解放する。 */
}
.reveal.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  /* GPU レイヤーを即解放（再描画破棄による消失を防止） */
  will-change: auto;
}
.no-js .reveal,
.reveal.is-fallback {
  opacity: 1;
  transform: none;
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
