/* =========================================================
   ナラティビティ総研 コーポレートサイト 共通スタイル
   スマホファースト: 基本はモバイル、min-width で PC へ拡張
   ========================================================= */

:root {
  /* colors */
  --c-bg: #faf8f4;          /* 2026-09-21 修正資料: 背景色 */
  --c-bg-alt: #ece4d8;
  --c-bg-soft: #f2efe8;
  --c-card: #fbf7ef;
  --c-border: #d7cbbf;
  --c-border-strong: #bca98c;
  --c-primary: #890012;
  --c-header: #b4041d;      /* 2026-09-21 修正資料: ヘッダ色 */
  --c-accent: #a84c2a;
  --c-text: #5a4e44;
  --c-text-strong: #2b2520;
  --c-text-deep: #1c1815;
  --c-text-brown: #4a3728;
  --c-text-dark: #33261a;
  --c-cream: #f6eee0;
  --c-white: #ffffff;

  /* 6MoN */
  --c-insight: #456dff;
  --c-active: #ff4b2f;
  --c-ethical: #b14be8;
  --c-collab: #00a000;

  /* fonts */
  /* サイト全体の書体は Noto Serif JP に統一(2026-09-23)。例外はヘッダー / フッターの社名と 6MoN ロゴ(--f-ui)のみ */
  --f-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-sans: var(--f-serif);
  --f-latin: var(--f-serif);
  --f-ui: "Meiryo UI", Meiryo, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP", sans-serif;  /* ヘッダー / フッターの社名・6MoN ロゴ用 */

  /* layout */
  --container: 1152px;
  --gutter: 24px;
  --header-h: 64px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 2px; background: var(--c-white); color: var(--c-primary); font-weight: 700;
  box-shadow: 0 4px 16px rgba(43,37,32,.25);
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: 56px; }
.section--alt { background: var(--c-bg-alt); }
.section--soft { background: var(--c-bg-soft); }
.section--card { background: var(--c-card); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
@media (min-width: 768px) { .section { padding-block: 64px; } }

/* ---------- typography ---------- */
.serif { font-family: var(--f-serif); }
.latin { font-family: var(--f-latin); }
.eyebrow {
  font-family: var(--f-latin);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.25em;
  color: var(--c-primary);
  text-transform: uppercase;
}
.heading-1 { font-family: var(--f-serif); font-weight: 700; font-size: 36px; line-height: 1.3; color: var(--c-white); }
.heading-2 { font-family: var(--f-serif); font-weight: 700; font-size: 26px; line-height: 1.4; color: var(--c-text-strong); }
.heading-3 { font-family: var(--f-serif); font-weight: 700; font-size: 20px; line-height: 1.4; color: var(--c-text-deep); }
.page-title { font-family: var(--f-serif); font-weight: 700; font-size: 30px; line-height: 1.4; color: var(--c-text-strong); }
.lead { font-size: 15px; line-height: 2; color: var(--c-text); max-width: 800px; }
.body-text { font-size: 14px; line-height: 2; color: var(--c-text); }
.text-center { text-align: center; }
@media (min-width: 768px) {
  .heading-1 { font-size: 48px; line-height: 1.25; }
  .heading-2 { font-size: 30px; line-height: 1.375; }
  .page-title { font-size: 40px; line-height: 56px; }
}
@media (min-width: 1024px) {
  .heading-1 { font-size: 60px; line-height: 75px; }
  .heading-2--xl { font-size: 36px; line-height: 1.375; }
}

/* ---------- 特許・商標の注記 ---------- */
/* 6MoN の読み方(ロクモン) */
.mon-reading { display: block; font-family: var(--f-serif); font-weight: 700; font-size: 20px; line-height: 28px; letter-spacing: 0.13em; }  /* ロゴの上に載せるルビ(Figma 1065:1243 / 1065:1247) */
.ip-note { font-family: var(--f-sans); font-size: 12px; line-height: 1.9; color: var(--c-text); }
.ip-note__indent { padding-left: 1em; }
@media (min-width: 768px) { .ip-note__indent { padding-left: 2em; } }
@media (min-width: 768px) { .ip-note { font-size: 13px; } }

/* ---------- section label ---------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.section-label__num {
  font-family: var(--f-latin);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.3em;
  color: var(--c-primary);
  white-space: nowrap;
}
.section-label__line { flex: 1 0 0; height: 1px; background: var(--c-border); }
.section-label__title {
  font-family: var(--f-latin);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.2em;
  color: var(--c-text-brown);
  opacity: 0.5;
  white-space: nowrap;
}
.section-label__title--bold { font-weight: 700; }
.section-label--lg .section-label__num { font-size: 18px; }
.section-label--lg .section-label__title { font-size: 13px; color: var(--c-text); }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 24px;
  font-size: 12px;
  color: var(--c-text);
}
.breadcrumb a { opacity: 0.6; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb [aria-current="page"] { font-weight: 700; color: var(--c-primary); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 2px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.btn .arrow { font-size: 12px; line-height: 16px; }
.btn--primary { background: var(--c-header); color: var(--c-cream); font-weight: 700; }  /* ヘッダー・フッターと同じ #B4041D(2026-09-24) */
.btn--primary:hover { background: var(--c-primary); }
.btn--primary.btn--medium { font-weight: 500; }
.btn--primary .arrow { opacity: 0.7; }
.btn--accent { background: var(--c-accent); color: var(--c-cream); font-weight: 700; }
.btn--accent:hover { background: #8f3f22; }
.btn--outline { border: 1px solid var(--c-primary); color: var(--c-primary); background: transparent; padding: 12px 24px; }
.btn--outline:hover { background: var(--c-primary); color: var(--c-cream); }
.btn--ghost { border: 1px solid rgba(246, 238, 224, 0.4); color: var(--c-white); font-weight: 500; }
.btn--ghost:hover { border-color: var(--c-white); background: rgba(255,255,255,.08); }
.btn--lg { padding: 16px 32px; font-size: 15px; }
.btn--block { width: 100%; }
@media (min-width: 640px) { .btn--block { width: auto; } }

.text-link { font-weight: 700; color: var(--c-primary); }
.text-link:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 24px;
}
.card--lg { padding: 32px; }
.card--r8 { border-radius: 8px; }
.card--r12 { border-radius: 12px; }
@media (min-width: 768px) {
  .card--lg { padding: 40px; }
}

/* ---------- placeholders (画像素材未取得: Issue #13) ---------- */
.img-placeholder {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(137,0,18,.10), rgba(168,76,42,.05) 40%, rgba(74,55,40,.12)),
    var(--c-bg-alt);
  border: 1px solid var(--c-border);
}
.img-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(74,55,40,.05) 0 2px, transparent 2px 14px);
}
.img-placeholder::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
  font-family: var(--f-latin);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--c-text-brown);
  opacity: 0.55;
}
.img-placeholder--dark {
  background:
    radial-gradient(120% 80% at 70% 20%, rgba(255,214,150,.35), transparent 60%),
    radial-gradient(80% 60% at 20% 90%, rgba(168,76,42,.35), transparent 60%),
    linear-gradient(180deg, #5a4437 0%, #3a2e27 60%, #2b2520 100%);
  border: 0;
  border-radius: 0;
}
.img-placeholder--dark::after { color: var(--c-cream); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-header);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-white);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.site-logo { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.site-logo__en { font-family: var(--f-ui); font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: 0.2em; }
.site-logo__ja { font-family: var(--f-ui); font-weight: 700; font-size: 14px; line-height: 20px; letter-spacing: 0.05em; }

.nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -8px;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--c-white);
  transition: transform .25s, opacity .25s, top .25s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--c-primary);
  border-top: 1px solid rgba(215,203,191,.3);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 12px 24px rgba(43,37,32,.25);
}
.site-nav.is-open { display: block; }
.site-nav__list { display: flex; flex-direction: column; padding: 8px 0; }
.site-nav__list a {
  display: block;
  padding: 14px var(--gutter);
  font-size: 14px;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(215,203,191,.15);
}
.site-nav__list li:last-child a { border-bottom: 0; }
.site-nav__list a[aria-current],
.site-nav__list a:hover { background: rgba(255,255,255,.08); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .site-nav__list { flex-direction: row; align-items: center; gap: 32px; padding: 0; }
  .site-nav__list a {
    padding: 4px 0;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.1em;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent !important;
    opacity: 0.9;
  }
  .site-nav__list a:hover,
  .site-nav__list a[aria-current] { opacity: 1; border-bottom-color: rgba(255,255,255,.7); }
}

