/*!
 * DAISEN Global Footer CSS
 * 格納場所: /daisen.life/public_html/wp-content/themes/cocoon-child-master/footer/footer.css
 * Version: 1.0.0
 *
 * 全ページ共通フッター。Cocoonテーマの影響を一切受けない独立設計。
 * style.css の CSS カスタムプロパティ（--ds-*）を継承して使用。
 */

/* ============================================================
   0. Cocoon 標準フッターを全ページで完全非表示
   ============================================================ */
#footer,
.site-footer,
.footer-widgets,
#footer-widget-area,
.cocoon-footer,
.footer-container,
#footer-container {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ============================================================
   1. フッター ルートコンテナ
   ============================================================ */
.dsf-footer {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* 全ページで最下部に */
  margin-top: auto;
  /* フォント */
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: rgba(255, 255, 255, 0.82);
}

/* ============================================================
   2. 背景レイヤー
   ============================================================ */
.dsf-footer__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 背景画像 */
.dsf-footer__bg-img {
  position: absolute;
  inset: 0;
  background-image: url('https://daisen.life/wp-content/uploads/2026/03/daisen_footer_imgage-scaled.webp');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  /* PC：ホバー時に微拡大するためトランジション設定 */
  transition: transform 12s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* オーバーレイ（深みのある宇宙感） */
.dsf-footer__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(4, 4, 20, 0.72) 0%,
      rgba(4, 4, 20, 0.58) 40%,
      rgba(4, 4, 20, 0.75) 100%
    );
}

/* 星のキャンバス */
.dsf-footer__bg-stars {
  position: absolute;
  inset: 0;
}

#dsf-star-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

/* ============================================================
   3. インナーレイアウト（PC：3カラム / スマホ：1カラム）
   ============================================================ */
.dsf-footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 56px 5% 48px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================================
   4. ブランドエリア（左カラム）
   ============================================================ */
.dsf-footer__brand {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 40px;
}

.dsf-footer__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
  /* ホバーアニメーション */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dsf-footer__brand-link:hover {
  transform: translateX(4px);
  filter: drop-shadow(0 0 16px rgba(0, 180, 216, 0.6));
}

.dsf-footer__brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  /* PC：ホバー時の輝きアニメーション */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dsf-footer__brand-link:hover .dsf-footer__brand-logo {
  transform: rotate(5deg) scale(1.08);
  filter: drop-shadow(0 0 12px rgba(0, 200, 230, 0.9));
}

.dsf-footer__brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.85rem;
  letter-spacing: 0.18em;
  color: #ffffff;
  text-shadow:
    0 0 20px rgba(0, 200, 230, 0.7),
    0 0 50px rgba(0, 200, 230, 0.3),
    0 2px 12px rgba(0, 0, 0, 0.6);
  line-height: 1;
  transition: text-shadow 0.4s ease;
}

.dsf-footer__brand-link:hover .dsf-footer__brand-name {
  text-shadow:
    0 0 28px rgba(0, 200, 230, 1),
    0 0 60px rgba(0, 200, 230, 0.6),
    0 2px 12px rgba(0, 0, 0, 0.6);
}

.dsf-footer__brand-tagline {
  margin: 14px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

/* ============================================================
   5. セパレーター（縦線）
   ============================================================ */
.dsf-footer__sep {
  flex: 0 0 1px;
  align-self: stretch;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 20%,
    rgba(255, 255, 255, 0.18) 80%,
    transparent 100%
  );
  margin: 0 36px;
}

/* ============================================================
   6. ナビゲーション（右3カラム）
   ============================================================ */
.dsf-footer__nav {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
  align-items: start;
  padding-left: 8px;
}

/* 各列 */
.dsf-footer__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* リンク */
.dsf-footer__link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 2.2;
  color: rgba(255, 255, 255, 0.72) !important;
  text-decoration: none !important;
  text-underline-offset: 3px;
  transition:
    color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    text-decoration-color 0.3s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    text-shadow 0.3s ease;
  will-change: transform;
  position: relative;
  width: fit-content;
}

