/*
Theme Name: Takagaki Portfolio
Theme URI: https://tmm-design.work/
Description: Portfolio theme for Takagaki — minimal, monotone, Awwwards-style.
Version: 1.0.0
Author: Takagaki
*/

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ivory:    #f4f4f5;
  --stone:    #e5e7eb;
  --warm-mid: #6b7280;
  --charcoal: #1f2937;
  --ink:      #0f1115;
  --accent:   #374151;
  --white:    #ffffff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', 'Noto Sans JP', sans-serif;

  --ease-silk:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h:   64px;
  --col-gap: 24px;
}

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
}

a {
  color: var(--accent);
  text-decoration-color: rgba(55, 65, 81, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-silk), text-decoration-color 0.2s var(--ease-silk);
}
a:hover { color: var(--ink); text-decoration-color: rgba(15, 17, 21, 0.55); }

mark, .mark {
  background: linear-gradient(180deg, rgba(55,65,81,.12) 0%, rgba(55,65,81,.12) 100%);
  color: var(--ink);
  padding: .08em .35em;
  border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(15, 17, 21, 0.08);
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.nav-logo-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--stone);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--accent);
  border: none;
  flex-shrink: 0;
}
.nav-logo-avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-mid);
  transition: color 0.2s var(--ease-silk);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-silk);
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--ink); text-decoration: none; }
.nav-links a:hover::after,
.nav-links a.is-active::after { width: 100%; }

/* current-menu-item 対応 */
.nav-links li.current-menu-item > a,
.nav-links li.current_page_item > a { color: var(--ink); }
.nav-links li.current-menu-item > a::after,
.nav-links li.current_page_item > a::after { width: 100%; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--charcoal);
  transition: transform 0.3s, opacity 0.3s;
}

/* ═══════════════════════════════════════════════════════════
   HERO / PAGE TITLE
═══════════════════════════════════════════════════════════ */
.hero {
  padding-top: calc(var(--nav-h) + 70px);
  padding-bottom: 72px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-mid);
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.1s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 110px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out-expo) 0.2s forwards;
}
.hero-title em { font-style: italic; color: var(--accent); }

/* Contact/Order ページは white-space: nowrap でタイトルを一行に */
.hero-title.nowrap { white-space: nowrap; font-size: clamp(50px, 7vw, 88px); line-height: 1; }

/* ═══════════════════════════════════════════════════════════
   FILTER BAR (front-page)
═══════════════════════════════════════════════════════════ */
.filter-wrap {
  padding: 0 40px 48px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.35s forwards;
}
.filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--stone);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }

.filter-btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-mid);
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.25s var(--ease-silk);
}
.filter-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-silk);
}
.filter-btn:hover { color: var(--charcoal); }
.filter-btn.active { color: var(--ink); }
.filter-btn.active::after { transform: scaleX(1); }

/* ═══════════════════════════════════════════════════════════
   GRID (front-page)
═══════════════════════════════════════════════════════════ */
.grid-wrap { padding: 0 40px 100px; }

.grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 22px;
  align-items: start;
  position: relative;
  min-height: 0;
}
.grid.is-empty { min-height: 320px; }

/* ═══════════════════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════════════════ */
.card {
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
}
.card.visible { opacity: 1; transform: translateY(0); }
.card.hidden  { display: none; }

.card-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--stone);
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(15, 17, 21, 0.06);
  box-shadow: none;
  transition:
    transform    0.35s var(--ease-silk),
    border-color 0.35s var(--ease-silk);
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-silk), filter 0.5s;
  filter: saturate(0.95);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 25, 23, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s var(--ease-silk);
}
.card-overlay-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(249, 247, 244, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s var(--ease-silk), transform 0.3s var(--ease-silk);
  backdrop-filter: blur(8px);
}
.card-overlay-icon svg { width: 16px; height: 16px; stroke: var(--ink); }

