/* =========================================
   リバティワーク研究所
   元サイトのデザインを継承・改善
   =========================================
   背景    : #f0ede8 (ウォームベージュ)
   オフホワイト: #fdfaf7
   テキスト : #2c2220
   アクセント: #6b5c57 (控えめなブラウン)
   ========================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #fdfaf7;
  --bg-warm:   #f0ede8;
  --bg-deep:   #e6e0d8;
  --text:      #2c2220;
  --text-mid:  #5a4d4a;
  --text-lt:   #9e8e88;
  --border:    #d8d0c8;
  --accent:    #5c7a5c;
  --table-head-bg: #c8d8c8;
  --table-row-bg:  #e8f0e8;
  --table-alt-bg:  #f2f6f2;
  --table-border:  #b0c8b0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Noto Serif JP', 'Georgia', 'Yu Mincho', serif;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: var(--text);
}
h1 { font-size: clamp(1.45rem, 3vw, 2rem); }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h3 { font-size: clamp(1rem, 2vw, 1.15rem); }

p { line-height: 1.9; }

/* ---------- Layout ---------- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 40px;
}

.prose {
  max-width: 680px;
}
.prose p { margin-bottom: 1.4em; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Navigation ---------- */
.site-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}
.nav-brand {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.08em;
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text);
  padding: 0 18px;
  letter-spacing: 0.04em;
  text-decoration: none;
  position: relative;
  line-height: 56px;
  white-space: nowrap;
}
.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.nav-links a:hover { color: var(--accent); }

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown > a::after {
  content: '▾';
  font-size: 0.75rem;
  color: var(--text-lt);
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  min-width: 180px;
  z-index: 100;
}
.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  font-size: 0.82rem;
  line-height: 1.4;
  border-bottom: 1px solid var(--border);
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--bg-warm); }
.nav-dropdown:hover .dropdown-menu { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text);
  transition: all 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 40px;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.mobile-nav a:hover { background: var(--bg-warm); }

/* ---------- Split Layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 60vh;
}
.split-image {
  background: var(--bg-deep);
  overflow: hidden;
  position: relative;
}
.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.split-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  color: var(--text-lt);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}
.split-content {
  background: var(--bg-warm);
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-content h2 {
  margin-bottom: 24px;
}
.split-content p {
  color: var(--text-mid);
  font-size: 0.97rem;
}

/* ---------- Section ---------- */
.section {
  padding: 88px 0;
}
.section-white { background: var(--bg); }
.section-warm  { background: var(--bg-warm); }
.section-deep  { background: var(--bg-deep); }

.section-title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin-bottom: 36px;
  letter-spacing: 0.06em;
}

/* ---------- Scroll arrow ---------- */
.scroll-arrow {
  text-align: center;
  padding: 20px 0 32px;
  color: var(--text-lt);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

/* ---------- Mission / Content list ---------- */
.mission-list {
  margin: 24px 0 16px;
}
.mission-list li {
  padding: 10px 0;
  font-size: 0.97rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.mission-list li:first-child { border-top: 1px solid var(--border); }

/* ---------- Problem Table ---------- */
.table-intro {
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 32px;
  color: var(--text-mid);
  letter-spacing: 0.04em;
}
.problem-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.problem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.75;
}
.problem-table th,
.problem-table td {
  border: 1px solid var(--table-border);
  padding: 14px 16px;
  vertical-align: top;
  text-align: left;
}
.problem-table thead th {
  background: var(--table-head-bg);
  font-weight: 500;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--text);
}
.problem-table tbody tr:nth-child(odd)  td { background: var(--table-row-bg); }
.problem-table tbody tr:nth-child(even) td { background: var(--table-alt-bg); }
.problem-table .row-header {
  font-weight: 500;
  font-family: 'Noto Serif JP', serif;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  background: var(--table-row-bg);
}
.problem-table .cause-list {
  padding-left: 0;
}
.problem-table .cause-list li {
  padding: 2px 0;
  color: var(--text-mid);
}
.problem-table .cause-list li::before {
  content: '・';
  color: var(--text-lt);
}

