/*
 * footer_tp.css
 * 固定ページ専用 共通フッター スタイルシート
 * 格納場所: /wp-content/themes/cocoon-child-master/footer_tp/footer_tp.css
 *
 * Design Concept: 深淵なる黒金 ── Luxury Dark with Gold Shimmer
 */

/* ============================================================
   CSS カスタムプロパティ（デザイントークン）
   ============================================================ */
:root {
  --tp-footer-bg:           #1a1f14;
  --tp-footer-border-top:   1px solid rgba(180, 200, 120, 0.22);
  --tp-footer-gold:         #b8c878;
  --tp-footer-gold-light:   #d4e090;
  --tp-footer-gold-dim:     rgba(160, 190, 80, 0.55);
  --tp-footer-text:         rgba(255, 255, 255, 0.55);
  --tp-footer-text-hover:   #d4af37;
  --tp-footer-link-gap:     clamp(1.4rem, 3vw, 2.8rem);
  --tp-footer-font-site:    'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Rounded Mplus 1c', sans-serif;
  --tp-footer-font-nav:     'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Rounded Mplus 1c', sans-serif;
  --tp-footer-height:       auto;
  --tp-shimmer-duration:    3.8s;
}

/* ============================================================
   Cocoon デフォルトフッターを固定ページで非表示
   ============================================================ */
body.page #footer,
body.page .footer-area,
body.page .footer-widget-area,
body.page .go-to-top-button {
  display: none !important;
}

/* ============================================================
   フッター本体
   ============================================================ */
#tp-footer.tp-footer {
  position: relative;
  width: 100%;
  background-color: var(--tp-footer-bg);
  border-top: var(--tp-footer-border-top);
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(1.8rem, 4vw, 3rem) 1.5rem;
  z-index: 10;

  /* 上部ゴールドグラデーションライン */
  box-shadow: 0 -1px 0 0 rgba(212, 175, 55, 0.08),
              inset 0 1px 0 0 rgba(212, 175, 55, 0.15);
}

/* ============================================================
   キラキラ シマーレイヤー
   ============================================================ */
.tp-footer__shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shimmer-particle {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 208, 96, 0.9) 0%, rgba(212, 175, 55, 0.4) 40%, transparent 70%);
  opacity: 0;
  animation: tp-shimmer-burst var(--tp-shimmer-duration) ease-in-out infinite;
  will-change: transform, opacity;
}

/* 各パーティクルの位置・サイズ・遅延 */
.shimmer-particle:nth-child(1)  { width: 6px;  height: 6px;  top: 20%; left: 8%;   animation-delay: 0s; }
.shimmer-particle:nth-child(2)  { width: 4px;  height: 4px;  top: 60%; left: 18%;  animation-delay: 0.4s; }
.shimmer-particle:nth-child(3)  { width: 8px;  height: 8px;  top: 35%; left: 32%;  animation-delay: 0.8s; }
.shimmer-particle:nth-child(4)  { width: 5px;  height: 5px;  top: 75%; left: 45%;  animation-delay: 0.2s; }
.shimmer-particle:nth-child(5)  { width: 7px;  height: 7px;  top: 15%; left: 55%;  animation-delay: 1.1s; }
.shimmer-particle:nth-child(6)  { width: 4px;  height: 4px;  top: 55%; left: 65%;  animation-delay: 0.6s; }
.shimmer-particle:nth-child(7)  { width: 9px;  height: 9px;  top: 30%; left: 75%;  animation-delay: 1.5s; }
.shimmer-particle:nth-child(8)  { width: 5px;  height: 5px;  top: 70%; left: 82%;  animation-delay: 0.9s; }
.shimmer-particle:nth-child(9)  { width: 6px;  height: 6px;  top: 45%; left: 90%;  animation-delay: 0.3s; }
.shimmer-particle:nth-child(10) { width: 4px;  height: 4px;  top: 80%; left: 97%;  animation-delay: 1.3s; }

@keyframes tp-shimmer-burst {
  0%   { opacity: 0;    transform: scale(0.4) translateY(0);   }
  15%  { opacity: 1;    transform: scale(1.2) translateY(-4px); }
  30%  { opacity: 0.7;  transform: scale(1.0) translateY(-2px); }
  45%  { opacity: 0;    transform: scale(0.6) translateY(0);   }
  100% { opacity: 0;    transform: scale(0.4) translateY(0);   }
}