.card:hover .card-img-wrap img   { transform: scale(1.04); filter: saturate(1.05); }
.card:hover .card-overlay        { background: rgba(26, 25, 23, 0.18); }
.card:hover .card-overlay-icon   { opacity: 1; transform: scale(1); }
.card:hover .card-img-wrap {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15,17,21,.06);
}
.card-meta { padding: 16px 2px 0; }

.card-category {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  /* 複数カテゴリ: 長い場合は折り返し、カードサイズは崩さない */
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
}

.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.card:hover .card-title { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-silk);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 10px;
  width: 100%;
  max-width: 1200px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 2px  4px  rgba(0,0,0,0.04),
    0 12px 40px rgba(0,0,0,0.18),
    0 40px 80px rgba(0,0,0,0.1);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s var(--ease-out-expo);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--stone);
  flex-shrink: 0;
}
.modal-header-left { display: flex; flex-direction: column; gap: 4px; }

.modal-category {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  border: 1px solid var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
  margin-top: 2px;
}
.modal-close:hover { background: var(--stone); transform: scale(1.08); }
.modal-close svg { width: 14px; height: 14px; stroke: var(--charcoal); }

.modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 32px 36px;
  scrollbar-width: thin;
  scrollbar-color: var(--stone) transparent;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--stone); border-radius: 4px; }

.modal-caption {
  padding: 18px 20px;
  border-left: 2px solid var(--stone);
  margin-bottom: 28px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  border-radius: 0 6px 6px 0;
}
.modal-caption-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-mid);
  margin-bottom: 6px;
}
.modal-caption-text {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.75;
}

.modal-image {
  width: 100%;
  border-radius: 6px;
  display: block;
  background: var(--stone);
  object-fit: cover;
  margin-bottom: 16px;
}
.modal-image:last-child { margin-bottom: 0; }

/* モーダル内「詳細を見る」リンク — 非表示 */
.modal-detail-link {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   NO RESULTS
═══════════════════════════════════════════════════════════ */
.no-results {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
  color: var(--warm-mid);
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.01em;
  pointer-events: none;
}
.no-results.visible { display: flex; }

/* ═══════════════════════════════════════════════════════════
   PAGE BODY (About / Contact / Terms 共通ラッパー)
═══════════════════════════════════════════════════════════ */
.page-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px 120px;
}

/* ─── SECTION LABEL ─── */
.sec-label, .sec-label2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-label  { margin-bottom: 24px; }
.sec-label2 { margin-bottom: 28px; }

.sec-label-bar, .sec-label2-bar {
  width: 5px; height: 18px;
  border-radius: 2px;
  background: var(--ink);
  flex-shrink: 0;
}
.sec-label-text, .sec-label2-text {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ─── SECTION BASE (scroll reveal) ─── */
.section {
  padding: 48px 0;
  border-top: 1px solid var(--stone);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity   0.65s var(--ease-out-expo),
    transform 0.65s var(--ease-out-expo);
}
.section:first-of-type { border-top: none; padding-top: 0; }
.section.in-view { opacity: 1; transform: translateY(0); }

/* ─── LEAD BLOCK (Contact) ─── */
.lead-block {
  padding-bottom: 20px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity   0.65s var(--ease-out-expo),
    transform 0.65s var(--ease-out-expo);
}
.lead-block.in-view { opacity: 1; transform: translateY(0); }
.lead-block p { font-size: 14px; line-height: 1.85; color: var(--charcoal); margin-bottom: 6px; }

/* ═══════════════════════════════════════════════════════════
   ABOUT — PROFILE
═══════════════════════════════════════════════════════════ */
.profile-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: start;
}
.profile-img {
  width: 180px; height: 180px;
  border-radius: 16px;
  background: var(--stone);
  overflow: hidden;
  border: 1px solid rgba(15,17,21,.06);
  flex-shrink: 0;
}
.profile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 64px; font-weight: 300;
  color: var(--warm-mid);
}
.profile-info  { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.profile-name  {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 300; color: var(--ink);
  letter-spacing: .01em; line-height: 1.1;
}
.profile-name em { font-style: italic; color: var(--accent); }
.profile-role  { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--warm-mid); }
.profile-bio   { font-size: 14px; line-height: 1.85; color: var(--charcoal); margin-top: 6px; max-width: 100%; }

