/* =========================================================
   Window of Tomorrow — 六本木アートナイト2026
   ========================================================= */

:root {
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --ink: rgba(255, 255, 255, 0.92);
  --ink-soft: rgba(255, 255, 255, 0.66);
  --ink-faint: rgba(255, 255, 255, 0.42);
  --maxw: 1040px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: #06061a;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
}

/* ---- 背景キャンバス ---- */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
}
/* WebGL非対応時のフォールバック */
body.no-webgl {
  background: linear-gradient(180deg,
    #08081e 0%, #1b1240 14%, #132447 30%,
    #21382c 44%, #2d2455 56%, #5b415a 70%,
    #b7855c 82%, #b89bb7 92%, #c2c8b5 100%);
}

/* ---- フィルムグレイン ---- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 6s steps(6) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -2%); }
  60%  { transform: translate(-2%, 4%); }
  80%  { transform: translate(4%, -3%); }
  100% { transform: translate(0, 0); }
}

.defs { position: absolute; }

/* ---- ナビ ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 48px);
  mix-blend-mode: screen;
}
.nav__logo {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
}
.nav__menu {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
}
.nav__menu a {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.4s var(--ease), opacity 0.4s var(--ease);
}
.nav__menu a:hover { color: var(--ink); }

/* ---- パネル(1画面ごと) ---- */
.panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh clamp(24px, 6vw, 90px);
  scroll-snap-align: start;
}
.panel__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}

/* ---- カテゴリー見出し ---- */
.cat {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 12vw, 168px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  margin-bottom: clamp(36px, 6vh, 88px);
  /* ゆらぎフィルターは main.js で見出しごとに付与し、出現後に収束させる */
}
.cat--sub {
  font-size: clamp(32px, 5vw, 64px);
  margin: clamp(48px, 8vh, 96px) 0 clamp(28px, 4vh, 48px);
}
/* 見出しは main.js で SVG <text> に置き換える。
   グラデーションは SVG の fill、ゆらぎ(液体的な歪み=izanami風)は
   feTurbulence+feDisplacementMap。出現時に強く歪み → なめらかに収束。
   SVG text の fill なので background-clip:text のような帯崩れは起きない。 */
.head-svg {
  display: block;
  height: clamp(64px, 13.5vw, 194px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  overflow: visible;
  opacity: 0;
  transform: translateY(0.12em);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
}
.cat.is-in .head-svg { opacity: 1; transform: none; }
.cat--sub .head-svg { height: clamp(32px, 5vw, 64px); }

/* ---- 汎用リビール ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   HERO
   ========================================================= */
.panel--hero { text-align: center; align-items: center; }
.hero__inner { max-width: 1100px; }
.hero__title { line-height: 0; }
/* タイトルはロゴ画像。出現時に液体ゆらぎフィルター(main.js)をかけて収束させる */
.hero__logo {
  display: block;
  width: min(78vw, 720px);
  height: auto;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(0.1em) scale(0.99);
  transition: opacity 1.1s var(--ease), transform 1.3s var(--ease);
}
.panel--hero.is-in .hero__logo { opacity: 1; transform: none; }

.hero__count {
  margin-top: clamp(28px, 5vh, 56px);
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  font-weight: 300;
}
.hero__count #countdown {
  font-family: var(--serif);
  font-size: 1.5em;
  color: var(--ink);
  margin: 0 0.15em;
}

.scroll-hint {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
}
.scroll-hint span {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.3em;
}
.scroll-hint i {
  width: 1px; height: 46px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent);
  animation: scrollLine 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(46px); opacity: 0; }
}

/* =========================================================
   SHOW INFO
   ========================================================= */
.info__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 40px;
}
.rule { width: clamp(30px, 6vw, 80px); height: 1px; background: rgba(255,255,255,0.5); }
.info__event { font-size: clamp(20px, 3vw, 30px); letter-spacing: 0.12em; font-weight: 400; }
.info__date {
  font-size: clamp(19px, 3.4vw, 32px);
  font-weight: 400;
  letter-spacing: 0.06em;
}
.info__date span { font-size: 0.7em; margin: 0 0.2em; }
.info__date .info__dash { font-size: 0.9em; margin: 0 0.3em; }
.info__note { font-size: 14px; color: var(--ink-soft); margin-top: 10px; letter-spacing: 0.08em; }
.info__place { font-size: clamp(18px, 2.6vw, 26px); margin-top: 42px; letter-spacing: 0.1em; }
.info__place-sub { font-size: 14px; color: var(--ink-soft); margin-top: 8px; letter-spacing: 0.1em; }

/* クレジット */
.credits { max-width: 720px; margin: clamp(44px, 7vh, 80px) auto 0; }
.credits__rule {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  margin-bottom: clamp(28px, 4vh, 44px);
}
.credits__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px clamp(30px, 6vw, 70px);
  text-align: left;
}
.credit { display: grid; grid-template-columns: 152px 1fr; gap: 6px 16px; align-items: baseline; }
.credit dt { font-size: 13px; color: var(--ink-faint); letter-spacing: 0.06em; line-height: 1.6; }
.credit dd { font-size: 14px; color: var(--ink); letter-spacing: 0.06em; line-height: 1.6; }

/* =========================================================
   CONCEPT
   ========================================================= */
.concept__body { max-width: 860px; margin: 0 auto; }
.concept__body p {
  font-size: clamp(14px, 1.7vw, 18px);
  line-height: 2.2;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 2em;
}
.concept__body p:last-child { margin-bottom: 0; }
.concept__body .reveal:nth-child(1) { transition-delay: 0.05s; }
.concept__body .reveal:nth-child(2) { transition-delay: 0.2s; }
.concept__body .reveal:nth-child(3) { transition-delay: 0.35s; }
.concept__body .reveal:nth-child(4) { transition-delay: 0.5s; }