/* 横断シマーライン（ページ全幅を流れる光） */
#tp-footer.tp-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.0) 20%,
    rgba(212, 175, 55, 0.9) 50%,
    rgba(212, 175, 55, 0.0) 80%,
    transparent 100%
  );
  animation: tp-shimmer-line var(--tp-shimmer-duration) ease-in-out infinite;
  animation-delay: 1s;
  will-change: left;
}

@keyframes tp-shimmer-line {
  0%   { left: -60%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 160%; opacity: 0; }
}

/* ============================================================
   インナーコンテナ
   ============================================================ */
.tp-footer__inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.4rem);
}

/* ============================================================
   ナビゲーションリスト（PC: 横一列 / SP: 縦一列）
   ============================================================ */
.tp-footer__nav {
  width: 100%;
  text-align: center;
}

.tp-footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.tp-footer__nav-list li {
  display: flex;
  align-items: center;
}

/* セパレーター（PC: li と li の間） */
.tp-footer__nav-list li + li::before {
  content: '|';
  display: inline-block;
  color: var(--tp-footer-gold-dim);
  padding: 0 var(--tp-footer-link-gap);
  font-size: 0.65rem;
  opacity: 0.6;
}

.tp-footer__nav-list a {
  font-family: var(--tp-footer-font-nav);
  font-size: clamp(0.7rem, 1.5vw, 0.82rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--tp-footer-text);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
  padding: 0.25rem 0;
}

.tp-footer__nav-list a:hover,
.tp-footer__nav-list a:focus {
  color: var(--tp-footer-text-hover);
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  outline: none;
}

/* ============================================================
   コピーライト
   ============================================================ */
.tp-footer__copyright {
  width: 100%;
  text-align: center;
}

.tp-footer__copyright p {
  margin: 0;
  padding: 0;
  font-family: var(--tp-footer-font-nav);
  font-size: clamp(0.65rem, 1.4vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--tp-footer-text);
  line-height: 1.8;
}

/* ゴールドグロウ装飾ライン（コピーライト上） */
.tp-footer__copyright::before {
  content: '✦  ✦  ✦';
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.6em;
  color: var(--tp-footer-gold-dim);
  margin-bottom: 0.7rem;
  opacity: 0.6;
  animation: tp-ornament-pulse 4s ease-in-out infinite;
}

@keyframes tp-ornament-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}

/* サイト名リンク（稼ぐ〇〇日記） */
.tp-footer__sitename {
  font-family: var(--tp-footer-font-site);
  font-size: clamp(0.7rem, 1.6vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--tp-footer-gold);
  text-decoration: none;
  position: relative;
  padding-bottom: 1px;
  transition: color 0.3s ease, text-shadow 0.3s ease;

  /* アンダーライン演出 */
  background-image: linear-gradient(
    90deg,
    var(--tp-footer-gold-light),
    var(--tp-footer-gold)
  );
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.4s ease, color 0.3s ease, text-shadow 0.3s ease;
}

.tp-footer__sitename:hover,
.tp-footer__sitename:focus {
  color: var(--tp-footer-gold-light);
  text-shadow:
    0 0 8px rgba(240, 208, 96, 0.7),
    0 0 20px rgba(212, 175, 55, 0.3);
  background-size: 100% 1px;
  outline: none;
}

/* 年表示 */
.tp-footer__year {
  display: inline;
}

/* ============================================================
   スマートフォン対応（480px以下）
   ============================================================ */
@media screen and (max-width: 480px) {
  #tp-footer.tp-footer {
    padding: 1.6rem 1rem 1.8rem;
  }

  .tp-footer__nav-list {
    flex-direction: column;
    gap: 0;
    align-items: center;
  }

  /* SP: セパレーター非表示 → 縦並びに変更 */
  .tp-footer__nav-list li + li::before {
    display: none;
  }

  .tp-footer__nav-list li {
    width: 100%;
    justify-content: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    padding: 0.45rem 0;
  }

  .tp-footer__nav-list li:first-child {
    border-top: 1px solid rgba(212, 175, 55, 0.08);
  }

  .tp-footer__nav-list a {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }
}

/* ============================================================
   タブレット対応（481px〜834px）
   ============================================================ */
@media screen and (min-width: 481px) and (max-width: 834px) {
  .tp-footer__nav-list {
    flex-wrap: wrap;
    gap: 0.1rem 0;
  }

  .tp-footer__nav-list li + li::before {
    padding: 0 clamp(1rem, 2.5vw, 2rem);
  }
}

