/* =============================================================
   デモテンプレート B「FORMAL」（サンプル）
   白と墨、差し色は深藍一色。装飾はhairline罫線のみ。
   角丸・影・グラデーション・カード禁止。動きはフェードのみ。
   ============================================================= */

:root {
  --ink: #1a1a1a;
  --paper: #fcfcfa;
  --indigo: #1b3a5f;
  --gray: #565656;
  --hair: rgba(26, 26, 26, 0.26);
  --hair-strong: rgba(26, 26, 26, 0.6);
  --mincho: "Zen Old Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --measure: 38em; /* 和文 35〜42字 */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 2.1;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 0; /* ベタ組み——文書の呼吸 */
}

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

/* ---------- フェード（動かないことが品格。移動なし・透過のみ） ---------- */
.fade {
  opacity: 0;
  transition: opacity 1.4s ease;
}
.fade.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transition: none; }
}

/* ---------- ヘッダー：便箋の題字のように ---------- */
.site-header {
  padding: 40px 24px 0;
  text-align: center;
}
.site-header .brand {
  display: inline-block;
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  line-height: 1;
}
.site-header .brand-yomi {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  color: var(--gray);
}
.site-nav {
  margin-top: 28px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 14px 8px;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 2.4em;
  row-gap: 4px;
}
.site-nav a {
  white-space: nowrap;
  font-size: 12.5px;
  letter-spacing: 0.28em;
  color: var(--ink);
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s ease, color 0.5s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--indigo);
  border-bottom-color: var(--indigo);
}

/* ---------- ヒーロー：縦書きの静けさ ---------- */
.hero {
  min-height: min(calc(100svh - 200px), 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 120px;
}
.hero-tagline {
  font-size: 11px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gray);
  margin-bottom: 64px;
}
.hero h1 {
  display: flex;
  flex-direction: row-reverse; /* 一行目を右に（縦書きの読み順） */
  justify-content: center;
  align-items: flex-start;
  gap: clamp(26px, 5vw, 52px);
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(34px, 7.5vw, 58px);
  line-height: 1;
  letter-spacing: 0.32em;
}
.hero h1 span {
  display: block;
  writing-mode: vertical-rl;
  text-align: start;
}
.hero h1 span:last-child { margin-top: 1.5em; } /* 二行目を一字半下げる（行頭の段差） */
.hero-rule {
  width: 1px;
  height: 72px;
  background: var(--hair-strong);
  margin: 72px auto 64px;
}
.hero-sub {
  max-width: 22em;
  font-size: 13.5px;
  line-height: 2.4;
  letter-spacing: 0.14em;
  color: var(--gray);
}

/* ---------- 数字の帯：三十七年・二十二件・特-30 ---------- */
.stats {
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 72px 24px;
}
.stats-row {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.stats-item {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}
.stats-item + .stats-item { border-left: 1px solid var(--hair); }
.stats-item .value {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: 0.18em;
  color: var(--indigo);
  line-height: 1.4;
  white-space: nowrap;
}
.stats-item .label {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--gray);
}
.stats-note {
  max-width: 880px;
  margin: 40px auto 0;
  font-size: 11px;
  line-height: 1.9;
  color: var(--gray);
  text-align: center;
}

/* ---------- セクションの器：余白を怖いほど取る ---------- */
.section {
  padding: 176px 24px;
}
.section-inner {
  max-width: 960px;
  margin: 0 auto;
}
.section-inner--narrow { max-width: 720px; }

/* 章見出し：漢数字の章立て */
.chapter {
  text-align: center;
  margin-bottom: 96px;
}
.chapter-num {
  display: block;
  font-family: var(--mincho);
  font-weight: 400;
  font-size: 20px;
  color: var(--indigo);
  letter-spacing: 0;
  line-height: 1;
}
.chapter-rule {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--hair-strong);
  margin: 24px auto;
}
.chapter h2 {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(24px, 3.6vw, 30px);
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  line-height: 1.6;
}

/* ---------- 一、私たちの想い ---------- */
.philosophy-text {
  max-width: var(--measure);
  margin: 0 auto;
}
.philosophy-text p + p { margin-top: 3em; }
.philosophy-lead {
  font-family: var(--mincho);
  font-size: 16px;
  line-height: 2.6;
}
.philosophy-body {
  font-family: var(--mincho);
  font-size: 16px;
  line-height: 2.6;
  color: var(--ink);
}
.philosophy-sign {
  margin-top: 72px;
  text-align: right;
  font-family: var(--mincho);
  font-size: 14px;
  letter-spacing: 0.18em;
}
.philosophy-figure { margin: 112px auto 0; max-width: 560px; }

