/* JIMTOF2026 特設ページ */

/* ページ全体で使う色 */
:root {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --blue: #3a8cf7;
  --white: #fff;
}

/* 余白と幅の計算を要素の枠内に揃える */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 本文の基本文字組み */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "M PLUS 1", sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.75;
  letter-spacing: 0.04em;
}

/* 画像が親要素からはみ出さないようにする */
img {
  max-width: 100%;
  vertical-align: bottom;
}

/* リンクの下線はホバー時だけ出す */
a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ボタンを本文と同じ書体にし、枠線を消す */
button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* 画面上部に固定する黒帯ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #000;
}

/* ヘッダー内でロゴを中央に置く */
.site-header__inner {
  min-height: 90px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ヘッダーロゴの高さ */
.site-header img {
  height: 50px;
  width: auto;
}

/* ファーストビュー（ブース写真と開催案内バナー） */
.hero {
  overflow: hidden;
  background: var(--white);
}

/* ヒーロー動画。1920×1080を上下トリミングし、幅は画面に合わせてリサイズする */
.hero__booth {
  overflow: hidden;
  width: 100%;
  height: calc(100vw * 720 / 1920);
}

.hero__booth video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* 開催案内バナーを左右2枚で並べる */
.hero__banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* 課題解決の導入文。中央寄せで幅を抑える */
.intro {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 32px;
  text-align: center;
}

/* 導入文の本文サイズ */
.intro__body {
  font-size: 36px;
  line-height: 2;
  font-weight: 800;
}

/* 「人手が足りない」などの課題キーワードを青字で強調する */
.challenge {
  color: var(--blue);
  font-weight: 800;
  font-size: 1.2em;
  letter-spacing: 0.04em;
  line-height: 1.6;
  white-space: nowrap;
}

/* 並んだ課題キーワードのあいだを少し空ける */
.challenge + .challenge {
  margin-left: 0.25em;
}

/* 見どころ・新商品・アクセスの帯見出し。背景は白、文字色は各帯の色 */
.cases h2,
.news h2,
.booth h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  background: #fff;
  color: #800079;
  font-size: clamp(48px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  margin-top: 32px;
  padding: 22px 0px;
}

/* アクセス見出しの文字色 */
.booth h2 {
  color: #333333;
}

/* 新商品見出しの文字色 */
.news h2 {
  color: #e60012;
}

/* 文字の左右に置く4pxの線。最初は端に畳んでおき、画面に入ると文字側へ伸ばす */
.cases h2::before,
.cases h2::after,
.news h2::before,
.news h2::after,
.booth h2::before,
.booth h2::after {
  content: "";
  flex: 1 1 auto;
  height: 4px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.8s ease;
}

.cases h2::before,
.news h2::before,
.booth h2::before {
  transform-origin: left center;
}

.cases h2::after,
.news h2::after,
.booth h2::after {
  transform-origin: right center;
}

.cases h2.is-inview::before,
.cases h2.is-inview::after,
.news h2.is-inview::before,
.news h2.is-inview::after,
.booth h2.is-inview::before,
.booth h2.is-inview::after {
  transform: scaleX(1);
}

/* 見どころ・新商品の画像を2列で並べる */
.cases__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 見どころ画像と、その直下の帯ボタンを1枚のカードにする */
.case {
  display: block;
  width: 100%;
  padding: 0;
}

/* 見どころ・新商品の画像を枠いっぱいに表示する */
.cases img,
.news img {
  display: block;
  width: 100%;
  height: auto;
}

/* 画像の下に置く「動画を見る」ボタン。幅は画像の半分で中央に置く */
.case__play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 50%;
  min-height: 56px;
  margin: 10px auto 36px;
  background: #fff;
  color: #e60012;
  border: 2px solid #e60012;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* 再生アイコンだけ赤地に白三角。ホバーでボタンが赤くなるときは白地に赤三角へ反転する */
.case__play-icon {
  flex: none;
  width: 28px;
  height: 28px;
}

.case__play-icon path {
  fill: #fff;
}

@media (hover: hover) {
  .case__play:hover .case__play-icon path {
    fill: #e60012;
  }
}

.case__play:active .case__play-icon path {
  fill: #9a000c;
}

/* マウスがある画面では、赤地に白文字へ反転する */
@media (hover: hover) {
  .case__play:hover {
    background: #e60012;
    color: #fff;
  }
}

/* タップしたときは赤を濃くする */
.case__play:active {
  background: #9a000c;
  color: #fff;
  border-color: #9a000c;
}

/* 会場案内図。左右に余白を残して中央に置く */
.booth__map {
  display: block;
  width: calc(100% - 64px);
  max-width: 1440px;
  margin: 32px auto 56px;
  background: var(--white);
}

/* フッター前の来場のお礼とJIMTOFバナー。中央に置く */
.welcome {
  padding: 16px 32px 72px;
  text-align: center;
}

.welcome__text {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.6;
}

.welcome__note {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.75;
}

.welcome__banner {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 28px auto 0;
}

.welcome__banner img {
  display: block;
  width: 100%;
  height: auto;
}

.welcome__banner:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* ヒーロー、導入文、見どころ以降。画面に入るまで少し下に隠しておき、入ったら浮かび上がる */
.js .hero__booth,
.js .hero__banner img,
.js .intro,
.js .cases .case,
.js .news .cases__grid > img,
.js .booth__map,
.js .welcome {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js .hero__banner img:nth-child(even),
.js .cases .case:nth-child(even),
.js .news .cases__grid > img:nth-child(even) {
  transition-delay: 0.15s;
}

.js .hero__booth.is-inview,
.js .hero__banner img.is-inview,
.js .intro.is-inview,
.js .cases .case.is-inview,
.js .news .cases__grid > img.is-inview,
.js .booth__map.is-inview,
.js .welcome.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* ページ下部の黒帯フッター */
.site-footer {
  background: #000;
  color: #fff;
  padding: 36px 24px 40px;
  text-align: center;
}

/* フッター内容の最大幅 */
.site-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
}

/* SNSアイコンを横一列に並べる */
.sns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

/* SNSアイコンの下線と余白を消す */
.sns a {
  display: block;
  line-height: 0;
}

/* SNSアイコンのホバー時は少し薄くする */
.sns a:hover {
  text-decoration: none;
  opacity: 0.75;
}

/* SNSアイコンの高さ */
.sns img {
  display: block;
  height: 32px;
  width: auto;
}

/* コピーライト表記 */
.site-footer__copy {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #fff;
}

/* 見どころ動画を画面中央に重ねて表示するオーバーレイ */
.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 24px;
  background: rgba(0, 0, 0, 0.72);
}

