/* =========================================================
   株式会社MATIA
   土台は飽海商事サイトの設計（base.css）。書体・角・罫線の規則はそのまま使い、
   色だけMATIAに置き換える: 図形と成果の数字はMATIAのオレンジ、紺は両社共通。
   MATIAのイラストは色を持っているので、飽海商事の色替えフィルターは外す。
   ========================================================= */

:root {
  --flame: #FF5D02;   /* MATIAのオレンジ。図形と数字だけ */
  --ai: #C24700;      /* リンク・フォーカス・ホバー */
  --slip: #FBF0E7;    /* 伝票: オレンジ寄りの淡い面 */
}

img.illo { filter: none; }

/* ---------- ヘッダーのロゴ（MATIAは横長） ---------- */
.brand img { width: auto; height: 30px; }

/* ---------- オープニング（今のMATIAサイトのロゴ動画） ---------- */
#intro { position: fixed; inset: 0; z-index: 300; background: #fafaf9; display: flex; align-items: center; justify-content: center; transition: opacity .7s ease, visibility .7s; }
#intro video { width: min(900px, 86vw); height: auto; display: block; -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 40%, transparent 72%); mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 40%, transparent 72%); }
#intro .skip-intro { position: absolute; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); font: 500 12px/1 var(--f-sans); letter-spacing: .18em; color: var(--mute); background: none; border: 1px solid var(--line); border-radius: var(--r-paper); padding: 9px 16px; cursor: pointer; }
#intro .skip-intro:hover { color: var(--ink); border-color: var(--ink); }
#intro.out { opacity: 0; visibility: hidden; pointer-events: none; }
html.no-intro #intro { display: none; }

