/* =========================================================
   layout.css
   ---------------------------------------------------------
   全体レイアウト（共通枠）
   - .wrap（幅と余白）
   - 見出し（h2 / h3）
   - トップナビ（.topnav）
   - ロゴ（h1 / .logo）
   - ページトップ
   ※ セクション固有（featured / ig / tiktok 等）は含めない
   ========================================================= */


body.modal-lock{
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* =========================================================
   1) Variables / Base
   ========================================================= */
.wrap{
  max-width: var(--max);
  width: 88%;
  margin: 0 auto;
}

/* ==========================================
   2) LOGO
   ------------------------------------------
   ・PC：最大650px
   ・画面の高さに応じて横幅を調整
   ・タブレット（768〜1024px）：PC指定の約半分、最大325px
   ・スマートフォン：親要素の幅に収める
   ========================================== */

/* =============================
   PC
   ============================= */

h1 {
    margin: 0;
    padding: 48px 0 25px;
    text-align: center;
}

h1 img.logo {
    width: min(100%, 650px, 60vh);
    height: auto;
    display: inline-block;
    object-fit: contain;
    filter: drop-shadow(0 10px 28px rgba(249, 197, 67, .35));
}

/* タブレットのロゴのみ、幅と高さ上限を半分にする */
@media (min-width: 768px) and (max-width: 1024px) {
    h1 img.logo {
        width: min(50%, 325px, 30vh);
    }
}


/* =============================
   タブレット
   ============================= */

@media (max-width: 767px) {

    h1 {
        padding: 70px 0 25px;
    }

    h1 img.logo {
        width: min(100%, 420px, 60vh);
    }

}


/* =============================
   スマートフォン
   ============================= */

@media (max-width: 767px) {

    h1 {
        padding: 9px 0 18px;
    }

    h1 img.logo {
        width: min(100%, 420px);
    }

}

/* =========================================================
   3) Headings
   ========================================================= */
h2,
h3{
  margin-bottom: 2rem;
  color: var(--blue);
  text-align: center;
}

h2{
  font-size: 36px;
  text-transform: uppercase;
}

h3{
  font-size: calc(18px * var(--official-font-scale, 1));
}

@media (max-width: 767px){

  /* ---------- Headings ---------- */
  h2{
    font-size: 28px;
  }

  h3{
    font-size: calc(16px * var(--official-font-scale, 1));
  }

}

/* =========================
   4) PageTop
   ========================= */

#page_top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 999;

  width: 54px;
  height: 54px;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 50%;

  /* サイト全体の背景色に合わせたグラデーション */
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(255, 165, 90, .40),
      transparent 65%
    ),
    radial-gradient(
      circle at 82% 10%,
      rgba(190, 175, 235, .26),
      transparent 65%
    ),
    radial-gradient(
      circle at 50% 80%,
      rgba(255, 221, 110, .30),
      transparent 68%
    ),
    linear-gradient(
      180deg,
      var(--bg),
      #fff
    );

  backdrop-filter: blur(8px);
  text-decoration: none;

  opacity: 0;
  transform: translateY(18px) scale(.92);
  pointer-events: none;

  transition:
    opacity .35s ease,
    transform .35s ease,
    background-color .25s ease,
    border-color .25s ease;
}

#page_top.is-visible{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#page_top:hover{
  background: rgba(255, 255, 255, 0.85);
  border-color: #7f7f7f;
  transform: translateY(-2px) scale(1.02);
}

#page_top::before{
  content: "";
  width: 12px;
  height: 12px;
  border-top: 3px solid #ffc232;
  border-left: 3px solid #ffc232;
  transform: translateY(2px) rotate(45deg);
}

@media (max-width: 767px){

  /* ---------- PageTop ---------- */
  #page_top{
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
  }

  #page_top::before{
    width: 10px;
    height: 10px;
  }
}

/* =========================
   5) Navigation Toggle
   ---------------------------------------------------------
   スマホ時のみ表示
   ========================= */