/* ---------- footer ---------- */
/* スマホ: 社名の下に罫線、リンク縦並び、特許表記、© 中央(Figma SP-Footer 1003:1451) */
.site-footer {
  background: var(--c-header);
  color: var(--c-white);
  border-top: 1px solid var(--c-border);
  padding-block: 16px 24px;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.site-footer .site-logo { padding-bottom: 16px; border-bottom: 1px solid var(--c-white); }
.site-footer .site-logo__en { opacity: 0.4; }
.site-footer__links { display: flex; flex-direction: column; gap: 8px; margin-top: -16px; }
.site-footer__links a { font-size: 12px; line-height: 16px; letter-spacing: 0.05em; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__note { font-size: 10px; line-height: 16px; letter-spacing: 0.05em; }
.site-footer__copy { font-family: var(--f-latin); font-size: 12px; line-height: 16px; text-align: center; margin-top: -20px; }
@media (min-width: 900px) {
  /* PC: 左に社名と特許表記、右にリンクと ©(Figma Footer 849:2820) */
  .site-footer { padding-block: 32px; }
  .site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px 48px;
  }
  .site-footer .site-logo { padding-bottom: 0; border-bottom: 0; }
  .site-footer__links { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; margin-top: 0; justify-content: flex-end; }
  .site-footer__note { grid-column: 1; }
  .site-footer__copy { grid-column: 2; text-align: right; margin-top: 0; }
}

/* ---------- page shell for sub pages ---------- */
.page-content { padding-bottom: 80px; }
.page-content > .container { display: flex; flex-direction: column; gap: 40px; }
.page-content > .container > .breadcrumb { margin-bottom: -16px; }
.page-head { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) {
  .page-content > .container { gap: 48px; }
  .page-content > .container > .breadcrumb { margin-bottom: -24px; }
  .page-head { gap: 24px; }
  .page-content--narrow > .container { max-width: calc(800px + var(--gutter) * 2); }
  .page-content--medium > .container { max-width: calc(900px + var(--gutter) * 2); }
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--c-bg-alt); padding-block: 64px; }
.cta-band__inner { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.cta-band__title { font-family: var(--f-serif); font-weight: 700; font-size: 26px; line-height: 1.4; color: var(--c-text-strong); }
.cta-band__text { max-width: 640px; font-size: 14px; line-height: 2; }
@media (min-width: 768px) {
  .cta-band { padding-block: 80px; }
  .cta-band__inner { gap: 32px; }
  .cta-band__title { font-size: 36px; line-height: 48px; }
}

/* ---------- step flow (課題→原因→解決 / Step1→3 など) ---------- */
.flow { display: flex; flex-direction: column; gap: 8px; }
.flow__step { display: flex; flex-direction: column; gap: 12px; }
.flow__label { font-family: var(--f-latin); font-size: 12px; line-height: 16px; letter-spacing: 0.2em; color: var(--c-accent); }
.flow__title { font-family: var(--f-serif); font-weight: 700; font-size: 18px; line-height: 1.4; color: var(--c-text-strong); }
.flow__text { font-size: 14px; line-height: 24px; }
.flow__arrow { display: flex; align-items: center; justify-content: center; width: 100%; height: 24px; color: var(--c-accent); }
.flow__arrow svg { width: 24px; height: 24px; transform: rotate(90deg); }
@media (min-width: 900px) {
  .flow { flex-direction: row; align-items: stretch; gap: 24px; }
  .flow__step { flex: 1 0 0; }
  .flow__arrow { flex: 0 0 40px; width: 40px; height: auto; align-self: center; }
  .flow__arrow svg { transform: none; }
  .flow__title { font-size: 20px; line-height: 28px; }
}
.flow--compact { gap: 4px; }
.flow--compact .flow__step { padding: 16px 24px; }
.flow--compact .flow__title { font-size: 16px; line-height: 28px; }
@media (min-width: 900px) {
  .flow--compact { gap: 4px; }
  .flow--compact .flow__arrow { flex-basis: 20px; width: 20px; }
  .flow--compact .flow__arrow svg { width: 20px; height: 20px; }
}

/* ---------- definition table ---------- */
.spec-table { width: 100%; }
.spec-table__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding-block: 14px;
  border-bottom: 1px solid rgba(215,203,191,.4);
}
.spec-table__row:last-child { border-bottom: 0; }
.spec-table__th { font-weight: 700; font-size: 13px; color: var(--c-text); }
.spec-table__td { font-size: 14px; line-height: 24px; color: var(--c-text-strong); }
@media (min-width: 640px) {
  .spec-table__row { grid-template-columns: 200px 1fr; gap: 16px; padding-block: 16px; }
  .spec-table__th { font-size: 14px; }
}

/* ---------- Google マップ埋め込み ---------- */
.map-embed { display: block; width: 100%; height: 280px; border: 0; }
@media (min-width: 900px) { .map-embed { height: 430px; } }

/* ---------- utilities ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.stack-32 > * + * { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
