/* ==========================================================================
   ntv-fv.css — WebGL キービジュアル用スタイル（ZENITH 仕様）

   色・フォントは下の変数ブロックだけ差し替えれば全体が変わる。
   ルート要素（.ntvfv）に付くステートクラス
     .is-ready … 初期化完了（文字がせり上がる）
     .is-hover … カードにポインタが乗っている
     .is-focus … カードが選択され中央に来ている
   ========================================================================== */

.ntvfv {
  /* --- ブランド変数：ここだけ変えれば配色が揃う --- */
  --ntvfv-bg:        #050D24;   /* WebGL 非対応時の背景。JS の bgColor と揃える */
  --ntvfv-stroke:    #5D87FF;   /* 見出しのアウトライン色 = ロゴのブルー */
  --ntvfv-glow:      #1E46D6;   /* 見出しの光 */
  --ntvfv-sub:       #7FA6E8;   /* ワイド字間のサブライン */
  --ntvfv-text:      #D9E5FA;   /* 本文 */
  --ntvfv-dim:       #5E7AA8;   /* クレジット・Scroll など */
  --ntvfv-accent:    #1E46D6;   /* 追従ボタンの既定色 */
  --ntvfv-type-accent: var(--logo); /* ロゴと共通のブランドブルー */
  --ntvfv-title-fill: 20%;      /* 和文見出しの塗りの濃さ。0% で完全なアウトライン、100% でベタ */
  --ntvfv-font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ntvfv-font-jp-display: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --ntvfv-font-body:    "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;

  --ntvfv-pad: clamp(20px, 4vw, 64px);

  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ntvfv-bg);
  color: var(--ntvfv-text);
  font-family: var(--ntvfv-font-body);
  cursor: default;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.ntvfv.is-hover { cursor: pointer; }

/* ---- WebGL キャンバス ---- */
.ntvfv__stage { position: absolute; inset: 0; z-index: 0; }
.ntvfv__stage canvas { display: block; width: 100% !important; height: 100% !important; }

/* ---- テキストレイヤー ---- */
.ntvfv__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: var(--ntvfv-pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
}
/* テキスト側に薄い暗幕。カードが背後を通っても見出しが読める */
.ntvfv__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    var(--ntvfv-bg) 0%,
    color-mix(in srgb, var(--ntvfv-bg) 58%, transparent) 30%,
    transparent 60%
  );
}

.ntvfv__head { margin: 0; }

