/*
 * Portfolio — 見た目トークンとセクション順で整理
 *
 * ざっくり流れ（検索用キーワード）:
 *   :root … 色・グラデ・モーション・ナビ用トークン（--nav-header-* / --nav-chrome-* は index/実績ヘッダー共通）
 *   reset / .container* … ベースとレイアウト幅
 *   .header / .nav … デスクトップ横並びナビ
 *   .hero / .hero--photo … ファーストビュー（グラデのみ or 写真＋スクリム＋blob）
 *   .section … 各セクション背景の切り替え、#identity / #contact のインク色
 *   IDENTITY / SERVICE / LAB / CONTACT / Footer
 *   .reveal-on-scroll … html.js 時の入場アニメ（遅延は #identity / .projects-grid 等で調整）
 *   @media (max-width: 768px) … モバイルナビ全画面化 + グリッド 1 列
 *   body.sub-page … 実績サブページ（ファイル末尾の大ブロック）
 *
 * インタラクション（フォーム POST・ライトボックス）は js/script.js と対で読むと分かりやすい。
 */
:root {
  --hero-blue-0: #e6f4ff;
  --hero-blue-3: #1d8bff;
  --hero-blue-4: #0b5bff;
  --hero-blue-5: #7f39fb;
  --hero-blue-6: #3700b3;

  /* 企業ごとに差し替え: --hero-blue-* を書き換えてもよいが、ヒーローだけ別色にしたい場合はここだけ上書き */
  --brand-hero-deep: var(--hero-blue-6);
  --brand-hero-mid: var(--hero-blue-5);
  --brand-hero-bright: var(--hero-blue-4);

  /* 写真フィーチャー: 左上〜中央は闇 / 右上は細い一筋の光 / 右下はさらに締める（3層） */
  --hero-photo-scrim:
    radial-gradient(
      ellipse 24% 52% at 94% 17%,
      rgba(255, 255, 255, 0.48) 0%,
      rgba(255, 255, 255, 0.16) 42%,
      rgba(255, 255, 255, 0) 68%
    ),
    radial-gradient(
      ellipse 95% 72% at 98% 102%,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.28) 48%,
      rgba(0, 0, 0, 0) 72%
    ),
    linear-gradient(
      100deg,
      rgba(0, 0, 0, 0.97) 0%,
      rgba(0, 0, 0, 0.94) 12%,
      rgba(0, 0, 0, 0.84) 30%,
      rgba(0, 0, 0, 0.52) 56%,
      rgba(0, 0, 0, 0.32) 78%,
      rgba(0, 0, 0, 0.24) 100%
    );

  --accent-grad-muted: linear-gradient(180deg, #e8f0ff 0%, #f2edff 100%);
  --accent-grad-line: linear-gradient(180deg, var(--hero-blue-4), var(--hero-blue-5));
  --accent-grad-line-h: linear-gradient(90deg, var(--hero-blue-3), var(--hero-blue-5));
  /* 水平版と同色ストップ。縦ライン・縦方向の装飾用（上 → 下） */
  --accent-grad-line-v: linear-gradient(180deg, var(--hero-blue-3), var(--hero-blue-5));
  --accent-grad-line-h-light: linear-gradient(90deg, #93c5fd, #e9d5ff);
  --accent-grad-btn: linear-gradient(135deg, var(--hero-blue-4) 0%, var(--hero-blue-5) 100%);
  --accent-grad-thumb: linear-gradient(135deg, #cfe8ff 0%, #ddd5ff 100%);
  --accent-border: rgba(127, 57, 251, 0.14);
  --accent-border-strong: rgba(11, 91, 255, 0.22);
  --accent-glow: rgba(55, 0, 179, 0.07);

  --bg: #fafafa;
  --card: #ffffff;
  --border: #e5e5e5;
  --text: #0a0a0a;
  --text-muted: #737373;

  /* 白背景セクション（NEWS / IDENTITY / CONTACT）のインク */
  --ink-on-white: #111827;
  --ink-on-white-muted: #4b5563;
  --border-on-white: #d1d5db;
  --placeholder-on-white: #9ca3af;

  --concrete-mid: #656565;
  --concrete-dark: #525252;
  --concrete-light: #767676;
  --concrete-bg-image:
    linear-gradient(168deg, rgba(255, 255, 255, 0.06) 0%, transparent 38%),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.06) 0%,
      transparent 22%,
      transparent 78%,
      rgba(0, 0, 0, 0.05) 100%
    ),
    linear-gradient(180deg, var(--concrete-light) 0%, var(--concrete-mid) 42%, var(--concrete-dark) 100%),
    repeating-linear-gradient(
      -11deg,
      transparent 0,
      transparent 3px,
      rgba(0, 0, 0, 0.025) 3px,
      rgba(0, 0, 0, 0.025) 4px
    );

  --concrete-footer-light: #e4e4e4;
  --concrete-footer-mid: #d8d8d8;
  --concrete-footer-dark: #cecece;
  --concrete-footer-bg-image:
    linear-gradient(168deg, rgba(255, 255, 255, 0.45) 0%, transparent 42%),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.04) 0%,
      transparent 20%,
      transparent 80%,
      rgba(0, 0, 0, 0.035) 100%
    ),
    linear-gradient(
      180deg,
      var(--concrete-footer-light) 0%,
      var(--concrete-footer-mid) 42%,
      var(--concrete-footer-dark) 100%
    ),
    repeating-linear-gradient(
      -11deg,
      transparent 0,
      transparent 3px,
      rgba(0, 0, 0, 0.025) 3px,
      rgba(0, 0, 0, 0.025) 4px
    );

  /* モーション・モバイルナビ（数値の単一ソース） */
  --reveal-duration: 3.2s;
  --reveal-delay: 0.4s;
  --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-nav-overlay: 130;
  --z-nav-chrome: 140;
  --overlay-scrim: rgba(15, 15, 18, 0.52);
  /* モバイル全画面メニュー開閉（opacity は display 切替の代わり） */
  --nav-menu-duration: 0.6s;
  --nav-menu-stagger: 0.08s;
  --nav-menu-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-menu-end: calc(var(--nav-menu-stagger) + var(--nav-menu-duration));

  --nav-header-bg: #0a0a0a;
  --nav-header-bg-image: none;
  /* --nav-header-height:6px; */
  /* #news / #architecture などへジャンプしたとき、H2 がヘッダーに潰れないよう確保する上余白 */
  /* --section-scroll-margin-top: calc(var(--nav-header-height) + 2.5rem); */

  /* 黒ヘッダー用の下線・影（トップ index .header / 実績 .detail-header / モバイルメニュー折りたたみパネルで共用） */
  --nav-chrome-border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  --nav-chrome-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 16px rgba(0, 0, 0, 0.55);
}

