/*
Theme Name: BlankSlate Child
Template: blankslate
Description: コーポレートサイト用の子テーマ。シンプルなポートフォリオ型レイアウト。
Version: 1.0.0
*/

/* ---------------------------------------------------------------
   カラー変数・ベース
--------------------------------------------------------------- */
:root {
  --color-bg: #F4F6F7;
  --color-main: #4F6473;
  --color-accent: #9FAF9F;
  --color-text: #3a4750;
  --header-h: 88px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* BlankSlate 親テーマの既定レイアウトをリセット */
#wrapper,
#container,
#content {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
}

/* ---------------------------------------------------------------
   ヘッダー
--------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 clamp(20px, 5vw, 60px);
  z-index: 1300;
}

/* ハンバーガーボタン */
.nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1200;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 8px;
  width: 28px;
  height: 1.5px;
  background: var(--color-main);
  transition: transform 0.35s ease, opacity 0.2s ease, background 0.35s ease;
}

.nav-toggle__bar {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle__bar::before {
  content: "";
  top: -8px;
}

.nav-toggle__bar::after {
  content: "";
  top: 8px;
}

/* 開いている時：ヘッダーは透過、ロゴは白抜き */
body.is-nav-open .site-header,
body.is-nav-open:not(.home) .site-header {
  background: transparent;
  backdrop-filter: none;
}

/* 開いている時：×印 */
.is-nav-open .nav-toggle__bar {
  background: transparent;
}

.is-nav-open .nav-toggle__bar::before {
  top: 0;
  transform: rotate(45deg);
  background: #fff;
}

.is-nav-open .nav-toggle__bar::after {
  top: 0;
  transform: rotate(-45deg);
  background: #fff;
}

/* ---------------------------------------------------------------
   グローバルメニュー（オーバーレイ）
--------------------------------------------------------------- */
.gnav {
  position: fixed;
  inset: 0;
  background: var(--color-main);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 1100;
}

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

.gnav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.gnav__item {
  margin: 4px 0;
}

.gnav__link {
  display: inline-block;
  padding: 10px 20px;
  color: #fff;
  font-size: 20px;
  letter-spacing: 0.18em;
  transition: color 0.25s ease;
}

.gnav__link:hover {
  color: var(--color-accent);
}

/* ドロップダウン（Works） */
.gnav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}

.gnav__sub-link {
  display: inline-block;
  padding: 7px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  letter-spacing: 0.2em;
  transition: color 0.25s ease;
}

.gnav__sub-link:hover {
  color: var(--color-accent);
}

/* デスクトップ：ホバーで開く */
@media (hover: hover) and (min-width: 768px) {
  .gnav__item--has-child:hover .gnav__sub {
    max-height: 160px;
    opacity: 1;
  }
}

/* モバイル／クリック開閉 */
.gnav__item--has-child.is-open .gnav__sub {
  max-height: 160px;
  opacity: 1;
}

/* ---------------------------------------------------------------
   FV（ファーストビュー）
--------------------------------------------------------------- */
.fv {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--header-h) 20px 40px;
}

/* 背景画像レイヤー */
.fv__bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.fv__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.fv__bg.is-active {
  opacity: 1;
}

/* 文字を読みやすくするスクリム */
.fv__bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fef7de;
}

/* カテゴリーホバー時の背景色オーバーレイ */
.fv__tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-main);
  opacity: 0;
  transition: opacity 0.6s ease, background-color 0.6s ease;
  pointer-events: none;
}

.fv.is-tinted .fv__tint {
  opacity: 0.92;
}

.fv__inner {
  position: relative;
  z-index: 1;
}

.fv__logo {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fv__wordmark {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 8vw, 110px);
  line-height: 1;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: #000;
  transition: color 0.4s ease;
}

/* 頭文字（P / C）を大きく */
.fv__lg {
  font-size: 1.6em;
}

.fv__tagline {
  margin: 32px 0 0;
  font-size: clamp(13px, 2.2vw, 16px);
  letter-spacing: 0.34em;
  color: var(--color-main);
  transition: color 0.4s ease;
}