/* PC：ホバー時の演出 */
.dsf-footer__link:hover {
  color: rgba(0, 220, 255, 1) !important;
  text-decoration: none !important;
  transform: translateX(5px);
  text-shadow:
    0 0 10px rgba(0, 200, 230, 0.7),
    0 0 24px rgba(0, 200, 230, 0.3);
}

/* ホバー前の光の粒（::before で左端ドット） */
.dsf-footer__link::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 5px;
  height: 5px;
  background: rgba(0, 220, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 200, 230, 0.8);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dsf-footer__link:hover::before {
  transform: translateY(-50%) scale(1);
}

/* ============================================================
   7. コピーライトバー
   ============================================================ */
.dsf-footer__copy-bar {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 5%;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
}

.dsf-footer__copy {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

.dsf-footer__copy-link {
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.dsf-footer__copy-link:hover {
  color: rgba(0, 220, 255, 0.9) !important;
  text-shadow: 0 0 12px rgba(0, 200, 230, 0.6);
}

/* ============================================================
   8. PC ホバー：背景画像の微動
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  .dsf-footer:hover .dsf-footer__bg-img {
    transform: scale(1.03);
  }
}

/* ============================================================
   9. PC：ナビゲーションの均等感
   ============================================================ */
@media (min-width: 1025px) {
  .dsf-footer__nav {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0;
  }

  /* 列間セパレーター */
  .dsf-footer__col[data-col="1"],
  .dsf-footer__col[data-col="2"] {
    padding-right: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    margin-right: -1px;
  }

  .dsf-footer__col[data-col="2"],
  .dsf-footer__col[data-col="3"] {
    padding-left: 24px;
  }
}

/* ============================================================
   10. タブレット（768px〜1024px）
   ============================================================ */
@media (max-width: 1024px) and (min-width: 769px) {
  .dsf-footer__inner {
    padding: 48px 4% 40px;
    flex-wrap: wrap;
    gap: 32px 0;
  }

  .dsf-footer__brand {
    flex: 0 0 220px;
    padding-right: 24px;
  }

  .dsf-footer__sep {
    margin: 0 24px;
  }

  .dsf-footer__nav {
    gap: 0 16px;
  }

  .dsf-footer__link {
    font-size: 0.79rem;
    line-height: 2.1;
  }
}

/* ============================================================
   11. スマートフォン（〜768px）
       レイアウト: ロゴ → 左列 → 中列 → 右列 → コピー
   ============================================================ */
@media (max-width: 768px) {

  /* インナーを縦積みに */
  .dsf-footer__inner {
    flex-direction: column;
    align-items: center;
    padding: 40px 6% 32px;
    gap: 0;
    text-align: center;
  }

  /* ブランドエリア */
  .dsf-footer__brand {
    flex: none;
    width: 100%;
    padding-right: 0;
    align-items: center;
    margin-bottom: 24px;
  }

  .dsf-footer__brand-link {
    justify-content: center;
  }

  .dsf-footer__brand-logo {
    width: 44px;
    height: 44px;
  }

  .dsf-footer__brand-name {
    font-size: 1.6rem;
  }

  .dsf-footer__brand-tagline {
    text-align: center;
    margin-top: 10px;
  }

  /* 縦セパレーターを横線に変換 */
  .dsf-footer__sep {
    flex: none;
    width: 80%;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.2) 20%,
      rgba(255, 255, 255, 0.2) 80%,
      transparent 100%
    );
    margin: 0 auto 28px;
  }

  /* ナビゲーション：縦1列 */
  .dsf-footer__nav {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    padding-left: 0;
  }

  /* 各列 */
  .dsf-footer__col {
    width: 100%;
    padding: 0 0 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    align-items: flex-start;
    padding-left: 6%;
  }

  .dsf-footer__col:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  /* スマホでのリンク */
  .dsf-footer__link {
    font-size: 0.86rem;
    line-height: 2.4;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.78) !important;
    /* スマホはホバー効果なし（タップ体験優先） */
  }

  .dsf-footer__link:hover {
    transform: none;
    text-shadow: none;
    color: rgba(255, 255, 255, 0.78) !important;
  }

  .dsf-footer__link::before {
    display: none;
  }

  /* コピーライトバー */
  .dsf-footer__copy-bar {
    padding: 16px 5%;
  }

  .dsf-footer__copy {
    font-size: 0.68rem;
  }
}

