@charset "UTF-8";
/* ==========================================================================
   ALPHAZ — NEWS 一覧（home.php）・NEWS 詳細（single.php）
   --------------------------------------------------------------------------
   Figma: PC 175:9485（1440）/ SP 183:1099（375）
   ヒーローは下層共通の .page-hero（common.css / 動きは motion.css）。

   01. List          02. Pagination（.c-pagination。Figma のボタン位置に置き換え）
   03. Motion（JS は assets/js/motion.js）
   04. Article（NEWS 詳細。Figma PC 175:9769 / SP デザインなし）
   05. Article body（ブロックエディタの本文）
   06. Article motion
   ========================================================================== */

.news {
  --pad: max(20px, calc(108 * var(--s)));
  overflow-x: clip;
}

/* ==========================================================================
   01. List
   --------------------------------------------------------------------------
   罫線は border ではなく疑似要素で引く（線が伸びる演出のため。03. Motion）
   ========================================================================== */
.news-list {
  background: var(--c-white);
}

.news-list__inner {
  max-width: calc(1440 * var(--s));
  margin: 0 auto;
  padding: calc(76 * var(--s)) var(--pad) calc(115 * var(--s));
}

.news-list__item {
  --news-line: #b8b8b2;
  position: relative;
}

.news-list__item::after,
.news-list__item:first-child::before {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--news-line);
  content: "";
}

.news-list__item::after {
  bottom: 0;
}

.news-list__item:first-child::before {
  top: 0;
}

.news-list__link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(24 * var(--s));
  min-height: calc(178 * var(--s));
  padding: calc(28 * var(--s)) calc(34 * var(--s)) calc(26 * var(--s)) 0;
  overflow: hidden;
  isolation: isolate;
}

.news-list__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--s));
  color: #787872;
  font-family: var(--font-en);
  transition: color 0.3s ease;
}

.news-list__date {
  font-size: max(12px, calc(12 * var(--s)));
  line-height: 1.2;
  letter-spacing: 0.125em;
}

/* Bebas を line-height 14px（キャップハイト）で組み、上下 5px の枠 */
.news-list__cat {
  padding: calc(6 * var(--s)) calc(5 * var(--s)) calc(4 * var(--s));
  border: 1px solid currentColor;
  font-size: max(13px, calc(20 * var(--s)));
  line-height: 0.7;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-list__story {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--s));
}

