/* =============================================================================
   テンプレート「きなり」v0.1（yamamoto 用。仕様: cms/docs/仕様_35_yamamotoCMS化.md）
   白い上のメニュー（英字・太字）。黒いパンくずの帯。濃い灰色の見出しの帯と下の欄。黒いコピーライトの帯。
   見出しの英字は Poppins 700、トップの動画の題は Yesteryear（どちらも fonts/ の woff2。外の読み込みはしない）。
   スマホ（991px 以下）はハンバーガー。
   ============================================================================= */
@font-face { font-family: "Poppins"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Yesteryear"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/yesteryear-400.woff2") format("woff2"); }
:root {
  --c-band: #2b2b2b;        /* 濃い帯・下の欄の地 */
  --c-black: #000000;       /* パンくず・コピーライトの帯 */
  --c-current: #2b2b2b;     /* 上のメニューの今いる所の線 */
  --c-footlink: #d7efff;    /* 下の欄のリンク */
  --c-text: #2b2b2b;
  --c-muted: #777777;
  --c-bg: #ffffff;
  --c-main: #2b2b2b;
  --c-link: #0b6fb8;
  --c-primary: #2b2b2b;
  --c-soft: #f5f5f5;
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", sans-serif;
  --font-en: "Poppins", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --font-script: "Yesteryear", cursive;
  --font-heading: var(--font-en);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: .5em 1em; }
.page { background: var(--c-bg); min-height: 100vh; overflow-x: clip; }
.nav-toggle, .nav-btn { display: none; }

/* ---- ヘッダー：白・高さ 130px。左にロゴ、右に上のメニュー（Poppins 700・16px） ---- */
.site-header { position: relative; background: #fff; z-index: 50; }
.header-in { display: flex; align-items: center; height: 130px; padding: 0 50px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--c-text); font-weight: 700; }
.brand img { display: block; height: 56px !important; width: auto; max-width: 280px; object-fit: contain; }
.head-nav { display: flex; align-items: center; margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: center; }
.main-nav > ul > li > a { display: block; padding: 8px 16px; font-family: var(--font-en); font-size: 16px; font-weight: 700; color: rgba(0, 0, 0, .6); text-decoration: none; letter-spacing: 0; }
.main-nav > ul > li > a:hover { color: rgba(0, 0, 0, .9); }
.main-nav .is-active > a, .main-nav .is-current > a { color: rgba(0, 0, 0, .9); box-shadow: inset 0 -2px 0 var(--c-current); }
.main-nav .has-sub > a::after { display: none; }