/* 額装写真：細罫で静かに */
.framed {
  border: 1px solid var(--hair);
  padding: 14px;
  background: var(--paper);
}
.framed img { width: 100%; height: auto; }
.framed figcaption {
  padding-top: 14px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--gray);
}

/* ---------- 二、事業内容 ---------- */
.services-primary {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  margin-bottom: 112px;
}
.services-primary li {
  flex: 1;
  text-align: center;
  padding: 44px 12px;
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.22em;
  line-height: 1.9;
}
.services-primary li + li { border-left: 1px solid var(--hair); }
.services-primary .svc-note {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gray);
}

.services-detail { border-top: 1px solid var(--hair); }
.services-detail > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  column-gap: 56px;
  padding: 48px 0;
  border-bottom: 1px solid var(--hair);
}
.services-detail dt {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.14em;
  line-height: 2;
}
.services-detail dt small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-top: 6px;
}
.services-detail dd {
  font-size: 13.5px;
  line-height: 2.3;
  color: var(--gray);
}

/* ---------- 三、施工実績：公文書様式 ---------- */
.works-caption {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gray);
  margin-bottom: 64px;
}
.works-table-wrap { overflow-x: auto; }
.works-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.9;
}
.works-table caption {
  caption-side: top;
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  padding-bottom: 24px;
}
.works-table th,
.works-table td {
  border: 1px solid var(--hair);
  padding: 13px 18px;
  text-align: left;
  font-weight: 400;
  vertical-align: middle;
}
.works-table thead th {
  border-bottom: 3px double var(--hair-strong);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-align: center;
  padding: 15px 18px;
}
.works-table .col-no {
  width: 3.6em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--gray);
}
.works-table .col-cat {
  width: 3.4em;
  text-align: center;
  writing-mode: vertical-rl;
  font-family: var(--mincho);
  font-size: 14px;
  letter-spacing: 0.5em;
  color: var(--indigo);
  padding: 24px 12px;
}
.works-note {
  margin-top: 32px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--gray);
}
.works-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 112px;
  align-items: start;
}
.works-figures .framed img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---------- 四、選ばれる理由 ---------- */
.reasons { border-top: 1px solid var(--hair); }
.reasons > li {
  display: grid;
  grid-template-columns: 72px 260px 1fr;
  column-gap: 48px;
  align-items: baseline;
  padding: 56px 0;
  border-bottom: 1px solid var(--hair);
}
.reasons .r-num {
  font-family: var(--mincho);
  font-size: 18px;
  color: var(--indigo);
  text-align: center;
}
.reasons h3 {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.12em;
  line-height: 1.9;
}
.reasons p {
  font-size: 14px;
  line-height: 2.3;
  color: var(--gray);
}
.standards {
  margin-top: 96px;
}
.standards h3 {
  text-align: center;
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  margin-bottom: 48px;
}
.standards ul {
  max-width: var(--measure);
  margin: 0 auto;
}
.standards li {
  position: relative;
  padding: 14px 0 14px 1.6em;
  font-size: 13.5px;
  line-height: 2.1;
  color: var(--gray);
  border-bottom: 1px solid var(--hair);
}
.standards li:first-child { border-top: 1px solid var(--hair); }
.standards li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 1.55em;
  width: 0.55em;
  height: 1px;
  background: var(--indigo);
}