.news-list__title {
  flex: 1;
  min-width: 0;
  color: #080808;
  font-size: max(13px, calc(15 * var(--s)));
  font-weight: 700;
  line-height: 1.6;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-list__story .icon {
  flex-shrink: 0;
  width: calc(16 * var(--s));
  height: calc(16 * var(--s));
  transition: transform var(--dur) var(--ease-out);
}

.news-list__empty {
  padding: calc(40 * var(--s)) 0;
  border-top: 1px solid #b8b8b2;
  border-bottom: 1px solid #b8b8b2;
  font-size: max(13px, calc(15 * var(--s)));
  font-weight: 700;
  text-align: center;
}

@media (max-width: 767px) {
  .news {
    --pad: 20px;
  }

  .news-list__inner {
    padding: 60px var(--pad);
  }

  .news-list__link {
    justify-content: flex-start;
    gap: 30px;
    min-height: 0;
    padding: 26px 0;
  }

  .news-list__date {
    font-size: 13px;
    letter-spacing: 0;
  }

  .news-list__cat {
    padding: 4px 5px;
    font-size: 18px;
    line-height: 18px;
    letter-spacing: 0;
  }

  .news-list__story {
    gap: 16px;
  }

  .news-list__title {
    font-size: 14px;
    line-height: 1.8;
  }

  .news-list__story .icon {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================================================
   02. Pagination
   --------------------------------------------------------------------------
   Figma は「詳細はこちら」ボタンだったが、一覧なのでページ番号に置き換え
   （2026-10-14 ジョニー確認済み）。トーンはボタン（黒地・黄矢印）に揃える。
   中身は paginate_links() の出力（a / span.current / span.dots / a.prev / a.next）。
   ========================================================================== */
.c-pagination {
  margin-top: calc(70 * var(--s));
}

.c-pagination__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(8 * var(--s));
}

.c-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  /* タブレットでも押しやすい大きさ（36px）は確保 */
  min-width: max(36px, calc(44 * var(--s)));
  height: max(36px, calc(44 * var(--s)));
  padding: 0 calc(8 * var(--s));
  border: 1px solid #b8b8b2;
  color: #080808;
  font-family: var(--font-en);
  font-size: max(13px, calc(20 * var(--s)));
  line-height: 1;
  letter-spacing: 0.05em;
  transition:
    background-color var(--dur) ease,
    border-color var(--dur) ease,
    color var(--dur) ease;
}

.c-pagination .page-numbers.current {
  border-color: var(--c-black);
  background: var(--c-black);
  color: var(--c-accent);
}

.c-pagination .page-numbers.dots {
  min-width: calc(24 * var(--s));
  padding: 0;
  border-color: transparent;
  color: #787872;
}

/* 前へ・次へ: 黒地に黄色い矢印（ボタンと同じ） */
.c-pagination .prev,
.c-pagination .next {
  border-color: var(--c-black);
  background: var(--c-black);
  color: var(--c-accent);
}

.c-pagination .page-numbers .icon {
  width: calc(16 * var(--s));
  height: calc(16 * var(--s));
  transition: transform var(--dur) var(--ease-out);
}

.c-pagination .prev .icon {
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .c-pagination a.page-numbers:not(.prev, .next):hover {
    border-color: var(--c-black);
    background: var(--c-black);
    color: var(--c-white);
  }

  .c-pagination .next:hover .icon {
    transform: translateX(calc(3 * var(--s)));
  }

  .c-pagination .prev:hover .icon {
    transform: rotate(180deg) translateX(calc(3 * var(--s)));
  }
}

@media (max-width: 767px) {
  .c-pagination {
    margin-top: 40px;
  }

  .c-pagination__list {
    gap: 6px;
  }

  .c-pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* ==========================================================================
   03. Motion
   --------------------------------------------------------------------------
     ヒーロー: 下層共通（motion.css「Page hero」）
     記事    : 画面に入った行から、下線が左から伸び、中身が下からふわっと
               （最初に見えている行は 0.08s ずつずらす）
     ホバー  : TOP の NEWS と同じ。黄色い帯が斜めに左から差し込み、タイトルが右へ、矢印が右上へ
   ========================================================================== */
.motion-ok .news-list__item::after,
.motion-ok .news-list__item:first-child::before {
  transform: scaleX(0);
  transform-origin: left center;
}

.motion-ok .news-list__item.is-inview::after,
.motion-ok .news-list__item.is-inview:first-child::before {
  transform: none;
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--i) * 0.08s);
}

.motion-ok .news-list__link {
  opacity: 0;
  transform: translateY(calc(16 * var(--s)));
}

.motion-ok .news-list__item.is-inview .news-list__link {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s ease calc(0.25s + var(--i) * 0.08s),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) calc(0.25s + var(--i) * 0.08s);
}

/* ホバーの黄色い帯（行いっぱい。斜めの分だけ左右へ広げ、はみ出しは行の枠で切る） */
.news-list__link::after {
  position: absolute;
  inset: 0 calc(-80 * var(--s));
  z-index: -1;
  background: var(--c-accent);
  transform: scaleX(0) skewX(-14deg);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  content: "";
}

@media (hover: hover) and (pointer: fine) {
  .news-list__link:hover::after {
    transform: scaleX(1) skewX(-14deg);
  }

  .news-list__link:hover .news-list__meta {
    color: var(--c-black);
  }

  .news-list__link:hover .news-list__title {
    transform: translateX(calc(8 * var(--s)));
  }

  .news-list__link:hover .icon {
    transform: translate(calc(3 * var(--s)), calc(-3 * var(--s)));
  }
}

/* ==========================================================================
   04. Article（NEWS 詳細）
   --------------------------------------------------------------------------
   本文の幅は 996（1440 の中央）。カテゴリーの見た目は一覧と同じ（.news-list__cat）。
   ========================================================================== */
.news-article {
  background: var(--c-white);
  color: var(--c-black);
}

.news-article__inner {
  max-width: calc(996 * var(--s) + 2 * 20px);
  margin: 0 auto;
  padding: calc(100 * var(--s)) 20px calc(120 * var(--s));
}

.news-article__meta {
  display: flex;
  color: #787872;
  font-family: var(--font-en);
}

