/* ============================================================
   blocks.css — 固定ページの見た目
   ------------------------------------------------------------
   このファイルは「フロント」と「管理画面のブロックエディター」の
   両方に読み込まれます（inc/tkw-blocks.php の tkw_blocks_setup /
   tkw_blocks_front_assets）。

   ■ 方針: HTMLタグごとにスタイルを当てる
   編集者はブログを書くのと同じ感覚で、見出し・段落・リスト・画像を
   置くだけでよい、という状態を目指しています。
   「このクラスを付けたときだけ効く」という作りにはしないこと。
   普通に H2 を打ったら H2 として整う、が原則です。

   ■ セレクタが2つ並んでいる理由
     .tkw-content h2,
     .block-editor-block-list__layout h2 { ... }

   前者がフロント（page.php の <main class="tkw-content">）、
   後者が編集画面のキャンバスです。編集画面には .tkw-content が
   存在しないため、前者だけでは管理画面に効きません。
   逆にタグだけ（h2 { }）で書くと、ヘッダー・フッター・トップページの
   要素まで巻き込みます（実際 header の <p> は行間指定が無く該当する）。
   そのため「本文領域だけ」に限定しつつ両方へ効く、この書き方にしています。

   ■ Tailwind を使わない理由
   Tailwind は Play CDN（JS）で動くため、ブロックエディターの iframe 内では
   効きません。編集対象の領域は、この実CSSだけで完結させています。
   ============================================================ */

/* ------------------------------------------------------------
   本文コンテナ
   ------------------------------------------------------------
   横幅はサイトの他の部分（ヘッダーのナビ、ページヘッダー）と揃えて 1280px。

   ★ box-sizing: border-box であること★
   ヘッダーは Tailwind の `max-w-7xl mx-auto px-5 lg:px-10` で、
   Tailwind は border-box なので「1280px の中に左右の padding が含まれる」。
   ここを content-box にすると padding が 1280px の外側に付き、
   ヘッダーより左右 40px ずつ外へ広がって左端がズレる（実際にズレた）。
   ------------------------------------------------------------ */
.tkw-content {
  box-sizing: border-box;
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 20px 96px;
  overflow-wrap: break-word;
}
@media (min-width: 1024px) {
  .tkw-content {
    padding: 96px 40px 120px;
  }
}

/* ============================================================
   本文のタグ別スタイル
   ここから下は「.tkw-content 配下」＋「編集キャンバス配下」の2本立て。
   片方だけ足すと、フロントと管理画面で見た目がズレます。
   ============================================================ */

/* ------------------------------------------------------------
   見出し
   ------------------------------------------------------------ */
/* H2 … 紺の文字 ＋ 下線の左端に金のアクセント。
   ブランドカラー（紺 #1B2A4A / 金 #A07E2C）の2色で構成している。 */
.tkw-content h2,
.block-editor-block-list__layout h2 {
  position: relative;
  font-family: "NumYu", "Shippori Mincho", "Noto Serif JP", serif;
  font-size: clamp(2.1rem, 1.7rem + 1.6vw, 2.5rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: #1B2A4A;
  margin: 3.5rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(27, 42, 74, 0.15);
}
/* 下線の左端に重ねる金の短い線 */
.tkw-content h2::after,
.block-editor-block-list__layout h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3rem;
  height: 2px;
  background: #A07E2C;
}

/* H3 … 紺の文字 ＋ 行頭に金の縦線 */
.tkw-content h3,
.block-editor-block-list__layout h3 {
  font-family: "NumYu", "Shippori Mincho", "Noto Serif JP", serif;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: #1B2A4A;
  margin: 2.5rem 0 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid #A07E2C;
}

/* H4 … 紺の文字（ゴシック） */
.tkw-content h4,
.block-editor-block-list__layout h4 {
  font-family: "NumYu", "Noto Sans JP", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.7;
  color: #1B2A4A;
  margin: 2rem 0 0.75rem;
}

/* 本文の先頭が見出しのときは、上の余白を詰める */
.tkw-content > :first-child,
.block-editor-block-list__layout > :first-child {
  margin-top: 0;
}

/* ------------------------------------------------------------
   段落
   ------------------------------------------------------------ */
.tkw-content p,
.block-editor-block-list__layout p {
  font-family: "NumYu", "Noto Sans JP", sans-serif;
  font-size: 24px;
  line-height: 2;
  color: #374151;
  margin: 0 0 1.5rem;
}

/* 強調（Ctrl+B）はブランドのゴールドで */
.tkw-content strong,
.block-editor-block-list__layout strong {
  font-weight: 500;
  color: #A07E2C;
}

/* ------------------------------------------------------------
   リンク
   ------------------------------------------------------------ */
