/*
 * service-map.css
 * Pokkeマップ（/map/）固有スタイル。service.css の後に読み込む。
 *
 * プロトタイプでこのページだけに読み込まれていたCSSを同じ順番でつなげ、
 * このページで使うクラスに当たる指定だけを残している。
 */


/* #############################################################
   ここから マップ（プロトタイプの map-renewal.css）
   ############################################################# */

/*
 * map-renewal.css
 * Pokkeマップのサービスページ（/studio/map/）専用。
 * 見た目の土台はガイドページと共通（guide.css＋guide-renewal.css、<body class="guide-renewal">）で、
 * ここにはマップだけの部分（FVの地図ビジュアル、レイヤー画像の比率など）を書く。
 */

/* =============================================
   FV右：地図の上にピンが順に立ち、手前のスマホで画面が切り替わる
   ・奥：浅草のマップ（角丸のカード）。ゆっくり拡大・移動
   ・ピン：0.6秒ずつずらして落ちてきて、足元に波紋
   ・手前のスマホ：スポット情報 → 音声ガイド → スタンプラリー → 特典 を3.5秒ずつ
   ============================================= */
.mh-stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50vw;
  container-type: size;
  pointer-events: none;
}

@keyframes mh-pan {
  0%   { transform: scale(1.04) translate(0, 0); }
  100% { transform: scale(1.14) translate(-3%, 2%); }
}

@keyframes mh-pin-drop {
  0%       { opacity: 0; translate: 0 -40px; }
  8%       { opacity: 1; translate: 0 0; }
  80%      { opacity: 1; translate: 0 0; }
  90%, 100% { opacity: 0; translate: 0 0; }
}

@keyframes mh-pin-ring {
  0%, 8%   { opacity: 0; transform: rotate(45deg) scale(.2); }
  10%      { opacity: 1; }
  30%, 100% { opacity: 0; transform: rotate(45deg) scale(1.8); }
}

/* 手前のスマホ（ガイドのFVと同じ縁・影） */
.mh-phone {
  position: absolute;
  z-index: 3;
  top: 54%;
  left: 74%;
  height: 74cqh;
  aspect-ratio: 196 / 392;
  transform: translate(-50%, -50%) rotate(4deg);
}

.mh-phone__float {
  height: 100%;
  animation: gh-float 6s ease-in-out infinite;
}

.mh-phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1.1cqh solid #1D1D22;
  border-radius: 6cqh;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .25),
    0 4cqh 8cqh rgba(120, 40, 10, .35),
    0 1cqh 2cqh rgba(120, 40, 10, .2);
}

/* 4枚を重ね、1枚あたり3.5秒ずつ順番に表示（入ってくる画面を上に重ねてフェードイン） */
body.guide-renewal .mh-phone__screen img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background-color: transparent !important;
  opacity: 0;
  animation: mh-swap 14s ease-in-out infinite;
  animation-delay: calc(var(--i) * 3.5s - 14s);
}

@keyframes mh-swap {
  0%     { opacity: 0; transform: scale(1.06); z-index: 3; }
  4.5%   { opacity: 1; transform: scale(1);    z-index: 3; }
  4.6%   { z-index: 2; }
  29.5%  { opacity: 1; z-index: 2; }
  29.6%  { opacity: 0; z-index: 1; }
  100%   { opacity: 0; z-index: 1; }
}

/* 機能ラベル（ガイドのFVと同じ白いピル） */
.mh-chip--browser { top: 10%;    left: 50%; translate: -96% 0; }