/* 見出し：ロゴと同じ「ワイドなアウトライン文字」 */
.ntvfv__title {
  margin: 0;
  font-family: var(--ntvfv-font-display);
  font-weight: 800;
  font-style: italic;
  font-stretch: 125%;
  font-size: clamp(3.4rem, 12.5vw, 11rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  color: var(--ntvfv-stroke);
}
@supports (-webkit-text-stroke: 1px currentColor) {
  .ntvfv__title {
    color: transparent;
    -webkit-text-stroke: clamp(2px, 0.3vw, 5px) var(--ntvfv-stroke);
    filter: drop-shadow(0 0 30px color-mix(in srgb, var(--ntvfv-glow) 70%, transparent));
  }
}

/* 見出しが日本語のとき：欧文のイタリック／エクステンドは外し、和文用に組み直す */
.ntvfv__title--ja {
  font-family: var(--ntvfv-font-jp-display);
  font-style: normal;
  font-stretch: normal;
  font-weight: 700;
  font-size: clamp(2.1rem, 6.25vw, 5.6rem);
  line-height: 1.15;
  letter-spacing: -0.055em;
  color: #F7FBFF;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.24);
}
@supports (-webkit-text-stroke: 1px currentColor) {
  .ntvfv__title--ja {
    color: #F7FBFF;
    -webkit-text-stroke: 0 transparent;
    filter: none;
  }
}

/* PEARL LIGHT：白から青灰へ柔らかく落ちる、固定の真珠光沢 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ntvfv__title--ja .ntvfv__ch > span {
    background-image: radial-gradient(ellipse at 38% 24%, #fff 0%, #f7f7fb 30%, #d4d9e8 63%, #95a5ca 100%);
    background-position: 0 0;
    background-repeat: no-repeat;
    animation: none;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

/* 先頭の「Web」だけを欧文アウトラインにして、和文とのコントラストを作る */
.ntvfv__title--ja .ntvfv__line:first-child .ntvfv__w:first-child {
  display: inline-block;
  overflow: hidden;
  padding: 0.08em 0.16em;
  margin-block: -0.08em;
  margin-inline: -0.14em 0.02em;
  transform: translateY(0.16em);
  font-family: var(--ntvfv-font-display);
  font-size: 1.28em;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.ntvfv__title--ja .ntvfv__line:first-child .ntvfv__w:first-child .ntvfv__ch {
  overflow: visible;
}
@supports (-webkit-text-stroke: 1px currentColor) {
  .ntvfv__title--ja .ntvfv__line:first-child .ntvfv__w:first-child .ntvfv__ch > span {
    color: var(--blue-mid);
    -webkit-text-fill-color: var(--blue-mid);
    -webkit-text-stroke: clamp(1.5px, 0.15vw, 2.3px) #f7fbff;
    filter: none;
  }
}

/* 進行方向を示す「前へ」だけを光色へ切り替える */
.ntvfv__title--ja .ntvfv__line:nth-child(2) .ntvfv__w:nth-last-child(-n + 2) .ntvfv__ch > span {
  text-shadow: none;
}

/* サブライン：ロゴの "WEB CREATIONS" と同じ字間の広い小さな行 */
.ntvfv__sub {
  margin: clamp(10px, 1.6vw, 20px) 0 0;
  font-family: var(--ntvfv-font-display);
  font-weight: 500;
  font-stretch: 125%;
  font-size: clamp(0.68rem, 1.45vw, 1.05rem);
  letter-spacing: 0.62em;
  text-indent: 0.62em;
  text-transform: uppercase;
  color: var(--ntvfv-sub);
}

.ntvfv__copy {
  margin: clamp(18px, 2.6vw, 34px) 0 0;
  font-size: clamp(0.95rem, 1.85vw, 1.4rem);
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.06em;
  color: var(--ntvfv-text);
}
.ntvfv__line { display: block; white-space: nowrap; }

/* 1 文字ずつのせり上がり */
/* 語のまとまり。この中では改行させず、語と語の間だけで折り返す */
.ntvfv__w { white-space: nowrap; }

.ntvfv__ch {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: inherit;
}
.ntvfv__ch > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i) * 0.028s + 0.25s);
  will-change: transform;
}
.ntvfv.is-ready .ntvfv__ch > span { transform: translateY(0); }

/* フォーカス中はテキストを退かせる */
.ntvfv__head,
.ntvfv__credit,
.ntvfv__scroll {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 登場演出が始まるまでは伏せておく（ローディング中に先出ししない） */
.ntvfv__credit,
.ntvfv__scroll { opacity: 0; transition-delay: 0.45s; }
.ntvfv.is-ready .ntvfv__credit,
.ntvfv.is-ready .ntvfv__scroll { opacity: 1; }
.ntvfv.is-focus .ntvfv__head { opacity: 0; transform: translateY(-14px); }
.ntvfv.is-focus .ntvfv__credit,
.ntvfv.is-focus .ntvfv__scroll { opacity: 0; }

/* ---- クレジット ---- */
.ntvfv__credit {
  position: absolute;
  left: var(--ntvfv-pad);
  bottom: var(--ntvfv-pad);
  margin: 0;
  font-family: var(--ntvfv-font-display);
  font-size: 0.68rem;
  font-stretch: 125%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ntvfv-dim);
}

/* ---- スクロール誘導 ---- */
.ntvfv__scroll {
  position: absolute;
  right: var(--ntvfv-pad);
  bottom: var(--ntvfv-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: var(--ntvfv-font-display);
  font-size: 0.7rem;               /* 10.56px は小さすぎたので 11.2px に */
  font-stretch: 125%;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ntvfv-dim);
}
/* 縦組みの文字 + 下へ伸びる線 + 下向きの山形。下へ進む方向だけを示す */
.ntvfv__scroll span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.ntvfv__scroll i {
  display: block;
  width: 1px;
  height: 68px;
  background: currentColor;
  opacity: 0.28;
  position: relative;
  overflow: hidden;
}
.ntvfv__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ntvfv-stroke);
  transform-origin: top;
  animation: ntvfv-scroll 2.3s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.ntvfv__scroll::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}