html {
  font-size: 112.5%;
}

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

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

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

body {
  /* 100vh はモバイルでアドレスバー込みの「高い」高さになりがち → 下に変な余白。
     100dvh は今見えている画面の高さに追従（ツールバーの出し入れに合わせる） */
  min-height: 100%;
  font-family: "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  letter-spacing: 0.04em;
}

/* トップ: コンテンツが短くてもフッターを「見えている画面の下」に寄せる（実績ページは fixed フッターで別設計） */
body:not(.sub-page) {
  display: flex;
  flex-direction: column;
}

body:not(.sub-page) main {
  flex: 1 0 auto;
}

.container {
  width: min(720px, 100% - 48px);
  margin-inline: auto;
}

.container-wide {
  width: min(1080px, 100% - 48px);
  margin-inline: auto;
}

.container-narrow {
  width: min(560px, 100% - 48px);
  margin-inline: auto;
}

/* Header（index）— 実績ページ .detail-header とトークン共有 */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--nav-header-bg);
  background-image: var(--nav-header-bg-image);
  /* border-bottom: var(--nav-chrome-border-bottom); */
  box-shadow: var(--nav-chrome-shadow);
}

.header .logo,
.header .logo-name,
.header .nav-links a {
  color: rgba(255, 255, 255, 0.92);
}

.header .nav-links a:hover,
.header .logo:hover .logo-name {
  color: #fff;
}

.u-sp-only {
  display: none;
}

.main {
  padding-bottom: 100px;
}

/* 入場アニメの translateX（reveal-from--left / --right）が初期位置では画面外にはみ出し、
   横スクロールが出るのを防ぐ（True Purpose 右カラム・IDENTITY の右から入る要素など） */
main {
  overflow-x: hidden;
  overflow-x: clip;
}

.nav {
  position: relative;
  width: min(1200px, 100% - 48px); /* 960pxから1200pxへ変更 */
  height: 56px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* flex-wrap: wrap; */
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  z-index: 2;
  text-decoration: none;
  color: inherit;
}

/* .logo-mark {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
} */

.logo .logo-mark {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  max-height: 64px;
  max-width: min(320px, calc(100vw - 140px));
}

