/*
Theme Name: mytheme
Author: Shota Nakajima
Version: 1.1.10
*/

/* ========== Reset / Base ========== */
html,body{margin:0;padding:0}
*{box-sizing:border-box}
img{display:block;max-width:100%;height:auto}

html,body{
  font-family:'Noto Sans JP','Noto Sans','Hiragino Kaku Gothic ProN','Meiryo',sans-serif;
  color:#fff;
  background:#000;
}
body{overflow-x:hidden}

/* ========== Header（黒帯） ========== */
.site-header{background:#000;padding:0;height:auto;}
.header-inner{
  display:flex;align-items:center;justify-content:flex-start;
  height:56px;padding:0 32px;
  gap:clamp(16px,2.5vw,48px);
}

/* --- ロゴ --- */
.site-logo__link{display:inline-flex;align-items:center;line-height:1;}
.site-logo__link img,.site-logo img{
  height:28px !important;width:auto;display:block;
  transition:opacity .25s ease, filter .25s ease, transform .25s ease;
}
.site-logo__link:hover img{
  filter:grayscale(25%) brightness(.9);
  opacity:.85;
}

/* --- ナビ --- */
.global-nav{margin-left:auto;min-width:0;}
.global-nav__list{
  list-style:none;margin:0;padding:0;display:flex;
  gap:clamp(14px,1.8vw,36px);white-space:nowrap;
}
.global-nav__list a{
  color:#fff;text-decoration:none;display:flex;flex-direction:column;align-items:center;
  line-height:1.15;font-weight:700;font-size:clamp(12px,.9vw,14px);
}
.global-nav__list a::before{
  content:attr(title);font-size:clamp(10px,.75vw,11px);
  letter-spacing:.08em;opacity:.9;
}
.global-nav__list a:hover{color:#a2a2a2;text-decoration:none;}
@media (max-width:1280px){ .global-nav__list a::before{display:none;} }

/* --- SNSアイコン --- */
.sns-icons{margin-left:0;display:flex;align-items:center;gap:12px;}
.sns-icons img{width:20px;height:20px;filter:brightness(0) invert(1);transition:opacity .2s;}
.sns-icons a:hover img{opacity:.7}

/* ========== Hero（スライダー） ========== */
:root{ --header-h: 56px; }

.hero-slider{
  position:relative;width:100%;margin:0;overflow:hidden;background:#000;
  /* PCは従来どおりフル画面（ヘッダー分だけ引く） */
  height:calc(100svh - var(--header-h));
  height:calc(100dvh - var(--header-h));
  height:calc(100vh  - var(--header-h));
}

/* 管理バー対策 */
body.admin-bar .hero-slider{
  height:calc(100svh - var(--header-h) - 32px);
  height:calc(100dvh - var(--header-h) - 32px);
  height:calc(100vh  - var(--header-h) - 32px);
}

/* --- スライド（フェード＋ズーム） --- */
.hero-slide{
  position:absolute;inset:0;
  opacity:0;visibility:hidden;
  transform:scale(1.05);
  transition:opacity 1s ease-in-out,visibility 1s ease-in-out,transform 4s ease-in-out;
  display:flex;align-items:center;justify-content:center;
}
.hero-slide.is-active{
  opacity:1;visibility:visible;transform:scale(1);
  z-index:1;
}
.hero-slide img{
  width:100%;height:100%;
  object-fit:cover;object-position:center;
}

/* --- CTAボタン --- */
.hero-cta{
  position:absolute;z-index:3;
  /* PCは従来のカスタムプロパティで位置決め */
  top:var(--cta-top,60%);left:var(--cta-left,83%);
  transform:translate(-50%,-50%);
  display:inline-flex;align-items:center;justify-content:center;
  white-space:nowrap;line-height:1;box-sizing:border-box;

  padding:10px 20px;
  min-width:210px;

  background:transparent;
  color:#fff;
  border:3px solid #fff;
  border-radius:30px;
  font-weight:700;
  font-size:18px;
  text-decoration:none;
  letter-spacing:.05em;
  box-shadow:0 3px 10px rgba(0,0,0,.25);
  transition:transform .3s ease,background .3s ease,color .3s ease,border-color .3s ease;
}
.hero-cta:hover{
  background:#000;border-color:#fff;color:#fff;
  transform:translate(-50%,-52%);
}

/* --- モバイルの最小調整 --- */
@media (max-width:767px){
  .hero-cta{
    font-size:15px;
    padding:10px 22px;
    min-width:min(78vw,260px);
  }
}

/* ===== 矢印ナビ ===== */
.hero-arrows{
  position:absolute; inset:0; pointer-events:none; z-index:4;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 16px;
}
.hero-arrows button{
  pointer-events:auto;
  width:48px; height:48px; border-radius:50%;
  border:2px solid #fff; background:rgba(0,0,0,.25);
  color:#fff; font-size:28px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s ease, transform .2s ease, opacity .2s ease;
  opacity:.9;
}
.hero-arrows button:hover{
  background:rgba(0,0,0,.45);
  transform:scale(1.06);
}
@media (max-width:767px){
  .hero-arrows button{ width:40px; height:40px; font-size:24px; }
}

/* ===== Responsive Patch（PCは触らない／TB・SPのみ） ===== */

/* TB・SPも常に全画面（アドレスバー対策付き）＋矢印非表示 */
@media (max-width:1024px){
  .hero-slider{
    /* 古→新の順でフォールバック。typo注意：dsvhは存在しない */
    height: calc(100vh  - var(--header-h));
    height: calc(100svh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    min-height:-webkit-fill-available; /* iOS保険 */
  }
  body.admin-bar .hero-slider{
    height: calc(100vh  - var(--header-h) - 32px);
    height: calc(100svh - var(--header-h) - 32px);
    height: calc(100dvh - var(--header-h) - 32px);
    min-height:-webkit-fill-available;
  }
  .hero-cta{ font-size: clamp(15px, 1.9vw, 18px); padding: 12px 18px; }
  .hero-prev,.hero-next{ width: clamp(44px, 7vw, 56px); height: clamp(44px, 7vw, 56px); }
  .hero-arrows{ display:none !important; } /* TB/SPで矢印オフ（オート＋スワイプのみ） */
}

/* SPは“画像の上”に置き、数値で微調整可能（CSS変数で上書きOK） */
@media (max-width:768px){
  .hero-cta{
    /* デフォは下センター。下から距離は --cta-mb で上書き可 */
    top: var(--cta-mt, auto);
    left: var(--cta-ml, 50%);
    bottom: var(--cta-mb, 72px);
    transform: translateX(-50%);
    max-width:min(92vw,560px);
    text-align:center; white-space:nowrap;
  }
}

/* 省モーション */
@media (prefers-reduced-motion: reduce){
  .hero-slide{ transition:opacity .2s linear; }
  .hero-prev,.hero-next,.hero-cta{ transition:none; }
}

/* ===== 表示切替（PC／SP） ===== */

/* デフォルトはPC表示 */
.only-sp { display: none !important; }
.only-pc { display: block !important; }

/* タブレット以下はSP版だけ見せる（スライド非表示） */
@media (max-width:1024px){
  .only-pc { display: none !important; }
  .only-sp { 
    display: block !important;
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-h));
    overflow: hidden;
  }
  .only-sp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
  /* iPhone対策 */
  @supports (-webkit-touch-callout: none) {
    .only-sp { height: 100dvh; }
  }
}

/* === Picture ラッパーに高さを通す（これが鍵） === */
.hero-slide picture{
  display:block;
  position:absolute;        /* スライドと同じ面いっぱいに */
  inset:0;
  width:100%;
  height:100%;
  z-index:1;                /* CTAより下でOK */
}
.hero-slide picture > img{
  width:100%;
  height:100%;
  object-fit:cover;         /* 端はトリミングしても良い */
  object-position:center;
  display:block;
}

/* TB/SPは矢印を消す（スライドは動いてOKのまま） */
@media (max-width:1024px){
  .hero-arrows{ display:none !important; }
  /* 高さは常に全画面（アドレスバー対策） */
  .hero-slider{
    height:calc(100vh  - var(--header-h));
    height:calc(100svh - var(--header-h));
    height:calc(100dvh - var(--header-h));
    min-height:-webkit-fill-available;
  }
  body.admin-bar .hero-slider{
    height:calc(100vh  - var(--header-h) - 32px);
    height:calc(100svh - var(--header-h) - 32px);
    height:calc(100dvh - var(--header-h) - 32px);
    min-height:-webkit-fill-available;
  }
}

/* ===== PC/SP 出し分け ===== */
.only-pc { display:block; }
.only-sp { display:none; }

/* ===== TB/SPは静止画だけ表示（スライドをDOMごと隠す） ===== */
@media (max-width:1024px){
  .only-pc { display:none !important; }   /* ← PCスライダーを完全に非表示 */
  .only-sp { display:block !important; }

  /* 全画面・黒帯ゼロ */
  .hero-static{
    position:relative;
    width:100%;
    height:calc(100vh - var(--header-h));
    overflow:hidden;
    background:#000;
  }
  .hero-static picture,
  .hero-static img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;        /* 端はトリミングOKでフィット */
    object-position:center;
  }

  /* iOSアドレスバー対策（黒帯防止） */
  .hero-static{
    height:calc(100svh - var(--header-h));
    height:calc(100dvh - var(--header-h));
    min-height:-webkit-fill-available;
  }
  body.admin-bar .hero-static{
    height:calc(100vh - var(--header-h) - 32px);
    height:calc(100svh - var(--header-h) - 32px);
    height:calc(100dvh - var(--header-h) - 32px);
    min-height:-webkit-fill-available;
  }

  /* TB/SPは矢印も消す（念のため） */
  .hero-arrows{ display:none !important; }
}