/* ============================================================
   アクセシビリティ: モーション低減設定への配慮
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .shimmer-particle,
  #tp-footer.tp-footer::before,
  .tp-footer__copyright::before {
    animation: none;
  }
}

/* ============================================================
   ページトップボタン（↑）
   LP共通：ヒーロー通過後〜フッター手前で表示
   Design: ミルキーホワイト × ローズゴールド — 清潔な女性的エレガンス
   ============================================================ */

#tp-pagetop {
  /* 固定配置 */
  position:   fixed;
  bottom:     2.8rem;
  right:      2rem;
  z-index:    9998;

  /* サイズ・形状 */
  width:      52px;
  height:     52px;
  border-radius: 50%;
  padding:    0;
  border:     none;

  /* ミルキーホワイト × ローズゴールドのガラス質感 */
  background: rgba(255, 252, 250, 0.88);
  backdrop-filter:         blur(16px);
  -webkit-backdrop-filter: blur(16px);

  /* ローズゴールドの繊細なボーダー */
  outline: 1.5px solid rgba(210, 170, 150, 0.35);
  box-shadow:
    0 2px 12px rgba(180, 130, 110, 0.12),
    0 6px 28px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(210, 170, 150, 0.12);

  /* 内部レイアウト */
  display:        flex;
  flex-direction: column;
  align-items:    center;
  justify-content: center;
  gap:            2px;

  /* 初期状態：非表示（フェードアウト・下にずれた状態） */
  opacity:   0;
  transform: translateY(18px) scale(0.9);
  pointer-events: none;
  cursor: pointer;

  /* トランジション */
  transition:
    opacity     0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform   0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow  0.3s ease,
    background  0.3s ease;

  -webkit-tap-highlight-color: transparent;
}

/* 表示状態 */
#tp-pagetop.is-visible {
  opacity:        1;
  transform:      translateY(0) scale(1);
  pointer-events: auto;
}

/* ホバー */
#tp-pagetop:hover {
  background: rgba(255, 254, 252, 0.96);
  transform:  translateY(-4px) scale(1.04);
  box-shadow:
    0 4px 20px rgba(180, 130, 110, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(210, 170, 150, 0.18);
}

/* フォーカス（キーボードアクセシビリティ） */
#tp-pagetop:focus-visible {
  outline: 2px solid rgba(200, 150, 130, 0.6);
  outline-offset: 4px;
}

/* クリック時 */
#tp-pagetop:active {
  transform:  translateY(0) scale(0.96);
  transition: transform 0.1s ease;
}

/* リングアクセント（装飾用の薄い内縁リング） */
.tp-pagetop__ring {
  position:      absolute;
  inset:         4px;
  border-radius: 50%;
  border:        1px solid rgba(210, 170, 150, 0.2);
  pointer-events: none;
  transition:    border-color 0.3s ease;
}

#tp-pagetop:hover .tp-pagetop__ring {
  border-color: rgba(210, 170, 150, 0.38);
}

/* SVG矢印アイコン */
.tp-pagetop__arrow {
  display:    flex;
  align-items: center;
  justify-content: center;
  color:      #b88c78;  /* ダスティローズゴールド */
  transition: color 0.3s ease, transform 0.3s ease;
  position:   relative;
  z-index:    1;
}

#tp-pagetop:hover .tp-pagetop__arrow {
  color:     #9a6e5e;
  transform: translateY(-1px);
}

/* 「TOP」ラベル */
.tp-pagetop__label {
  font-family:    'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif;
  font-size:      7.5px;
  font-weight:    700;
  letter-spacing: 0.16em;
  color:          #c4a090;
  line-height:    1;
  position:       relative;
  z-index:        1;
  transition:     color 0.3s ease;
}

#tp-pagetop:hover .tp-pagetop__label {
  color: #9a6e5e;
}

/* ─── スマートフォン ─── */
@media (max-width: 480px) {
  #tp-pagetop {
    width:   44px;
    height:  44px;
    bottom:  1.6rem;
    right:   1.2rem;
  }

  .tp-pagetop__arrow svg {
    width:  14px;
    height: 14px;
  }

  .tp-pagetop__label {
    font-size: 6.5px;
  }
}

/* ─── モーション低減対応 ─── */
@media (prefers-reduced-motion: reduce) {
  #tp-pagetop {
    transition: opacity 0.2s ease;
  }

  #tp-pagetop:hover {
    transform: none;
  }
}