.logo-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.nav-toggle-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1px;
  transition: transform 0.28s ease, top 0.28s ease, background 0.2s ease;
}

.nav-toggle-line:nth-child(1) {
  top: 16px;
}

.nav-toggle-line:nth-child(2) {
  top: 26px;
}

.nav-toggle.is-open .nav-toggle-line:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-line:nth-child(2) {
  top: 21px;
  transform: rotate(-45deg);
}

/* デスクトップ: ラッパーは無視して ul だけが flex 子になる */
.nav-mobile-overlay {
  display: contents;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-hero-deep) 0%, var(--brand-hero-mid) 100%);
}

.hero-photo,
.hero-scrim {
  display: none;
}

.hero--photo .hero-bg {
  background: transparent;
}

.hero--photo .hero-photo {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero--photo .hero-scrim {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--hero-photo-scrim);
}

.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 写真モード: blob を写真と黒スクリムの間に置き、暗霞のようににじませる（グラデのみ時は従来どおり） */
.hero--photo .hero-blobs {
  z-index: 1;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
}

.hero--photo .hero-blob {
  opacity: 0.14;
  filter: blur(88px);
}

.hero--photo .hero-blob-1 {
  background: radial-gradient(circle at 32% 28%, rgba(200, 205, 230, 0.22), rgba(200, 205, 230, 0) 56%);
}

.hero--photo .hero-blob-2 {
  background: radial-gradient(circle at 30% 30%, rgba(100, 95, 130, 0.18), rgba(100, 95, 130, 0) 58%);
}

.hero--photo .hero-blob-3 {
  background: radial-gradient(
    circle at 30% 30%,
    color-mix(in srgb, var(--brand-hero-mid) 22%, transparent),
    color-mix(in srgb, var(--brand-hero-mid) 0%, transparent) 62%
  );
}

.hero--photo .hero-blob-4 {
  background: radial-gradient(circle at 30% 30%, rgba(150, 148, 180, 0.16), rgba(150, 148, 180, 0) 60%);
}

.hero-blob-1 {
  width: 60vw;
  height: 60vw;
  max-width: 480px;
  max-height: 480px;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 55%);
}

.hero-blob-2 {
  width: 45vw;
  height: 45vw;
  max-width: 360px;
  max-height: 360px;
  top: 30%;
  right: -5%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 58%);
}

.hero-blob-3 {
  width: 50vw;
  height: 50vw;
  max-width: 400px;
  max-height: 400px;
  bottom: -10%;
  left: -15%;
  background: radial-gradient(
    circle at 30% 30%,
    color-mix(in srgb, var(--brand-hero-bright) 55%, transparent),
    color-mix(in srgb, var(--brand-hero-bright) 0%, transparent) 60%
  );
}

.hero-blob-4 {
  width: 35vw;
  height: 35vw;
  max-width: 280px;
  max-height: 280px;
  top: 50%;
  left: 20%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* --- ファーストビューのフェードインアニメーション --- */

/* 初期状態：暗く、ぼかした状態 */
.hero-reveal {
  opacity: 0;
  filter: blur(12px) brightness(0.5);
  letter-spacing: 0.2em; /* ぼんやりしている時は字間を広げる */
  transition: 
    opacity 1.2s ease-out, 
    filter 1.6s ease-out, 
    letter-spacing 1.6s ease-out,
    transform 1.2s ease-out;
  transform: translateY(6px);
  display: inline-block;
}

/* 発火状態：クリアに浮かび上がる */
.is-revealed .hero-reveal {
  opacity: 1;
  filter: blur(0) brightness(1);
  letter-spacing: 0.08em; /* 本来の字間に収束 */
  transform: translateY(0);
}

/* GOAL：時間差（スタッガー）の設計 */
.is-revealed .line-1 { transition-delay: 0.2s; }
.is-revealed .line-2 { transition-delay: 0.6s; }
.is-revealed .line-3 { transition-delay: 0.6s; }
.is-revealed .line-4 { transition-delay: 1.2s; } /* ボタンを最後に */

/* --- Keyframes：最小限の動き --- */

@keyframes type-reveal {
  from { width: 0; }
  to { width: 100%; border-color: var(--hero-blue-4); } /* 終了時にカーソル色を出す */
}

@keyframes cursor-blink {
  50% { border-color: transparent; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

.hero-name {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.35;
}

.hero-catch {
  font-size: clamp(0.7rem, 1.6vw, 0.9rem);
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.6;
  max-width: 36em;
  margin-inline: auto;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* フッターと同系のコンクリート（変数・トーンを揃える） */
.btn-hero {
  border-radius: 999px;
  background-color: var(--concrete-footer-mid);
  background-image: var(--concrete-footer-bg-image);
  color: #424242;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  margin-top: 10px;
  transform: scale(1);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.35s ease,
    transform 0.5s ease,
    opacity 1.5s ease-out, /* 追加：reveal用 */
    filter 1.6s ease-out;    /* 追加：reveal用 */
}

.btn-hero:hover {
  filter: brightness(1.06);
  color: #424242;
  transform: scale(1.06);
}

.btn-hero:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.scroll-capsule {
  width: 28px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-arrow {
  font-size: 0.7rem;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.scroll-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
}

/* Sections */
.section {
  padding: 64px 0;
  background: linear-gradient(180deg, #f5f8ff 0%, #fafafa 40%, #fafafa 100%);
}

/* ページ内リンク・scrollIntoView 時：先頭セクション以外は sticky ヘッダー分 + 見出し前の空気を確保 */
/* section[id]:not(#top) {
  scroll-margin-top: var(--section-scroll-margin-top);
} */

.section-first {
  padding-top: 72px;
}

#identity.section,
#contact.section {
  background: #ffffff;
}

#identity .identity-body,
#identity .identity-name,
#identity .identity-lead,
#identity .identity-direction-title {
  color: var(--ink-on-white-muted);
}

#identity .identity-role {
  color: var(--ink-on-white-muted);
}

#identity .identity-direction-list {
  color: var(--ink-on-white-muted);
}

#contact .contact-intro {
  color: var(--ink-on-white);
}

#contact .form-label {
  color: var(--ink-on-white-muted);
}