/* ===== スマホでの横ズレ防止 ===== */
@media (max-width:1024px){
  html, body {
    overflow-x: hidden !important; /* 横スクロール禁止 */
    overscroll-behavior-x: none;   /* iOS/Androidの横バウンス防止 */
  }
  .hero-static {
    touch-action: pan-y; /* ←縦方向のスクロールのみ許可（横は禁止） */
  }
}

/* ======== SP/TB専用ヘッダー（PCは絶対に影響しない版） ======== */

/* デフォでは何もしない（PC用保持） */
.sp-header { display: none; }

/* 1024px以下だけ適用 */
@media screen and (max-width: 1024px) {

  /* PCヘッダーはSP/TBでは隠す（PCには効かない） */
  .site-header { display: none !important; }

  /* SPヘッダー本体 */
  .sp-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    position:fixed;
    top:0; left:0; width:100%; height:56px;
    padding:0 16px;
    z-index:1000;
    background:rgba(0,0,0,.5);
    backdrop-filter:blur(6px);
  }
  .sp-logo img{
    height:34px; width:auto;
    filter:brightness(0) invert(1);
    transition:opacity .3s;
  }
  .sp-logo:hover img{ opacity:.85; }

  .sp-menu-btn{
    width:36px; height:28px; border:0; background:transparent; cursor:pointer;
    display:flex; flex-direction:column; justify-content:space-between;
  }
  .sp-menu-btn span{
    display:block; width:100%; height:3px; background:#fff; border-radius:2px;
    transition:transform .3s, opacity .3s;
  }

  /* 本文の上ずれ防止（SP/TBのみ） */
  body { padding-top:56px; }
}