/* カテゴリーリンク */
.fv__cats {
  position: relative;
  z-index: 1;
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fv__cat {
  font-size: clamp(17px, 5vw, 22px);
  letter-spacing: 0.16em;
  color: var(--color-main);
  transition: color 0.25s ease;
}

/* ホバー中：背景が濃色になるので文字を白へ */
.fv.is-tinted .fv__wordmark {
  color: #fff;
}

.fv.is-tinted .fv__tagline {
  color: #fff;
}

.fv.is-tinted .fv__cat {
  color: rgba(255, 255, 255, 0.6);
}

.fv.is-tinted .fv__cat:hover {
  color: #fff;
}

.fv__cat:hover {
  color: var(--color-accent);
}

/* PC：ロゴを左上寄り、カテゴリーを右下に配置 */
@media (min-width: 768px) {
  .fv {
    display: block;
    text-align: left;
  }

  .fv__inner {
    position: absolute;
    top: clamp(110px, 22vh, 240px);
    left: clamp(24px, 6vw, 96px);
  }

  .fv__logo {
    align-items: flex-start;
  }

  .fv__tagline {
    margin-top: 28px;
  }

  .fv__cats {
    position: absolute;
    margin-top: 0;
    right: clamp(28px, 6vw, 96px);
    bottom: clamp(48px, 11vh, 140px);
    align-items: flex-end;
    gap: clamp(6px, 1vw, 14px);
  }

  .fv__cat {
    font-size: clamp(22px, 2.8vw, 38px);
    letter-spacing: 0.08em;
  }
}

/* ---------------------------------------------------------------
   Vision
--------------------------------------------------------------- */
.vision {
  position: relative;
  padding: clamp(90px, 16vw, 180px) 20px;
  text-align: center;
  background: var(--color-main) url(images/vision_bg.jpg) center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

/* メインカラー（青）のフィルター */
.vision::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-main);
  opacity: 0.72;
}

.vision::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-main);
  opacity: 0.35;
  mix-blend-mode: multiply;
}

.vision > * {
  position: relative;
  z-index: 1;
}

.vision__label {
  margin: 0 0 40px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.vision__label::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin: 18px auto 0;
  background: var(--color-accent);
}

.vision__heading {
  margin: 0 auto;
  max-width: 20em;
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  font-size: clamp(20px, 4vw, 34px);
  line-height: 2;
  letter-spacing: 0.14em;
  color: #fff;
}

.vision__text {
  margin: 44px auto 0;
  max-width: 40em;
  font-size: 15px;
  line-height: 2.4;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------------------------------------------------------------
   フッター
--------------------------------------------------------------- */
.site-footer {
  background: #fef7de;
  color: rgba(255, 255, 255, 0.85);
  padding: 56px clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__logo {
  line-height: 0;
}

.site-footer__logo img {
  height: 16px;
  width: auto;
  display: block;
/*   filter: brightness(0) invert(1); */
  opacity: 0.9;
}

.site-footer__copy {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #000000;
}

/* ---------------------------------------------------------------
   下層ページ共通
--------------------------------------------------------------- */
body:not(.home) #content {
  padding-top: var(--header-h);
}

body:not(.home) .site-header {
  background: rgba(244, 246, 247, 0.92);
  backdrop-filter: blur(6px);
  justify-content: space-between;
}

/* 下層ページのヘッダーロゴ（リンク先は TOP） */
.site-header__logo {
  line-height: 0;
}

.site-header__logo img {
  height: clamp(15px, 2.2vw, 19px);
  width: auto;
  display: block;
}

/* メニュー展開中はロゴを白抜きに */
.is-nav-open .site-header__logo img {
  filter: brightness(0) invert(1);
}

.page-head {
  text-align: center;
  padding: clamp(50px, 9vw, 96px) 20px clamp(36px, 6vw, 64px);
}

.page-head__label {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.page-head__title {
  margin: 0;
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  font-size: clamp(24px, 4.4vw, 40px);
  letter-spacing: 0.12em;
  color: var(--color-main);
}

/* ---------------------------------------------------------------
   固定ページ（About / Access など）
--------------------------------------------------------------- */
.page-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px) clamp(80px, 14vw, 160px);
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.page-content > *:first-child {
  margin-top: 0;
}

.page-content p {
  margin: 0 0 1.6em;
}

.page-content h2 {
  margin: 2.4em 0 1em;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-main);
}

.page-content a {
  color: var(--color-main);
  border-bottom: 1px solid var(--color-accent);
}

/* テーブル（縦線なし・横罫線のみ） */
.page-content .wp-block-table,
.page-content figure.wp-block-table {
  margin: 0;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.page-content th,
.page-content td {
  padding: 18px 2px;
  border: none;
  border-bottom: 1px solid rgba(79, 100, 115, 0.16);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.9;
}

.page-content tr:first-child th,
.page-content tr:first-child td {
  border-top: 1px solid rgba(79, 100, 115, 0.16);
}

.page-content td:first-child,
.page-content th:first-child {
  width: 26%;
  min-width: 5em;
  color: var(--color-main);
  font-weight: 500;
}

.page-content .wp-block-table figcaption {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #8a969b;
  text-align: left;
}

@media (max-width: 600px) {
  .page-content td:first-child,
  .page-content th:first-child {
    width: auto;
    display: block;
    padding-bottom: 2px;
    border-bottom: none;
  }
  .page-content td:last-child {
    display: block;
    padding-top: 4px;
  }
  .page-content tr {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(79, 100, 115, 0.16);
  }
  .page-content tr:first-child {
    border-top: 1px solid rgba(79, 100, 115, 0.16);
  }
  .page-content tr td {
    border: none;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ---------------------------------------------------------------
   お問い合わせフォーム（CF7 / マルチステップ）
--------------------------------------------------------------- */
.contact-form {
  margin: 0 auto;
  max-width: 620px;
}

/* CF7 の自動整形（wpcf7_autop）が挿入する p のマージンを打ち消す */
.contact-form p {
  margin: 0;
}

.cf-row {
  padding: 22px 0;
  border-bottom: 1px solid rgba(79, 100, 115, 0.16);
}

.cf-row:first-child {
  border-top: 1px solid rgba(79, 100, 115, 0.16);
}

.cf-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-main);
  margin-bottom: 12px;
}

.cf-label .req {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--color-accent);
  vertical-align: 1px;
}

