/*
Theme Name: S.F. studio portfolio
*/

/* ===========================
  ローディング画面（通常時）
=========================== */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(
    ellipse at center,
    #1a1a2e 0%,
    #0d0d0d 50%,
    #000000 100%
  );
  /* var(--color--loading) */
  display: flex;
  align-items: center;
  justify-content: center;

}
.loading-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 35%,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.04) 55%,
    transparent 65%,
    transparent 100%
  );
  pointer-events: none;
}
.loading-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
}
/* テキストとロゴを重ねるための親要素 */
.loading-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* ===========================
  ローディングテキスト
=========================== */
.loading-text {
  color: #96d45b;
  -webkit-text-stroke: 1px var(--color--text);  /* テキスト枠線 */
  font-size: var(--font-size--3xl);
  font-weight: 700;
  letter-spacing: 0.12em;
  display: flex;
  z-index: 1;
}

.loading-char {
  display: inline-block;
}

/* ===========================
  ローディングロゴ
=========================== */
.loading-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(7.5rem, 4.286rem + 6.7vw, 15rem);
  height: clamp(7.5rem, 4.286rem + 6.7vw, 15rem);
}

/* サイト内遷移時はスキップ */
.loading-screen.skip {
  display: none;
}


/* ===========================
  ページ遷移オーバーレイ
=========================== */
/* 初期設定では非表示 */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(
    ellipse at center,
    #1e2a4a 0%,
    #151e35 50%,
    #0d1428 100%
  );

  /* 初期状態 */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* transitionはベースに持たせることで、クラス着脱時も滑らかに繋ぐ */
  transition: opacity 0.7s ease-in-out, visibility 0.7s ease-in-out;

}

/* フェードアウト開始（現在ページを覆う） */
.page-transition.is-leave {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

}
/* 遷移先ページ：最初からオーバーレイで覆った状態で始まる */
.page-transition.is-enter {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: none; /* 即座に表示 */
}
/* フェードイン（遷移先ページのオーバーレイを消す） */
.page-transition.is-enter.is-fadeIn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.9s ease-in-out, visibility 0.9s ease-in-out;
}

/* ===========================
  サイトTOPページ枠組み
=========================== */
/* .area-grid {
  display: grid;
  gap: var(--space--2);
  max-width: 100%;
  min-height: 100vh;
  margin-inline: auto;
  grid-template-columns: 1fr;
  grid-template-rows: 100px 1fr 1fr;
  grid-template-areas:
    "header"
    "main"
    "footer";
  border: dashed 1px;

} */

/* -----------------------------------
 * ナビゲーションモーダル
 * --------------------------------- */
.nav-dialog {
  /* デフォルトのdialogスタイルをリセット */
  border: none;
  padding: 0;
  margin: 0;
  max-width: unset;
  max-height: unset;
  overflow: unset;
  background: none;

  /* フルスクリーン表示 */
  width: 100%;
  height: 100%;

  /* テキストカラー */
  color: var(--color--text--1);

  /* 背景を半透明の黒 + ブラー効果 */
  background-color: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);

  /* アニメーション */
  opacity: 0;
  transition: opacity var(--duration), var(--duration);
  z-index: 100;
}

/* ::backdrop のスタイル */
.nav-dialog::backdrop {
  background-color: transparent;
}

/* トランジション用（data-open でフェードイン） */
.nav-dialog[data-open] {
  opacity: 1;
}