.news-article__title {
  margin-top: calc(20 * var(--s));
  font-size: max(26px, calc(45 * var(--s)));
  font-weight: 700;
  line-height: 1.4444;
}

.news-article__lead {
  margin-top: calc(20 * var(--s));
  font-size: max(15px, calc(18 * var(--s)));
  font-weight: 400;
  line-height: 2.1111;
}

.news-article__thumb {
  margin: calc(60 * var(--s)) 0 0;
  aspect-ratio: 996 / 652;
  overflow: hidden;
  border: 1px solid #dedede;
  background: #f5f5f5;
}

.news-article__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-article__back {
  margin-top: calc(60 * var(--s));
  text-align: center;
}

@media (max-width: 767px) {
  .news-article__inner {
    padding: 48px 20px 64px;
  }

  .news-article__meta {
    font-size: 18px;
  }

  .news-article__title {
    margin-top: 16px;
    font-size: 24px;
    line-height: 1.5;
  }

  .news-article__lead {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.9;
  }

  .news-article__thumb {
    margin-top: 32px;
  }

  .news-article__back {
    margin-top: 48px;
  }

  .news-article__back .c-btn {
    width: 100%;
  }
}

/* ==========================================================================
   05. Article body（ブロックエディタの本文）
   --------------------------------------------------------------------------
   Figma の記事見本（175:9872）に合わせた本文の見た目。
     本文      18px / 行間 38px（Regular）
     H2        30px Black
     H3        30px Black ＋ 左に黒い縦線 3px
     H4        25px Bold
     H5        18px Bold
     画像      枠線 #dedede
     2カラム   「カラム」「メディアと文章」ブロック。間隔 20px、SP は縦積み
     ボックス  グループブロックのスタイル「ボックス（グレー）」（inc/setup.php で登録）
   ブロック同士の間隔: 基本 30px、見出しの前は 60px、見出しの直後は 20px。
   ========================================================================== */
.news-article__body {
  margin-top: calc(60 * var(--s));
  font-size: max(15px, calc(18 * var(--s)));
  font-weight: 400;
  line-height: 2.1111;
  overflow-wrap: anywhere;
}

.news-article__body > * + * {
  margin-top: calc(30 * var(--s));
}

.news-article__body > :is(h2, h3, h4, h5, h6) {
  margin-top: calc(60 * var(--s));
}

.news-article__body > :first-child {
  margin-top: 0;
}

.news-article__body > :is(h2, h3, h4, h5, h6) + * {
  margin-top: calc(20 * var(--s));
}

/* Figma は見出しを行間なし（行の高さ＝文字サイズ）で組んで 20px 空けている。
   ここでは 2行になっても読めるよう行間を付けた分、直後の余白を詰めて見た目の間隔を合わせる */
.news-article__body > :is(h2, h3) + * {
  margin-top: calc(11 * var(--s));
}

.news-article__body > h4 + * {
  margin-top: calc(13 * var(--s));
}

.news-article__body > :is(h5, h6) + * {
  margin-top: calc(23 * var(--s));
}

.news-article__body h2 {
  font-size: max(21px, calc(30 * var(--s)));
  font-weight: 900;
  line-height: 1.3;
}

.news-article__body h3 {
  padding-left: calc(17 * var(--s));
  border-left: 3px solid var(--c-black);
  font-size: max(19px, calc(30 * var(--s)));
  font-weight: 900;
  line-height: 1.3;
}

.news-article__body h4 {
  font-size: max(18px, calc(25 * var(--s)));
  font-weight: 700;
  line-height: 1.4;
}

.news-article__body :is(h5, h6) {
  font-size: max(15px, calc(18 * var(--s)));
  font-weight: 700;
  line-height: 1.6667;
}

.news-article__body a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: opacity var(--dur) ease;
}

.news-article__body a:hover {
  opacity: 0.6;
}

.news-article__body strong {
  font-weight: 700;
}

.news-article__body :is(ul, ol):not([class*="wp-block-"]):not(.blocks-gallery-grid) {
  padding-left: 1.5em;
}

.news-article__body li + li {
  margin-top: 0.3em;
}

/* 画像 */
.news-article__body figure {
  margin-right: 0;
  margin-left: 0;
}

.news-article__body :is(.wp-block-image, .wp-block-media-text__media) img {
  border: 1px solid #dedede;
}