.tkw-content a,
.block-editor-block-list__layout a {
  color: #1B2A4A;
  text-underline-offset: 2px;
}
.tkw-content a:hover {
  color: #A07E2C;
}

/* ------------------------------------------------------------
   リスト
   ------------------------------------------------------------ */
.tkw-content ul,
.tkw-content ol,
.block-editor-block-list__layout ul,
.block-editor-block-list__layout ol {
  font-family: "NumYu", "Noto Sans JP", sans-serif;
  font-size: 24px;
  line-height: 2;
  color: #374151;
  margin: 0 0 1.5rem;
  padding-left: 1.5em;
}
.tkw-content li,
.block-editor-block-list__layout li {
  margin-bottom: 0.5rem;
}
.tkw-content li::marker,
.block-editor-block-list__layout li::marker {
  color: #A07E2C;
}
/* 入れ子のリスト */
.tkw-content li > ul,
.tkw-content li > ol,
.block-editor-block-list__layout li > ul,
.block-editor-block-list__layout li > ol {
  margin: 0.5rem 0 0;
}

/* ------------------------------------------------------------
   画像
   ------------------------------------------------------------ */
.tkw-content figure,
.block-editor-block-list__layout figure {
  margin: 2.5rem 0;
}
.tkw-content img,
.block-editor-block-list__layout img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
.tkw-content figcaption,
.block-editor-block-list__layout figcaption {
  margin-top: 0.75rem;
  font-family: "NumYu", "Noto Sans JP", sans-serif;
  font-size: 19px;
  line-height: 1.8;
  color: #6b7280;
  text-align: left;
}

/* ------------------------------------------------------------
   引用
   ------------------------------------------------------------ */
.tkw-content blockquote,
.block-editor-block-list__layout blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid #A07E2C;
  color: #6b7280;
}
.tkw-content blockquote p,
.block-editor-block-list__layout blockquote p {
  font-size: 23px;
  line-height: 1.9;
  color: inherit;
  margin-bottom: 0.75rem;
}
.tkw-content blockquote cite,
.block-editor-block-list__layout blockquote cite {
  font-size: 19px;
  font-style: normal;
  color: #9ca3af;
}

/* ------------------------------------------------------------
   表
   ------------------------------------------------------------ */
.tkw-content table,
.block-editor-block-list__layout table {
  width: 100%;
  border-collapse: collapse;
  font-family: "NumYu", "Noto Sans JP", sans-serif;
  font-size: 22px;
  line-height: 1.8;
  margin: 2rem 0;
}
.tkw-content th,
.tkw-content td,
.block-editor-block-list__layout th,
.block-editor-block-list__layout td {
  border: 1px solid #e9e7e0;
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
}
.tkw-content th,
.block-editor-block-list__layout th {
  background: #faf9f6;
  font-weight: 500;
  color: #111827;
}
/* 横に長い表はスクロールさせる（スマホで崩れないように） */
.tkw-content .wp-block-table {
  overflow-x: auto;
}

/* ------------------------------------------------------------
   区切り線
   ------------------------------------------------------------ */
.tkw-content hr,
.block-editor-block-list__layout hr {
  border: 0;
  border-top: 1px solid #e9e7e0;
  margin: 3rem auto;
}

/* ------------------------------------------------------------
   ボタン
   ------------------------------------------------------------ */
.tkw-content .wp-block-buttons,
.block-editor-block-list__layout .wp-block-buttons {
  margin: 2.5rem 0;
  gap: 12px;
}
.tkw-content .wp-block-button__link,
.block-editor-block-list__layout .wp-block-button__link {
  display: inline-block;
  padding: 20px 40px;
  border-radius: 9999px;
  background: #1B2A4A;
  color: #ffffff;
  font-family: "NumYu", "Noto Sans JP", sans-serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: background .3s ease, transform .3s ease;
}
.tkw-content .wp-block-button__link:hover {
  background: #28406B;
  transform: translateY(-2px);
  color: #ffffff;
}
/* 白抜き（電話番号など） */
.tkw-content .is-style-outline .wp-block-button__link,
.block-editor-block-list__layout .is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #1f2937;
}
.tkw-content .is-style-outline .wp-block-button__link:hover {
  background: #1B2A4A;
  border-color: transparent;
  color: #ffffff;
}

/* ------------------------------------------------------------
   小ラベル（見出しの上に置く英字などの短い札）
   ------------------------------------------------------------
   本文で使える数少ない「クラス」。段落の追加CSSクラスに tkw-eyebrow。
   タグだけでは表現できず、かつ既存ページで多用しているため残している。
   ------------------------------------------------------------ */