.hero.hero-about {
  padding-bottom: 58px;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT — AWARDS
═══════════════════════════════════════════════════════════ */
.award-list  { display: flex; flex-direction: column; gap: 12px; }
.award-card  {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(15,17,21,.06);
  box-shadow: none;
  padding: 22px 24px;
  display: flex; align-items: baseline; gap: 20px;
  transition: none;
}
.award-card:hover {
  transform: none;
  box-shadow: none;
}
.award-year { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.award-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 400;
  color: var(--ink); line-height: 1.25;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT — SKILLS TAGS
═══════════════════════════════════════════════════════════ */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 11px; letter-spacing: .08em; font-weight: 400;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 100px;
  padding: 7px 16px;
  transition: border-color .2s, color .2s, background .2s;
}
.tag:hover { border-color: var(--charcoal); color: var(--ink); background: var(--ivory); }

/* ═══════════════════════════════════════════════════════════
   ABOUT / CONTACT — SERVICE / INFO CARDS (共通)
═══════════════════════════════════════════════════════════ */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.service-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(15,17,21,.06);
  padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.service-card .card-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500;
  color: var(--ink); line-height: 1.2; letter-spacing: .01em;
}
.service-card .card-body { font-size: 13px; color: var(--warm-mid); line-height: 1.65; }

/* ═══════════════════════════════════════════════════════════
   ABOUT — CREDITS
═══════════════════════════════════════════════════════════ */
.credit-list { display: flex; flex-direction: column; border-top: 1px solid var(--stone); }
.credit-item {
  padding: 16px 4px;
  border-bottom: 1px solid var(--stone);
  transition: background .2s;
}
.credit-item:hover { background: rgba(255,255,255,.6); }
.credit-company {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 400;
  color: var(--ink); margin-bottom: 4px;
}
.credit-role { font-size: 12px; color: var(--warm-mid); line-height: 1.6; }
.credit-role li { list-style: none; padding-left: 12px; position: relative; }
.credit-role li::before { content: "·"; position: absolute; left: 0; color: var(--warm-mid); }

/* ═══════════════════════════════════════════════════════════
   ABOUT — FEATURES (掲載情報) — credit-list と同デザイン
═══════════════════════════════════════════════════════════ */
.feature-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--stone);
}
.feature-card {
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--stone);
  box-shadow: none;
  padding: 16px 4px;
  display: flex; align-items: baseline; gap: 16px;
  transition: background .2s;
}
.feature-card:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255,255,255,.6);
}
.feature-pub   { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.feature-title { font-family: var(--font-display); font-size: 15px; font-weight: 400; color: var(--ink); line-height: 1.3; }

/* ═══════════════════════════════════════════════════════════
   CONTACT — INFO CARDS
═══════════════════════════════════════════════════════════ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.info-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(15,17,21,.06);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.info-card-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--ivory);
  border: 1px solid var(--stone);
  display: flex; align-items: center; justify-content: center;
}
.info-card-icon svg { width: 16px; height: 16px; stroke: var(--charcoal); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.info-card-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.info-card-value { font-family: var(--font-display); font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.info-card-note, .info-card-note2 { font-size: 12px; color: var(--warm-mid); }
.info-card-note  { line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   CONTACT — FLOW
═══════════════════════════════════════════════════════════ */
.flow-list { display: flex; flex-direction: column; gap: 12px; }
.flow-item {
  display: flex; align-items: flex-start; gap: 20px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(15,17,21,.06);
  box-shadow: none;
  padding: 20px 24px;
  opacity: 0; transform: translateX(-8px);
  transition: opacity .5s var(--ease-out-expo), transform .5s var(--ease-out-expo);
}
.flow-item.in-view { opacity: 1; transform: translateX(0); }
.flow-item:hover   { box-shadow: none; }
.flow-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 400; letter-spacing: .04em;
  flex-shrink: 0; margin-top: 1px;
}
.flow-content { display: flex; flex-direction: column; gap: 4px; }
.flow-title   { font-family: var(--font-display); font-size: 17px; font-weight: 400; color: var(--ink); line-height: 1.2; }
.flow-desc    { font-size: 13px; color: var(--warm-mid); line-height: 1.65; }