.nav-toggle{
  display: none;
  position: relative;
  z-index: 1002;
  width: 50px;
  height: 50px;
  padding-right: 15px;
  padding-left: 15px;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-toggle span{
  display: block;
  width: 100%;
  height: 2px;
  margin: 6px 0;
  transition: .3s;
  box-shadow: 0 1px 2px rgba(145, 145, 145, 0.25);
}

.nav-toggle span:first-of-type,
.nav-toggle span:nth-of-type(3){
  background: #ffe5a4;
}

.nav-toggle span:nth-of-type(2){
  background: #ffaeee;
}

.nav-toggle.is-open{
  background-color: transparent;
}

.nav-toggle.is-open span{
  background: #ffffff;
}

.nav-toggle.is-open span:nth-child(1){
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2){
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3){
  transform: translateY(-8px) rotate(-45deg);
}


/* =========================
   menu logo
   ========================= */
.topnav .nav-menu .menu-logo{
  display: none;
}


/* =========================================================
   6) Top Navigation
   ========================================================= */

/* ---------- Base ---------- */
.topnav{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  width: 100%;
  padding: 18px 0 14px;
  font: calc(12px * var(--official-font-scale, 1))/1 ui-sans-serif, system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (min-width: 768px){
  .topnav{
    color: var(--muted);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}


/* ---------- Navigation Row ---------- */
.topnav .row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.topnav .row a{
  position: relative;
  padding: 2px 0;
  line-height: 1.6;
}

.topnav .row a span{
  display: block;
  text-align: center;
}

.topnav .row a span:nth-of-type(2){
  font-size: calc(9px * var(--official-font-scale, 1));
}

.topnav .row a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  opacity: 0;
  transform: scaleX(.7);
  transition: opacity .25s ease, transform .25s ease;
}

.topnav .row a:hover::after{
  opacity: 1;
  transform: scaleX(1);
}


/* ---------- Open Animation ---------- */
.topnav .row.nav-open a{
  opacity: 1;
  transform: translateX(0);
  overflow: hidden;
  transition:
    opacity .45s ease,
    transform .45s cubic-bezier(.2,.9,.2,1);
}

/* メニュー項目の順番表示 */
.topnav .row.nav-open > a:nth-of-type(1){ transition-delay: .10s; }
.topnav .row.nav-open > a:nth-of-type(2){ transition-delay: .15s; }
.topnav .row.nav-open > a:nth-of-type(3){ transition-delay: .20s; }
.topnav .row.nav-open > a:nth-of-type(4){ transition-delay: .25s; }
.topnav .row.nav-open > a:nth-of-type(5){ transition-delay: .30s; }
.topnav .row.nav-open > a:nth-of-type(6){ transition-delay: .35s; }
.topnav .row.nav-open > a:nth-of-type(7){ transition-delay: .40s; }
.topnav .row.nav-open > a:nth-of-type(8){ transition-delay: .45s; }

/* 英語 / 日本語の遅延 */
.topnav .row.nav-open > a span:first-child{
  transition-delay: .5s;
}

.topnav .row.nav-open a span:last-child{
  transition-delay: .8s;
}

/* =========================================================
   Mobile Navigation - Text Alignment
   ---------------------------------------------------------
   ・メニュー内の文字を中央寄せ
   ・英語と日本語の配置を統一
========================================================= */

@media (max-width: 767px) {

  .topnav .row.nav-open a {
    justify-content: center;
    text-align: center;
  }

  .topnav .row a span:first-of-type,
  .topnav .row a span:nth-of-type(2) {
    text-align: center;
  }

}

@media (max-width: 480px) {

  .topnav .row.nav-open a {
    justify-content: center;
  }

}


/* =========================================================
   7) Responsive
   ========================================================= */
@media (max-width: 767px){

  /* ---------- Top Navigation ---------- */
  .topnav{
    padding: 14px 0;
  }

  .topnav .wrap{
    position: relative;
    min-height: 26px;
  }

  /* Toggle表示 */
  .nav-toggle{
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #6cccffee;
  }

  /* SP時のメニュー本体 */
  .topnav .row{
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;

    display: flex;              /* ← 最初からflex */
    flex-direction: column;     /* ← 縦並び */
    gap: 0;

    width: 100%;
    height: 100vh;
    padding: 80px 24px 40px;

    text-align: center;
    color: #fff;

    backdrop-filter: blur(72px);
    background-color: #8dc5e300;

    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);

    transition:
      transform .45s cubic-bezier(.2,.8,.2,1),
      opacity .3s ease;
  }

  /* 開く前のリンク状態 */
  .topnav .row > a{
    opacity: 0;
    transform: translateX(50px);
  }

  .topnav .row > a span{
    opacity: 0;
    transform: translateY(10px);
  }

  .topnav .row a span:first-of-type{
    text-align: left;
    font-size: calc(14px * var(--official-font-scale, 1));
  }

  .topnav .row a span:nth-of-type(2){
    text-align: right;
  }

  /* メニュー展開時 */
  .topnav .row.nav-open{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);

    width: min(300px, 75%);
    height: 100vh;
    height: 100dvh;
    overflow: hidden; /* ← 全体スクロールをやめる */

    background: linear-gradient(
      180deg,
      #8dc5e3 50%,
      #6aaed4 100%
    );

    box-shadow:
      -12px 0 32px rgba(0,0,0,.12),
      inset 1px 0 0 rgba(0, 0, 0, 0.18);
  }

  .topnav .nav-menu{
    box-sizing: border-box;
  }

  .topnav .nav-menu .header-cotact{
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 12px;
  }  

  /* 各リンク */
  .topnav .row.nav-open a{
    display: flex;
    align-items: center;

    width: 100%;

    font-size: calc(14px * var(--official-font-scale, 1));
    font-weight: 600;
    letter-spacing: .14em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: #fff;

    transition:
      transform .25s ease,
      background .25s ease,
      border-color .25s ease,
      box-shadow .25s ease,
      color .25s ease;
  }

  .topnav .row.nav-open > a:nth-of-type(odd){
    background-color: var(--yellow);
  }

  .topnav .row.nav-open > a:nth-of-type(even){
    background-color: var(--pink);
  }

  /* テキストアニメーション */
  .topnav .row.nav-open > a span:first-child{
    animation: navBounce 1.5s ease forwards;
  }

  .topnav .row.nav-open > a span:nth-child(2){
    animation: navBounce2 2s ease forwards;
  }

  /* ---------- Overlay ---------- */
  .nav-overlay{
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
  }

  .nav-overlay.is-open{
    opacity: 1;
    visibility: visible;
  }

  body.nav-open{
    overflow: hidden;
  }

  /* ---------- Menu Logo ---------- */
  .topnav .nav-menu .menu-logo{
    display: block;
    width: 85%;
    margin-inline: auto;
    margin-bottom: 9px;
    flex-shrink: 0;
  }

  /* ---------- Header Contact ---------- */
  .topnav .nav-menu .header-cotact{
    width: 100%;
    margin-top: auto;   /* ← 最下部へ送る */
    flex-shrink: 0;
  }

  .topnav .nav-menu .header-cotact p{
    font-size: calc(10px * var(--official-font-scale, 1));
    line-height: 1.6;
  }

  .topnav .nav-menu .header-cotact .header-cotact-list{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 90%;
    margin-top: 6px;
    margin-inline: auto;
    gap: 6px;
  }

  .topnav .nav-menu .header-cotact .header-cotact-list li{
    width: 100%;
  }

  .topnav .nav-menu .header-cotact .header-cotact-list li a{
    display: flex;
    align-items: center;
    justify-content: center;

    height: 40px;

    text-align: center;
    font-size: calc(11px * var(--official-font-scale, 1));
    letter-spacing: .06em;
    color: #fff;
    text-decoration: none;

    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.35);

    background: linear-gradient(
      180deg,
      rgba(255,255,255,.15),
      rgba(255,255,255,.05)
    );

    backdrop-filter: blur(6px);

    box-shadow:
      0 4px 10px rgba(0,0,0,.15),
      inset 0 1px 0 rgba(255,255,255,.3);

    transition:
      transform .15s ease,
      box-shadow .2s ease,
      background .2s ease;
  }

  @keyframes navBounce{
    0%{
      opacity: 0;
      transform: translateY(50px);
    }
    80%{
      transform: translateY(-3px);
    }
    100%{
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes navBounce2{
    0%{
      opacity: 0;
      transform: translateY(25px);
    }
    80%{
      transform: translateY(-3px);
    }
    100%{
      opacity: 1;
      transform: translateY(0);
    }
  }
}


/* ---------- Small Mobile ---------- */
@media (max-width: 480px){

  .topnav .row{
    width: 100%;
    padding: 52px 12px 0;
  }

  .topnav .row.nav-open a{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    font-size: calc(14px * var(--official-font-scale, 1));
    letter-spacing: .14em;
  }

  .topnav .row.nav-open a:not(:last-of-type){
    margin-bottom: 5px;
  }

  h2{
    font-size: calc(24px * var(--official-font-scale, 1));
  }

  h1 img.logo{
    width: min(100%, 230px);
  }
}


/* =========================================================
   8) HEADER CONTACT
   ========================================================= */
@media (min-width: 768px){
  .header-cotact{
    display: none;
  }
}


/* =========================================================
   8）HEADER CONTACT
   ========================================================= */
@media (min-width: 768px){
  .header-cotact {
    display: none;
  }
}

@media (max-width: 767px){

  .topnav .nav-menu .header-cotact p {
    font-size: calc(10px * var(--official-font-scale, 1));
    line-height: 1.6;
  }

  .topnav .nav-menu .header-cotact{
    width: 100%;
  }

  .topnav .nav-menu .header-cotact .header-cotact-list{
    margin-top: 6px;
    margin-bottom: 6px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 6px;
  }

  .topnav .nav-menu .header-cotact .header-cotact-list li{
    width: 100%;
  }

  .topnav .nav-menu .header-cotact .header-cotact-list li a{

    display:flex;
    align-items:center;
    justify-content:center;

    height:40px;

    text-align:center;
    font-size:calc(11px * var(--official-font-scale, 1));
    letter-spacing:.06em;

    color:#fff;
    text-decoration:none;

    border-radius:8px;

    background:linear-gradient(
      180deg,
      rgba(255,255,255,.15),
      rgba(255,255,255,.05)
    );

    backdrop-filter:blur(6px);

    border:1px solid rgba(255,255,255,.35);

    box-shadow:
    0 4px 10px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.3);

    transition:
    transform .15s ease,
    box-shadow .2s ease,
    background .2s ease;

  }

}