/* ============================================================
   12. 極小スクリーン（〜375px）
   ============================================================ */
@media (max-width: 375px) {
  .dsf-footer__inner {
    padding: 32px 4% 24px;
  }

  .dsf-footer__brand-name {
    font-size: 1.4rem;
  }

  .dsf-footer__brand-logo {
    width: 38px;
    height: 38px;
  }

  .dsf-footer__link {
    font-size: 0.82rem;
  }
}

/* ============================================================
   13. アニメーション キーフレーム
   ============================================================ */
@keyframes dsf-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dsf-shimmer {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.8; }
}

/* ============================================================
   14. 読み込み時のフェードイン
   ============================================================ */
.dsf-footer__brand {
  animation: dsf-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.dsf-footer__col[data-col="1"] {
  animation: dsf-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.dsf-footer__col[data-col="2"] {
  animation: dsf-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.dsf-footer__col[data-col="3"] {
  animation: dsf-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* アニメーションは一度だけ（スクロールリビール対応） */
.dsf-footer.is-visible .dsf-footer__brand,
.dsf-footer.is-visible .dsf-footer__col {
  animation-play-state: running;
}


/* =========================================================================
   ✦ DAISEN LIGHT ENHANCEMENT v1.0 ― 共通フッター「光の演出レイヤー」
   -------------------------------------------------------------------------
   ・デザイン思想（宇宙感・黒×シアン）は維持。PHP/JS は無変更
   ・暗幕を薄く（72/58/75% → 50/36/54%）、上端に光のライン、背景に淡い光
   ・補助文字のコントラストを引き上げ（白45〜50% → 62〜66%以上）
   ・発光は静的（点滅させない）
   ========================================================================= */

/* 1. 暗幕を緩和し、中央〜上端にシアンの淡い光を宿す */
.dsf-footer .dsf-footer__bg-overlay {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%,
      rgba(0, 200, 230, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 50% 45% at 88% 100%,
      rgba(0, 180, 216, 0.10) 0%, transparent 72%),
    linear-gradient(180deg,
      rgba(4, 4, 20, 0.50) 0%,
      rgba(4, 4, 20, 0.36) 40%,
      rgba(4, 4, 20, 0.54) 100%);
}
/* 星の輝きをわずかに強調 */
.dsf-footer #dsf-star-canvas { opacity: 0.75; }
/* 背景画像をわずかに持ち上げる */
.dsf-footer .dsf-footer__bg-img { filter: brightness(1.05); }

/* 2. 上端：光のライン（本文ページ→フッターの橋渡し） */
.dsf-footer::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(120, 232, 255, 0.85) 50%,
    transparent 100%);
  box-shadow: 0 0 22px 1px rgba(0, 200, 230, 0.35);
  opacity: 0.7;
  pointer-events: none;
}

/* 3. 文字：暗幕を薄くした分、文字側のコントラストを引き上げ */
.dsf-footer .dsf-footer__brand-tagline { color: rgba(255, 255, 255, 0.68); }
.dsf-footer .dsf-footer__copy          { color: rgba(255, 255, 255, 0.64); }
.dsf-footer .dsf-footer__link {
  color: rgba(255, 255, 255, 0.84) !important;
  text-shadow: 0 1px 8px rgba(4, 4, 20, 0.55);
}
.dsf-footer .dsf-footer__link:hover {
  color: rgba(0, 220, 255, 1) !important;
  text-shadow:
    0 0 10px rgba(0, 200, 230, 0.7),
    0 0 24px rgba(0, 200, 230, 0.3);
}
.dsf-footer .dsf-footer__copy-link { color: rgba(255, 255, 255, 0.82) !important; }
.dsf-footer .dsf-footer__copy-link:hover { color: rgba(0, 220, 255, 0.95) !important; }
.dsf-footer .dsf-footer__brand-tagline,
.dsf-footer .dsf-footer__copy { text-shadow: 0 1px 8px rgba(4, 4, 20, 0.5); }

/* 4. ロゴの発光（通常時から静的に） */
.dsf-footer .dsf-footer__brand-logo {
  filter: drop-shadow(0 0 8px rgba(0, 200, 230, 0.45));
}
.dsf-footer .dsf-footer__brand-link:hover .dsf-footer__brand-logo {
  filter: drop-shadow(0 0 12px rgba(0, 200, 230, 0.9));
}

/* 5. 縦線・区切り線を少し明るく（光の筋として見えるように） */
.dsf-footer .dsf-footer__sep {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(160, 235, 255, 0.28) 20%,
    rgba(160, 235, 255, 0.28) 80%,
    transparent 100%);
}
.dsf-footer .dsf-footer__copy-bar {
  border-top-color: rgba(160, 235, 255, 0.18);
  background: rgba(0, 0, 0, 0.18);
}

/* 6. キーボード操作時のフォーカスも「光」で */
.dsf-footer a:focus-visible {
  outline: 2px solid rgba(120, 232, 255, 0.9);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(0, 200, 230, 0.25);
}

/* 7. 動きを抑えたい利用者への配慮 */
@media (prefers-reduced-motion: reduce) {
  .dsf-footer .dsf-footer__bg-img,
  .dsf-footer .dsf-footer__link,
  .dsf-footer .dsf-footer__brand-link,
  .dsf-footer .dsf-footer__brand-logo { transition: none !important; }
  .dsf-footer__brand,
  .dsf-footer__col { animation: none !important; }
}

/* ===== /DAISEN LIGHT ENHANCEMENT (footer) ===== */

/* ============================================================
   99. 共通フッター下の「不要な空白」防止
   ------------------------------------------------------------
   【原因】
   共通フッター（.dsf-footer）の直後〜</body> の間には、JS/PHP が出力する
   次の2つの要素が並ぶ。見た目の定義は style.css 側にあり、LP（独自テンプレート）で
   style.css が外されると、どちらも「無装飾のまま通常フロー内」に残り、
   フッターの下に空白帯として現れる。

     ① #ds-lightbox（js/daisen-image.js が body 末尾へ生成。✕ボタン・画像・キャプション）
        → 添付画像1：左に「✕」のある帯
     ② #daisen-pagetop（functions.php §47 が wp_footer で出力するページトップボタン）
        → 添付画像2：左下の小さな枠（無装飾の <button>）

   【対策】
   :where() で詳細度を 0 にして「style.css / daisen-top.css が無いページでだけ」
   効く既定値を与える。style.css が読み込まれるページ（投稿・トップ等）では
   style.css 側の指定が常に優先されるため、ライトボックスやページトップの
   既存の動作・見た目は変わらない。
   ============================================================ */

/* ① ライトボックス：無装飾時は完全に非表示（フロー・高さに一切関与しない） */
:where(#ds-lightbox) {
  display: none;
}

/* ② ページトップボタン：無装飾時はフローから外して非表示
      （position:fixed でも、display:none でも高さは 0。念のため両方指定） */
:where(#daisen-pagetop) {
  display: none;
  position: fixed;
  margin: 0;
  padding: 0;
}

/* ③ 共通フッター自身の下に余白・隙間を作らない */
.dsf-footer {
  display: block;
  margin-bottom: 0;
  padding-bottom: 0;
}
.dsf-footer > :last-child {
  margin-bottom: 0;
}

/* ④ 共通フッターが載っているページでは、body 下端の余白をゼロに
      （:has() 対応ブラウザのみ。非対応でも他の指定には影響しない） */
@supports selector(:has(*)) {
  html:has(.dsf-footer),
  body:has(> .dsf-footer) {
    margin-bottom: 0;
  }
}