/* ═══════════════════════════════════════════════════════════
   DETAIL/TERMS — TERMS CARD
═══════════════════════════════════════════════════════════ */
.terms-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(15,17,21,.06);
  padding: 24px;
}
.terms-body { font-size: 14px; line-height: 1.85; color: var(--charcoal); }

.intro {
  padding-bottom: 18px;
  opacity: 0; transform: translateY(18px);
  transition: opacity .65s var(--ease-out-expo), transform .65s var(--ease-out-expo);
}
.intro.in-view { opacity: 1; transform: translateY(0); }
.intro p { font-size: 14px; line-height: 1.85; color: var(--charcoal); margin-bottom: 6px; }

/* ═══════════════════════════════════════════════════════════
   SINGLE (作品詳細)
═══════════════════════════════════════════════════════════ */
.single-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px 120px;
}
.single-hero-img {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15,17,21,.06);
  box-shadow: 0 12px 28px rgba(15,17,21,.06), 0 2px 8px rgba(15,17,21,.04);
  margin-bottom: 40px;
  background: var(--stone);
}
.single-hero-img img { width: 100%; height: auto; display: block; }
.single-category { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.single-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.1;
  margin-bottom: 32px;
}
.single-content {
  font-size: 15px; line-height: 1.85;
  color: var(--charcoal);
}
.single-content img {
  width: 100%; border-radius: 10px;
  margin: 24px 0;
  box-shadow: 0 8px 24px rgba(15,17,21,.08);
}
.single-content h2 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 400;
  margin: 40px 0 16px;
  color: var(--ink);
}
.single-content h3 { font-size: 18px; font-weight: 500; margin: 28px 0 12px; color: var(--ink); }
.single-content p  { margin-bottom: 16px; }
.single-content ul, .single-content ol { padding-left: 20px; margin-bottom: 16px; }
.single-content iframe {
  width: 100%; aspect-ratio: 16/9;
  border-radius: 10px; border: none;
  margin: 24px 0;
}

.single-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warm-mid);
  text-decoration: none;
  transition: color .2s;
}
.single-back:hover { color: var(--ink); }
.single-back svg  { width: 14px; height: 14px; stroke: currentColor; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--stone);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 11px; color: var(--warm-mid); line-height: 1.7; }
.footer-links { display: flex; gap: 20px; align-items: center; }
.footer-links a {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--stone);
  color: var(--warm-mid);
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.footer-links a:hover { border-color: var(--charcoal); color: var(--ink); }
.footer-links svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════════════════
   MODAL — 投稿本文コンテンツ表示
═══════════════════════════════════════════════════════════ */

/* キャプション（空のとき .is-hidden） */
.modal-caption {
  padding: 18px 20px;
  border-left: 2px solid var(--stone);
  margin-bottom: 28px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  border-radius: 0 6px 6px 0;
}
.modal-caption.is-hidden { display: none; }

/* ローディングスピナー */
.modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  min-height: 120px;
}

/* 投稿本文ラッパー */
.modal-post-content {
  font-size: 14px;
  line-height: 1.85;
  color: var(--charcoal);
  /* 上部に余白（キャプションが非表示のときも自然に見える） */
  padding-top: 4px;
}

/* ─── モーダル内メディア共通ラッパー ─── */
/* 画像・動画・YouTube を自然なサイズで中央表示
   PC: max-width 760px 中央寄せ / スマホ: 画面幅に収まる */