/* =========================================================
   TIMETABLE
   ========================================================= */
.tt { list-style: none; max-width: 780px; margin: 0 auto; text-align: left; }
.tt__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: baseline;
  padding: 30px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.tt__row:first-child { border-top: 1px solid rgba(255, 255, 255, 0.18); }
.tt__time {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.04em;
  text-align: left;
}
.tt__time small { font-size: 0.45em; margin-left: 4px; letter-spacing: 0; }
.tt__title { font-size: clamp(16px, 2.2vw, 22px); font-weight: 500; letter-spacing: 0.04em; }
.tt__at { font-size: 0.7em; font-weight: 400; color: var(--ink-soft); margin-left: 10px; }
.tt__cast { font-size: 14px; color: var(--ink-soft); margin-top: 10px; letter-spacing: 0.04em; }

/* =========================================================
   ARTIST / STAFF
   ========================================================= */
.people {
  list-style: none;
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}
.people--main { grid-template-columns: repeat(3, 1fr); max-width: 720px; margin: 0 auto; }
.people--staff { grid-template-columns: repeat(3, 1fr); max-width: 720px; margin: clamp(40px, 6vh, 76px) auto 0; }
.people__more {
  max-width: 720px;
  margin: clamp(22px, 3vh, 34px) auto 0;
  text-align: right;
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 22px);
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.person__photo {
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  backdrop-filter: blur(2px);
  overflow: hidden;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.96) brightness(0.98);
}
.person:hover .person__photo { transform: translateY(-6px); box-shadow: 0 14px 40px rgba(0,0,0,0.35); }
.person__role { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.08em; }
.person__name { font-size: clamp(15px, 1.8vw, 19px); font-weight: 500; margin-top: 6px; letter-spacing: 0.06em; }
.person__note { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* =========================================================
   ACCESS
   ========================================================= */
.access__addr { font-size: clamp(15px, 2vw, 20px); letter-spacing: 0.08em; color: var(--ink); }
.access__link {
  display: inline-block;
  margin-top: clamp(24px, 4vh, 40px);
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 3px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.access__link:hover { color: #fff; border-color: rgba(255, 255, 255, 0.85); }

/* =========================================================
   CONTACT / FOOTER
   ========================================================= */
.contact__mail {
  display: inline-block;
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s var(--ease), opacity 0.5s var(--ease);
}
.contact__mail:hover { border-color: rgba(255, 255, 255, 0.6); }

.foot {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px clamp(24px, 6vw, 90px);
  background: linear-gradient(180deg, transparent, rgba(20, 18, 34, 0.55));
}
.foot__list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(30px, 6vw, 70px);
  justify-content: center;
}
.foot__list div { display: flex; gap: 16px; align-items: baseline; }
.foot__list dt { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.08em; }
.foot__list dd { font-size: 14px; color: var(--ink-soft); letter-spacing: 0.06em; }
.foot__list dd a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.foot__list dd a:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.5); }
.foot__copy {
  text-align: center;
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 720px) {
  .nav__menu { display: none; }
  .panel { padding: 14vh 22px; }
  .people--main { grid-template-columns: repeat(2, 1fr); }
  .people--staff { grid-template-columns: repeat(2, 1fr); }
  .tt__row { grid-template-columns: 72px 1fr; gap: 26px; }
  .info__head { gap: 12px; }
  .concept__body p br { display: none; }
  .credits__list { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.2s !important; }
  .cat { filter: none; }
  .hero__title { filter: none; }
}

/* =========================================================
   プロフィール モーダル
   ========================================================= */
.person.is-clickable { cursor: pointer; }
.person.is-clickable .person__photo { position: relative; }
.person.is-clickable .person__photo::after {
  content: 'Profile +';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 18px; letter-spacing: 0.08em;
  color: #fff; background: rgba(10, 10, 26, 0.4);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.person.is-clickable:hover .person__photo::after { opacity: 1; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(8, 8, 22, 0.66);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: mFade 0.4s ease;
}
.modal__panel {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(28, 26, 52, 0.94), rgba(18, 16, 36, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 4px;
  padding: clamp(30px, 4vw, 46px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: mRise 0.5s var(--ease);
}
.modal__close {
  position: absolute; top: 12px; right: 18px;
  background: none; border: 0; color: var(--ink-soft);
  font-size: 30px; line-height: 1; cursor: pointer; transition: color 0.3s;
}
.modal__close:hover { color: var(--ink); }
.modal__photo {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 20px; border: 1px solid rgba(255, 255, 255, 0.2);
}
.modal__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal__role { text-align: center; font-size: 12px; letter-spacing: 0.14em; color: var(--ink-soft); }
.modal__name {
  text-align: center; font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 4vw, 38px); letter-spacing: 0.04em; margin-top: 6px;
}
.modal__note { text-align: center; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.modal__profile {
  margin-top: 24px; font-size: 14px; line-height: 2.0; font-weight: 300;
  white-space: pre-line; color: var(--ink); letter-spacing: 0.02em;
}
.modal__links {
  list-style: none; margin-top: 26px; padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.modal__links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 4px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}
.modal__links a:hover { color: #fff; padding-left: 10px; }
.modal__linklabel { font-family: var(--serif); font-size: 16px; letter-spacing: 0.06em; }
.modal__linkarrow { color: var(--ink-soft); font-size: 14px; }
@keyframes mFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mRise {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