/* ---------- ヒーロー: 縦の帯に、ショーリール動画とイラストを混ぜる ---------- */
.reel-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-item.is-illo { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.reel-item.is-illo img { width: 100%; height: 100%; object-fit: contain; padding: 18% 10%; }
.news-line { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 12px; justify-self: start; font-size: 14px; color: var(--ink); text-decoration: none; }
.news-line b { font-size: 11px; font-weight: 700; letter-spacing: .08em; background: var(--ink); color: var(--bg); padding: 3px 8px; border-radius: var(--r-paper); }
.news-line:hover { color: var(--ai); }
.hero-foot p b { font-weight: 700; }

/* ---------- 取引先: MATIAのロゴは色をそのまま使う ---------- */
.logo-row img { filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; opacity: .8; }
.logo-row li:hover img { opacity: 1; }

/* ---------- 取扱: 横長のイラストを置く枠 ---------- */
.item-main .main-art { width: 260px; align-self: center; background: var(--paper); padding: 18px; border-radius: var(--r-paper); box-shadow: inset 0 0 0 1px var(--line); }
.item-main .main-art img { width: 100%; height: auto; }
.item.has-ph > img.mill { object-fit: contain; background: var(--paper); padding: 8px; box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 959px) { .item-main .main-art { width: 100%; max-width: 360px; } }

/* ---------- 料金: 「個別お見積もり」は小さめに ---------- */
.plan-price.is-quote { font-size: clamp(26px, 2.4vw, 32px); }
.plan .link-arrow { margin-top: 20px; font-size: 14px; }

/* ---------- 比較表の自社列 ---------- */
.compare th.us img { width: 22px; height: 22px; }

/* ---------- 人: 写真の代わりに縦書きの名前だけ置く ---------- */
.portrait .slot { display: none; }

/* ---------- 会社概要の右列 ---------- */
.co-side { grid-column: 9 / span 4; }
@media (max-width: 959px) { .co-side { grid-column: 1 / -1; margin-top: 32px; } }
.co-side { display: grid; gap: 32px; align-content: start; }
.equation { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-weight: 700; font-size: clamp(18px, 2vw, 22px); letter-spacing: .04em; }
.equation span { display: flex; flex-direction: column; line-height: 1.3; }
.equation small { font-size: 12px; font-weight: 500; color: var(--mute); }
.equation i { font-style: normal; color: var(--mute); font-weight: 400; }
.equation .res { color: var(--flame); }
.co-msg h3 { font-size: 15px; color: var(--mute); font-weight: 500; letter-spacing: .08em; }
.co-msg p { margin-top: 12px; }
.co-msg .sign { margin-top: 16px; font-weight: 700; }
.co-msg .sign small { display: block; font-size: 13px; font-weight: 400; color: var(--mute); }

/* ---------- 相談フォーム（このページの中で送る） ---------- */
.form-sec .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 48px; align-items: start; }
.form-sec .form { grid-column: 1 / span 7; }
.form-sec .form-aside { grid-column: 8 / span 5; display: grid; gap: 24px; }
.form-body { display: grid; gap: 28px; }
.field select { width: 100%; height: 52px; padding: 0 14px; font: 400 16px/1.4 var(--f-sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-paper); }
.field select:focus { outline: 2px solid var(--ai); outline-offset: 1px; border-color: var(--ai); }
.form .hp { position: absolute; left: -9999px; }
.form-msg { font-size: 14px; }
.form-note { font-size: 13px; color: var(--mute); }
.form-done { display: none; padding: 32px 0; }
.form-done b { display: block; font-size: 22px; }
.form.sent .form-body { display: none; }
.form.sent .form-done { display: block; }
.form-aside ul { display: grid; gap: 10px; }
.form-aside li { display: flex; gap: 10px; align-items: baseline; }
.form-aside li i { color: var(--flame); }
.form-aside .bphoto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 0 100%); }
@media (max-width: 959px) {
  .form-sec .form, .form-sec .form-aside { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .reel-item video { display: none; }
}

/* 比較表（スマホ）: 左列の見出しをMATIA用に */
@media (max-width: 767px) { .compare .gen::before { content: "よくある外注　"; } }

/* 黄色いロゴはグレーにすると消えるので、濃くしてから並べる */
.logo-row img[alt="CHEESE Group"] { filter: grayscale(1) brightness(.55) contrast(1.6); }

/* =========================================================
   MATIAらしさの層（IT企業寄り）
   飽海商事と同じ「落ち着いた余白・細い罫線・一つの紺」は残し、
   書体は横組みのゴシック、角は画面の角丸、図形は編集のタイムラインにする。
   ========================================================= */
:root {
  --bg: #F7F7F5; --paper: #FFFFFF; --slip: #FFF4EC;
  --ink: #0E1116; --mute: #5E6470; --line: #E3E4E8;
  --navy: #0E1116; --on-navy: #F4F5F7; --on-navy-mute: #9CA3AF; --navy-line: #262B33;
  --f-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-mincho: var(--f-sans);
  --f-en: "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  --r-card: 16px;
  --g1: #F90366; --g2: #7BC701; --g3: #018DF9; --g4: #F49C01;
}
body { letter-spacing: .02em; font-feature-settings: "palt" 1; }
.h2, .m-h2 { font-weight: 800; letter-spacing: .01em; }
.m-h2 { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.4; }

/* 見出しの印: ロゴの4色を短い線にして、英語＋日本語 */
.mark { gap: 10px; font-size: 13px; letter-spacing: .04em; }
.mark::before { width: 30px; height: 5px; border: 0; border-radius: 3px; box-shadow: none; background: linear-gradient(90deg, var(--g1) 0 22%, transparent 22% 26%, var(--g2) 26% 48%, transparent 48% 52%, var(--g3) 52% 74%, transparent 74% 78%, var(--g4) 78%); }
.mark .en { font-family: var(--f-en); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.on-navy .mark { color: var(--on-navy-mute); }
.on-navy .mark .en { color: #fff; }

/* ボタン: 角丸10px、ホバーでオレンジ */
.btn { border-radius: 10px; }
.btn-primary:hover { background: var(--flame); color: #fff; }

/* 斜めの切り欠きはやめ、画面の角丸にそろえる */
.minato figure { margin-left: 0; }
.minato figure .cut { clip-path: none; border-radius: var(--r-card); overflow: hidden; }
.minato figcaption { padding-left: 0; }
.minato .text { flex-direction: column; gap: 20px; }
.mid-cta { clip-path: none; }
.contact-band { clip-path: none !important; border-radius: var(--r-card); }
.item.has-ph > img { clip-path: none; border-radius: 12px; }
.form-aside .bphoto { clip-path: none; border-radius: var(--r-card); }
.item-main { border-radius: var(--r-card); }
.plan.pick::before { display: none; }
.plan.pick { border-radius: var(--r-card); }
.compare th.us { border-radius: 12px 12px 0 0; }
.portrait { border-radius: var(--r-card); overflow: hidden; }
.portrait .vname { font-weight: 900; }
.person .also img { border-radius: 6px; }

/* ---------- ヒーロー: 横組みの大見出し＋タイムラインの帯 ---------- */
.m-hero { padding: 128px 0 64px; }
.hero-gear { position: absolute; z-index: 0; right: -10vw; top: -8vw; width: min(58vw, 760px); opacity: .06; filter: grayscale(1); pointer-events: none; }
.m-hero-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.m-title { margin-top: 20px; font-weight: 900; font-size: clamp(32px, 3.9vw, 60px); line-height: 1.22; letter-spacing: -.005em; }
.m-title span { display: block; white-space: nowrap; }
.m-title em { font-style: normal; color: var(--flame); }
.m-hero-side p { color: var(--mute); }
.m-hero-side p b { display: block; margin-bottom: 6px; font-size: 18px; color: var(--ink); }
.m-hero-side .hero-actions { margin-top: 24px; }
.m-reel { margin-top: 52px; }
.m-reel .reel-track { flex: none; height: clamp(300px, 44svh, 480px); }
.tl { position: relative; display: grid; grid-template-columns: 2fr 3fr 1.2fr; gap: 6px; height: 30px; margin-right: var(--gutter); }
.tl-seg { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; }
.tl-seg b { font-family: var(--f-en); font-weight: 800; letter-spacing: .06em; }
.tl-ai { background: var(--g3); }
.tl-hu { background: var(--g1); }
.tl-ok { background: var(--g2); }
.tl-head { position: absolute; top: -6px; bottom: -10px; left: 0; width: 2px; background: var(--ink); }
.tl-head::before { content: ""; position: absolute; top: -4px; left: -5px; width: 12px; height: 12px; border-radius: 3px; background: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .tl-head { animation: playhead 10s linear infinite; }
  html.pt-hold .tl-head { animation-play-state: paused; }
}
@keyframes playhead { from { left: 0; } to { left: 100%; } }
@media (max-width: 1100px) {
  .m-hero-top { grid-template-columns: 1fr; }
}
@media (max-width: 959px) {
  .hero-gear { width: 90vw; right: -30vw; top: -10vw; }
}
@media (max-width: 767px) {
  .m-hero { padding: 96px 0 48px; }
  .m-title { font-size: min(34px, 8.6vw); }
  .m-reel { margin-top: 32px; }
  .m-reel .reel-track { height: clamp(260px, 42svh, 360px); }
  .tl-seg { font-size: 10px; padding: 0 8px; }
  .tl-seg b { display: none; }
}

/* ---------- 仕組み: 黒いパネルに編集のタイムライン ---------- */
.m-how { margin-top: 96px; padding: 56px; border-radius: 24px; background: var(--navy); color: var(--on-navy); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px 56px; align-items: center; }
.m-how-head { grid-column: 1 / -1; }
.m-how .m-h2 { color: #fff; }
.m-steps { display: grid; gap: 12px; }
.m-steps li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 20px; padding: 18px 20px 20px; border-radius: 14px; background: #161A21; box-shadow: inset 0 0 0 1px var(--navy-line); }
.m-steps .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; margin-bottom: 12px; }
.st-in .bar { width: 28%; background: #6B7280; }
.st-ai .bar { width: 58%; background: var(--g3); }
.st-hu .bar { width: 100%; background: var(--g1); }
.m-steps .who { grid-row: 2 / span 2; padding-top: 5px; font-family: var(--f-en); font-weight: 800; font-size: 12px; letter-spacing: .08em; color: var(--on-navy-mute); }
.st-ai .who { color: #6CC0FF; }
.st-hu .who { color: #FF7FB0; }
.m-steps h3 { font-size: 19px; font-weight: 700; line-height: 1.5; }
.m-steps p { font-size: 14px; line-height: 1.7; color: var(--on-navy-mute); }
.m-how-art { background: var(--paper); border-radius: var(--r-card); padding: 20px; }
.m-how-art img { width: 100%; height: auto; }
.voyage-tail { margin-top: 24px; }
@media (max-width: 959px) {
  .m-how { grid-template-columns: 1fr; padding: 40px 28px; }
  .m-how-art { max-width: 420px; }
}
@media (max-width: 767px) {
  .m-how { margin-top: 64px; padding: 32px 18px; border-radius: 18px; }
  .m-steps li { grid-template-columns: 1fr; }
  .m-steps .who { grid-row: auto; padding-top: 0; }
}

/* ---------- ファーストビュー v2: ショーリールを大きな角丸の画面に、文字は白で重ねる ---------- */
.m-hero { padding: 92px 0 40px; }
.kv { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; min-height: min(78svh, 760px); display: flex; align-items: flex-end; background: var(--ink); }
.kv-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.kv-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(14 17 22 / .82) 0%, rgb(14 17 22 / .55) 45%, rgb(14 17 22 / .1) 100%), linear-gradient(0deg, rgb(14 17 22 / .6) 0%, transparent 55%); }
.kv-body { width: 100%; padding: clamp(28px, 5vw, 64px); color: #fff; }
.kv-news { display: inline-flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgb(255 255 255 / .12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); font-size: 13px; color: #fff; text-decoration: none; }
.kv-news b { font-family: var(--f-en); font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--ink); }
.kv-news:hover { background: rgb(255 255 255 / .2); color: #fff; }
.kv-title { margin-top: 22px; font-weight: 900; font-size: clamp(32px, 4.6vw, 68px); line-height: 1.2; letter-spacing: -.005em; }
.kv-title span { display: block; }
.kv-title em { font-style: normal; color: var(--flame); }
.kv-lead { margin-top: 20px; max-width: 34em; font-size: clamp(15px, 1.25vw, 17px); line-height: 1.85; color: rgb(255 255 255 / .82); }
.kv-actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.kv-btn { background: var(--flame); color: #fff; height: 56px; padding: 0 28px; }
.kv-btn:hover { background: #fff; color: var(--ink); }
.kv-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: #fff; text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / .5); padding-bottom: 4px; }
.kv-link:hover { color: #fff; border-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .js .kv-body > * { animation: doorIn 800ms var(--ease) both; }
  .js .kv-body > :nth-child(2) { animation-delay: 80ms; }
  .js .kv-body > :nth-child(3) { animation-delay: 160ms; }
  .js .kv-body > :nth-child(4) { animation-delay: 240ms; }
  html.pt-hold .kv-body > * { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .kv-video { display: none; } .kv { background: var(--ink) url("../img/hero-home-poster.jpg") center/cover; } }
@media (max-width: 767px) {
  .m-hero { padding: 76px 0 24px; }
  .kv { min-height: 82svh; border-radius: 18px; }
  .kv-shade { background: linear-gradient(0deg, rgb(14 17 22 / .9) 0%, rgb(14 17 22 / .55) 55%, rgb(14 17 22 / .2) 100%); }
  .kv-body { padding: 26px 20px; }
  .kv-title { font-size: min(26px, 6.8vw); }
  .kv-news { font-size: 11.5px; white-space: nowrap; max-width: 100%; }
  .kv-news b { font-size: 10px; }
  .kv-lead br { display: none; }
  .kv-actions .btn { width: 100%; }
}

/* ---------- ファーストビュー v3: 入口を2つに（企業→TEGIWA／代理店→Video Factory） ---------- */
.doors-hero { padding: 104px 0 48px; }
.doors-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.doors-top p { font-size: 14px; color: var(--mute); }
.doors { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; }
.door { display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; }
.door-body { flex: 1; display: flex; flex-direction: column; padding: clamp(24px, 3vw, 40px); }
.door-for { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.door-for span { padding: 4px 12px; border-radius: 999px; font-size: 12px; }
.door-title { margin-top: 14px; font-weight: 900; line-height: 1.25; letter-spacing: -.005em; }
.door-text { margin-top: 12px; font-size: 15px; line-height: 1.85; }
.door-text sup { font-size: 10px; }
.door-actions { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.door-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.door-note { margin-top: 16px; font-size: 12px; line-height: 1.7; }

/* 企業向け（TEGIWA）: 黒い大きなカード、上に見本CM */
.door-cm { background: var(--ink); color: #fff; }
.door-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.door-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.door-badge { position: absolute; left: 16px; bottom: 16px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgb(14 17 22 / .72); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.door-cm .door-for { color: rgb(255 255 255 / .7); }
.door-cm .door-for span { background: var(--flame); color: #fff; }
.door-cm .door-title { font-size: clamp(34px, 4.2vw, 62px); }
.door-cm .door-text { color: rgb(255 255 255 / .82); }
.door-btn { background: var(--flame); color: #fff; height: 56px; padding: 0 26px; }
.door-btn:hover { background: #fff; color: var(--ink); }
.door-cm .door-link { color: #fff; }
.door-cm .door-link:hover { color: #FFB27F; }
.door-cm .door-note { color: rgb(255 255 255 / .55); }

/* 代理店向け（Video Factory）: 白いカード、イラスト */
.door-oem { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.door-art { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 24px 32px 0; background: var(--slip); }
.door-art img { width: 100%; max-width: 360px; height: auto; }
.door-oem .door-for { color: var(--mute); }
.door-oem .door-for span { background: var(--ink); color: #fff; }
.door-oem .door-title { font-size: clamp(24px, 2.4vw, 34px); }
.door-oem .door-text { color: var(--mute); }
.door-oem .door-link { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .js .door { animation: doorIn 800ms var(--ease) both; }
  .js .door-oem { animation-delay: 120ms; }
  html.pt-hold .door { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .door-media video { display: none; } .door-media { background: #000 url("../img/tegiwa-sample-poster.jpg") center/cover; } }
@media (max-width: 959px) {
  .doors { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .doors-hero { padding: 80px 0 32px; }
  .doors-top p { display: none; }
  .door { border-radius: 18px; }
  .door-body { padding: 24px 20px 26px; }
  .door-cm .door-title { font-size: min(34px, 9vw); }
  .door-oem .door-title { font-size: min(24px, 6.4vw); }
  .door-actions .btn { width: 100%; }
  .door-art { aspect-ratio: 16 / 9; }
}

/* 語のまとまりで改行する */
.nb { display: inline-block; }

@keyframes doorIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* =========================================================
   v3: 入口を横並びに（どの画面幅でも2択）＋ ボタンの形をそろえる
   形の規則（固定）: ボタンは丸いピルで、矢印は自分の円に入れる／外枠28px・中身22px／写真16px
   ========================================================= */
.btn { border-radius: 999px; padding: 0 8px 0 26px; gap: 14px; }
.btn i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / .14); font-size: 16px; transition: transform 500ms cubic-bezier(.32,.72,0,1); }
.btn-primary i { background: rgb(255 255 255 / .16); }
.btn:hover i { transform: translate(2px, -1px) scale(1.05); }
.gnav .btn { padding: 0 20px; }
.on-navy .btn-primary i, .contact-actions .btn i { background: rgb(14 17 22 / .08); }

/* ---------- 2択のファーストビュー ---------- */
.chooser { padding: 96px 0 40px; }
.chooser-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-bottom: 18px; }
.chooser-ask { font-size: clamp(15px, 1.3vw, 18px); font-weight: 700; letter-spacing: .04em; }
.split { display: flex; gap: 12px; height: clamp(440px, calc(100svh - 190px), 760px); }
.pane { position: relative; flex: 1 1 0; min-width: 0; padding: 6px; border-radius: 28px; background: rgb(14 17 22 / .04); box-shadow: inset 0 0 0 1px rgb(14 17 22 / .06); transition: flex-grow 900ms cubic-bezier(.32,.72,0,1), opacity 600ms cubic-bezier(.32,.72,0,1); }
.pane-core { position: relative; isolation: isolate; height: 100%; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.pane-body { position: relative; z-index: 1; padding: clamp(20px, 3vw, 44px); }
.pane-for { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.pane-for span { font-family: var(--f-en); font-weight: 600; font-size: 12px; opacity: .7; letter-spacing: .02em; }
.pane-title { margin-top: 12px; font-weight: 900; line-height: 1.22; letter-spacing: -.005em; font-size: clamp(28px, 3.5vw, 54px); }
.pane-sub { margin-top: 12px; font-size: clamp(13px, 1.1vw, 16px); line-height: 1.8; }
.pane-cta { position: static; display: inline-flex; align-items: center; gap: 14px; margin-top: 24px; height: 54px; padding: 0 8px 0 24px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background-color 300ms, color 300ms; }
.pane-cta::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 22px; } /* 面全体を押せるようにする */
.pane-cta .ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 17px; transition: transform 600ms cubic-bezier(.32,.72,0,1); }
.pane:hover .pane-cta .ic { transform: translate(3px, -2px) scale(1.06); }
.pane:focus-within { outline: 2px solid var(--flame); outline-offset: 3px; }
.pane-cta:focus-visible { outline: none; }

/* 左: 企業（TEGIWA）。見本CMを全面に */
.pane-cm .pane-core { background: #000; color: #fff; }
.pane-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1200ms cubic-bezier(.32,.72,0,1); }
.pane-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(14 17 22 / .92) 0%, rgb(14 17 22 / .62) 46%, rgb(14 17 22 / .08) 100%); }
.pane-cm .pane-for { color: #FFB27F; }
.pane-cm .pane-sub { color: rgb(255 255 255 / .8); }
.pane-cm .pane-cta { background: var(--flame); color: #fff; }
.pane-cm .pane-cta .ic { background: rgb(255 255 255 / .2); }
.pane-cm:hover .pane-cta { background: #fff; color: var(--ink); }
.pane-cm:hover .pane-cta .ic { background: var(--flame); color: #fff; }
.pane-cm:hover .pane-bg { transform: scale(1.03); }

/* 右: 代理店（Video Factory）。イラストを主役に */
.pane-vf .pane-core { background: var(--slip); color: var(--ink); }
.pane-art { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8% 10% 0; }
.pane-art img { width: 100%; max-width: 440px; max-height: 100%; height: auto; transition: transform 1200ms cubic-bezier(.32,.72,0,1); }
.pane-vf .pane-for { color: var(--mute); }
.pane-vf .pane-sub { color: var(--mute); }
.pane-vf .pane-cta { background: var(--ink); color: #fff; }
.pane-vf .pane-cta .ic { background: rgb(255 255 255 / .16); }
.pane-vf:hover .pane-cta { background: var(--flame); }
.pane-vf:hover .pane-art img { transform: scale(1.04) translateY(-4px); }


.chooser-note { margin-top: 14px; font-size: 12px; line-height: 1.7; color: var(--mute); }

@media (prefers-reduced-motion: no-preference) {
  .js .pane { animation: doorIn 900ms cubic-bezier(.32,.72,0,1) both; }
  .js .pane-vf { animation-delay: 110ms; }
  html.pt-hold .pane { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .pane-bg { display: none; }
  .pane-cm .pane-core { background: #000 url("../img/tegiwa-sample-poster.jpg") center/cover; }
}

/* スマホでも横並びのまま。文字を絞って2枚に収める */
@media (max-width: 767px) {
  .chooser { padding: 76px 0 28px; }
  .chooser-top { margin-bottom: 12px; }
  .chooser-ask { font-size: 15px; }
  .split { gap: 8px; height: clamp(420px, 68svh, 560px); }
  .pane { padding: 4px; border-radius: 20px; }
  .pane-core { border-radius: 16px; }
  .pane-cta::after { border-radius: 16px; }
  .pane-body { padding: 16px 12px 14px; }
  .pane-for { font-size: 11px; display: block; }
  .pane-for span { display: block; font-size: 10px; margin-top: 2px; }
  .pane-title { margin-top: 8px; font-size: min(19px, 5vw); line-height: 1.32; }
  .pane-sub { font-size: 11px; line-height: 1.65; margin-top: 8px; }
  .pane-cta { margin-top: 14px; height: 40px; width: 100%; justify-content: space-between; padding: 0 4px 0 14px; font-size: 12px; }
  .pane-cta .ic { width: 30px; height: 30px; font-size: 14px; }
  .pane-art { padding: 14% 6% 0; }
  .chooser-note { font-size: 11px; }
}

/* ---------- 飽海商事サイトから持ってきた部品を、MATIA の形に合わせる ---------- */
.channels { border-top-color: var(--ink); }
.channels li:last-child .ic { border-color: var(--ink); color: var(--ink); }
.channels .ic { border-color: var(--line); background: var(--paper); }
.channels li:nth-child(2) .ic { border-color: var(--flame); color: var(--flame); }
.channels .role { color: var(--flame); }
.terms-ph.illo { clip-path: none; border-radius: 16px; background: var(--paper); }
.process-head img.illo { clip-path: none; border-radius: 16px; background: var(--paper); }
.voyage-map { margin-top: 72px; }
.voyage-map::before { inset: 0; clip-path: none; border-radius: 28px; }
.voyage-map .vm-grid { padding: 56px clamp(24px, 5vw, 64px); }
.vm-kicker { font-family: var(--f-sans); font-weight: 900; letter-spacing: .02em; }
@media (max-width: 959px) {
  .voyage-map::before { inset: 0; clip-path: none; border-radius: 20px; }
  .voyage-map .vm-grid { padding: 36px 20px; }
}

/* =========================================================
   v3.1: 3スキル（taste / high-end / frontend-design）レビューの反映
   ========================================================= */
/* 余白のリズム: セクション間は常に --sec ひとつ分 */
main > .sec + .sec { padding-top: 0; }
.contact { padding-bottom: 0; }

/* 見出しの大きさを1系統に */
.m-h2 { font-size: clamp(26px, 2.6vw, 36px); }
.terms li h3 { font-size: clamp(18px, 1.5vw, 21px); }

/* 1択目: 見出しの問いを左上に大きく、NEWSは右へ */
.chooser-top { justify-content: flex-start; align-items: baseline; }
.chooser-ask { order: -1; font-size: clamp(20px, 1.9vw, 28px); font-weight: 900; letter-spacing: .02em; }
.chooser-top .news-line { order: 2; margin-left: auto; }
@media (max-width: 767px) { .chooser-ask { font-size: 18px; } .chooser-top .news-line { margin-left: 0; } }

/* 左の扉: 16:9のCMを切り抜かず、画面としてそのまま見せる（右の扉のイラストと同じ置き方） */
.pane-cm .pane-core { background: var(--ink); }
.pane-cm .pane-bg { position: relative; inset: auto; z-index: 0; width: auto; height: auto; aspect-ratio: 16 / 9; margin: auto clamp(20px, 3vw, 44px) 0; border-radius: 16px; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / .12), 0 30px 60px -30px rgb(0 0 0 / .8); }
.pane-shade { display: none; }
@media (max-width: 767px) { .pane-cm .pane-bg { flex: 1; min-height: 0; width: 100%; aspect-ratio: auto; margin: 0; border-radius: 0; box-shadow: none; object-position: 50% 50%; } }
@media (prefers-reduced-motion: reduce) { .pane-cm .pane-core { background: var(--ink); } .pane-bg { display: block; } }

/* ホバー: 幅は変えず（文字の折り返しが揺れるため）、持ち上げと減光だけ */
.pane { transition: transform 700ms cubic-bezier(.32,.72,0,1); }
.pane-core { transition: opacity 600ms cubic-bezier(.32,.72,0,1); }
.pane-cta { transition: background-color 500ms cubic-bezier(.32,.72,0,1), color 500ms cubic-bezier(.32,.72,0,1); }
@media (hover: hover) and (min-width: 768px) {
  .split:hover .pane:not(:hover) .pane-core { opacity: .72; }
  .pane:hover { transform: translateY(-4px); }
  .pane:active { transform: translateY(-2px) scale(.995); }
}

/* 人: 写真の枠は出さず、2列の罫線で並べる */
.person .portrait { display: none; }
.people .grid { margin-top: 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; }
.person.ceo, .person.coo { grid-column: auto; margin-top: 0; }
.person { gap: 0; align-content: start; padding-top: 24px; border-top: 1px solid var(--ink); }
@media (max-width: 959px) { .people .grid { grid-template-columns: 1fr; gap: 40px; } }

/* 対応フォーマット: アイコンの色を1つに */
.channels .ic, .channels li:nth-child(2) .ic, .channels li:last-child .ic { border-color: var(--line); background: var(--paper); color: var(--ink); }

/* 事業内容: 主カードはイラストなしの文章だけ */
.item-main { grid-template-columns: 1fr; align-self: start; }

/* 相談フォーム: 1列で読みやすく */
.form-sec .grid { grid-template-columns: minmax(0, 680px); }
.form-sec .form { grid-column: 1; }

/* 角の規則を全体で固定: 大きな面28 / 中の面22 / 画像16 / ボタンはピル */
.m-how, .contact-band, .voyage-map::before, .item-main { border-radius: 28px; }
.m-steps li { border-radius: 22px; }
.item.has-ph > img, .m-how-art, .terms-ph.illo, .process-head img.illo, .minato figure .cut, .mid-cta .mid-ill { border-radius: 16px; }
.plan.pick { border-radius: 0; }
@media (max-width: 767px) { .m-how, .contact-band, .voyage-map::before, .item-main { border-radius: 20px; } .m-steps li { border-radius: 16px; } }

/* 業務提携の一文（地図の代わり） */
.people .pair-note { margin-top: 40px; border-radius: 22px; }

/* 料金: 運用代行（2列） */
.plan-sub-h { margin-top: 64px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 900; }
.plan-cols-2 { margin-top: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) { .plan-cols-2 { grid-template-columns: 1fr; } .plan-sub-h { margin-top: 48px; } }

/* header nav: five services + company (2026-11-03) */
.gnav a { white-space: nowrap; }
@media (min-width: 960px) and (max-width: 1199px) {
  .site-header .wrap { gap: 20px; }
  .gnav { gap: 18px; }
  .gnav a:not(.btn) { font-size: 14px; letter-spacing: .02em; }
  .gnav .btn { padding: 0 16px; font-size: 13px; }
  .brand span { font-size: 15px; letter-spacing: .04em; }
}

/* business: five services, each card opens its page (2026-11-03) */
.biz-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.biz { position: relative; grid-column: span 2; display: grid; grid-template-rows: auto 1fr; padding: 8px; border-radius: 28px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: transform 500ms cubic-bezier(.32,.72,0,1), box-shadow 500ms cubic-bezier(.32,.72,0,1); }
.biz.is-big { grid-column: span 3; }
.biz:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgb(14 17 22 / .35); }
.biz-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 22px; background: var(--bg); }
.biz-media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz.is-factory .biz-media { background: var(--slip); }
.biz.is-factory .biz-media > img { object-fit: contain; padding: 6% 10%; }
.biz.is-sns .biz-media { background: #FFE9DE; display: grid; place-items: center; }
.biz.is-sns .biz-media > img { width: auto; height: 86%; aspect-ratio: 9 / 16; border: 4px solid var(--ink); border-radius: 16px; }
.biz-panels { position: absolute; inset: 0; padding: 12px; display: grid; grid-template-columns: 1fr 1.4fr; grid-template-rows: 1fr 1fr; gap: 6px; background: var(--paper); }
.biz-panels > span { display: grid; place-items: center; overflow: hidden; border: 2.5px solid var(--ink); border-radius: 5px; background: var(--paper); }
.biz-panels > span:nth-child(1) { background: radial-gradient(rgb(14 17 22 / .15) 1px, transparent 1.4px) 0 0 / 6px 6px; }
.biz-panels > span:nth-child(2) { grid-row: span 2; grid-column: 2; background: #EAF5FF; }
.biz-panels > span:nth-child(3) { background: #FFEFF5; }
.biz-panels img { width: 82%; height: 82%; object-fit: contain; }
.biz-body { display: flex; flex-direction: column; padding: 22px 18px 16px; }
.biz-kind { font-size: 13px; font-weight: 700; color: var(--flame); }
.biz h3 { margin-top: 4px; font-size: 22px; font-weight: 800; line-height: 1.4; }
.biz.is-big h3 { font-size: 26px; }
.biz-body > p:not([class]) { margin-top: 10px; color: var(--mute); font-size: 15px; line-height: 1.85; word-break: auto-phrase; }
.biz-price { margin-top: auto; padding-top: 18px; font-size: 14px; font-weight: 700; }
.biz-price b { font-family: var(--f-en); font-size: 22px; font-weight: 800; }
.biz-link { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.biz-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.biz-link i { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); transition: transform 500ms cubic-bezier(.32,.72,0,1), background-color 300ms; }
.biz:hover .biz-link i { transform: translateX(3px); background: var(--flame); color: #fff; box-shadow: none; }
.biz-link:focus-visible { outline: none; }
.biz:has(.biz-link:focus-visible) { box-shadow: inset 0 0 0 2px var(--ink); }
@media (max-width: 1100px) {
  .biz, .biz.is-big { grid-column: span 3; }
  .biz.is-manga { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; align-items: center; }
}
@media (max-width: 767px) {
  .biz-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
  .biz, .biz.is-big, .biz.is-manga { grid-column: auto; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; border-radius: 20px; }
  .biz-media { border-radius: 16px; }
  .biz h3, .biz.is-big h3 { font-size: 20px; }
  .biz-body { padding: 18px 12px 12px; }
}
@media (prefers-reduced-motion: reduce) { .biz, .biz-link i { transition: none; } .biz:hover { transform: none; } }

/* works: stills from finished videos (2026-11-03) */
.works-sub { margin-top: 44px; display: flex; align-items: baseline; gap: 12px; font-size: 17px; font-weight: 800; }
.works-sub small { font-size: 13px; font-weight: 500; color: var(--mute); }
.works-rail { margin-top: 16px; display: grid; gap: 18px 16px; }
.works-rail.is-h { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.works-rail.is-v { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.work { margin: 0; }
.work img { display: block; width: 100%; height: auto; object-fit: cover; border-radius: 16px; background: var(--line); box-shadow: 0 0 0 1px rgb(14 17 22 / .06); }
.works-rail.is-h .work img { aspect-ratio: 16 / 9; }
.works-rail.is-v .work img { aspect-ratio: 9 / 16; }
.work figcaption { margin-top: 10px; font-size: 13px; font-weight: 700; line-height: 1.5; }
.work figcaption span { display: block; font-weight: 500; color: var(--mute); }
.works-note { margin-top: 20px; font-size: 13px; color: var(--mute); }
@media (max-width: 959px) {
  .works-rail.is-h { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works-rail.is-v { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .works-rail { grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .works-rail::-webkit-scrollbar { display: none; }
  .works-rail.is-h { grid-template-columns: none; grid-auto-columns: 78%; }
  .works-rail.is-v { grid-template-columns: none; grid-auto-columns: 42%; }
  .work { scroll-snap-align: start; }
  .work img { border-radius: 12px; }
  .works-sub { margin-top: 32px; flex-wrap: wrap; row-gap: 2px; }
}
