@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500&display=swap');

/* トップページ専用スタイル（本文はブロックエディタで編集、Column/Caseのみショートコードで動的表示） */

/* 左右余白は画面幅の5% + 40px */
.front-top-page #main { padding: 0; }
.tg-top > .tg-hero, .tg-top > .tg-movie, .tg-top > .tg-service,
.tg-top > .tg-column, .tg-top > .tg-about, .tg-top > .tg-case, .tg-top > .tg-company {
  padding-left: calc(5% + 16px);
  padding-right: calc(5% + 16px);
}

.tg-top .wp-block-group.tg-section-title { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; margin: 0 0 72px; padding: 0 24px; }
.tg-section-title::after { content: ""; flex-basis: 100%; height: 0; }
.tg-section-title .tg-section-title-en { order: 0; margin: 0; padding: 0; border: none; background: none; font-family: "Cormorant Garamond", serif; font-size: 55px; font-weight: 500; line-height: 1.4; letter-spacing: .1em; color: #333; }
.tg-section-title .tg-section-title-ja { margin: 0; font-size: 20px; font-weight: 500; color: #333; }
.tg-section-title::before { content: ""; order: 1; width: 80px; height: 5px; margin-top: 24px; background: #f44336; }

/* Hero（書体・寸法は元サイトどおり。先頭の赤線は ::before） */
.tg-top > .tg-hero { padding-top: 6px; }
.tg-hero-eyebrow { position: relative; margin: 0 0 31px; padding: 0 24px 0 76px; font-family: "Noto Serif JP", serif; font-size: 14px; font-weight: 600; line-height: 26px; letter-spacing: 2px; color: #c8151b; }
.tg-hero-eyebrow::before { content: ""; position: absolute; top: 25px; left: 24px; width: 38px; height: 2px; background: #c8151b; }
.tg-hero-sub { margin: 0; padding: 0 24px; font-family: "Noto Serif JP", serif; font-size: 16px; line-height: 32px; color: #4b463f; }
#main .tg-hero-title { margin: 0 0 20px; padding: 0 24px; border: none; background: none; font-family: "Shippori Mincho B1", serif; font-size: 65px; font-weight: 800; line-height: 95px; letter-spacing: 3px; color: #16130f; }
.tg-hero-image { padding: 0 24px; }
.tg-hero-image img { width: 100%; height: auto; display: block; }

/* Movie */
.tg-movie { padding: 60px 24px; }
.tg-top .tg-movie .wp-block-group.tg-section-title { margin-bottom: 20px; }
.tg-top > .tg-movie { position: relative; }
.tg-top > .tg-movie::before, .tg-top > .tg-movie::after { content: ""; position: absolute; bottom: 0; width: min(300px, 40%); background: no-repeat center / contain; mix-blend-mode: multiply; pointer-events: none; }
.tg-top > .tg-movie::before { left: 0; aspect-ratio: 920 / 614; background-image: url(/wp-content/uploads/2026/09/top-movie-ink-left.webp); }
.tg-top > .tg-movie::after { right: 0; aspect-ratio: 840 / 508; background-image: url(/wp-content/uploads/2026/09/top-movie-ink-right.webp); }
.tg-movie-frame { position: relative; width: 71vw; max-width: 100%; aspect-ratio: 16/9; margin: 0 auto; }
.tg-top .tg-movie-frame .video-container, .tg-top .tg-movie-frame .video { position: static; max-width: none; width: 100%; height: 100%; padding-bottom: 0; margin: 0; }
.tg-movie-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Service */
.tg-service { background: #f4f2ee; padding: 60px 24px; }
.tg-service-cn { background: #fff; }
.tg-service-item { margin: 0 0 64px; padding: 0 24px; gap: 48px; align-items: center; }
.tg-service-item:last-child { margin-bottom: 0; }
.tg-service-item-noimage { max-width: 700px; }
#main .tg-service-item h3 { margin: 0 0 8px; padding: 0; border: none; background: none; font-family: "Shippori Mincho B1", serif; font-size: 30px; font-weight: 700; line-height: 56px; letter-spacing: 1px; color: #16130f; }
.tg-service-item .tg-service-lead { color: #7c756a; font-family: "Noto Serif JP", serif; font-size: 14px; line-height: 26px; letter-spacing: 1px; margin: 0 0 16px; }
.tg-service-item p { font-family: "Noto Serif JP", serif; font-size: 15px; line-height: 27px; color: #4b463f; margin: 0 0 16px; }
.tg-service-item .tg-service-link { margin: 24px 0 0; text-align: center; }
.tg-service-link a { display: inline-flex; align-items: center; gap: 8px; font-family: "Noto Serif JP", serif; font-size: 20px; font-weight: 700; line-height: 28px; color: #333; text-decoration: none; }
.tg-service-link a::after { content: "→"; display: flex; align-items: center; justify-content: center; width: 47px; height: 47px; border-radius: 50%; background: #000; color: #fff; font-size: 20px; }
.tg-service-link a:hover { color: #333; opacity: .8; }
.tg-service-item img { width: 100%; border-radius: 4px; display: block; }

/* Column */
.tg-column { background: #f8f7f6; padding: 100px 48px; }
.tg-top > .tg-column { padding-left: 48px; padding-right: 48px; }
.tg-column > * { max-width: 1095px; margin-left: auto; margin-right: auto; }
.tg-top .tg-column .wp-block-group.tg-section-title { padding: 0; margin-left: auto; margin-right: auto; }
.tg-column-grid { display: flex; flex-wrap: wrap; margin-bottom: 61px; }
.tg-column-card { width: min(337px, calc((100% - 72px) / 3)); margin: 0 12px 24px; padding: 24px; background: #fff; border-radius: 10px; box-shadow: 0 2px 20px rgba(0,0,0,.1); text-decoration: none; color: #000; display: block; }
.tg-column-card-thumb { height: 180px; }
.tg-column-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tg-column-card-title { font-size: 16px; font-weight: 700; line-height: 1.6; letter-spacing: .05em; margin: 24px 0 0; }
.tg-column-card-date { margin: 24px 0 0; line-height: 1.4; font-family: "Montserrat", sans-serif; font-size: 14px; font-weight: 500; letter-spacing: .05em; color: #aaa; }
.tg-column-loadmore { display: block; width: 282px; margin: 0 auto; padding: 8px 0; border-radius: 20px; line-height: 24px; background: #000; color: #fff; font-family: "Montserrat", sans-serif; font-size: 16px; text-align: center; text-decoration: none; }
.tg-column-loadmore:hover { color: #fff; opacity: .8; }

/* About */
.tg-about { padding: 60px 24px; }
.tg-top > .tg-about { padding-left: 50px; padding-right: 50px; }
.tg-top > .tg-about > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.tg-top .tg-about .wp-block-group.tg-section-title { padding: 0; margin: 0 auto 40px; }
.tg-top .tg-about-body { gap: 32px; padding: 0; align-items: flex-start; }
.tg-about-body > .wp-block-column { flex: 1 1 0; min-width: 0; }
#main .tg-about-body h3 { margin: 27px 0 24px; padding: 0; border: none; background: none; font-family: "Shippori Mincho B1", serif; font-size: 24px; font-weight: 500; line-height: 1.4; color: #333; }
.tg-about-body p { font-family: "Noto Serif JP", serif; font-size: 16px; line-height: 1.6; color: #4b463f; margin: 0; }
.tg-about-body figure { margin: 0; }
.tg-about-body img { display: block; width: 100%; max-width: none; height: 504px; object-fit: cover; border-radius: 0; }

/* Case */
.tg-case { background: #f8f7f6; padding: 100px 24px; }
.tg-top > .tg-case { padding-left: 50px; padding-right: 50px; }
.tg-top > .tg-case > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.tg-top .tg-case .wp-block-group.tg-section-title { padding: 0; margin-left: auto; margin-right: auto; }
.tg-case-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; grid-auto-rows: 1fr; padding: 0; }
.tg-case .tg-case-viewall { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 56px auto 0; font-size: 20px; font-weight: 700; color: #333; text-decoration: none; }
.tg-case-viewall::after { content: "→"; display: flex; align-items: center; justify-content: center; width: 47px; height: 47px; border-radius: 50%; background: #000; color: #fff; font-size: 20px; }
.tg-case-viewall:hover { color: #333; opacity: .8; }

/* Company */
.tg-company { padding: 60px 24px 100px; }
.tg-company-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.tg-company-heading { margin: 0 0 13px; font-family: "Shippori Mincho B1", serif; font-size: 55px; font-weight: 800; line-height: 1.24; letter-spacing: 1px; color: #16130f; }
.tg-company-heading-en { margin: 0; font-family: "Cormorant Garamond", serif; font-size: 18px; font-weight: 600; line-height: 33px; letter-spacing: 6px; color: #c8151b; }
.tg-company-heading-en::after { content: ""; display: block; width: 120px; height: 3px; margin: 24px auto 0; background: #c8151b; }
.tg-top .tg-company-table { width: 100%; margin: 0; border: none; border-collapse: collapse; text-align: left; }
.tg-top .tg-company-table tr { border: none; border-bottom: 1px solid #d7d7d7; background: none; }
.tg-top .tg-company-table th, .tg-top .tg-company-table td { padding: 24px 0; border: none; background: none; font-size: 16px; font-weight: 400; line-height: 32px; letter-spacing: .03em; vertical-align: top; }
.tg-top .tg-company-table th { width: 256px; padding-left: 16px; color: #7a7a7a; }
.tg-top .tg-company-table td { font-family: "Noto Serif JP", serif; color: #171717; }

@media screen and (max-width: 1139px) {
  .tg-case-grid { column-gap: 12px; }
}

@media screen and (max-width: 834px) {
  .tg-top > .tg-hero, .tg-top > .tg-movie, .tg-top > .tg-service,
  .tg-top > .tg-column, .tg-top > .tg-about, .tg-top > .tg-case, .tg-top > .tg-company {
    padding-left: 0;
    padding-right: 0;
  }
  /* 元サイトは840px以下で写真が先 */
  .tg-service-item { flex-direction: column-reverse; }
  .tg-top .tg-about-body { flex-direction: column-reverse; align-items: stretch; }
  .tg-top > .tg-about { padding-left: 20px; padding-right: 20px; }
  #main .tg-about-body h3 { margin-top: 0; }
  .tg-case-grid { grid-template-columns: 1fr; row-gap: 32px; }
  .tg-top > .tg-case { padding-left: 20px; padding-right: 20px; }
  .tg-top > .tg-column { padding: 96px 24px; }
  .tg-column-card { width: calc(50% - 24px); }
  .tg-column-card-title { font-size: 14px; }
  #main .tg-hero-title { font-size: 35px; }
  .tg-company-heading { font-size: 40px; }
  .tg-company-inner { padding: 0 24px; }
  .tg-top .tg-company-table th { width: 110px; padding-left: 8px; }
}

@media screen and (max-width: 480px) {
  /* 以下、元サイト（540px以下）の寸法に合わせる */
  .tg-top .wp-block-group.tg-section-title { padding: 0 20px; margin-bottom: 76px; }
  /* Cocoon のブロック下余白（28.8px）は元サイトにないので外す */
  #main .tg-top > * { margin-bottom: 0; }
  /* 元サイトは46pxだが空きすぎるため詰める（元サイトにない改善） */
  .tg-top > .tg-hero { padding: 20px 0 0; }
  .tg-hero-eyebrow { margin-bottom: 24px; padding: 0 26px 0 78px; }
  .tg-hero-eyebrow::before { left: 26px; }
  .tg-hero-sub { margin-bottom: 10px; padding: 0 54px 0 26px; word-break: keep-all; overflow-wrap: anywhere; }
  #main .tg-hero-title { margin: 0; padding: 0 26px; }
  .tg-hero-image { padding: 0 54px 0 26px; }
  .tg-top > .tg-movie { padding: 65px 0 82px; }
  .tg-top .tg-movie .wp-block-group.tg-section-title { padding: 0 40px; }
  .tg-movie-frame { width: calc(100% - 80px); }
  .tg-top > .tg-movie::before, .tg-top > .tg-movie::after { width: 40%; }
  .tg-top > .tg-service { padding: 94px 0 82px; background: #faf8f4; }
  .tg-top > .tg-service-cn { padding: 80px 0 103px; background: #fff; }
  .tg-top .tg-service .wp-block-group.tg-section-title { margin-bottom: 46px; padding: 0 40px; }
  #main .tg-service-item { gap: 0; margin-bottom: 104px; padding: 0 40px; }
  #main .tg-service-cn .tg-service-item { gap: 24px; margin-bottom: 99px; }
  #main .tg-service-item:last-child { margin-bottom: 0; }
  .tg-top .tg-service-cn .wp-block-group.tg-section-title { margin-bottom: 86px; }
  #main .tg-service-item h3 { margin-bottom: 5px; font-size: 28px; }
  #main .tg-service-cn .tg-service-item h3 { font-size: 30px; }
  .tg-service-item .tg-service-lead { margin-bottom: 22px; }
  .tg-service-item .tg-service-link { margin-top: 0; }
  .tg-service-item img { margin-bottom: 0; }
  .tg-top > .tg-column { padding: 96px 24px 44px; }
  .tg-top .tg-column .wp-block-group.tg-section-title { padding: 0; }
  .tg-column-grid { margin-bottom: 84px; }
  .tg-column-card { width: 100%; margin: 0 0 30px; }
  .tg-top > .tg-case { padding: 60px 20px 10px; background: #faf8f4; }
  .tg-top .tg-case .wp-block-group.tg-section-title { margin-bottom: 76px; }
  /* 1列のときは元サイトどおりカードの高さを中身に合わせる */
  .tg-case-grid { grid-auto-rows: auto; row-gap: 30px; }
  .tg-top > .tg-about { padding-bottom: 90px; }
  .tg-top > .tg-company { padding: 60px 0 0; }
  .tg-company-heading { font-size: 55px; line-height: 68px; }
  .tg-company-heading-en::after { margin-bottom: 0; }
  .tg-company-inner { padding: 0 23px 0 24px; }
  /* 会社概要の表は項目名の下に内容を置く */
  .tg-top .tg-company-table th, .tg-top .tg-company-table td { display: block; width: auto; font-size: 13px; line-height: 26px; }
  .tg-top .tg-company-table th { padding: 10px 16px 0; font-family: "Noto Sans JP", sans-serif; }
  .tg-top .tg-company-table td { padding: 36px 16px 11px; }
}

/* 画面幅に応じた調整（元サイトにない改善）。広い画面で画像だけが大きくなるのを抑え、スマホのファーストビューを詰める */
/* ① 中身の幅の上限（背景は全幅のまま） */
@media screen and (min-width: 835px) {
  .tg-top > .tg-hero, .tg-top > .tg-movie, .tg-top > .tg-service { padding-left: max(calc(5% + 16px), calc((100% - 1240px) / 2)); padding-right: max(calc(5% + 16px), calc((100% - 1240px) / 2)); }
}
.tg-movie-frame { width: min(71vw, 1000px); }
/* ② ファーストビューで見出しと画像が収まるよう画像の高さを抑える（狭くなった分は右に寄せ、見出しを左上に） */
.tg-hero-image img { width: auto; max-width: 100%; max-height: max(480px, calc(100vh - 400px)); margin: 0 0 0 auto; }

/* ③ 大きな画面では文字を少し大きく */
@media screen and (min-width: 1680px) {
  #main .tg-hero-title { font-size: 72px; line-height: 104px; }
  .tg-hero-sub { font-size: 17px; }
  .tg-section-title .tg-section-title-en { font-size: 60px; }
  .tg-section-title .tg-section-title-ja { font-size: 21px; }
  #main .tg-service-item h3 { font-size: 32px; }
  .tg-service-item .tg-service-lead { font-size: 15px; }
  .tg-service-item p { font-size: 16px; line-height: 29px; }
  .tg-about-body p { font-size: 17px; }
}

@media screen and (max-width: 834px) {
  /* ④ 見出しの行間（PCの95pxのままだった）を詰める */
  #main .tg-hero-title { line-height: 1.5; }
  /* ⑤ 代表写真は切らずに元の比率で */
  .tg-about-body img { height: auto; max-width: 560px; margin: 0 auto; }
}

@media screen and (max-width: 480px) {
  /* ④ 画像を左右均等の余白で中央に */
  .tg-hero-image { padding: 0 20px; }
  .tg-hero-image img { max-height: none; }
  .tg-hero-sub { margin-bottom: 16px; }
  #main .tg-hero-title { margin-bottom: 16px; }
}