.cf-field input[type="text"],
.cf-field input[type="tel"],
.cf-field input[type="email"],
.cf-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(79, 100, 115, 0.28);
  border-radius: 0;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  transition: border-color 0.2s ease;
}

.cf-field textarea {
  min-height: 160px;
  resize: vertical;
}

.cf-field input:focus,
.cf-field textarea:focus {
  outline: none;
  border-color: var(--color-main);
}

/* 確認画面 */
.contact-confirm .cf-field {
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-text);
  min-height: 1.9em;
}

.contact-confirm .cf-field--pre {
  white-space: pre-wrap;
}

/* ボタン */
.cf-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-form input[type="submit"],
.contact-form input.wpcf7-previous {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding: 15px 44px;
  border: 1px solid var(--color-main);
  border-radius: 0;
  background: var(--color-main);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.16em;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-form input[type="submit"]:hover {
  opacity: 0.82;
}

/* 「戻る」ボタンはアウトライン表示 */
.contact-form input.wpcf7-previous {
  background: transparent;
  color: var(--color-main);
}

.contact-form input.wpcf7-previous:hover {
  background: var(--color-main);
  color: #fff;
}

/* CF7 メッセージ・バリデーション */
.wpcf7 form .wpcf7-response-output {
  margin: 28px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(79, 100, 115, 0.3);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.wpcf7-not-valid-tip {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #c0392b;
}

.cf-field .wpcf7-not-valid {
  border-color: #c0392b;
}

.wpcf7-spinner {
  margin: 12px auto 0;
}

/* 完了ページ */
.contact-thanks {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  line-height: 2.1;
}

.contact-thanks__lead {
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(18px, 3.4vw, 24px);
  letter-spacing: 0.1em;
  color: var(--color-main);
  margin-bottom: 1.4em;
}

.contact-thanks__home {
  margin-top: 2.4em;
  font-size: 13px;
  letter-spacing: 0.14em;
}

@media (max-width: 600px) {
  .cf-actions {
    flex-direction: column-reverse;
  }
  .contact-form input[type="submit"],
  .contact-form .wpcf7msm-previous {
    width: 100%;
  }
}

/* ---------------------------------------------------------------
   Works アーカイブ
--------------------------------------------------------------- */
.works-archive {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px) clamp(80px, 14vw, 160px);
}

.works-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: clamp(40px, 7vw, 72px);
}

.works-filter__item {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--color-text);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.works-filter__item:hover {
  color: var(--color-main);
}

.works-filter__item.is-current {
  color: var(--color-main);
  border-color: var(--color-accent);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 44px);
}

.works-card__link {
  display: block;
}

.works-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e7ebec;
  display: flex;
  align-items: center;
  justify-content: center;
}

.works-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.works-card__link:hover .works-card__thumb img {
  transform: scale(1.04);
}

.works-card__noimg {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #9aa7ac;
}

.works-card__cat {
  margin: 16px 0 6px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.works-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--color-main);
}

.works-empty {
  text-align: center;
  color: var(--color-text);
}

.works-pager {
  margin-top: clamp(48px, 8vw, 80px);
}

.works-pager .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--color-text);
}

.works-pager .page-numbers.current {
  color: var(--color-main);
  border-bottom: 1px solid var(--color-accent);
}

/* ---------------------------------------------------------------
   Works 詳細
--------------------------------------------------------------- */
.works-single {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px) clamp(80px, 14vw, 160px);
}

.works-single__hero {
  margin: 0 0 clamp(32px, 6vw, 56px);
}

.works-single__body {
  font-size: 15px;
  line-height: 2.2;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.works-single__body img {
  height: auto;
}

.works-single__back {
  margin-top: clamp(48px, 8vw, 80px);
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.works-single__back a:hover {
  color: var(--color-accent);
}

@media (max-width: 600px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------
   カーソル追従アイコン
--------------------------------------------------------------- */
.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 76%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.35s ease, background-size 0.3s ease;
  will-change: transform;
  /* 背景の明暗に応じて反転し、常に視認できるようにする */
  filter: invert(1);
  mix-blend-mode: difference;
}

.cursor-follower.is-visible {
  opacity: 0.7;
}

.cursor-follower.is-hover {
  opacity: 1;
  background-size: 100%;
}

/* タッチ端末では非表示 */
@media (hover: none), (pointer: coarse) {
  .cursor-follower {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-follower {
    display: none;
  }
}

/* BlankSlate 親テーマの不要要素を隠す */
#search,
#site-description,
.blankslate-parent-only {
  display: none;
}
