/* =========================================================
  HOME NEWS (index) - news.css
========================================================= */

/* セクション見出しを「タイトル左 / ボタン右」みたいにしたい時用 */
.section__head--row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.section__actions{
  margin-left:auto;
}

.newsgrid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:14px;
}

.news-card{
  grid-column:span 12;
  display:block;
  text-decoration:none;
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.14);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 14px 36px rgba(0,0,0,.28);
  transition:transform 160ms ease, border-color 160ms ease;
}
.news-card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.22);
}

.news-media{
  /* 横長でニュースっぽく */
  aspect-ratio: 16 / 9;
  background:rgba(0,0,0,.25);
  border-bottom:1px solid rgba(255,255,255,.12);
}
.news-media__img{
  width:100%;
  height:100%;
  background-image:
    var(--img),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(0,0,0,.35));
  background-size:cover;
  background-position:center;
  filter:saturate(1.05) contrast(1.03);
}

.news-body{
  padding:12px 14px 14px;
}

.news-meta{
  display:flex;
  align-items:center;
  gap:10px;
  color:rgba(255,255,255,.70);
  font-size:12px;
}

.news-badge{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.18);
  color:rgba(255,255,255,.86);
}

.news-title{
  margin:8px 0 6px;
  font-size:15px;
  line-height:1.35;
  letter-spacing:.02em;
}

.news-excerpt{
  margin:0;
  color:rgba(255,255,255,.72);
  font-size:13px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* 2列 */
@media (min-width: 640px){
  .news-card{grid-column:span 6}
}

/* 4列 */
@media (min-width: 980px){
  .news-card{grid-column:span 3}
}

/* Motion reduction */
@media (prefers-reduced-motion: reduce){
  .news-card{transition:none !important}
  .news-card:hover{transform:none}
}


/* =========================================================
  Section transition (TEST): News only
  - セクションの切り替わりに、サイトの雰囲気に合わせた
    “薄め”の斜めグラデーションを入れる（ニュースだけ）
========================================================= */

#news{
  position: relative;
  /* ✅ sticky header を効かせるため overflow:hidden は使わない */
  overflow: visible;
  isolation: isolate;

  /* 少し黒っぽい赤（下に向かって薄く） */
  background:
    linear-gradient(180deg, rgba(42,0,0,.34), rgba(11,13,18,0) 62%);

  padding-bottom: 56px;
}

#news::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* 黒赤のベース */
    linear-gradient(180deg, rgba(28,0,0,.55), rgba(11,13,18,0) 62%),
    /* 斜めにうっすら明るさを足す */
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,0) 54%),
    /* アクセント（赤）を少し強めに発光 */
    radial-gradient(900px 520px at 14% 0%, rgba(225,6,0,.22), transparent 62%),
    radial-gradient(760px 520px at 96% 24%, rgba(255,59,48,.14), transparent 65%);
  opacity: .85;
  pointer-events: none;
  z-index: 0;
}

#news::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* 下側を少しだけ締める */
    radial-gradient(900px 520px at 50% 120%, rgba(0,0,0,.42), transparent 58%);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}

#news > .wrap{
  position: relative;
  z-index: 1;
}


/* =========================================================
  News header (Title + red line + flowing text)
  - Fighters 見出し（ftprevHead）と同じ雰囲気
  - ✅ Nav の下で sticky
  - ✅ アニメは「表示された瞬間」に開始（JSが .is-in を付与）
========================================================= */

#news .newsHead{
  /* --- tuning vars --- */
  --news-titleSize: clamp(48px, 7vw, 72px);
  --news-titleStagger: 90ms;
  --news-titleDur: 720ms;

  /* "News" は 4文字なので (3 * stagger) + dur */
  --news-titleTotal: calc((3 * var(--news-titleStagger)) + var(--news-titleDur));

  --news-headLineW: min(320px, 70%);
  --news-headLineH: 3px;
  --news-headLineDelay: 140ms;
  --news-headLineDur: 320ms;

  --news-marqueeSize: 14px;
  --news-marqueeDur: 18s;
  --news-marqueeGap: 48px;
  --news-marqueeDelay: 260ms;

  margin: 0 0 16px;
}