#contact .contact-form input,
#contact .contact-form textarea {
  border-color: var(--border-on-white);
  background: #fff;
  color: var(--ink-on-white);
}

#contact .contact-form input::placeholder,
#contact .contact-form textarea::placeholder {
  color: var(--placeholder-on-white);
}

#identity .identity-photo-placeholder {
  border-color: var(--border-on-white);
}

.section-title {
  font-size: 30px;
  /* font-size: clamp(1.1rem, 2.6vw, 1.3rem); */
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  width: fit-content;
  max-width: 100%;
  font-weight: 800;
  line-height: 1.3;
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(100%, 56px);
  height: 3px;
  border-radius: 2px;
  background: var(--accent-grad-line-h);
}

.section-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* IDENTITY */
.identity-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 40px;
  align-items: start;
}

/* 行の高さは本文側に合わせる。写真だけその中で縦中央 */
.identity-photo {
  min-width: 0;
  align-self: center;
}

.identity-photo-placeholder {
  aspect-ratio: 1;
  max-width: 280px;
  width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: stretch;
  overflow: hidden;
  background: linear-gradient(145deg, #e8f2ff 0%, #ede8ff 100%);
  border: 1px solid var(--accent-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.identity-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.identity-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}

.identity-body p + p {
  margin-top: 12px;
}

/* 英字見出し（IDENTITY）の下、本文より一段だけ強く。字間を少し空けて名刺的な落ち着き */
.identity-name {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.45;
  margin: 0 0 6px;
}

/* 氏名の下の肩書き。スラッシュ直後でだけ折り返せるように HTML に <wbr> を入れる */
.identity-role {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  margin: 0 0 14px;
}

.identity-lead {
  font-weight: 500;
  margin-bottom: 8px;
}

.identity-direction {
  margin-top: 24px;
  padding-top: 20px;
  position: relative;
}

.identity-direction::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(220px, 100%);
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad-line-h);
}

.identity-direction-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.identity-direction-list {
  list-style: disc;
  padding-left: 1.25em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.identity-direction-list li + li {
  margin-top: 6px;
}

/* ARCHITECTURE / True Purpose — コンクリート質感 */
#architecture.section,
#purpose.section {
  background-color: var(--concrete-mid);
  background-image: var(--concrete-bg-image);
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#architecture .section-title,
#purpose .section-title {
  color: rgba(255, 255, 255, 0.92);
}

#architecture .section-title::after,
#purpose .section-title::after {
  background: var(--accent-grad-line-h-light);
}

/* ARCHITECTURE：見出しとカードグリッドの間をやや広げる（他セクションの .section-title は 10px のまま） */
#architecture .section-title {
  margin-bottom: 30px;
}

#purpose .section-lead {
  color: rgba(255, 255, 255, 0.78);
}