/* dialogのdisplay操作はできるだけ避けたいので、innerを用意してレイアウト管理 */
.nav-dialog__inner {
  /* 内部を縦向きフレックス（__body を flex:1 で広げるため） */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.nav-dialog__wrapper {
  display: flex;
  justify-content: center;
}
/* 閉じるボタンを配置するヘッダー */
.nav-dialog__head {
  max-width: 860px;
  width: 100%;
}
.nav-dialog__head__inner {
  display: flex;
  flex-shrink: 0;
}

/* ナビゲーションコンテンツ本体 */
.nav-dialog__body {
  /* 高さを広げる */
  flex: 1;

  /* 要素が増えて画面サイズを超えたらここをスクロールできるようにする */
  overflow: auto;
  overscroll-behavior: contain;

  /* 中央配置 */
  display: grid;
  align-content: center;
  justify-items: center;
}

/* ナビゲーションリスト */
.site-nav__list {
  list-style: none;
  padding: 0;

  /* 項目を縦並びで余白をgapで管理 */
  display: flex;
  flex-direction: column;
  gap: var(--space--4);
}

/* モーダル展開時のアニメーションを付ける */
.site-nav__item {
  opacity: 0;
  transform: translateY(2em);
  transition: transform var(--duration), opacity var(--duration);
}
.nav-dialog[data-open] .site-nav__item {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ナビゲーションリンク */
.site-nav__item > a {
  color: inherit;
  text-decoration: none;
  font-size: 2em;
  font-family: serif;
  font-style: italic;

  display: inline-flex;
  padding: 0.25em 0.5em;
  border-radius: 2px;
  transition-duration: var(--duration);
  transition-property: color, scale;
}
@media (any-hover: hover) {
  .site-nav__item > a:hover {
    color: var(--color--accent);
    scale: 1.05;
  }
}

/* --- サイトナビゲーション用トグルボタン --- */
.menu-btn {
  /* buttonのスタイルリセット */
  font: inherit;
  width: auto;
  height: auto;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;

  /* ボタンのスタイル */
  border-radius: 4px;
  padding: 0.5rem;
  margin-inline-start: auto;
  transition: opacity var(--duration);
}

/* メニューを開くボタン: メニュー展開時にフェードアウト */
.menu-btn--open {
  opacity: 1;
}
/* body:has() は処理負荷が高いので、隣接セレクタを使う */
.nav-dialog[data-open] + .header .menu-btn--open {
  opacity: 0;
  pointer-events: none;
}

/* メニューを閉じるボタン: dialog展開時にフェードイン */
.menu-btn--close {
  opacity: 0;
}
.nav-dialog[data-open] .menu-btn--close {
  opacity: 1;
}

/* ハンバーガーアイコン */
.menu-icon {
  width: 1.5em;
  height: 1.5em;
  display: grid;
  align-content: center;
  gap: 0.375em;
  transition: gap var(--duration);
}
.menu-icon > span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition-duration: var(--duration);
  transition-property: transform, opacity;
}

/* 閉じるボタンのアイコン */
.menu-icon--close > span {
  grid-area: 1/1;
  --rotate: 45deg;
  transition: transform var(--duration);
}
.menu-icon--close > span:first-child {
  transform: rotate(var(--rotate));
}
.menu-icon--close > span:last-child {
  transform: rotate(calc(var(--rotate) * -1));
}
/* ホバーアニメーション */
@media (any-hover: hover) {
  .menu-btn--open:hover > .menu-icon {
    gap: 0.25em;
  }
  .menu-btn--close:hover > .menu-icon > span {
    --rotate: 30deg;
  }
}

.display-none {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* =========================================================
  Header
========================================================= */
/* ヘッダー（全ページ共通ベース） */
.header {
  position: fixed;
  display: flex;
  justify-content: center;
  width: 100%;
  /* grid-area: header; */
  /* height: 100%; */
  padding: 0 var(--space--8);
  top: 0;
  color: var(--color--text--1);
  z-index: 100;
  mix-blend-mode: difference;
}
/* トップページ（front-page）のみヘッダーを黒にする */
.home .header {
  color: var(--color--text--2);
  mix-blend-mode: normal;
}

.site-header__inner {
  max-width: 860px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__inner > a {
  color: inherit;

}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space--2g);
  padding: calc(var(--space--2)*1) calc(var(--space--2)*2);
  border-radius: var(--radius--md);
  /* border: 1px solid transparent; */
}
.site-header__logo > img {
  width: 80px;
  height: 80px;
}

.site-header__logoText {
  font-weight: 700;
  letter-spacing: .02em;
}

/* .nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--space--2)*1) calc(var(--space--2)*2);
  font-weight: 600;
  font-size: var(--font-size--xs);
  transition: transform .15s ease, border-color .15s ease;
} */

/* .nav-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 163, 175, .35);
}

.nav-pill:focus-visible {
  outline: 3px solid rgba(0, 163, 175, .35);
  outline-offset: 2px;
} */



.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--space--2)*1.25) calc(var(--space--2)*2);
  border-radius: var(--radius--md);
  border: 1px solid var(--color--border);
  background: var(--color--bg--1);
  font-weight: 700;
  line-height: 1;
  /* transition: transform .15s ease, box-shadow .15s ease; */
}

/* .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
} */

/* .btn:focus-visible {
  outline: 3px solid rgba(0, 163, 175, .35);
  outline-offset: 2px;
} */

/* -----------------------------------
 * 汎用コンポーネントクラス
 * --------------------------------- */
/* 画像ラッパー */
.img-frame {
  overflow: hidden;
}
:where(.img-frame) > img {
  object-fit: cover;
}

/* ===========================
  メインコンテンツ（全ページ共通ベース）
  フロントページ以外は即時フェードイン
=========================== */
.main {
  grid-area: main;
  container-type: inline-size;
  container-name: main;
  width: 100%;
  /* overflow-x: hidden; */

}

.footer {
  grid-area: footer;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 60px;
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  grid-template-areas:
    "footer_up-area"
    "footer_down-area";

  position: relative;
  /* display: flex;
  justify-content: space-between; */
  width: 100%;
  background: var(--color--bg--2);
  color: #fff;
  padding: 80px 5% 20px;
}

.footer .footer_up-area {
  grid-area: footer_up-area;
  display: flex;
}

.footer a {
  color: #fff;
}
.footer .info-area {
  width: 35%;
}

.footer .logo-area {
  display:flex;
  align-items: center;
}

.footer .info-area .logo {
  width: 100%;
  max-width: 100px;
  display: block;
  line-height: 0;
  /* margin-bottom: 30px; */
}
.footer .info-area .site-name {
  font-size: var(--font-size--md);
}

.footer .info-area .copyright {
  font-size: 10px;
}
.footer .menu-area {
  width: 65%;
  display: flex;
  justify-content: flex-end;
}
.footer .menu-area .menu-col {
  width: 100%;
  max-width: 145px;
}
.footer .menu-area .menu-col .menu-title {
  font-size: var(--font-size--md);
  font-weight: 500;
  margin-bottom: 30px;
}
.footer .menu-area .menu-col .menu-list li {
  font-size: var(--font-size--sm);
  margin-bottom: 20px;
}
.footer .menu-area .menu-col .menu-list li::before {
  content: "-";
  margin-right: 10px;
}

.footer .footer_down-area {
  grid-area: footer_down-area;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (width <= 600px) {
  .footer .logo-area {
    flex-direction: column;
  }

}