/* ---------- 五、施工の流れ ---------- */
.flow {
  display: flex;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.flow li {
  flex: 1;
  padding: 56px 28px;
  text-align: center;
}
.flow li + li { border-left: 1px solid var(--hair); }
.flow .f-num {
  display: block;
  font-family: var(--mincho);
  font-size: 15px;
  color: var(--indigo);
  margin-bottom: 20px;
}
.flow h3 {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 16.5px;
  letter-spacing: 0.16em;
  margin-bottom: 16px;
}
.flow p {
  font-size: 12.5px;
  line-height: 2.2;
  color: var(--gray);
  text-align: left;
}

/* ---------- 六、会社概要（抄）と 概要ページ共通の表 ---------- */
.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 2;
}
.company-table th,
.company-table td {
  border: 1px solid var(--hair);
  padding: 18px 24px;
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}
.company-table th {
  width: 11em;
  font-family: var(--mincho);
  font-weight: 500;
  letter-spacing: 0.2em;
  white-space: nowrap;
}
.more-link-wrap { text-align: center; margin-top: 88px; }
.more-link {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 20px 72px;
  font-family: var(--mincho);
  font-size: 14px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  transition: color 0.5s ease, border-color 0.5s ease, background-color 0.5s ease;
}
.more-link:hover {
  color: var(--paper);
  background: var(--indigo);
  border-color: var(--indigo);
}

/* ---------- 沿革 ---------- */
.history { text-align: center; }
.history li { padding: 0; }
.history .h-year {
  display: block;
  font-family: var(--mincho);
  font-size: 15px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--indigo);
}
.history .h-event {
  display: block;
  margin-top: 14px;
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.2em;
  line-height: 2;
}
.history .h-rule {
  display: block;
  width: 1px;
  height: 88px;
  background: var(--hair-strong);
  margin: 40px auto;
}
.history .h-now .h-event {
  font-size: 16px;
  color: var(--gray);
  font-weight: 400;
}

/* ---------- 名簿（所属団体・資格） ---------- */
.roster {
  max-width: 640px;
  margin: 0 auto;
}
.roster li {
  text-align: center;
  padding: 22px 8px;
  border-bottom: 1px solid var(--hair);
  font-size: 14.5px;
  letter-spacing: 0.14em;
  line-height: 2;
}
.roster li:first-child { border-top: 1px solid var(--hair); }

/* ---------- お問い合わせ ---------- */
.contact { text-align: center; }
.contact-tel {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: 0.12em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.contact-tel a { color: inherit; }
.contact-lines {
  margin-top: 40px;
  font-size: 13.5px;
  line-height: 2.6;
  color: var(--gray);
  letter-spacing: 0.12em;
}
.contact-lines a { border-bottom: 1px solid var(--hair-strong); padding-bottom: 1px; }

/* ---------- デモ注記・フッター ---------- */
.demo-note {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 40px;
  font-size: 10.5px;
  line-height: 1.9;
  color: var(--gray);
  text-align: center;
}
.site-footer {
  border-top: 1px solid var(--hair);
  padding: 56px 24px 64px;
  text-align: center;
}
.site-footer .f-brand {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}
.site-footer .f-lines {
  margin-top: 24px;
  font-size: 11.5px;
  line-height: 2.2;
  color: var(--gray);
  letter-spacing: 0.1em;
}
.site-footer .f-copy {
  margin-top: 32px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--gray);
}

/* ---------- ティーザーモーダル ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(252, 252, 250, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box {
  max-width: 480px;
  width: 100%;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 64px 48px 56px;
  text-align: center;
}
.modal-box .m-rule {
  display: block;
  width: 1px;
  height: 32px;
  background: var(--hair-strong);
  margin: 0 auto 28px;
}
.modal-box p {
  font-size: 14.5px;
  line-height: 2.4;
  letter-spacing: 0.1em;
  text-align: left;
}
.modal-close {
  margin-top: 40px;
  display: inline-block;
  background: none;
  border: none;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mincho);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--ink);
  padding: 4px 8px;
  cursor: pointer;
}
.modal-close:hover { color: var(--indigo); border-bottom-color: var(--indigo); }

/* ---------- ページタイトル（会社概要ページ） ---------- */
.page-title {
  padding: 152px 24px 0;
  text-align: center;
}
.page-title .pt-en {
  font-size: 11px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gray);
}
.page-title h1 {
  margin-top: 24px;
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 36px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
}
.page-title .pt-rule {
  display: block;
  width: 1px;
  height: 56px;
  background: var(--hair-strong);
  margin: 48px auto 0;
}

/* =============================================================
   レスポンシブ（SP最優先：無理をしない設計判断）
   ============================================================= */