/* True Purpose */
.true-purpose {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.true-purpose-col {
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid var(--accent-border);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.true-purpose-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(11, 91, 255, 0.1);
}

/* .true-purpose-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--accent-grad-muted);
  border: 1px solid var(--accent-border);
  color: var(--hero-blue-6);
} */

.true-purpose-head::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.8rem;
  background: var(--accent-grad-line-h-light);
  margin-right: 0;
  position: relative;
  /* top: 2px; */
  vertical-align: middle;
}

.true-purpose-head h3 {
  font-size: 1rem;
  font-weight: 700;
}

.true-purpose-list {
  list-style: disc;
  padding-left: 1.25em;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
}

.true-purpose-list li + li {
  margin-top: 6px;
}

/* ARCHITECTURE */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.project-card:hover {
  border-color: var(--accent-border-strong);
  box-shadow: 0 16px 40px rgba(55, 0, 179, 0.1), 0 0 0 1px rgba(127, 57, 251, 0.08);
}

/* 画像は絶対配置で枠いっぱいに敷く。grid + place-items:center だと img の枠がセルより小さくなり、
   object-fit:cover でも親の background（グラデ）が上下に見えてしまうことがある */
.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: var(--accent-grad-thumb);
  border-bottom: 1px solid var(--accent-border);
}

.project-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project-thumb-web {
  background: linear-gradient(135deg, #b8d9ff 0%, #d4c4ff 100%);
}

.project-thumb-migration {
  background: linear-gradient(135deg, #a8c8ff 0%, #c8b8ff 100%);
}

.project-thumb-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  line-height: 1.5;
}

.project-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: linear-gradient(135deg, rgba(230, 244, 255, 0.95), rgba(245, 240, 255, 0.95));
  border: 1px solid var(--accent-border);
  color: #4c1d95;
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.project-desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.project-links {
  font-size: 0.85rem;
}

.project-links li + li {
  margin-top: 4px;
}

.project-links a {
  color: var(--hero-blue-4);
  text-decoration: none;
}

.project-links a:hover {
  color: var(--hero-blue-5);
}

.project-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--hero-blue-6);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(11, 91, 255, 0.12);
  display: inline-block;
  width: 100%;
  text-align: left;
}

.project-more:hover {
  color: var(--hero-blue-4);
}

/* Experience */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  max-width: 640px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent-grad-line);
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, var(--hero-blue-0));
  border: 3px solid var(--hero-blue-5);
  box-shadow: 0 0 0 2px var(--bg), 0 2px 8px rgba(127, 57, 251, 0.2);
}

.timeline-period {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  color: var(--hero-blue-6);
}

.timeline-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Contact */
.contact-intro {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 28px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--hero-blue-4);
  box-shadow: 0 0 0 3px rgba(11, 91, 255, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* .btn-submit … contact フォームの送信ボタン。.btn-cta … 同じ見た目で別ページへ飛ばすだけのリンク（Submit はしない） */
.btn-submit,
.btn-cta {
  align-self: center;
  margin-top: 8px;
  padding: 12px 36px;
  border-radius: 999px;
  background: var(--accent-grad-btn);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(55, 0, 179, 0.25);
  transform: scale(1);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.35s ease,
    transform 0.5s ease;
}

a.btn-cta {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.contact-cta {
  margin-top: 40px;
  text-align: center;
}

.btn-submit:hover,
.btn-cta:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(55, 0, 179, 0.32);
  transform: scale(1.06);
}

.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  filter: none;
}

.contact-form-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.875rem;
  text-align: center;
  color: var(--hero-blue-4, #0b5bff);
}

.contact-form-status.is-error {
  color: #b00020;
}

/* Footer */
.footer {
  height: 100px;
  width: 100%;
  padding: 32px;
  text-align: center;
  font-size: 0.75rem;
  color: #424242;
  background-color: var(--concrete-footer-mid);
  background-image: var(--concrete-footer-bg-image);
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  position: absolute;
  bottom: 0;
}

/* Scroll reveal: フェード + 下から上へ（html.js 時のみ初期非表示） */
html.js .reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 3.5rem, 0);
  transition:
    opacity var(--reveal-duration) var(--reveal-ease) var(--reveal-delay),
    transform var(--reveal-duration) var(--reveal-ease) var(--reveal-delay);
  will-change: transform, opacity;
}

html.js .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* 入場方向（:not(.is-visible) で終了後の transform を .is-visible に任せる） */
html.js .reveal-on-scroll.reveal-from--left:not(.is-visible) {
  transform: translate3d(-3.25rem, 0, 0);
}