/* スマホ幅：テキストの上にビジュアル（ガイドと同じ高さ） */
@media screen and (max-width: 834px) {
  .mh-stage {
    left: 0;
    bottom: auto;
    width: 100%;
    height: 380px;
  }

  

  .mh-phone {
    height: 70cqh;
  }

  

  
  /* 画面の端に付かないよう、左右 16px の内側に置く */
  .mh-chip--browser { top: 6%;    left: 16px; translate: 0 0; }
  

  .mh-phone {
    left: auto;
    right: 16px;
    transform: translate(0, -50%) rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mh-stage *,
  body.guide-renewal .mh-map img,
  body.guide-renewal .mh-phone__screen img {
    animation: none !important;
  }

  

  body.guide-renewal .mh-phone__screen img[style*="--i:0"] {
    opacity: 1;
  }
}

/* =============================================
   マップに重ねる4つのレイヤー：画像は 4:3 で枠いっぱいに
   ============================================= */
.map-layer__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* =============================================
   特徴：説明文の下の箇条書き
   ============================================= */
body.guide-renewal .gf__text + .gf-list {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* =============================================
   導入事例：「事例をすべて見る」ボタン
   ============================================= */
body.guide-renewal .service-cases__more {
  margin-top: 40px;
  text-align: center;
}

/* 特徴#004：縦長の画面画像は上（マップ部分）を見せる */
body.guide-renewal .gf__img.map-gf__img--top {
  object-position: center top;
}

/* =============================================
   FV：ピンを結ぶルートの線（番号順に少しずつ描かれる）
   ============================================= */

@keyframes mh-route-draw {
  0%        { stroke-dashoffset: 1; opacity: .85; }
  50%, 80%  { stroke-dashoffset: 0; opacity: .85; }
  90%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

/* =============================================
   対応デバイス：スマホ・PC・サイネージを、同じマップの画面で並べる
   ============================================= */
.map-devices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-device__stage {
  display: grid;
  place-items: center;
  height: 280px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: var(--color-bg-light);
}

.map-device__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
}

.map-device__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-text);
}

body.guide-renewal .map-device__stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background-color: transparent !important;
}

/* スマートフォン */
.md-phone {
  display: block;
  width: 108px;
  height: 216px;
  overflow: hidden;
  border: 5px solid #1D1D22;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
}

/* PC（ノートパソコン） */
.md-pc {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 78%;
}

.md-pc__screen {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 7px solid #1D1D22;
  border-bottom-width: 9px;
  border-radius: 12px 12px 4px 4px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .14);
}

.md-pc__base {
  display: block;
  width: 116%;
  height: 10px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(#D5D5DA, #B8B8BF);
}

/* デジタルサイネージ（縦型ディスプレイ＋スタンド） */
.md-signage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.md-signage__screen {
  display: block;
  width: 124px;
  height: 200px;
  overflow: hidden;
  border: 6px solid #1D1D22;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
}

.md-signage__stand {
  position: relative;
  display: block;
  width: 10px;
  height: 34px;
  background: #4A4A52;
}

.md-signage__stand::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 70px;
  height: 6px;
  border-radius: 3px;
  background: #4A4A52;
  transform: translateX(-50%);
}

@media screen and (max-width: 1079px) {
  .map-devices {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin: 0 auto;
  }

  .map-device__stage {
    height: 240px;
  }
}

/* =============================================
   配色：Pokkeマップは紺（トップページのプロダクトカードと同じ #1B1464）
   ヘッダー・フッターはサイト共通の赤のまま。ページの中身（ナビ〜下のCTA帯）だけ紺にする
   ============================================= */
body.page-map .page-nav,
body.page-map .service-hero,
body.page-map .pokke-section,
body.page-map .inquiry {
  --color-primary: #1B1464;
  --color-primary-hover: #110C47;
  --service-bg-accent: #EEF0F8;
}

/* FV：紺のグラデーション（カード画像と同じ、左上が濃く右へ明るく） */
body.page-map .service-hero.guide-hero {
  background: linear-gradient(115deg, #1B1464 0%, #2C3488 48%, #4E66B2 100%) !important;
}

body.page-map .mh-phone__screen {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .25),
    0 4cqh 8cqh rgba(10, 10, 60, .4),
    0 1cqh 2cqh rgba(10, 10, 60, .25);
}

body.page-map .gh-chip {
  box-shadow: 0 10px 30px rgba(10, 10, 60, .25);
}

/* サービス紹介：アイコンの丸と背景の円を紺の淡い色に */
body.page-map .guide-about {
  --ga-tint: #EEF0F8;
}

body.page-map .guide-about::before,
body.page-map .guide-about::after {
  background: radial-gradient(closest-side, rgba(27, 20, 100, .08), rgba(27, 20, 100, .03) 62%, rgba(27, 20, 100, 0));
}