/* =========================================================
   9）BREADCRUMB
   ========================================================= */
.breadcrumb{
  padding-top: 5px;
  padding-bottom: 5px;
  margin-inline: auto;
  margin-bottom: 60px;
  width: 100%;
  font-size: calc(12px * var(--official-font-scale, 1));
  letter-spacing: .08em;
  background-color: #ffffff2e;
  text-align: center;
}

.breadcrumb ul{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline-block;
}

.breadcrumb li{
  display: inline-flex;
  align-items: center;
  line-height: 1.6;
  text-transform: uppercase;
}

.breadcrumb li:not(:last-child)::after{
  content: ">";
  margin-right: 16px;
  margin-left: 16px;
  color: var(--muted);
}

.breadcrumb a{
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
}

.breadcrumb a:hover{
  color: var(--blue);
  opacity: .8;
}

.breadcrumb span{
  color: var(--muted);
}

@media (max-width: 767px){
  .breadcrumb{
    padding-left: 18px;
    padding-right: 18px;
    width: 100%;
    margin-bottom: 24px;
    font-size: calc(11px * var(--official-font-scale, 1));
    text-align: left;
    background-color: #ffffff39;
  }

  .breadcrumb ul{
    gap: 4px;
  }

  .breadcrumb li:not(:last-child)::after{
    margin-left: 4px;
  }
}

/* =========================================================
   10）404
   ========================================================= */
.error404 .errorWrap{
  padding-bottom: 20vh;
  width: min(66.666%, 960px);
  height: auto;
  margin-inline: auto;
}

/* 404の数字 */
.error-code{
  font-size: 80px;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* メインメッセージ */
.error-message{
  font-size: calc(18px * var(--official-font-scale, 1));
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--muted);
}

/* サブ説明 */
.error-sub{
  color: #666;
  line-height: 1.8;
  margin-bottom: 60px;
}

/* ボタン */
.error-actions{
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 共通ボタン */
.error-actions a{
  display: inline-block;
  padding: 10px 20px;
  font-size: calc(12px * var(--official-font-scale, 1));
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: .25s ease;
}

/* HOME */
.btn-home{
  background: #696969;
  color: #fff;
}

.btn-home:hover{
  background: #333;
}

/* サブリンク */
.btn-link{
  border: 1px solid #ccc;
  color: #333;
}

.btn-link:hover{
  background: #f5f5f5;
}

/* SP調整 */
@media (max-width: 480px){

  .error-code{
    font-size: 60px;
  }

  .error-message{
    font-size: calc(16px * var(--official-font-scale, 1));
  }

}