html.js .reveal-on-scroll.reveal-from--bottom:not(.is-visible) {
  transform: translate3d(0, 3.5rem, 0);
}

html.js .reveal-on-scroll.reveal-from--right:not(.is-visible) {
  transform: translate3d(3.25rem, 0, 0);
}

/* ARCHITECTURE: 左→中→右の順に動き出す（.projects-grid 直下のカードのみ） */
.projects-grid > .project-card.reveal-on-scroll:nth-child(1) {
  --reveal-delay: 0s;
}

.projects-grid > .project-card.reveal-on-scroll:nth-child(2) {
  --reveal-delay: 0.5s;
}

.projects-grid > .project-card.reveal-on-scroll:nth-child(3) {
  --reveal-delay: 1s;
}

/* IDENTITY: 見出し → 写真・氏名 → 肩書き → リード → 続きの段落 → 資格 */
#identity .section-title.reveal-on-scroll {
  --reveal-delay: 0s;
}

#identity .identity-photo-placeholder.reveal-on-scroll {
  --reveal-delay: 0.35s;
}

#identity .identity-name.reveal-on-scroll {
  --reveal-delay: 0.4s;
}

#identity .identity-role.reveal-on-scroll {
  --reveal-delay: 0.52s;
}

#identity .identity-lead.reveal-on-scroll {
  --reveal-delay: 0.72s;
}

#identity .identity-body > p.reveal-on-scroll:not(.identity-lead):not(.identity-name):not(.identity-role) {
  --reveal-delay: 1.08s;
}

#identity .identity-direction.reveal-on-scroll {
  --reveal-delay: 1.42s;
}

/* True Purpose: 左 → 右 */
#purpose .true-purpose > .true-purpose-col.reveal-on-scroll:nth-child(1) {
  --reveal-delay: 0s;
}

#purpose .true-purpose > .true-purpose-col.reveal-on-scroll:nth-child(2) {
  --reveal-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
    --reveal-delay: 0s;
    will-change: auto;
  }

  .nav-mobile-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(10, 10, 10, 0.8); 
    
    /* 状態制御の最小構成 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease; /* 速度を上げ、キレを出す */
  
    /* 中央揃えの基本構成 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  /* 開いた瞬間の「パッ」とした表示 */
  .nav-mobile-overlay.nav-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-mobile-overlay .nav-links {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: none;
    border: none;
  }

  .nav-mobile-overlay .nav-links a {
    display: inline-block; /* [重要] transform を有効にするために必要 */
    position: relative;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-decoration: none;
    padding: 8px 0;
    /* transform を transition に追加。0.2s でキレを出す[cite: 3, 4] */transition: 
      transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), 
      opacity 0.3s ease;
  }
}

/* -------------------------------------------------------------------------- *
 * 768px 以下: ハンバーガー表示・全画面メニュー・グリッドを 1 列化
 * （ナビの opacity/visibility アニメは :root の --nav-menu-* を参照）
 * -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .nav {
    width: 100%;
    padding: 10px 24px;
    flex-wrap: nowrap;
    isolation: isolate;
  }

  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
    position: relative;
    z-index: var(--z-nav-chrome);
    pointer-events: auto;
  }

  .logo {
    order: 1;
    position: relative;
    z-index: 1;
    pointer-events: auto;
  }

  /* 全画面メニュー: display ではなく opacity / visibility。閉じるときはパネル先行→遅れてスクラム */
.nav-mobile-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 130;
    
    /* 磨りガラス（blur）を全廃。鋭い「95%の漆黒」のみ。 */
    background: rgba(10, 10, 10, 0.95); 
    
    /* 状態制御の最小構成 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease; /* 速度を上げ、キレを出す */
  
    /* 中央揃えの基本構成 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  /* 開閉状態の制御 */
.nav-mobile-overlay.nav-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  /* メニュー項目を縦並びに固定 */
.nav-mobile-overlay .nav-links {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: none;
    border: none;
  }
  