/* ---------- Step List ---------- */
.step-block {
  margin-bottom: 40px;
}
.step-block h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--text);
}
.step-block ul {
  padding-left: 1.2em;
}
.step-block ul li {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.85;
  list-style: none;
  padding: 3px 0;
}
.step-block ul li::before {
  content: '・';
  color: var(--text-lt);
  margin-right: 2px;
}

/* ---------- Note Box ---------- */
.note-box {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 48px;
}
.note-box h3 {
  font-size: 0.92rem;
  margin-bottom: 16px;
  color: var(--text);
}
.note-box p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 1em;
}
.note-box p:last-child { margin-bottom: 0; }

/* ---------- Contact Info ---------- */
.contact-block {
  font-size: 0.92rem;
  line-height: 2;
  color: var(--text-mid);
}
.contact-block strong {
  display: block;
  font-weight: 500;
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 4px;
}
.contact-block .tel-link {
  color: var(--text);
  font-weight: 400;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.contact-block .tel-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Button ---------- */
.btn {
  display: inline-block;
  padding: 11px 32px;
  border: 1px solid var(--text);
  font-size: 0.85rem;
  font-weight: 300;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.08em;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:hover {
  background: var(--text);
  color: var(--bg);
}
.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  font-size: 0.8rem;
  color: var(--text-lt);
  text-align: center;
  line-height: 2;
}
.site-footer a {
  color: var(--text-lt);
  text-decoration: none;
}
.site-footer a:hover { color: var(--text); }

/* ---------- Fade-in Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-delay-1 { transition-delay: 0.1s; }
.fade-delay-2 { transition-delay: 0.2s; }
.fade-delay-3 { transition-delay: 0.3s; }

/* ---------- Chart / Diagram figures ---------- */
.chart-figure {
  margin: 32px 0;
  text-align: center;
}
.chart-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-warm);
  /* 画像が読み込めない場合の最小高さ */
  min-height: 40px;
}
/* 画像が存在しない（broken）ときのスタイル */
.chart-figure img[src$=".jpg"]:not([src=""]) {
  background: var(--bg-warm);
}
.chart-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  color: var(--text-lt);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  line-height: 1.8;
  text-align: center;
  padding: 24px;
}
.chart-figure figcaption {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-lt);
  letter-spacing: 0.04em;
}
.chart-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}
@media (max-width: 700px) {
  .chart-two-col { grid-template-columns: 1fr; }
}

/* ---------- お問合せフォーム ---------- */
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.required {
  color: #a04040;
  font-size: 12px;
  margin-left: 4px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  border-radius: 0;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.8;
}
.field-error {
  display: block;
  font-size: 12px;
  color: #a04040;
  margin-top: 4px;
}
#contact-form .btn {
  margin-top: 8px;
  padding: 14px 48px;
  letter-spacing: 0.15em;
}
[data-fs-success] {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.9;
}

/* ---------- Profile / Biography ---------- */
.bio-block {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.bio-block h2 {
  font-size: 1rem;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
}
.bio-block p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 2;
  margin-bottom: 1em;
}
.bio-block p:last-child { margin-bottom: 0; }

/* ---------- Two-col text grid ---------- */
.text-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; min-height: auto; }
  .split-content { padding: 56px 40px; }
  .text-two-col { grid-template-columns: 1fr; gap: 40px; }
  .container, .container-narrow { padding: 0 24px; }
  .nav-inner { padding: 0 24px; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .split-content { padding: 44px 24px; }
  .container, .container-narrow { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .mobile-nav a { padding: 14px 20px; }
}

@media (max-width: 480px) {
  .problem-table { font-size: 0.8rem; }
  .problem-table th,
  .problem-table td { padding: 10px 10px; }
}

@media print {
  .site-nav, .hamburger, .mobile-nav { display: none !important; }
}
