/* =====================================================
   Detail page layout (Bloom Prison / Metaverse 共通)
   写真中心 + スクロール連動アニメーション
   ===================================================== */

/* === Hero with animated cover === */
.dHero {
  position: relative;
  min-height: 80vh;
  padding: 140px var(--pad-x) 80px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.dHero__cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: dKenBurns 22s ease-in-out infinite alternate;
}
.dHero__cover--bloom {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,74,209,0.30), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(182,255,60,0.18), transparent 60%),
    linear-gradient(135deg, #1a0a14 0%, #2a1a3a 100%);
}
.dHero__cover--meta {
  background:
    radial-gradient(circle at 30% 30%, rgba(92,242,255,0.30), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,74,209,0.20), transparent 60%),
    linear-gradient(135deg, #07101e 0%, #1a1a3a 100%);
}
@keyframes dKenBurns {
  0%   { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.18) translate(-2%, -1.5%); }
}
.dHero__veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom,
    rgba(7,7,10,0.15) 0%,
    rgba(7,7,10,0.55) 60%,
    rgba(7,7,10,0.92) 100%);
}
.dHero__inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
}
.dHero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; color: var(--ink-3);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.dHero__title {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
/* em の font-family/style はグローバル (`em` と `:lang(ja) em`) に任せる。
   日本語=サンセリフ太字、英語=Instrument Serif normal、色は --accent。 */
.dHero__cover--meta + .dHero__veil ~ .dHero__inner .dHero__title em {
  color: var(--accent-2);
}
.dHero__sub {
  margin-top: 26px; max-width: 620px;
  color: var(--ink-2); font-size: 16px; line-height: 1.7;
}
.dHero__chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px;
}

/* === Block container === */
.dBlock {
  padding: 90px var(--pad-x);
  max-width: var(--maxw); margin: 0 auto;
}
.dBlock--tight { padding-top: 40px; padding-bottom: 40px; }

/* === Scroll reveal === */
.dReveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.dReveal.is-visible { opacity: 1; transform: translateY(0); }
.dReveal--lateA { transition-delay: 0.08s; }
.dReveal--lateB { transition-delay: 0.16s; }

/* === Image figure (placeholder + img auto-swap) === */
.dImg {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 30%, rgba(92,242,255,0.08), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255,74,209,0.06), transparent 60%),
    var(--bg-2);
  aspect-ratio: 16 / 9;
}
.dImg--square { aspect-ratio: 1 / 1; }
.dImg--portrait { aspect-ratio: 3 / 4; }
.dImg--cinema { aspect-ratio: 21 / 9; }
.dImg__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  padding: 20px; text-align: center;
}
.dImg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.dImg:hover img { transform: scale(1.06); }

/* === Caption === */
.dCap {
  margin-top: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; color: var(--ink-3);
  letter-spacing: 0.05em; line-height: 1.6;
}
.dCap__title {
  display: block;
  color: var(--ink-1);
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px; font-weight: 500;
  margin-bottom: 6px; letter-spacing: -0.01em;
}

/* === Two-column split (image + text) === */
.dSplit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.dSplit__txt h3 {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  line-height: 1.2;
  font-weight: 600;
}
/* em の書体はグローバルに委ねる */
.dSplit__txt p {
  color: var(--ink-2);
  line-height: 1.75;
  font-size: 15px;
  margin: 0 0 14px;
}

/* === 3-column grid === */
.dGrid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* === Cinematic full-bleed === */
.dCinema {
  position: relative;
  min-height: 75vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin: 60px 0;
}
.dCinema__bg {
  position: absolute; inset: -10% 0;
  z-index: 0;
  will-change: transform;
}
.dCinema__bg .dImg__ph {
  position: absolute; inset: 0;
}
.dCinema__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.dCinema__veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg,
    rgba(7,7,10,0.75) 0%,
    rgba(7,7,10,0.30) 50%,
    rgba(7,7,10,0.15) 100%);
}
.dCinema__txt {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: 40px var(--pad-x); width: 100%;
}
.dCinema__h {
  font-size: clamp(28px, 4.5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 760px;
  margin: 0;
  font-weight: 600;
}
/* em の書体はグローバルに委ねる */

/* === Pager (next page nav) === */
.dPager {
  display: flex; justify-content: space-between; align-items: center;
  padding: 60px var(--pad-x);
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--line);
}
.dPager__back, .dPager__next {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-2); text-decoration: none;
  font-size: 14px;
  transition: color .25s ease;
}
.dPager__back:hover, .dPager__next:hover { color: var(--accent); }
.dPager__lbl {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.08em;
  display: block; margin-bottom: 4px;
}

/* === Project gallery (metaverse.html 用) === */
.dProject {
  padding: 70px var(--pad-x) 50px;
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--line);
}
.dProject:first-of-type { border-top: none; padding-top: 30px; }
.dProject__head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.dProject__n {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; color: var(--accent-2);
  letter-spacing: 0.1em;
}
.dProject__title {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600; margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.dProject__title em {
  color: var(--ink-2);
  margin-left: 10px;
  font-size: 0.65em;
  letter-spacing: 0;
}
.dProject__desc {
  color: var(--ink-2);
  font-size: 14px; line-height: 1.75;
  margin: 0 0 30px;
  max-width: 720px;
}
.dPGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dPItem {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: zoom-in;
}
.dPItem img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .4s;
  opacity: 0.92;
}
.dPItem:hover img {
  transform: scale(1.06);
  opacity: 1;
}

/* === Lightbox === */
.dLB {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(7,7,10,0.96);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.dLB.is-open { display: flex; }
.dLB__img {
  max-width: 95vw; max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.dLB__close {
  position: absolute; top: 18px; right: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px; color: var(--ink-2);
  background: none; border: none; cursor: pointer;
  padding: 8px 12px;
  letter-spacing: 0.1em;
}
.dLB__close:hover { color: var(--accent); }
.dLB__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--ink-1);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 22px;
  transition: background .25s;
}
.dLB__nav:hover { background: rgba(182,255,60,0.15); }
.dLB__nav--prev { left: 24px; }
.dLB__nav--next { right: 24px; }
.dLB__caption {
  position: absolute; bottom: 24px; left: 0; right: 0;
  text-align: center;
  color: var(--ink-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.05em;
}

@media (max-width: 1100px) {
  .dPGrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .dSplit { grid-template-columns: 1fr; gap: 32px; }
  .dGrid3 { grid-template-columns: 1fr 1fr; }
  .dHero { min-height: 60vh; padding-top: 110px; }
  .dCinema { min-height: 50vh; }
  .dPGrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .dGrid3 { grid-template-columns: 1fr; }
  .dPager { flex-direction: column; gap: 24px; align-items: stretch; }
  .dPGrid { gap: 8px; }
  .dLB__nav { width: 40px; height: 40px; }
  .dLB__nav--prev { left: 8px; }
  .dLB__nav--next { right: 8px; }
}