.tkw-content .tkw-eyebrow,
.block-editor-block-list__layout .tkw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 3rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.35em;
  line-height: 1.4;
  color: #A07E2C;
  text-transform: uppercase;
}
.tkw-content .tkw-eyebrow::before,
.block-editor-block-list__layout .tkw-eyebrow::before {
  content: '';
  flex: none;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, #1B2A4A, #A07E2C);
}
/* ラベルの直後の見出しは、ラベルと一体で見せたいので
   上の余白と下線（金のアクセント含む）を外す。 */
.tkw-content .tkw-eyebrow + h2,
.block-editor-block-list__layout .tkw-eyebrow + h2 {
  margin-top: 0.75rem;
  padding-bottom: 0;
  border-bottom: 0;
}
.tkw-content .tkw-eyebrow + h2::after,
.block-editor-block-list__layout .tkw-eyebrow + h2::after {
  content: none;
}

/* ------------------------------------------------------------
   ゴールドの強調（本文中の一部だけ金色にする書式）
   ツールバーの「ゴールドの強調」で付く。
   ------------------------------------------------------------ */
.tkw-grad,
.gradient-text {
  background: linear-gradient(135deg, #C29B3C 0%, #8C6C24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   ページヘッダー（page.php がカスタムフィールドから描画）
   ------------------------------------------------------------
   ここはブロックではないので、編集キャンバスには出てきません。
   横幅はヘッダーのナビ（max-w-7xl = 1280px）と揃えています。
   ============================================================ */
/* 帯そのものは全幅。左右の padding は持たせない（内側の箱が持つ）。 */
.tkw-page-hero {
  position: relative;
  padding: 180px 0 100px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top right, rgba(27, 42, 74, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(160, 126, 44, 0.06) 0%, transparent 55%),
    #ffffff;
}
@media (max-width: 1023px) {
  .tkw-page-hero {
    padding-top: 130px;
    padding-bottom: 70px;
  }
}
@media (max-width: 640px) {
  .tkw-page-hero {
    padding-top: 110px;
    padding-bottom: 56px;
  }
}

/* ★ヘッダーのナビ・本文と左端を揃えるための箱★
   ヘッダーの `max-w-7xl mx-auto px-5 lg:px-10` と同じ構成にしてある。
   border-box なので、左右の padding は 1280px の内側に入る。
   これが無いと中身が画面左端に張り付き、ロゴとズレる。 */
.tkw-page-hero-inner {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 1024px) {
  .tkw-page-hero-inner {
    padding: 0 40px;
  }
}

/* 浮遊する装飾円 */
.tkw-page-hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  top: -200px;
  right: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 42, 74, 0.10) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: floatBlob 14s ease-in-out infinite;
}
@media (max-width: 1023px) {
  .tkw-page-hero::before {
    width: 380px;
    height: 380px;
    top: -140px;
    right: -100px;
  }
}

/* 背景の大きな欧文。編集画面の「英語」欄の値を page.php が
   --tkw-heroword として渡す。空なら .tkw-has-heroword が付かず出ない。 */
.tkw-has-heroword::after {
  content: var(--tkw-heroword, '');
  position: absolute;
  bottom: -30px;
  right: -20px;
  font-family: "Cormorant Garamond", serif;
  font-size: 200px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(27, 42, 74, 0.06);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}
@media (max-width: 1023px) {
  .tkw-has-heroword::after {
    font-size: 110px;
    bottom: -10px;
    right: -10px;
  }
}
@media (max-width: 640px) {
  .tkw-has-heroword::after {
    font-size: 72px;
    bottom: -6px;
    right: -6px;
  }
}

/* パンくずリスト */
.tkw-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 40px;
  font-size: 17px;
  color: #888;
  letter-spacing: 0.05em;
  flex-wrap: wrap;
}
.tkw-breadcrumb a {
  color: #888;
  text-decoration: none;
  transition: color .3s ease;
}
.tkw-breadcrumb a:hover {
  color: #1B2A4A;
}
.tkw-breadcrumb svg {
  color: #ccc;
  width: 12px;
  height: 12px;
  flex: none;
}
.tkw-breadcrumb .tkw-breadcrumb-current {
  color: #374151;
}

/* ラベル */
.tkw-page-hero .tkw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.35em;
  line-height: 1.4;
  color: #A07E2C;
  text-transform: uppercase;
}
.tkw-page-hero .tkw-eyebrow::before {
  content: '';
  flex: none;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, #1B2A4A, #A07E2C);
}

/* 大見出し */
.tkw-hero-title {
  font-family: "NumYu", "Shippori Mincho", "Noto Serif JP", serif;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #111827;
  margin: 32px 0 0;
}

/* リード文 */
.tkw-hero-lead {
  margin: 32px 0 0;
  max-width: 42rem;
  font-family: "NumYu", "Noto Sans JP", sans-serif;
  font-size: 24px;
  line-height: 2;
  color: #4b5563;
}
@media (min-width: 768px) {
  .tkw-hero-lead {
    font-size: 26px;
  }
}