/* 閉じているときはオーバーレイを出さない */
.video-overlay[hidden] {
  display: none;
}

/* 動画プレーヤーの枠 */
.video-overlay__box {
  position: relative;
  width: min(960px, 100%);
  background: #000;
}

/* YouTube埋め込みを16:9で表示する */
.video-overlay__box iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

/* 動画を閉じるボタン。プレーヤーの右上に置く */
.video-overlay__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

/* 狭い画面では2列を1列にし、各行が途中で割れないサイズにする */
@media (max-width: 860px) {
  .hero__banner {
    grid-template-columns: 1fr;
  }

  .cases__grid {
    grid-template-columns: 1fr;
  }

  .intro {
    padding: 36px 20px;
  }

  .intro__body {
    font-size: min(26px, calc((100vw - 40px) / 16.8));
    line-height: 1.85;
  }

  .challenge {
    display: block;
    font-size: min(26px, calc((100vw - 40px) / 20));
    line-height: inherit;
  }

  .challenge + .challenge {
    margin-left: 0;
  }

  /* 2語のあいだにあった改行は、spanごとの改行と重なるので消す */
  .challenge + br {
    display: none;
  }

  .cases h2,
  .news h2,
  .booth h2 {
    gap: 12px;
    padding: 16px 8px;
    font-size: min(28px, calc((100vw - 72px) / 11));
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .welcome {
    padding: 8px 20px 56px;
  }

  .welcome__text {
    font-size: min(24px, calc((100vw - 40px) / 20));
    white-space: nowrap;
  }

  .welcome__note {
    font-size: min(18px, calc((100vw - 40px) / 23));
  }

  .welcome__banner {
    margin-top: 20px;
  }
}
