/* =========================================================================
   top.css — トップページ専用（2026-10-06 リデザイン反映）
   デザイン元: 「b hotel リデザイン案」トップページ 案1（地図・How to enjoy 削除）
   ・ヘッダー帯 / フッター帯 / 下部の空室検索 / Recommendation のイベント導線は従来の機能のまま
   ・見た目（配色・書体・画像・動画・演出）をデザイン案に置き換え
   body.tp を付けたページだけに効く。他ページ（styles.css 共有）には影響しない。
   ========================================================================= */

:root {
  --tp-ink: #1c2331;
  --tp-ink-2: #2d3340;
  --tp-muted: #4a5060;
  --tp-muted-2: #6b7080;
  --tp-line: #e3e5ea;
  --tp-line-2: #eceef2;
  --tp-navy: #1a2233;
  --tp-paper: #f4f5f7;
  --tp-sans: 'Outfit', 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  --tp-serif: 'Fraunces', 'Shippori Mincho', serif;
}

body.tp {
  font-family: var(--tp-sans);
  color: var(--tp-ink);
  background: #fff;
}
body.tp main { padding-top: 0; }

/* ---------- 共通見出し ---------- */
.tp-h2 {
  margin: 0;
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1.1;
  font-weight: 400;
  color: var(--tp-ink);
  display: flex;
  align-items: baseline;
}
.tp-h2 .tp-serif { font-family: var(--tp-serif); font-weight: 300; }
.tp-h2 .tp-sans { font-family: var(--tp-sans); font-weight: 500; letter-spacing: -0.01em; }
.tp-logo-glyph { width: 0.592em; height: 0.74em; vertical-align: -0.7px; margin-right: 0.2em; fill: currentColor; flex-shrink: 0; }
.tp-lead { margin: 0; font-size: 15px; color: var(--tp-muted); }
.tp-kicker { margin: 0; font-size: 13px; font-weight: 500; color: var(--tp-muted); letter-spacing: 0.2em; }
.tp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- ヒーロー ---------- */
.tp-hero {
  position: relative;
  overflow: hidden;
  height: clamp(560px, 56.25vw, 810px);
  background: #bdbec2;
  color: #fff;
  /* 日本語コピーの文字数から JS が --tp-type-end（打ち終わり秒）を設定。既定は 57 文字相当 */
  --tp-type-end: 13.1s;
}
.tp-hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.tp-hero-shade { position: absolute; inset: 0; background: rgba(20, 26, 40, 0.22); }
.tp-hero-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; padding: 0 16px; text-align: center;
}
.tp-hero-title {
  margin: 0;
  font-size: clamp(40px, 5.3vw, 76px);
  line-height: 1.1; font-weight: 400; letter-spacing: -0.01em; white-space: nowrap;
  font-family: var(--tp-sans);
}
/* ①ロゴ: ぼかしから現れ、2.5秒後に大きい状態から縮む */
.tp-hero-title .tp-logo {
  width: 0.592em; height: 0.74em; vertical-align: -1px; margin-right: 0.035em; fill: currentColor;
  transform-origin: 50% 60%;
  animation: tpBlurIn 1s ease-out 0.5s both, tpLogoScale 1.6s cubic-bezier(0.65, 0, 0.35, 1) 2.5s both;
}
/* ②ロゴが左へ寄り、右に文字が開く */
.tp-hero-title .tp-slide {
  display: inline-flex; align-items: baseline; white-space: nowrap; vertical-align: baseline; overflow: hidden;
  animation: tpSlide 1.7s cubic-bezier(0.65, 0, 0.35, 1) 4.1s both;
}
.tp-hero-title .tp-blur { animation: tpBlurIn 1.4s ease-out 5.8s both; display: inline-flex; align-items: baseline; }
/* ③「etter than」は明朝。⑤打ち終わり1秒後に消えて幅を畳み「b hotel」になる */
.tp-hero-title .tp-etter {
  display: inline-flex; align-items: baseline; max-width: 6em; white-space: nowrap; vertical-align: baseline; overflow: hidden;
  font-family: var(--tp-serif); font-weight: 300;
  animation: tpFadeOut 1.6s ease-in-out calc(var(--tp-type-end) + 1s) both,
             tpCollapse 1.7s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--tp-type-end) + 2.6s) both;
}
.tp-hero-title .tp-hotel { font-family: var(--tp-sans); font-weight: 500; }
.tp-hero-title .tp-dot {
  display: inline-flex; align-items: baseline; max-width: 0.4em; vertical-align: baseline; overflow: hidden;
  animation: tpFadeOut 1.6s ease-in-out calc(var(--tp-type-end) + 1s) both,
             tpCollapseDot 1.7s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--tp-type-end) + 2.6s) both;
}
/* ④日本語コピーを1文字ずつ（JS が span を生成） */
.tp-hero-copy {
  margin: 0; max-width: 600px; min-height: 68px; white-space: nowrap;
  font-size: clamp(14px, 1.25vw, 18px); line-height: 1.9; letter-spacing: 0.14em; text-align: center;
}
.tp-hero-copy .tp-ch { opacity: 0; animation: tpType 0.01s linear both; }
.tp-hero-copy .tp-caret {
  display: inline-block; width: 0; height: 1.1em; vertical-align: -0.15em;
  border-right: 1.5px solid currentColor; margin-right: -1.5px; opacity: 0;
  animation: tpCaret 0.26s linear;
}
.tp-hero-copy .tp-caret-end { animation: tpBlink 1s steps(1) infinite; }
/* 下向きの矢印（演出の最後に出る） */
.tp-hero-cue {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  animation: tpFadeIn 1s ease-out calc(var(--tp-type-end) + 4.7s) both;
}
.tp-hero-cue svg { display: block; animation: tpCue 2s ease-in-out infinite; }
/* 演出をもう一度 */
.tp-hero-replay {
  position: absolute; right: 32px; bottom: 24px; height: 44px; padding: 0 18px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 22px;
  background: rgba(20, 26, 40, 0.35); color: #fff; font-family: inherit; font-size: 12px; letter-spacing: 0.14em;
  cursor: pointer;
}
.tp-hero-replay:hover { background: rgba(20, 26, 40, 0.55); }