.news-article__body figcaption {
  margin-top: 0.6em;
  color: #787872;
  font-size: max(12px, calc(14 * var(--s)));
  line-height: 1.6;
}

/* 2カラム（カラム／メディアと文章） */
.news-article__body .wp-block-columns {
  gap: calc(20 * var(--s));
  margin-bottom: 0;
}

.news-article__body .wp-block-column > * + * {
  margin-top: calc(20 * var(--s));
}

.news-article__body .wp-block-media-text {
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: calc(20 * var(--s));
}

.news-article__body .wp-block-media-text.has-media-on-the-right {
  grid-template-columns: 1fr 1fr;
}

.news-article__body .wp-block-media-text__content {
  padding: 0;
}

/* Figma は文章と画像の上端揃え（エディタで「中央揃え」「下揃え」を選んだ時はそれに従う） */
.news-article__body .wp-block-media-text:not(.is-vertically-aligned-center):not(.is-vertically-aligned-bottom) > * {
  align-self: start;
}

/* ボックス（グループのスタイル「ボックス（グレー）」） */
.news-article__body .is-style-alphaz-box {
  padding: calc(20 * var(--s));
  border: 1px solid #e4e4e4;
  border-radius: calc(10 * var(--s));
  background: #f5f5f5;
}

.news-article__body .is-style-alphaz-box > * + * {
  margin-top: calc(20 * var(--s));
}

@media (max-width: 767px) {
  .news-article__body {
    margin-top: 40px;
    font-size: 15px;
    line-height: 1.9;
  }

  .news-article__body > * + * {
    margin-top: 24px;
  }

  .news-article__body > :is(h2, h3, h4, h5, h6) {
    margin-top: 44px;
  }

  .news-article__body > :is(h2, h3, h4, h5, h6) + *,
  .news-article__body > :is(h2, h3) + *,
  .news-article__body > h4 + *,
  .news-article__body > :is(h5, h6) + * {
    margin-top: 16px;
  }

  .news-article__body h2 {
    font-size: 21px;
  }

  .news-article__body h3 {
    padding-left: 12px;
    font-size: 19px;
  }

  .news-article__body h4 {
    font-size: 18px;
  }

  .news-article__body :is(h5, h6) {
    font-size: 15px;
  }

  .news-article__body .wp-block-columns {
    gap: 16px;
  }

  /* メディアと文章は SP で縦積み（画像が上） */
  .news-article__body .wp-block-media-text,
  .news-article__body .wp-block-media-text.has-media-on-the-right {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .news-article__body .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
    grid-row: 1;
  }

  .news-article__body .wp-block-media-text .wp-block-media-text__content {
    grid-row: 2;
    grid-column: 1;
    padding: 0;
  }

  .news-article__body .is-style-alphaz-box {
    padding: 16px;
    border-radius: 8px;
  }
}

/* ==========================================================================
   06. Article motion
   --------------------------------------------------------------------------
     ヒーロー : 下層共通（motion.css「Page hero」）
     見出し   : カテゴリー → タイトル → リードの順に下からふわっと
     アイキャッチ: 斜めの刃で左から切り開かれ、寄りから引く
     本文     : 動かさない（読み物なので、すぐ読めるように）
   ========================================================================== */
.motion-ok .news-article__head > * {
  opacity: 0;
  transform: translateY(calc(20 * var(--s)));
}

.motion-ok .news-article__head.is-inview > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s ease 0.4s,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.motion-ok .news-article__head.is-inview > :nth-child(2) {
  transition-delay: 0.52s;
}

.motion-ok .news-article__head.is-inview > :nth-child(3) {
  transition-delay: 0.64s;
}

.motion-ok .news-article__thumb {
  clip-path: polygon(0 0, 0 0, -20% 100%, -20% 100%);
}

.motion-ok .news-article__thumb img {
  transform: scale(1.12);
}

.motion-ok .news-article__thumb.is-inview {
  clip-path: polygon(0 0, 120% 0, 100% 100%, -20% 100%);
  transition: clip-path 1.2s cubic-bezier(0.76, 0, 0.24, 1) 0.3s;
}

.motion-ok .news-article__thumb.is-inview img {
  transform: none;
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.motion-ok .news-article__back {
  opacity: 0;
  transform: translateY(calc(16 * var(--s)));
}

.motion-ok .news-article__back.is-inview {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