/* 対応領域の表：セルの淡い赤を、淡い紺に */
body.page-map .gp-scope__col ul li {
  background: #EEF0F8;
}

/* =============================================
   FV右（作り直し）：PCとスマホの両方で使えることを見せる
     奥：ノートパソコン（ブラウザで開いたマップ。画像は表示幅の約2倍で粗く見えない）
     手前：スマホ（430×932 の画面4枚を切り替え）
   ============================================= */

@keyframes mx-pan {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.06) translate(-1.5%, 1%); }
}

/* スマホ：画面の比率（430×932）に合わせ、ノートパソコンの右手前に */
.mx-phone {
  top: 58%;
  left: 81%;
  z-index: 3;
  height: 66cqh;
  aspect-ratio: 430 / 932;
}

@media screen and (max-width: 834px) {
  

  

  .mx-phone {
    left: auto;
    right: 16px;
    top: 58%;
    height: 62cqh;
    transform: translate(0, -50%) rotate(4deg);
  }
}

/* ノートパソコンをやめ、横向きのタブレットに（同じ枠の太さで四辺そろえる） */
.mx-tab {
  position: absolute;
  top: 46%;
  left: 44%;
  width: min(82cqw, 100cqh);
  overflow: hidden;
  border: 1.8cqh solid #1D1D22;
  border-radius: 4cqh;
  background: #1D1D22;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .25),
    0 4cqh 9cqh rgba(10, 10, 60, .35);
  transform: translate(-50%, -50%) rotate(-3deg);
}

.mx-tab__view {
  aspect-ratio: 1086 / 679;
  overflow: hidden;
  border-radius: 2.2cqh;
}

body.guide-renewal .mx-tab__view img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: transparent !important;
  animation: mx-pan 16s ease-in-out infinite alternate;
}

@media screen and (max-width: 834px) {
  .mx-tab {
    left: 43%;
    width: 80cqw;
    border-width: 1.4cqh;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.guide-renewal .mx-tab__view img {
    animation: none !important;
  }
}

/* タグは4つ：アプリ不要 → 紙のマップをデジタルに → 音声ガイドやクーポン → 対応端末 の順に、ふわっと出す */
.mh-chip--browser { top: 6%;     left: 50%; translate: -60% 0; }
.mh-chip--paper   { top: 30%;    left: 50%; translate: -150% 0; }
.mh-chip--more    { top: 52%;    left: 50%; translate: 10% 0; }
.mh-chip--device  { bottom: 8%;  left: 50%; translate: -80% 0; }

.mh-chip--browser { animation-delay: .4s, 0s; }
.mh-chip--paper   { animation-delay: .7s, -1.5s; }
.mh-chip--more    { animation-delay: 1s, -3s; }
.mh-chip--device  { animation-delay: 1.3s, -2s; }

@media screen and (max-width: 834px) {
  .mh-chip--browser { top: 4%;    left: 12px; translate: 0 0; }
  .mh-chip--paper   { top: 14%;   left: auto; right: 12px; translate: 0 0; }
  .mh-chip--more    { top: auto; bottom: 15%; left: 12px; translate: 0 0; }
  .mh-chip--device  { bottom: 4%; left: auto; right: 12px; translate: 0 0; }
}

/* PC：右端で切れないよう、左へ */
@media screen and (min-width: 835px) {
  .mh-chip--more { top: 64%; translate: -55% 0; }
}

/* FVのスマホを大きく */
.mx-phone { height: 76cqh; }

@media screen and (max-width: 834px) {
  .mx-phone { height: 72cqh; }
}

/* PC：大きくした分、右端に付かないよう内側へ */
@media screen and (min-width: 835px) {
  .mx-phone { left: 79%; }
}

/* PC：画面幅によってタグが右の枠の端で切れないよう、左右の端からの位置で置く */
@media screen and (min-width: 835px) {
  .mh-chip--browser { top: 6%;     left: auto; right: 16px; translate: 0 0; }
  .mh-chip--paper   { top: 30%;    left: 16px; translate: 0 0; }
  .mh-chip--more    { top: 64%;    left: 16px; translate: 0 0; }
  .mh-chip--device  { bottom: 6%;  left: auto; right: 16px; translate: 0 0; }
}