/* 念のため：PC幅ではSPヘッダーを強制非表示＆余白ゼロ */
@media screen and (min-width: 1025px){
  .sp-header { display:none !important; }
  body { padding-top: 0 !important; }
}

/* ====== タブレット・スマホ専用CTAボタン ====== */

/* デフォでは非表示（PCに影響させない） */
.hero-cta-sp { display: none; }

/* タブレット／スマホのみ有効 */
@media screen and (max-width: 1024px)
 {

  .hero-cta-sp {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 50%;
  bottom: 38%;
  transform: translateX(-50%);
  z-index: 5;

    /* 見た目（少し小さめ） */
    
    padding: 10px 24px;
  border: 2px solid #fff;
  border-radius: 28px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: clamp(13px, 3vw, 15px);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .05em;
  white-space: nowrap;              /* ←改行禁止 */
  min-width: min(50vw, 200px);      /* ←ボタン幅を確保 */
  transition: background .3s ease, transform .3s ease;
}

  .hero-cta-sp:hover {
    background: rgba(0,0,0,0.7);
    transform: translateX(-50%) translateY(-2px);
  }
}

/* ===== TB/SPドロワー（PCには効かない） ===== */
@media (max-width:1024px){

  /* 本体右からスライド */
  .sp-drawer{
    position: fixed;
    top: 0; right: 0;
    width: min(84vw, 320px);
    height: 100dvh;
    background: #111;
    z-index: 1100; /* ヘッダーより上 */
    transform: translateX(100%);
    transition: transform .3s ease;
    padding: 72px 20px 24px; /* 上はヘッダー分＋余白 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* オーバーレイ */
  .sp-overlay{
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1050;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }

  /* 開いた状態（JSで .is-open を body に付与） */
  body.is-open .sp-drawer{ transform: translateX(0); }
  body.is-open .sp-overlay{ opacity: 1; pointer-events: auto; }
  body.is-open{ overflow: hidden; } /* スクロールロック */

  /* メニューの見た目 */
  .sp-nav__list{
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 14px;
  }
  .sp-nav__list a{
    display: block;
    padding: 14px 12px;
    border-radius: 10px;
    color: #fff; text-decoration: none; font-weight: 700;
    background: #1a1a1a;
  }
  .sp-nav__list a:hover{ background:#242424; }

  /* ハンバーガーのX化（既にactiveスタイルはあるので再利用） */
  body.is-open .sp-menu-btn span:nth-child(1){ transform: translateY(12px) rotate(45deg); }
  body.is-open .sp-menu-btn span:nth-child(2){ opacity: 0; }
  body.is-open .sp-menu-btn span:nth-child(3){ transform: translateY(-12px) rotate(-45deg); }
}

/* === PCヘッダー強制パッチ（>1024px だけ適用）=== */
@media (min-width:1025px){

  /* SP用パーツはPCでは完全に無効化 */
  .sp-header, .sp-drawer, .sp-overlay { display:none !important; }

  /* 黒帯ヘッダーの基本レイアウトを再確定 */
  .site-header{ background:#000; padding:0; height:auto; }
  .header-inner{
    display:flex; align-items:center; justify-content:flex-start;
    height:56px; padding:0 32px;
    gap: clamp(16px, 2.5vw, 48px);
  }

  /* --- ナビ（箇条書きを消す／横並びにする） --- */
  .global-nav{ margin-left:auto; min-width:0; }
  .global-nav__list{
    list-style: none !important;   /* ← ● を消す */
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;      /* ← 横並び */
    gap: clamp(14px, 1.8vw, 36px);
    white-space: nowrap;
  }
  .global-nav__list li{ list-style: none !important; } /* 念押し */

  .global-nav__list a{
    color:#fff; text-decoration:none;
    display:flex; flex-direction:column; align-items:center;
    line-height:1.15; font-weight:700; font-size:clamp(12px,.9vw,14px);
  }
  .global-nav__list a::before{
    content:attr(title);
    font-size:clamp(10px,.75vw,11px);
    letter-spacing:.08em; opacity:.9;
  }
  .global-nav__list a:hover{ color:#a2a2a2; text-decoration:none; }

  /* ロゴ */
  .site-logo__link{ display:inline-flex; align-items:center; line-height:1; }
  .site-logo__link img,
  .site-logo img{
    height:28px !important; width:auto; display:block;
    transition:opacity .25s ease, filter .25s ease, transform .25s ease;
  }
}