.nav-mobile-overlay .nav-links a {
    display: inline-block; /* [重要] transformを効かせるための必須条件 */
    position: relative; /* アンダーラインの基準点 */
    color: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", sans-serif; /* 継承 */
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-decoration: none;
    padding: 8px 0;
    transition: 
      transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
      opacity 0.3s ease;
  }

  /* アンダーラインの初期状態：中央から外へ広がる設計 */
  .nav-mobile-overlay .nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;         /* 中央から開始 */
    width: 0;          /* 最初は幅ゼロ */
    height: 2px;       /* 鋭く細いライン */
    background: var(--accent-grad-line-h-light); /* 指定のグラデーション */
    transform: translateX(-50%); /* 中央配置の維持 */
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1); /* Apple的な滑らかな加速 */
  }

  /* Hover時のテキスト自体の微かな変化（オプション） */
  .nav-mobile-overlay .nav-links a:hover {
    transform: scale(1.1); /* 5% だけ拡大。これが「直感的な楽しさ」の正体です */
    opacity: 0.7; /* 透過させず、白を際立たせる[cite: 3, 4] */
  }

  /* Hover時：ラインがスッと伸びる */
  .nav-mobile-overlay .nav-links a:hover::after {
    width: 100%; /* テキスト幅いっぱいに広がる */
  }

  .u-sp-only {
    display: block;
  }

  .identity-layout {
    grid-template-columns: 1fr;
  }

  .true-purpose {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- *
 * サブページ（body.sub-page）
 * -------------------------------------------------------------------------*/

/* --- A. ページ背景 + LP/クリエイティブで使い回すホバー用グラデ --- */
body.sub-page {
  --works-hover-gradient: linear-gradient(135deg, #a575fc, #9a5efc, #5f1fdb);
  background: linear-gradient(180deg, #f5f8ff 0%, var(--bg) 38%, var(--bg) 100%);
}

/* --- B. 上部バー：スクロールしても見える sticky、トップと同じ黒ヘッダー --- */
/* .sub-page .detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--concrete-mid);
  background-image: var(--concrete-bg-image);
  border-bottom: var(--nav-chrome-border-bottom);
  box-shadow: var(--nav-chrome-shadow);
} */

.sub-page .detail-header__inner {
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sub-page .detail-back {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sub-page .detail-back:hover {
  color: #fff;
}

.sub-page .detail-back:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
  border-radius: 2px;
}

.sub-page .detail-brand {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  align-items: bottom;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 10px;
}

/* --- C. 本文エリア：中央寄せ・最大幅制限（読みやすいカラム幅） --- */
.sub-page .detail-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* 小見出し（英字）・H2・リード：メイン LP セクションと Others で共通クラスを再利用 */
.sub-page .detail-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sub-page .detail-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-on-white);
  line-height: 1.35;
  margin-bottom: 14px;
  padding-bottom: 16px;
  position: relative;
}

.sub-page .detail-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-grad-line-h);
}

.sub-page .detail-lede {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-on-white-muted);
  margin-bottom: 40px;
}

/* リスト枠：上下に区切り線（カード風の行） */
.sub-page .work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--accent-border);
}

.sub-page .work-list__item {
  border-bottom: 1px solid var(--accent-border);
}

/* --- D. LP・HP 外部リンク行：2列グリッド（左: タイトル+URL / 右: 矢印） ---
 * クリエイティブ行は <a> ではなく .works-creative__block のためここには当たらない。
 */
.sub-page a.work-list__link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  margin: 0 -12px;
  padding: 22px 12px;
  text-decoration: none;
  color: var(--ink-on-white);
  transform: scale(1);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.35s ease,
    transform 0.5s ease;
  border-radius: 8px;
}

.sub-page a.work-list__link:hover {
  background: var(--works-hover-gradient);
  box-shadow: 0 8px 32px var(--accent-glow);
  color: #fff;
  transform: scale(1.04);
}

.sub-page a.work-list__link:hover .work-list__arrow {
  color: #fff;
  opacity: 1;
}

.sub-page a.work-list__link:focus-visible {
  outline: 2px solid var(--hero-blue-4);
  outline-offset: 2px;
}

/* LP・HP 一覧（.work-list--web 内の名前のみグリッド列に配置） */
.sub-page .work-list--web .work-list__name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  grid-column: 1;
  grid-row: 1;
}

.sub-page .work-list__host {
  font-size: 0.8rem;
  color: var(--text-muted);
  grid-column: 1;
  grid-row: 2;
  word-break: break-all;
}

.sub-page .work-list__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--hero-blue-5);
  opacity: 0.85;
  transform: translate(2px, -2px);
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Others セクション：上に余白 + 区切り線で LP ブロックと分離 */
.sub-page .works-others {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--accent-border);
}