/* Sticky mode: Nav の直下に貼り付く */
#news .newsHead--sticky{
  position: sticky;
  top: var(--nh-navH, 72px);
  z-index: 25;

  padding: 14px 0 12px;
  margin-bottom: 14px;

  /* 透けすぎるとカードが読みにくいので薄い板 + ぼかし */
  background: linear-gradient(
    180deg,
    rgba(22,0,0,.78),
    rgba(22,0,0,.46) 62%,
    rgba(22,0,0,0)
  );
  backdrop-filter: blur(10px);

  /* ✅ Nav の直下に “くっつく” 感（薄い境界線） */
  border-top: 1px solid rgba(255,255,255,.08);
}

#news .newsHead__row{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#news .newsHead__title{
  margin: 0;
  font-size: var(--news-titleSize);
  line-height: 1.05;
  letter-spacing: .04em;
  font-weight: 900;
  text-shadow: 0 18px 40px rgba(0,0,0,.55);
}

#news .newsHead__ch{
  display: inline-block; /* base（JS無しでも文字が出る） */
}

/* “落下”アニメ（JSが .is-in を付与した時だけ再生） */
.js #news .newsHead__ch{
  opacity: 0;
  transform: translate(36px, -36px) rotate(8deg);
  filter: blur(1px);
  will-change: transform, opacity, filter;
}

.js #news .newsHead.is-in .newsHead__ch{
  animation: nhNewsTitleDrop var(--news-titleDur) cubic-bezier(.18,.9,.2,1) forwards;
  animation-delay: calc(var(--i) * var(--news-titleStagger));
}

@keyframes nhNewsTitleDrop{
  0%{ opacity:0; transform: translate(36px, -36px) rotate(8deg); filter: blur(1px); }
  60%{ opacity:1; transform: translate(-2px, 2px) rotate(0deg); filter: blur(0); }
  100%{ opacity:1; transform: translate(0,0) rotate(0deg); filter: blur(0); }
}

#news .newsHead__line{
  margin-top: 10px;
  width: var(--news-headLineW);
  height: var(--news-headLineH);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(225,6,0,1), rgba(255,59,48,0));
  box-shadow: 0 10px 22px rgba(225,6,0,.18);

  transform-origin: left;
  transform: scaleX(1); /* base（JS無しでも線は見える） */
}

/* 線のアニメ（JSが .is-in を付与した時だけ再生） */
.js #news .newsHead__line{
  transform: scaleX(0);
}

.js #news .newsHead.is-in .newsHead__line{
  animation: nhNewsHeadLineIn var(--news-headLineDur) ease forwards;
  animation-delay: calc(var(--news-titleTotal) + var(--news-headLineDelay));
}

@keyframes nhNewsHeadLineIn{
  from{ transform: scaleX(0); }
  to{ transform: scaleX(1); }
}

#news .newsHead__marquee{
  margin-top: 14px;
  overflow: hidden;
  white-space: nowrap;

  font-size: var(--news-marqueeSize);
  color: rgba(255,255,255,.74);
  letter-spacing: .02em;

  /* 左右をほんのりフェード */
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);

  opacity: 1;                /* base（JS無しでも見える） */
  transform: translateY(0);
}

/* マーキーの “ふわっ” 表示（JSが .is-in を付与した時だけ） */
.js #news .newsHead__marquee{
  opacity: 0;
  transform: translateY(4px);
}

.js #news .newsHead.is-in .newsHead__marquee{
  animation: nhNewsMarqueeIn 320ms ease forwards;
  animation-delay: calc(var(--news-titleTotal) + var(--news-headLineDelay) + var(--news-marqueeDelay));
}