@keyframes ntvfv-scroll {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- マウス追従ボタン（ロゴと同じアウトラインの語彙） ---- */
.ntvfv__stalker {
  --x: 50%; --y: 50%; --c: var(--ntvfv-accent);
  position: absolute;
  z-index: 3;
  top: 0; left: 0;
  width: 112px; height: 112px;
  margin: -56px 0 0 -56px;
  translate: var(--x) var(--y);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--c) 42%, #ffffff);
  background: color-mix(in srgb, var(--ntvfv-bg) 58%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 40px color-mix(in srgb, var(--c) 55%, transparent),
              inset 0 0 26px color-mix(in srgb, var(--c) 30%, transparent);
  color: #fff;
  font-family: var(--ntvfv-font-display);
  font-size: 0.64rem;
  font-stretch: 125%;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  scale: 0.35;
  pointer-events: none;
  transition: opacity 0.35s ease, scale 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.6s ease, box-shadow 0.6s ease, background-color 0.3s ease;
  will-change: translate, scale;
}
.ntvfv.is-hover .ntvfv__stalker,
.ntvfv.is-focus .ntvfv__stalker { opacity: 1; scale: 1; }
.ntvfv.is-focus .ntvfv__stalker { pointer-events: auto; }
.ntvfv.is-focus .ntvfv__stalker:hover,
.ntvfv__stalker:focus-visible {
  background: var(--c);
  outline: none;
}

@media (hover: none), (max-width: 767px) {
  .ntvfv__stalker {
    position: absolute;
    top: auto; left: 50%;
    bottom: calc(var(--ntvfv-pad) + 44px);
    translate: -50% 0;
    width: auto; height: auto;
    margin: 0;
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 0.7rem;
  }
  .ntvfv.is-hover .ntvfv__stalker { opacity: 0; }
  .ntvfv.is-focus .ntvfv__stalker { opacity: 1; scale: 1; }
}

/* ---- カウンター（3 —— 8） ---- */
.ntvfv__indices {
  position: absolute;
  z-index: 2;
  right: var(--ntvfv-pad);
  top: 50%;
  translate: 0 -50%;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--ntvfv-font-display);
  font-stretch: 125%;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--ntvfv-sub);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.ntvfv.is-focus .ntvfv__indices { opacity: 1; color: #fff; }
.ntvfv__bar {
  --p: 0;
  display: block;
  width: 60px; height: 1px;
  position: relative;
}
.ntvfv__bar::before {
  content: ""; position: absolute; inset: 0;
  background: currentColor; opacity: 0.28;
}
.ntvfv__bar i {
  position: absolute; inset: 0;
  background: currentColor;
  transform: scaleX(var(--p));
  transform-origin: left;
}

@media (max-width: 767px) {
  .ntvfv__indices { top: auto; bottom: var(--ntvfv-pad); right: auto; left: 50%; translate: -50% 0; }
  .ntvfv__credit  { display: none; }
  .ntvfv__scroll  { display: none; }
  .ntvfv__sub     { letter-spacing: 0.42em; text-indent: 0.42em; }
  .ntvfv__title--ja {
    font-size: clamp(2rem, 10.4vw, 3rem);
    line-height: 1.18;
  }
}

/* ---- キーボード / スクリーンリーダー用のリンク ---- */
.ntvfv__a11y {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.ntvfv__a11y a:focus-visible {
  position: fixed; z-index: 999;
  top: 16px; left: 16px;
  width: auto; height: auto;
  clip: auto; clip-path: none;
  padding: 10px 18px;
  background: var(--ntvfv-stroke); color: #fff;
  border-radius: 999px;
}

/* ---- WebGL が使えない環境 ---- */
.ntvfv.is-nogl .ntvfv__stage { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ntvfv__ch > span { transition-duration: 0.01ms; transform: none; }
  .ntvfv__scroll i::after { animation: none; }
}