/* --- E. クリエイティブ実績：縦並び（タイトル → 画像ボタン） ---
 * .works-creative__zoom … 見た目をリセットした button。ホバーで LP と同系の影＋拡大。
 * .works-creative__overlay … サムネ上の紫グラデ（--works-hover-gradient）。
 * .works-creative__img--* … ロゴ/フライヤー/マップで縦基準 or 横基準が異なるため修飾子で分岐。
 */
.sub-page .works-others .works-creative__block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0 -12px;
  padding: 22px 12px;
  border-radius: 8px;
  color: var(--ink-on-white);
}

.sub-page .works-others .work-list__name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  max-width: 100%;
}

.sub-page .works-others .works-creative__zoom {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
  border-radius: 10px;
  transition:
    transform 0.35s ease,
    box-shadow 0.2s ease;
}

.sub-page .works-others .works-creative__zoom:focus-visible {
  outline: 2px solid var(--hero-blue-4);
  outline-offset: 4px;
}

.sub-page .works-others .works-creative__thumb {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 10px;
}

.sub-page .works-others .works-creative__overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--works-hover-gradient);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.sub-page .works-others .works-creative__zoom:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.sub-page .works-others .works-creative__zoom:hover .works-creative__overlay {
  opacity: 0.88;
}

.sub-page .works-others .works-creative__thumb .works-creative__img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.sub-page .works-others .works-creative__img--logo,
.sub-page .works-others .works-creative__img--map {
  height: 240px;
  width: auto;
}

.sub-page .works-others .works-creative__img--flyer {
  width: 240px;
  height: auto;
}

/* --- F. ライトボックス（JS: initWorksCreativeLightbox） ---
 * [hidden] … display:none。開いているときだけ fixed で全面表示。
 * __backdrop … 暗転＋ぼかし。クリックで閉じる。
 * __shell … 閉じるボタン行 + 画像枠の縦並び。pointer-events の trick:
 *   親を none にして子だけ auto → 余白クリックは背面へ抜ける（閉じやすくする）。
 * __top … 閉じるボタンを画像と重ねないよう上段に配置。
 * __img … 実物比率のまま収まるよう max-width / max-height でビューポート内に収める。
 */
.sub-page .works-lightbox[hidden] {
  display: none;
}

.sub-page .works-lightbox:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 28px;
  box-sizing: border-box;
}

.sub-page .works-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 24, 0.82);
  backdrop-filter: blur(8px);
}

.sub-page .works-lightbox__shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: min(96vw, 1280px);
  max-height: min(96vh, 920px);
  pointer-events: none;
}

.sub-page .works-lightbox__shell > * {
  pointer-events: auto;
}

.sub-page .works-lightbox__top {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  min-height: 44px;
}

.sub-page .works-lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(40, 32, 58, 0.95), rgba(25, 20, 42, 0.98));
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.sub-page .works-lightbox__close:hover {
  transform: scale(1.06);
  border-color: rgba(165, 117, 252, 0.55);
  background: linear-gradient(145deg, rgba(95, 31, 219, 0.55), rgba(40, 32, 58, 0.98));
}

.sub-page .works-lightbox__close:focus-visible {
  outline: 2px solid var(--hero-blue-4);
  outline-offset: 3px;
}

.sub-page .works-lightbox__close-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.sub-page .works-lightbox__close-icon::before,
.sub-page .works-lightbox__close-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 22px;
  border-radius: 1px;
  background: currentColor;
}

.sub-page .works-lightbox__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.sub-page .works-lightbox__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.sub-page .works-lightbox__frame {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border-radius: 12px;
}

.sub-page .works-lightbox__img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(78vh, calc(96vh - 120px));
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* アニメーションを減らす設定のときは拡大・トランジションをオフ */
@media (prefers-reduced-motion: reduce) {
  .sub-page .works-others .works-creative__zoom,
  .sub-page .works-others .works-creative__overlay,
  .sub-page .works-lightbox__close {
    transition: none;
  }

  .sub-page .works-others .works-creative__zoom:hover {
    transform: none;
  }
}

.sub-page .detail-footnote {
  margin-top: 48px;
  margin-bottom: 96px;  
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* フッターは画面下に固定（本文に padding-bottom で被り回避は main 側の設計に依存） */
.sub-page .footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

/* --- G. 狭い画面：LP 行を 1 列にし、矢印を 3 行目へ（タイトル → URL → ↗） --- */
@media (max-width: 480px) {
  .sub-page .detail-main {
    padding-top: 40px;
  }

  .sub-page a.work-list__link {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .sub-page .work-list__arrow {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    margin-top: 4px;
  }
}