/* ---- パンくず：黒い帯・高さ 44px・字 13.6px・リンクは白（トップは空なので出ない） ---- */
.crumb-bar { background: var(--c-black); color: #fff; font-size: 13.6px; line-height: 20px; padding: 12px 0; }
.crumb-bar:empty { display: none; }
.crumb-bar ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 auto; padding: 0 50px; max-width: 1200px; }
.crumb-bar li + li::before { content: "/"; margin: 0 .6em; }
.crumb-bar a { color: #fff; text-decoration: none; }
.crumb-bar a:hover { text-decoration: underline; }

/* ---- 骨組み ---- */
.full { max-width: 1200px; margin: 0 auto; padding: 56px 50px 80px; }
.frame { display: grid; grid-template-columns: minmax(0, 1fr) 287px; column-gap: 30px; align-items: start; padding: 56px 50px 80px; max-width: 1200px; margin: 0 auto; }
.frame-left { grid-template-columns: 287px minmax(0, 1fr); }
.frame-left .side-col { order: -1; }
.main-col, .side-col { min-width: 0; }
.side-area:not(:empty) { margin-top: 24px; }
.side-area img { max-width: 100%; height: auto; }
.side-col > .side-top:first-child { margin-top: 0; }
.side-top:not(:empty) + .side-tree { margin-top: 24px; }
.side-area:empty { display: none; }
.side-tree ul { list-style: none; margin: 0; padding: 0; }
.side-tree li { border-bottom: 1px solid #ddd; }
.side-tree a { display: block; padding: 8px 0 8px 12px; font-size: 14.4px; font-weight: 700; color: #555; text-decoration: none; }
.side-tree a:hover { color: #000; }
.side-tree .t2 > a { padding-left: 28px; }
.side-tree .t3 > a { padding-left: 44px; }
.side-tree > ul > li:first-child { display: none; }
.side-tree ul ul { display: none; }
.side-tree li.t1.is-active ul { display: block; }
.side-tree .is-current > a, .side-tree .is-active > a { color: #000; }

/* ---- 本文 ---- */
.cms-content { color: var(--c-text); font-family: var(--font-body); line-height: 1.5; overflow-wrap: anywhere; --block-gap: 1.6rem; }
.cms-content p { margin: 0 0 1em; }
.cms-content a { color: var(--c-link); text-decoration: none; }
.cms-content a:hover { text-decoration: underline; }
.cms-content h2 { font-family: var(--font-en); font-size: 33.5px; font-weight: 400; line-height: 1.2; color: #333; margin: 0 0 .4em; padding: 0; border: 0; background: none; }
.cms-content h2 a { color: inherit; }
.cms-content h3 { font-family: var(--font-en); font-size: 28.7px; font-weight: 400; line-height: 1.2; color: #2b2b2b; margin: 0 0 .5em; padding: 0; border: 0; background: none; }
.cms-content h4 { font-size: 1.05em; font-weight: 700; color: #2b2b2b; margin: 0 0 .5em; }
.cms-content table { width: 100%; border-collapse: collapse; }
.cms-content th, .cms-content td { padding: 8px; border-bottom: 1px solid #dee2e6; text-align: left; vertical-align: top; }
.cms-content figcaption { color: var(--c-muted); }
.cms-content [data-block="textpic"] .b-media img, .cms-content [data-block="image"] img, .cms-content [data-block="gallery"] img { border-radius: 0; }
.b-news-img { aspect-ratio: 4 / 3; }

/* ---- hero：トップの動画。題は Yesteryear・大きく白。帯（band）の題は Poppins ---- */
.t-kinari [data-block="hero"] .b-hero-title { font-family: var(--font-en); font-weight: 700; }
.t-kinari [data-block="hero"][data-type="video"] .b-hero-title { font-family: var(--font-script); font-weight: 400; font-size: clamp(56px, 7.3vw, 88px); line-height: 1.2; color: #fff; }
.t-kinari [data-block="hero"][data-type="video"] .b-hero-lead { font-size: 33.5px; line-height: 1.5; color: #fff; max-width: none; }
.t-kinari [data-block="hero"][data-type="video"] .b-hero-text { width: 100%; }
[data-block="hero"][data-type="video"][data-height="large"] { --hero-h: 770px; }
@media (max-width: 575px) {
  .t-kinari [data-block="hero"][data-type="video"] .b-hero-lead { display: none; }
}

/* 帯の写真に文字が入っている（元の画像）ときは、重ねる文字を出さない */
.t-kinari [data-block="hero"][data-height="band"] .b-hero-text { display: none; }

/* ---- Q1：本文が h2 だけの textpic ＝ 濃い灰色の帯（画面の幅いっぱい・左に箱の画像・右に白い見出し） ---- */
.cms-content section[data-block="textpic"]:has(.b-body > h2:only-child) {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 40px;
  margin-block: 0; padding: 56px max(50px, calc(50% - 550px)); background: var(--c-band); color: #fff;
  margin-inline: calc(50% - 50vw); width: 100vw; max-width: none; margin-bottom: 56px;
}
.cms-content > section[data-block="textpic"]:first-child:has(.b-body > h2:only-child) { margin-top: -56px; }
.cms-content section[data-block="textpic"][data-pos="right"]:has(.b-body > h2:only-child) { grid-template-columns: minmax(0, 1fr) auto; }
.cms-content section[data-block="textpic"]:has(.b-body > h2:only-child) .b-media { max-width: 265px; }
.cms-content section[data-block="textpic"]:has(.b-body > h2:only-child) .b-media img { display: block; width: 100%; height: auto; }
.cms-content section[data-block="textpic"]:has(.b-body > h2:only-child) h2 { color: #fff; margin: 0; font-size: 33.5px; }

/* ---- Q2：CSR・RECRUIT の上の文字のバナー（濃い地）＝ 帯の幅・余白を元に合わせる ---- */
.cms-content > [data-block="textbanner"]:first-child { margin: -56px calc(50% - 50vw) 40px; --tb-bg: var(--c-band); --tb-tc: #fff; --tb-fg: #fff; }
.cms-content > [data-block="textbanner"]:first-child > * { display: block; border-radius: 0; box-shadow: none; background: var(--c-band); padding: 56px max(50px, calc(50vw - 550px)); }
.cms-content > [data-block="textbanner"]:first-child .b-tb-title { font-size: 33.5px; font-weight: 400; margin-bottom: .5em; }
.cms-content > [data-block="textbanner"]:first-child .b-tb-sub { font-size: 14px; line-height: 1.6; color: #fff; opacity: 1; }

/* ---- Q3：トップのタイル（tbgroup）＝ 枠なし。英語の題（Poppins・太字）＋日本語の小見出し（灰色） ---- */
.cms-content [data-block="tbgroup"][data-layout="tile"] { gap: 0 24px; }
.cms-content [data-block="tbgroup"][data-layout="tile"] > [data-block="textbanner"] { --tb-sh-in: none; --tb-sh-out: none; --tb-bg: transparent; }
.cms-content [data-block="tbgroup"][data-layout="tile"] > [data-block="textbanner"] > * { background: transparent; box-shadow: none; border: 0; border-radius: 0; align-items: flex-start; text-align: left; padding: 12px 20px; gap: 0; }
.cms-content [data-block="tbgroup"][data-layout="tile"] > [data-block="textbanner"] > a:hover { transform: none; filter: none; box-shadow: none; }
.cms-content [data-block="tbgroup"][data-layout="tile"] .b-tb-title { font-family: var(--font-en); font-weight: 700; font-size: 28.7px; line-height: 1.2; color: #444; letter-spacing: 0; }
.cms-content [data-block="tbgroup"][data-layout="tile"] .b-tb-sub { margin-top: .1em; font-size: 22px; color: #555; opacity: 1; }
.cms-content [data-block="tbgroup"][data-layout="tile"] .b-tb-icon, .cms-content [data-block="tbgroup"][data-layout="tile"] .b-tb-meta { display: none; }
.cms-content [data-block="textbanner"] .b-tb-title { font-family: var(--font-en); }

/* ---- 下の欄：濃い灰色。3 列（メニュー・リンク・白いロゴと住所）。コピーライトは黒い帯 ---- */
.site-footer { background: var(--c-band); color: #fff; font-size: 13.6px; line-height: 1.5; }
.footer-top { display: grid; grid-template-columns: 1fr 1fr 340px; grid-template-areas: "menu links logo" "menu links addr"; column-gap: 40px; align-content: start; max-width: 1200px; margin: 0 auto; padding: 50px 50px 40px; min-height: 229px; }
.footer-menu { grid-area: menu; }
.site-info { display: contents; }
.site-info .footer-name { display: none; }
.site-info .f-links { grid-area: links; }
.site-info .f-addr { grid-area: addr; text-align: center; margin-top: 12px; }
.site-info .f-addr p { margin: 0; color: #fff; }
.f-head, .site-info .f-links > p { margin: 0 0 .6em; font-size: 23.9px; line-height: 1.2; color: #fff; }
.footer-logo { grid-area: logo; text-align: center; }
.footer-logo img { filter: brightness(0) invert(1); height: auto !important; max-width: 100%; max-height: 56px; width: auto; display: inline-block; }
.footer-nav ul, .site-info .f-links ul { margin: 0; padding-left: 40px; }
.site-footer a { color: var(--c-footlink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-nav:not(:has(li)) { display: none; }
.footer-copy { background: var(--c-black); text-align: center; padding: 16px 20px; }
.copy { margin: 0; font-size: 13.6px; line-height: 18px; color: #fff; }

/* ---- スマホ（991px 以下） ---- */
@media (max-width: 991px) {
  .header-in { height: 70px; padding: 0 16px; }
  .brand img { height: 40px !important; max-width: calc(100vw - 100px); }
  .nav-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex: none; width: 44px; height: 44px; margin-left: auto; cursor: pointer; }
  .nav-btn span { display: block; width: 26px; height: 2px; background: #333; transition: transform .2s, opacity .2s; }
  .nav-btn b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .nav-toggle:checked ~ .site-header .nav-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .site-header .nav-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .site-header .nav-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle:focus-visible ~ .site-header .nav-btn { outline: 2px solid #333; }
  .head-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 60; margin: 0; background: #fff; border-top: 1px solid #eee; box-shadow: 0 8px 20px rgba(0, 0, 0, .1); flex-direction: column; align-items: stretch; }
  .nav-toggle:checked ~ .site-header .head-nav { display: block; }
  .main-nav > ul { display: block; }
  .main-nav > ul > li { border-bottom: 1px solid #eee; }
  .main-nav > ul > li > a { padding: 14px 20px; }
  .main-nav .is-active > a, .main-nav .is-current > a { box-shadow: none; }
  .main-nav .sub, .main-nav .mega { display: block; position: static; }
  .main-nav .sub a, .main-nav .mega a { padding-left: 2.2em !important; font-size: .9em; }
  .crumb-bar ol { padding: 0 16px; }
  .frame, .frame-left { display: block; padding: 32px 16px; }
  .side-col { margin-top: 40px; }
  .frame-left .side-col { order: 0; }
  .full { padding: 32px 16px 48px; }
  .cms-content h2 { font-size: 25.8px; }
  .cms-content h3 { font-size: 22px; }
  .cms-content > [data-block="textbanner"]:first-child { margin-top: -32px; }
  .cms-content > [data-block="textbanner"]:first-child > * { padding: 32px 20px; }
  .cms-content section[data-block="textpic"]:has(.b-body > h2:only-child) { grid-template-columns: 1fr; gap: 16px; padding: 32px 20px; }
  .cms-content section[data-block="textpic"][data-pos="right"]:has(.b-body > h2:only-child) { grid-template-columns: 1fr; }
  .cms-content section[data-block="textpic"]:has(.b-body > h2:only-child) .b-media { max-width: none; }
  .cms-content section[data-block="textpic"]:has(.b-body > h2:only-child) h2 { font-size: 25.8px; }
  .t-kinari [data-block="hero"][data-type="video"] .b-hero-title { font-size: 56px; }
  [data-block="hero"][data-type="video"][data-height="large"] { --hero-h: 560px; }
  .cms-content [data-block="tbgroup"][data-layout="tile"] .b-tb-title { font-size: 18px; overflow-wrap: normal; word-break: keep-all; }
  .cms-content [data-block="tbgroup"][data-layout="tile"] .b-tb-sub { font-size: 14px; }
  .cms-content [data-block="tbgroup"][data-layout="tile"] > [data-block="textbanner"] > * { padding: 10px 8px; }
  .footer-top { grid-template-columns: 1fr; grid-template-areas: "menu" "links" "logo" "addr"; row-gap: 20px; padding: 32px 20px; }
}