.modal-post-content figure,
.modal-post-content .wp-block-image,
.modal-post-content .wp-block-video,
.modal-post-content .wp-block-embed {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

/* 本文内の画像 */
.modal-post-content img {
  max-width: 100%;
  width: auto;          /* 元サイズを尊重、ただし max-width で制限 */
  height: auto;
  border-radius: 6px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.modal-post-content figure { margin-bottom: 20px; }
.modal-post-content figure img { width: 100%; margin-bottom: 0; }
.modal-post-content .wp-block-image img { width: 100%; }
.modal-post-content figcaption {
  font-size: 11px;
  color: var(--warm-mid);
  text-align: center;
  margin-top: 8px;
}

/* 本文内の動画 */
.modal-post-content video {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  background: var(--ink);
}
.modal-post-content .wp-block-video video {
  border-radius: 6px;
}

/* YouTube / iframe (Gutenbergブロック) */
.modal-post-content iframe,
.modal-post-content .wp-block-embed__wrapper iframe {
  width: 100%;
  border: none;
  border-radius: 6px;
  display: block;
}
.modal-post-content .wp-block-embed {
  margin-bottom: 20px;
}
/* 16:9 レスポンシブ */
.modal-post-content .wp-block-embed.is-type-video .wp-block-embed__wrapper,
.modal-post-content .wp-block-embed-youtube .wp-block-embed__wrapper,
.modal-post-content .wp-block-embed-vimeo .wp-block-embed__wrapper {
  position: relative;
  padding-top: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
}
.modal-post-content .wp-block-embed.is-type-video .wp-block-embed__wrapper iframe,
.modal-post-content .wp-block-embed-youtube .wp-block-embed__wrapper iframe,
.modal-post-content .wp-block-embed-vimeo .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 本文テキスト要素 */
.modal-post-content p  { margin: 0 0 12px; }
.modal-post-content p:last-child { margin-bottom: 0; }
.modal-post-content h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 400;
  color: var(--ink); margin: 20px 0 10px;
}
.modal-post-content h3 {
  font-size: 16px; font-weight: 500;
  color: var(--ink); margin: 16px 0 8px;
}
.modal-post-content ul,
.modal-post-content ol { padding-left: 18px; margin: 0 0 12px; }
.modal-post-content a {
  color: var(--accent);
  text-decoration-color: rgba(55,65,81,.35);
  text-underline-offset: 3px;
}
.modal-post-content a:hover { color: var(--ink); }

/* Gutenberg: gallery */
.modal-post-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}
.modal-post-content .wp-block-gallery figure { margin: 0; }
.modal-post-content .wp-block-gallery img { border-radius: 4px; }


/* ═══════════════════════════════════════════════════════════
   BACK TO TOP ボタン（全ページ共通）
═══════════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--stone);
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease-silk), transform 0.3s var(--ease-silk), background 0.2s, border-color 0.2s;
  z-index: 90;
  text-decoration: none;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--ivory);
  border-color: var(--charcoal);
  color: var(--ink);
}
.back-to-top svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .back-to-top { bottom: 20px; right: 20px; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET 1024px
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE 768px
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
    padding: 24px 20px 32px;
    border-bottom: 1px solid var(--stone);
    gap: 0;
    z-index: 99;
  }
  .nav-links.open li a { padding: 14px 0; display: block; font-size: 13px; }
  .nav-hamburger { display: flex; }

  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 36px; }
  .hero-title.nowrap { white-space: normal; font-size: clamp(38px, 12vw, 56px); }

  .filter-wrap { padding: 0 20px 32px; }
  .filter-btn  { padding: 10px 14px; font-size: 10px; }

  .grid-wrap { padding: 0 20px 60px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .modal-header { padding: 20px 20px 16px; }
  .modal-body   { padding: 20px 20px 28px; }
  .modal-title  { font-size: 22px; }

  .page-body   { padding: 0 20px 80px; }
  .single-wrap { padding: 0 20px 80px; }

  .profile-grid    { grid-template-columns: 1fr; gap: 24px; }
  .profile-img     { width: 120px; height: 120px; border-radius: 12px; }
  .info-grid       { grid-template-columns: 1fr; }
  .service-grid    { grid-template-columns: 1fr; }

  .footer { padding: 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-title { font-size: 52px; }
  .hero-title.nowrap { font-size: 42px; }
}