@keyframes tpBlurIn { 0% { opacity: 0; filter: blur(14px); } 100% { opacity: 1; filter: blur(0); } }
@keyframes tpSlide { 0% { max-width: 0; } 100% { max-width: 680px; } }
@keyframes tpCollapse { 0% { max-width: 6em; } 100% { max-width: 0.26em; } }
@keyframes tpCollapseDot { 0% { max-width: 0.4em; } 100% { max-width: 0; } }
@keyframes tpLogoScale { 0% { transform: scale(2.4); } 100% { transform: scale(1); } }
@keyframes tpFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes tpFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tpType { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes tpCaret { 0%, 100% { opacity: 1; } }
@keyframes tpBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tpCue { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(8px); opacity: 1; } }
@keyframes tpSpotPulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes tpModalIn { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }

/* 動きを減らす設定の人には演出を省いて最終状態を見せる */
@media (prefers-reduced-motion: reduce) {
  .tp-hero *, .tp-hero *::before, .tp-hero *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; }
}

/* ---------- A New Experience. ---------- */
.tp-exp {
  min-height: clamp(360px, 39vw, 560px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 64px 24px; background: var(--tp-navy); text-align: center;
}
.tp-exp h2 {
  margin: 0; display: flex; flex-direction: column; align-items: center;
  font-size: clamp(40px, 4.4vw, 64px); line-height: 1.1; color: #fff; font-weight: 400;
}
.tp-exp h2 .tp-sans { font-family: var(--tp-sans); font-weight: 500; letter-spacing: -0.01em; }
.tp-exp h2 .tp-serif { font-family: var(--tp-serif); font-weight: 300; }
.tp-exp p { margin: 0; max-width: 640px; font-size: 16px; line-height: 2; color: #d7dbe4; letter-spacing: 0.06em; }

/* ---------- b standards. ---------- */
.tp-std { background: var(--tp-paper); padding: clamp(64px, 8.3vw, 120px) 0 clamp(64px, 7vw, 100px); }
.tp-std .tp-wrap { display: flex; flex-direction: column; gap: 20px; }
.tp-std .tp-lead { margin-bottom: 28px; }
.tp-std-figure {
  position: relative; aspect-ratio: 1200 / 580; border-radius: 12px; overflow: hidden; background: #d6d8dd;
}
.tp-std-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tp-std-figure.is-room img { object-position: center 60%; }
.tp-std-figure.is-bath img { object-position: center 62%; }
/* ホットスポット: left/top は図の幅・高さに対する % */
.tp-spot {
  position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; padding: 0;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(20, 28, 45, 0.22);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.tp-spot::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #fff;
  animation: tpSpotPulse 2s ease-out infinite;
}
.tp-spot svg { width: 14px; height: 18px; fill: var(--tp-ink); }
.tp-spot:hover { background: #fff; }
@media (max-width: 640px) {
  .tp-std-figure { aspect-ratio: 358 / 240; }
  .tp-spot { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
}

/* ポップアップ（既存の #modalOverlay を使い、見た目だけデザイン案に） */
body.tp .modal { max-width: 800px; border-radius: 16px; overflow: hidden; animation: tpModalIn 0.35s ease-out both; }
body.tp .modal-image { aspect-ratio: 16 / 9; background: #d6d8dd; }
body.tp .modal-image img, body.tp .modal-image video { display: block; width: 100%; height: 100%; object-fit: cover; }
body.tp .modal-image video[hidden], body.tp .modal-image img[hidden] { display: none; }
body.tp .modal-content { padding: 40px 40px 44px; display: flex; flex-direction: column; gap: 14px; }
body.tp .modal-content h3 { margin: 0; font-family: var(--tp-serif); font-weight: 300; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; color: var(--tp-ink); }
body.tp .modal-content .category { margin: 0; font-size: 13px; letter-spacing: 0.12em; color: var(--tp-muted-2); }
body.tp .modal-content .description { margin: 6px 0 0; font-size: 17px; line-height: 1.8; color: var(--tp-ink-2); }
body.tp .modal-content .modal-note { margin: 10px 0 0; font-size: 13px; line-height: 1.8; color: var(--tp-muted-2); }
body.tp .modal-close { right: 18px; top: 18px; width: 48px; height: 48px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
@media (max-width: 640px) { body.tp .modal-content { padding: 24px 20px 28px; } }

/* ---------- Recommendation / Booking ----------
   2026-10-06 ニシタニ様指示: 見出しは更新版（デザイン案）、カードと予約フォームの中身は従来のまま。
   予約フォームは以前ヒーロー上部にあった1行型（エリア・日程・人数を同じ行）＋「空室を検索」を中央に。 */
body.tp .recommendation-section, body.tp .booking-section { font-family: 'Noto Sans JP', sans-serif; }
.tp-sec-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 44px; }
.tp-sec-head .tp-h2 { font-family: var(--tp-sans); }
.tp-sec-head .tp-h2-serif { font-family: var(--tp-serif); font-weight: 300; }
.tp-sec-head .tp-kicker, .tp-sec-head .tp-lead { font-family: var(--tp-sans); }
.tp-booking-title {
  margin: 0; font-family: var(--tp-sans); font-weight: 500; font-size: clamp(40px, 4.2vw, 60px); line-height: 1.1; letter-spacing: -0.01em;
  display: flex; align-items: baseline; color: var(--tp-ink);
}
.tp-booking-title .tp-logo-glyph { width: 0.592em; height: 0.74em; vertical-align: baseline; margin-right: 0.035em; }
body.tp .booking-section .tp-sec-head { margin-bottom: 8px; }
body.tp .best-rate { margin: 0; }
body.tp .best-rate small { display: block; margin-top: 4px; }

/* 1行型の検索フォーム */
body.tp .booking-form--row {
  max-width: 60rem; margin: 1.75rem auto 1.25rem;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem;
  padding: 1rem 1.1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
body.tp .booking-form--row .booking-field { flex: 1 1 9rem; min-width: 8rem; gap: 0.3rem; }
body.tp .booking-form--row .booking-field-area { flex: 1.3 1 11rem; }
body.tp .booking-form--row .booking-field label { font-size: 0.72rem; font-weight: 600; color: #6b7280; }
body.tp .booking-form--row .booking-field select, body.tp .booking-form--row .booking-field input { height: 2.6rem; padding: 0 0.6rem; border-radius: 0.55rem; font-size: 0.95rem; }
body.tp .booking-form--row .booking-guests { display: flex; gap: 0.4rem; }
body.tp .booking-form--row .booking-guests select { flex: 1; min-width: 5.2em; }
/* 「空室を検索」: 2行目の中央 */
body.tp .booking-form--row .booking-submit {
  flex: 1 0 100%; max-width: 16rem; margin: 0.35rem auto 0; height: 2.6rem; padding: 0 1.5rem;
  border-radius: 0.55rem; background: #6b7687; color: #fff; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.04em;
}
body.tp .booking-form--row .booking-submit:hover { background: #58616f; }
@media (max-width: 720px) {
  body.tp .booking-form--row { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  body.tp .booking-form--row .booking-field { flex: 1 1 auto; }
  body.tp .booking-form--row .booking-submit { max-width: none; width: 100%; }
}

/* ---------- フッター（既存の帯。余白だけ） ---------- */
body.tp .footer { margin-top: 72px; }

/* ---------- ヘッダー（既存の帯。デザイン案の線色に合わせる） ---------- */
body.tp .header { background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--tp-line-2); box-shadow: none; }
body.tp .header .btn { border: 1px solid var(--tp-ink); border-radius: 4px; background: transparent; color: var(--tp-ink); font-size: 12px; letter-spacing: 0.16em; }
body.tp .header .btn:hover { background: var(--tp-ink); color: #fff; }

@media (max-width: 768px) {
  .tp-hero { height: 640px; }
  .tp-hero-inner { gap: 22px; }
  .tp-hero-replay { right: 16px; bottom: 16px; }
  .tp-hero-cue { bottom: 20px; }
}
