/*
Theme Name: Makoto
Theme URI: https://makoto-biz.com
Author: 株式会社誠
Description: 株式会社誠 コーポレートサイト オリジナルテーマ
Version: 1.3.0
Text Domain: makoto
*/

/* ============================================================
   Variables
   ============================================================ */
:root {
  --bg:        #f7f5f0;
  --dark:      #111111;
  --darker:    #0d0d0d;
  --accent:    #4da8d4;
  --border:    #e0ddd7;
  --border-dk: #1e1e1e;
  --text:      #111111;
  --muted:     #777777;
  --faint:     #bbbbbb;
  --font:      'Helvetica Neue', Helvetica, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  --max:       1280px;
  /* 画面幅に応じて左右パディングが変化: 最小24px → 最大80px */
  --pad:       clamp(24px, 4vw, 80px);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.7; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================
   ⑤ Header / Nav
   ロゴ・メニューの端スペースは --pad で制御
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max);
  margin-inline: auto;
  /* ← --pad により左右に最低24px〜最大80pxの余白が入る */
  padding: 14px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* ロゴサイズ強制（WordPressがインライン width/height を付与する場合も上書き）*/
.site-header__logo img,
.site-header__logo-img,
.custom-logo {
  height: 40px !important;
  width: auto !important;
  display: block !important;
}
.site-header__logo-mark { font-size: 22px; font-weight: 300; letter-spacing: 0.12em; color: var(--text); }
.site-header__logo-sub  { font-size: 8px; letter-spacing: 0.22em; color: #999; }
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a { font-size: 10px; color: #666; letter-spacing: 0.14em; transition: color 0.2s; }
.site-nav a:hover { color: var(--text); }

/* ============================================================
   ① Hero — テキスト左右バランス・文字スケール対応
   黒背景・ベージュ背景はフルブリード（画面端まで）
   コンテンツは max-width の範囲内で左右パディングを確保
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 3fr 2fr;
  min-height: 520px;
  border-bottom: 1px solid var(--border);
}

/* 左: 黒パネル（フルブリード）*/
.hero__main {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

/* ④ グリッド背景は z-index:0 に固定 */
.hero__grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(#1e1e1e 1px, transparent 1px),
    linear-gradient(90deg, #1e1e1e 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ④ テキストコンテンツは z-index:1 で前面 */
.hero__main-content {
  position: relative;
  z-index: 1;
  /* 左カラムが広い画面でも右寄りになりすぎないよう、
     max-widthの60%を上限にしつつ左側は --pad で余白確保 */
  max-width: calc(var(--max) * 0.62);
  margin-left: auto;
  padding-top:    clamp(56px, 6vw, 96px);
  padding-bottom: clamp(56px, 6vw, 96px);
  padding-left:   var(--pad);
  padding-right:  clamp(32px, 3.5vw, 60px);
}

/* ① 文字サイズを clamp でビューポート幅に連動させる */
.hero__eyebrow {
  font-size: clamp(9px, 0.7vw, 12px);
  letter-spacing: 0.22em;
  color: #666;
  margin-bottom: clamp(28px, 3vw, 48px);
}
.hero__heading {
  font-size: clamp(24px, 2.4vw, 44px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #f7f5f0;
  margin-bottom: clamp(20px, 2.5vw, 36px);
}
.hero__heading-line1 { display: block; }
.hero__heading-line2 { display: block; padding-left: 1em; }
.hero__heading-kakko { color: #777; }
.hero__heading-hl {
  border-bottom: 2.5px solid var(--accent);
  color: #fff;
  padding-bottom: 3px;
}
.hero__heading-sub {
  display: block;
  font-size: clamp(16px, 1.6vw, 30px);
  color: #ccc;
  margin-top: clamp(10px, 1.2vw, 18px);
  letter-spacing: 0.03em;
}
.hero__lead {
  font-size: clamp(11px, 0.9vw, 15px);
  color: #888;
  line-height: 2.2;
  letter-spacing: 0.07em;
}

/* 右: ベージュパネル */
.hero__sub {
  background: var(--bg);
  border-left: 1px solid #333;
  display: flex;
  flex-direction: column;
}
.hero__sub-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 48px);
  max-width: calc(var(--max) * 0.4);
}

/* サービスインデックス */
.svc-index { flex: 1; }
.svc-index__label { font-size: 9px; letter-spacing: 0.18em; color: var(--faint); margin-bottom: 16px; }
.svc-index__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 0.5px solid #e8e5de;
  text-decoration: none; position: relative; overflow: hidden;
  transition: all 0.25s;
}
.svc-index__item::after {
  content: ''; position: absolute; left: 0; top: 0;
  width: 0; height: 100%; background: var(--accent); opacity: 0.06;
  transition: width 0.3s;
}
.svc-index__item:hover::after { width: 100%; }
.svc-index__item:hover .svc-index__num,
.svc-index__item:hover .svc-index__name { color: var(--accent); }
.svc-index__item:hover .svc-index__name { transform: translateX(4px); }
.svc-index__num { font-size: 9px; color: var(--faint); letter-spacing: 0.1em; min-width: 22px; transition: color 0.25s; }
.svc-index__name { font-size: clamp(11px, 0.85vw, 14px); color: #555; letter-spacing: 0.05em; transition: all 0.25s; }

/* Hero CTA */
.hero__cta-wrap { margin-top: 28px; }
.hero__cta {
  display: block; background: var(--dark); color: #f7f5f0;
  padding: 15px 24px; font-size: clamp(11px, 0.85vw, 14px);
  letter-spacing: 0.16em; text-align: center;
  position: relative; overflow: hidden;
}
.hero__cta-inner { position: relative; z-index: 1; transition: opacity 0.25s, transform 0.25s; }
.hero__cta::before {
  content: '無料相談を申し込む →'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: clamp(11px, 0.85vw, 14px); letter-spacing: 0.16em;
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
}
.hero__cta:hover::before { transform: translateY(0); }
.hero__cta:hover .hero__cta-inner { opacity: 0; transform: translateY(-100%); }
.hero__cta-note { font-size: 9px; color: #999; letter-spacing: 0.1em; text-align: center; margin-top: 8px; }

/* ============================================================
   ④ Info Band — 4列横並びを確実に
   ============================================================ */
.info-band { background: var(--darker); border-bottom: 1px solid #000; }
.info-band__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
  /* 確実に4列 */
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
}
.info-band__cell {
  padding: 18px 16px;
  border-right: 0.5px solid #222;
  display: flex; flex-direction: column; gap: 6px;
}
.info-band__cell:last-child { border-right: none; }
.info-band__label { font-size: 8px; letter-spacing: 0.18em; color: #666; white-space: nowrap; }
.info-band__value { font-size: clamp(11px, 0.9vw, 14px); color: #aaa; letter-spacing: 0.04em; line-height: 1.5; }

/* ============================================================
   ② Section Common — 文字スケール対応
   ============================================================ */
.section { padding: clamp(48px, 6vw, 96px) 0; border-bottom: 1px solid var(--border); }
.section__header {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
  text-align: center; margin-bottom: 44px;
}
.section__tag { font-size: 9px; letter-spacing: 0.22em; color: var(--faint); margin-bottom: 8px; }
/* ② clamp でビューポート幅に連動 */
.section__title {
  font-size: clamp(22px, 2vw, 36px);
  font-weight: 400; letter-spacing: 0.1em; color: var(--text);
}
.section__title small { display: block; font-size: 9px; color: #999; letter-spacing: 0.22em; margin-top: 6px; }

/* ============================================================
   ② Reasons — 文字スケール対応
   ============================================================ */
.reasons {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.reason {
  padding: clamp(24px, 2.5vw, 40px) clamp(20px, 2vw, 36px);
  border: 0.5px solid var(--border); margin: -0.5px 0 0 -0.5px;
  cursor: default; position: relative; overflow: hidden;
  transition: background 0.3s, transform 0.3s;
}
.reason::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 100%; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s;
}
.reason:hover { background: #fff; transform: translateY(-4px); }
.reason:hover::after { transform: scaleX(1); }
.reason:hover .reason__num { color: var(--accent); }
/* ② 数字・タイトル・本文すべてをvwでスケール */
.reason__num  { font-size: clamp(32px, 3vw, 52px); font-weight: 300; color: #ebe8e0; line-height: 1; margin-bottom: clamp(14px, 1.5vw, 24px); transition: color 0.3s; }
.reason__title { font-size: clamp(14px, 1.1vw, 18px); font-weight: 500; color: var(--text); margin-bottom: 10px; letter-spacing: 0.05em; }
.reason__body  { font-size: clamp(11px, 0.85vw, 14px); color: var(--muted); line-height: 1.95; }

/* ============================================================
   ② Services Grid — 文字スケール対応
   ============================================================ */
.services-grid {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.services-grid__item {
  padding: clamp(16px, 1.5vw, 24px) clamp(16px, 1.8vw, 28px);
  border: 0.5px solid var(--border); margin: -0.5px 0 0 -0.5px;
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; transition: all 0.25s;
}
.services-grid__item:hover { background: var(--dark); }
.services-grid__item:hover .services-grid__name  { color: #f7f5f0; }
.services-grid__item:hover .services-grid__arrow { color: var(--accent); transform: translateX(4px); }
.services-grid__name  { font-size: clamp(12px, 1vw, 16px); color: #333; letter-spacing: 0.04em; transition: all 0.25s; }
.services-grid__arrow { font-size: clamp(11px, 0.9vw, 14px); color: #bbb; transition: all 0.25s; }

/* ============================================================
   Voices (Coverflow)
   ============================================================ */
.voices { padding: clamp(48px, 6vw, 96px) 0; border-bottom: 1px solid var(--border); overflow: hidden; }
.voices .section__header { margin-bottom: 40px; }
.coverflow { position: relative; height: 300px; perspective: 800px; overflow: visible; }
.coverflow__card {
  width: 220px; height: 280px; position: absolute; top: 0; left: 50%;
  background: #fff; border: 0.5px solid var(--border); border-radius: 4px;
  padding: 22px 20px; display: flex; flex-direction: column; cursor: pointer;
  transition: transform 0.65s cubic-bezier(0.34,1.15,0.64,1), opacity 0.55s ease, box-shadow 0.55s ease;
  will-change: transform, opacity;
}
.coverflow__card.is-active  { transform: translateX(-110px) translateY(-12px) translateZ(50px) scale(1.05); z-index: 10; opacity: 1; box-shadow: 0 28px 60px rgba(0,0,0,0.18); }
.coverflow__card.is-prev    { transform: translateX(-330px) scale(0.82) rotateY(28deg); z-index: 5; opacity: 0.5; }
.coverflow__card.is-prev2   { transform: translateX(-490px) scale(0.67) rotateY(44deg); z-index: 3; opacity: 0.2; }
.coverflow__card.is-next    { transform: translateX(110px) scale(0.82) rotateY(-28deg); z-index: 5; opacity: 0.5; }
.coverflow__card.is-next2   { transform: translateX(270px) scale(0.67) rotateY(-44deg); z-index: 3; opacity: 0.2; }
.coverflow__card.is-hidden  { transform: translateX(500px) scale(0.5) rotateY(-60deg); z-index: 1; opacity: 0; pointer-events: none; }
.coverflow__avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0; margin-bottom: 14px; background: #e8e5de; }
.coverflow__avatar img { width: 100%; height: 100%; object-fit: cover; }
.coverflow__body { flex: 1; overflow: hidden; }
.coverflow__quote { font-size: 10px; color: #444; line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.coverflow__quote::before { content: '\201C'; font-size: 18px; color: var(--accent); line-height: 0.8; display: block; margin-bottom: 5px; }
.coverflow__meta { flex-shrink: 0; padding-top: 10px; margin-top: 10px; border-top: 0.5px solid #e8e5de; }
.coverflow__name { font-size: 10px; font-weight: 500; color: #333; letter-spacing: 0.04em; }
.coverflow__from { font-size: 9px; color: #999; letter-spacing: 0.08em; margin-top: 2px; }
.coverflow__controls {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--pad);
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px;
}
.coverflow__btn { width: 36px; height: 36px; border: 0.5px solid var(--border); background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #777; transition: all 0.2s; }
.coverflow__btn:hover { background: var(--dark); color: #fff; border-color: var(--dark); }
.coverflow__dots { display: flex; gap: 8px; align-items: center; }
.coverflow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all 0.3s; border: none; }
.coverflow__dot.is-active { background: var(--accent); width: 18px; border-radius: 3px; }

/* ============================================================
   ③ CTA Band — 中央揃え・文字スケール対応
   ============================================================ */
.cta-band { background: var(--dark); padding: clamp(48px, 6vw, 96px) 0; }
.cta-band__inner {
  max-width: var(--max);
  margin-inline: auto;
  /* ← --pad により左右に余白が入り、中央に収まる */
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(32px, 4vw, 80px);
}
/* ③ 文字をvwでスケール */
.cta-band__msg {
  font-size: clamp(22px, 2.4vw, 42px);
  font-weight: 400; line-height: 1.6; letter-spacing: 0.05em; color: #f0eeea;
}
.cta-band__msg em { font-style: normal; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.cta-band__msg-sub {
  display: block;
  font-size: clamp(11px, 0.9vw, 15px);
  color: #999; letter-spacing: 0.1em; margin-top: 12px;
}
.cta-band__btns {
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  min-width: clamp(180px, 15vw, 260px);
}
.btn-primary {
  display: block; background: var(--accent); color: #fff;
  padding: clamp(12px, 1.2vw, 18px) clamp(24px, 2.5vw, 40px);
  font-size: clamp(11px, 0.85vw, 14px); letter-spacing: 0.16em;
  text-align: center; border: 2px solid var(--accent); transition: all 0.25s; cursor: pointer;
}
.btn-primary:hover { background: transparent; color: var(--accent); }
.cta-band__note { font-size: 9px; color: #666; letter-spacing: 0.1em; text-align: center; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--darker); padding: clamp(32px, 4vw, 56px) 0 clamp(16px, 2vw, 28px); }
.site-footer__inner { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.site-footer__top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  margin-bottom: clamp(24px, 3vw, 44px);
  padding-bottom: clamp(20px, 2.5vw, 36px);
  border-bottom: 0.5px solid var(--border-dk);
}
.site-footer__tagline { font-size: clamp(10px, 0.85vw, 13px); color: #888; line-height: 1.9; letter-spacing: 0.06em; }
.site-footer__col-title { font-size: 9px; letter-spacing: 0.18em; color: #666; margin-bottom: 14px; }
.site-footer__col-links { display: flex; flex-direction: column; gap: 8px; }
.site-footer__col-links a { font-size: clamp(10px, 0.85vw, 13px); color: #888; letter-spacing: 0.06em; transition: color 0.2s; }
.site-footer__col-links a:hover { color: #ccc; }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.site-footer__copy { font-size: 9px; color: #555; letter-spacing: 0.1em; }
.site-footer__right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

/* ⑥ フッターロゴ: 横長・大きく */
.site-footer__logo,
.site-footer__right img {
  height: 52px !important;
  width: auto !important;
  filter: brightness(0) invert(0.5);
  display: block;
}
.site-footer__address { font-size: 9px; color: #666; letter-spacing: 0.06em; line-height: 1.8; text-align: right; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero__sub { border-left: none; border-top: 1px solid var(--border); }
  .hero__main-content { max-width: 100%; margin-left: 0; }
  .hero__sub-content  { max-width: 100%; }
  .info-band__inner   { grid-template-columns: repeat(2, 1fr) !important; }
  .info-band__cell:nth-child(2) { border-right: none; }
  .info-band__cell:nth-child(3) { border-top: 0.5px solid #222; }
  .reasons { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav { gap: 16px; flex-wrap: wrap; }
  .cta-band__inner { grid-template-columns: 1fr; gap: 32px; }
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (max-width: 600px) {
  .hero__heading { font-size: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .info-band__inner { grid-template-columns: 1fr !important; }
  .info-band__cell  { border-right: none; border-bottom: 0.5px solid #222; }
  .site-footer__top { grid-template-columns: 1fr; }
}
