/* サンプル測量設計(架空) — 検証用サイト共通スタイル
   配色は地形図の図式を借用:紙・墨・等高線・水域・植生 */

:root {
  --paper: #edf1ea;
  --paper-deep: #e1e8de;
  --ink: #1f2e2c;
  --ink-soft: #4a5a57;
  --contour: #8c5e34;
  --water: #2f6f9a;
  --vegetation: #5f7f4c;
  --rule: #b9c4b6;
  --focus: #2f6f9a;

  --font-head: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;

  /* 文字サイズは 1.25 の比で段階を作る */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: 3.052rem;

  --measure: 38em;
  --gutter: clamp(1rem, 4vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.8;
  font-feature-settings: "palt" 0;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--water); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- 見出し ---------- */
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); }

/* ---------- ヘッダー ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--gutter);
  max-width: 72rem;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: var(--step-1);
}
.brand img { width: 36px; height: 36px; }

.nav-toggle {
  display: none;
  font: inherit;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  border-radius: 2px;
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--contour); }

@media (max-width: 40rem) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: 0.5rem; padding-top: 0.75rem; }
}

/* ---------- ヒーロー:図郭つきの地形図 ---------- */
.hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--gutter);
}
.map-frame {
  position: relative;
  border: 1px solid var(--ink);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
}
/* 図郭の経緯度目盛り(地図の外枠に沿った表記) */
.map-frame__tick {
  position: absolute;
  font-size: 0.6875rem;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 0 0.3rem;
  font-variant-numeric: tabular-nums;
}
.map-frame__tick--n { top: -0.6rem; left: 2rem; }
.map-frame__tick--s { bottom: -0.6rem; right: 2rem; }
.map-frame__tick--w { bottom: -0.6rem; left: 2rem; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem;
  align-items: center;
}
.hero__copy h1 { margin-bottom: 0.5em; }
.hero__lead { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.7; }
.hero__map { margin: 0; border: 1px solid var(--rule); background: #f6f8f3; }
.hero__map svg { width: 100%; }

@media (max-width: 52rem) {
  .hero__grid { grid-template-columns: 1fr; }
  h1 { font-size: var(--step-4); }
}

/* 等高線の描画:ページ読み込み時に一度だけ線を引く */
.contour-line {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: draw 2.4s ease-out forwards;
}
.contour-line:nth-of-type(2) { animation-delay: 0.15s; }
.contour-line:nth-of-type(3) { animation-delay: 0.3s; }
.contour-line:nth-of-type(4) { animation-delay: 0.45s; }
.contour-line:nth-of-type(5) { animation-delay: 0.6s; }
.contour-line:nth-of-type(6) { animation-delay: 0.75s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .contour-line { animation: none; stroke-dashoffset: 0; }
}

/* ---------- ボタン ---------- */
.button {
  display: inline-block;
  font: inherit;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  border-radius: 2px;
}
.button:hover { background: var(--contour); border-color: var(--contour); color: #fff; }
.button--plain { background: transparent; color: var(--ink); }
.button--plain:hover { background: var(--paper-deep); color: var(--ink); border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- セクション ---------- */
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
}
.section + .section { border-top: 1px solid var(--rule); }
.section__intro { color: var(--ink-soft); }

/* ---------- 凡例(サービス一覧) ---------- */
.legend {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem 3rem;
}
.legend__item { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; align-items: start; }
.legend__symbol { width: 2.5rem; height: 2.5rem; }
.legend__item h3 { margin-bottom: 0.3em; }
.legend__item p { margin: 0; color: var(--ink-soft); }

/* ---------- 写真と説明 ---------- */
.figure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}
.figure-row figure { margin: 0; }
.figure-row img { border: 1px solid var(--rule); width: 100%; }
figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.5rem; }
@media (max-width: 48rem) { .figure-row { grid-template-columns: 1fr; } }

/* ---------- お知らせ(JSONから読み込み) ---------- */
.news { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: 48rem; }
.news li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px dotted var(--rule);
}
.news time { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.news__status { color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- 料金表 ---------- */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 32rem; }
caption { text-align: left; color: var(--ink-soft); font-size: var(--step--1); padding-bottom: 0.5rem; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); font-weight: 700; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--rule); padding: 0.9rem 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 0.6rem 0 0; color: var(--ink-soft); }

/* ---------- 沿革(時系列) ---------- */
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: 48rem; border-left: 2px solid var(--contour); }
.timeline li { position: relative; padding: 0 0 1.6rem 1.6rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.55rem;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border: 2px solid var(--contour);
  border-radius: 50%;
}
.timeline time,
.timeline__label { font-family: var(--font-head); font-size: var(--step-1); display: block; }

/* ---------- 会社概要 ---------- */
.profile { display: grid; grid-template-columns: 9rem 1fr; margin: 1.5rem 0 0; max-width: 48rem; }
.profile dt, .profile dd { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.profile dt { color: var(--ink-soft); }
@media (max-width: 32rem) {
  .profile { grid-template-columns: 1fr; }
  .profile dt { border-bottom: 0; padding-bottom: 0; }
}

/* ---------- 問い合わせ帯 ---------- */
.contact-band { background: var(--ink); color: var(--paper); }
.contact-band .section { border: 0; }
.contact-band a { color: #cfe3f1; }
.contact-band .button { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contact-band .button:hover { background: var(--contour); color: #fff; border-color: var(--contour); }

/* ---------- ページ見出し(下層ページ) ---------- */
.page-head { max-width: 72rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 1.5rem; }
.page-head p { color: var(--ink-soft); font-size: var(--step-1); }
.breadcrumb { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; display: flex; gap: 0.5rem; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--rule); }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.site-footer p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { max-width: 48rem; margin: 0 auto; padding: clamp(3rem, 10vw, 7rem) var(--gutter); }
.notfound__mark { width: 7rem; margin-bottom: 1.5rem; }

/* ---------- 架空組織の注意書き(全ページ共通) ---------- */
.notice {
  background: var(--contour);
  color: #fff;
  font-size: var(--step--1);
  line-height: 1.6;
  text-align: center;
  padding: 0.5rem var(--gutter);
}