@media (max-width: 760px) {
  body { font-size: 15px; }

  .site-header { padding-top: 32px; }
  .site-nav ul { column-gap: 1.6em; }
  .site-nav a { font-size: 11.5px; letter-spacing: 0.2em; }

  .hero { padding: 72px 24px 96px; min-height: auto; }
  .hero-tagline { margin-bottom: 48px; }
  .hero-rule { margin: 56px auto 48px; }

  .section { padding: 112px 20px; }
  .chapter { margin-bottom: 64px; }

  .stats { padding: 56px 20px; }
  .stats-row { flex-direction: column; }
  .stats-item { padding: 28px 0; }
  .stats-item + .stats-item { border-left: none; border-top: 1px solid var(--hair); }

  .philosophy-figure { margin-top: 80px; }

  .services-primary { flex-direction: column; margin-bottom: 80px; }
  .services-primary li + li { border-left: none; border-top: 1px solid var(--hair); }
  .services-primary li { padding: 32px 12px; }

  .services-detail > div {
    grid-template-columns: 1fr;
    row-gap: 20px;
    padding: 40px 0;
  }

  .works-table { font-size: 12.5px; }
  .works-table th, .works-table td { padding: 10px 10px; }
  .works-table .col-cat { padding: 20px 8px; font-size: 12.5px; }
  .works-figures { grid-template-columns: 1fr; gap: 48px; margin-top: 80px; }

  .reasons > li {
    grid-template-columns: 1fr;
    row-gap: 12px;
    padding: 44px 0;
  }
  .reasons .r-num { text-align: left; }

  .flow { flex-direction: column; }
  .flow li + li { border-left: none; border-top: 1px solid var(--hair); }
  .flow li { padding: 44px 24px; }
  .flow p { text-align: center; }

  .company-table th, .company-table td {
    display: block;
    width: auto;
    border: none;
  }
  .company-table tr { display: block; border-bottom: 1px solid var(--hair); padding: 20px 4px; }
  .company-table tbody tr:first-child { border-top: 1px solid var(--hair); }
  .company-table th { padding: 0 0 4px; font-size: 12px; color: var(--indigo); }
  .company-table td { padding: 0; }

  .more-link { padding: 18px 48px; }

  .page-title { padding-top: 104px; }

  .modal-box { padding: 48px 28px 44px; }
}

/* hero 背景写真（v0.2.2）— 和紙に薄く刷った一枚。
   モノクロに寄せた橋梁写真を淡く敷き、紙色へ溶かして縦書きの墨文字を立てる */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url("assets/img/placeholder-town.png") center 30% / cover no-repeat;
  filter: grayscale(0.5) contrast(0.98) brightness(1.02);
  opacity: 0.45;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(90deg,
      rgba(252,252,250,0.06) 0%,
      rgba(252,252,250,0.55) 37%,
      rgba(252,252,250,0.55) 67%,
      rgba(252,252,250,0.06) 100%),
    linear-gradient(180deg,
      rgba(252,252,250,0.42) 0%,
      rgba(252,252,250,0.08) 45%,
      rgba(252,252,250,0.66) 84%,
      var(--paper) 100%);
}
.hero > * { position: relative; z-index: 1; }

/* 短冊 — 写真の上に紙を一枚置き、縦書きを立てる伝統の構図 */
.hero-tanzaku{
  position:relative; z-index:1;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:rgba(252,252,250,0.93);
  border:1px solid rgba(28,44,72,0.22);
  box-shadow:0 2px 28px rgba(20,32,50,0.10);
  padding: clamp(40px,6vw,72px) clamp(32px,7vw,88px);
  max-width: min(88%, 640px);
}
@media (max-width:768px){ .hero-tanzaku{ max-width:92%; padding:40px 24px } }

@media (max-width: 768px) {
  .hero::before { background-position: 50% 62%; }
}

/* SPのみ: 実績表を折りたたみ（PCは全量表示） */
.works-more { display: none; }
@media (max-width: 768px) {
  .works-wrap { max-height: 640px; overflow: hidden; position: relative; }
  .works-wrap:not(.open)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
    background: linear-gradient(180deg, rgba(252,252,250,0) 0%, var(--paper) 92%);
  }
  .works-wrap.open { max-height: none; }
  .works-wrap.open::after { display: none; }
  .works-more {
    display: block; margin: 24px auto 0; padding: 12px 36px;
    background: none; border: 1px solid var(--indigo); color: var(--indigo);
    font-family: var(--mincho); font-size: 13px; letter-spacing: .18em; cursor: pointer;
  }
}