@keyframes nhNewsMarqueeIn{
  to{ opacity: 1; transform: translateY(0); }
}

#news .newsHead__marqueeTrack{
  display: inline-flex;
  width: max-content;
  animation: nhNewsMarquee var(--news-marqueeDur) linear infinite;
}

#news .newsHead__marqueeText{
  padding-right: var(--news-marqueeGap);
}

@keyframes nhNewsMarquee{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}

/* News list spacing */
#news .newsBody{
  padding-top: 4px;
}

/* hotfix 側のカードにも少し余白 */
#news .nh-news-grid{
  margin-top: 10px;
}

@media (max-width: 640px){
  #news .newsHead{
    --news-titleSize: clamp(42px, 12vw, 64px);
    --news-marqueeSize: 13px;
  }
}


/* =========================================================
  News: VIEW ALL bar（index）
  - ✅ ニュースの幅に合わせる（PC）
  - ✅ スマホは両端まで（余白なし）
  - ✅ 上下だけ細い白ライン
  - ✅ 背景：左→右へ出る → 文字：左→中央へ “ひゅー”
========================================================= */

#news .newsViewAll{
  position: relative;
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(255,255,255,.72);
  overflow: hidden;
}

#news .newsViewAll::before{
  content:"";
  position:absolute;
  inset:0;
  /* 少し暗い赤 */
  background: linear-gradient(90deg, rgba(120,0,0,1), rgba(150,0,0,1));
  transform-origin: left;
  transform: scaleX(1); /* base（JS無しでも赤は出る） */
}

/* テキスト */
#news .newsViewAll__link{
  position: relative;
  z-index: 1;

  display:flex;
  align-items:center;
  justify-content:center;
  gap: 18px;

  padding: 18px 0;
  text-decoration:none;

  color: rgba(255,255,255,.98);
  font-weight: 900;
  font-size: clamp(38px, 6vw, 72px);
  letter-spacing: .08em;
  text-transform: uppercase;

  text-shadow: 0 18px 40px rgba(0,0,0,.42);
}

/* global a:hover の薄れを無効化 */
#news .newsViewAll__link:hover{ opacity: 1; }

#news .newsViewAll__arrow{
  display:inline-block;
  transform: translateY(1px);
}

/* JSが動く時だけ：最初は隠して、入ってきた瞬間にアニメ */
.js #news .newsViewAll::before{
  transform: scaleX(0);
}
.js #news .newsViewAll__link{
  opacity: 0;
  transform: translateX(-46px);
}

.js #news .newsViewAll.is-in::before{
  animation: nhNewsViewAllFill 520ms ease forwards;
}

.js #news .newsViewAll.is-in .newsViewAll__link{
  animation: nhNewsViewAllText 560ms cubic-bezier(.18,.9,.2,1) forwards;
  animation-delay: 520ms;
}

@keyframes nhNewsViewAllFill{
  to{ transform: scaleX(1); }
}
@keyframes nhNewsViewAllText{
  to{ opacity: 1; transform: translateX(0); }
}

@media (max-width: 640px){
  /* ✅ スマホは画面いっぱい（左右の隙間ゼロ） */
  #news .newsViewAll{
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  #news .newsViewAll__link{
    padding: 16px 0;
    font-size: clamp(34px, 10vw, 60px);
  }
}


/* =========================================================
  Motion reduction (動きを減らしたい人向け)
========================================================= */

@media (prefers-reduced-motion: reduce){
  /* Header */
  .js #news .newsHead__ch{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .js #news .newsHead__line{
    animation: none !important;
    transform: none !important;
  }
  .js #news .newsHead__marquee{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .js #news .newsHead__marqueeTrack{
    animation: none !important;
    transform: none !important;
  }

  /* VIEW ALL */
  .js #news .newsViewAll::before{
    animation: none !important;
    transform: scaleX(1) !important;
  }
  .js #news .newsViewAll__link{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

