/* ==========================================================
   SQUARE ENIX NEXUS - SP first / PC (>=768px)
   Figma: SP 393px, PC 1920px
   ========================================================== */

:root {
  --color-bg-dark: #0f0f0f;
  --color-bg-light: #333;
  --color-text: #ccc;
  --color-text-dark: #111;
  --color-text-news: #333;
  --color-news-accent: #8189a2;
  --font-base: "Noto Sans JP", sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: #000;
}

/* ---------- 共通テンプレートとの連携 ----------
   ヘッダー(#sqexHeader-black)・フッター(#sqexFooter)は共通テンプレートの
   CSS/JS に任せ、サイト個別のスタイルは #contents の中だけに当てる */
#wp {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  /* 背景グラデーションはページ全面 (フェードイン中も背景が途切れない)
     下側 45% は黒のまま、そこから #4e535e へ。黒を増やすなら 45% を大きく */
  background-image: linear-gradient(330deg, #000000 45%, #4e535e 100%);
}

#contents {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* template2.0.css の #contents { margin:0 auto; background:#fff; color:#000 } を上書き
     (margin:auto のままだと flex 子要素が内容幅に縮む) */
  width: 100%;
  margin: 0;
  background: transparent;
  color: var(--color-text);
}

:where(#contents) *,
:where(#contents) *::before,
:where(#contents) *::after {
  box-sizing: border-box;
}

/* :where() で詳細度を 0 にし、個別クラスの指定を邪魔しない */
:where(#contents) img {
  display: block;
  max-width: none;
}

:where(#contents) h1,
:where(#contents) h2,
:where(#contents) p,
:where(#contents) ul {
  margin: 0;
  padding: 0;
}

:where(#contents) ul {
  list-style: none;
}

/* ---------- Main ---------- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.25));
}

/* ---------- Key visual ----------
   画像(kv-sp.webp / kv-pc.webp)にキャラ・OFFICIAL GOODS SHOP・ロゴが含まれる
   SP は余白を除いた幅いっぱいに拡縮、PC は最大 640px */
.kv {
  flex-shrink: 0;
  width: 100%;
  /* 上下左右の余白は画面幅比例 (393px 幅で 25px = 6.36%) */
  padding: 6.36%;
}

.kv__title {
  width: 100%;
  margin: 0 auto;
}

.kv__img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* ---------- GRAND OPEN ----------
   テキストは画像(open-sp.webp / open-pc.webp)。上下余白 24px
   表示幅は --open-width で調整 (SP は 画像 506 / デザイン幅 780 = 64.87%) */
.open {
  --open-width: 64.87%;
  flex-shrink: 0;
  width: 100%;
  padding: 24px 0;
  background: #272931;
}

.open__title {
  width: var(--open-width);
  max-width: 100%;
  margin: 0 auto;
}

.open__img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- News ---------- */
.news {
  flex-shrink: 0;
  width: 100%;
  padding: 24px clamp(20px, 5.09vw, 40px) 30px;
  background: #e6e6e6;
  color: var(--color-text-news);
}

/* 枠は全幅、中身だけ最大 1000px */
.news__inner {
  max-width: 1000px;
  margin: 0 auto;
}

.news__heading {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.news__heading-img {
  display: block;
  /* デザイン幅 780 に対し 220 = 28.21% (SP は画面幅比例) */
  width: 28.21vw;
  height: auto;
}

/* SP: 一覧は高さ固定でスクロール (3件ぶん表示) */
.news__list {
  max-height: clamp(360px, 91.6vw, 560px);
  margin-right: -8px;
  padding-right: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.news__list::-webkit-scrollbar {
  width: 8px;
}

.news__list::-webkit-scrollbar-track {
  background: transparent;
}

.news__list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #ccc;
}

.news__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
}

/* ◇ 2026.XX.XX */
.news__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-family: "Jost", var(--font-base);
  font-size: clamp(16px, 4.07vw, 22px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-news-accent);
}

.news__date::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* タイトル(行ごとに下線) + 文末に別窓アイコン */
.news__link {
  display: block;
  color: var(--color-text-dark);
  text-decoration: none;
}

.news__title {
  font-size: clamp(16px, 4.07vw, 22px);
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.news__icon {
  display: inline-block;
  width: clamp(15px, 3.82vw, 21px);
  height: auto;
  margin-left: 10px;
  vertical-align: -1px;
  flex-shrink: 0;
  color: var(--color-news-accent);
}

.news__link:hover .news__title {
  text-decoration-color: var(--color-news-accent);
}

/* ==========================================================
   PC
   ========================================================== */
@media (min-width: 768px) {
  .kv {
    padding: 50px 0;
  }

  .kv__title {
    max-width: 640px;
  }

  .open {
    --open-width: 647px;
  }

  .news {
    padding: 48px 40px 80px;
  }

  .news__date,
  .news__title {
    font-size: 16px;
  }

  .news__icon {
    width: 15px;
  }

  .news__list {
    max-height: none;
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
  }

  .news__heading {
    margin-bottom: 40px;
  }

  .news__heading-img {
    width: 114px;
  }

  .news__item {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
  }

  .news__date {
    flex: 0 0 120px;
  }

  .news__link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
  }

  .news__icon {
    margin-left: 0;
    vertical-align: baseline;
  }
}

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
