/* HUB BASE — 色と線はロゴから取っている
   緑 #506F2C / スミクロ #3A3A38 / 太い線と細い線の組み合わせ */
:root {
  --ink: #3A3A38;
  --moss: #506F2C;
  --moss-deep: #3C552D;
  --muted: #65655F;
  --line: #DEDDD7;
  --paper: #FFFFFF;
  --tint: #F4F5F0;
  --todo-bg: #FFF7CF;
  --todo-line: #B59600;
  --rail: 0px;
  --gutter: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 2;
  letter-spacing: .05em;
  font-feature-settings: "palt";
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
p + p { margin-top: 1.2em; }
.nb { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }

/* 確認用の帯とご提供待ちの枠（本公開で消える） */
.mock {
  margin: 0;
  padding: 6px var(--gutter);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 1.7;
}
.mock__key { color: #FFE27A; }
.todo {
  margin: 0;
  padding: 10px 14px;
  background: var(--todo-bg);
  border: 1px dashed var(--todo-line);
  font-size: 13px;
  line-height: 1.7;
  font-weight: 400;
}
.todo + .todo { margin-top: 10px; }

/* ナビ：スマホは上部バー＋全画面メニュー */
.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.rail__home { display: flex; align-items: center; gap: 10px; }
.rail__mark { width: 44px; }
.rail__word { width: 118px; }
.rail__toggle {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.rail__toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 1px;
  background: var(--ink);
  transition: transform .25s, opacity .25s;
}
.rail__toggle span:nth-child(1) { top: 15px; }
.rail__toggle span:nth-child(2) { top: 22px; }
.rail__toggle span:nth-child(3) { top: 29px; }
.rail__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.rail__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.rail__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.rail__nav {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--gutter);
  background: var(--paper);
  font-family: "Jost", sans-serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .08em;
}
.rail__nav.is-open { display: flex; }
.rail__nav a { padding: 4px 0; text-decoration: none; }
.rail__nav a[aria-current="page"] { color: var(--moss); }
.rail__nav .is-todo { align-self: flex-start; padding: 0 8px; background: var(--todo-bg); outline: 1px dashed var(--todo-line); }
.rail__sep { width: 48px; height: 3px; margin: 14px 0; background: var(--moss); }

/* セクション見出し：細い線＋太い緑の短い線（ロゴの線の太さの対比） */
.sec { padding: clamp(64px, 11vw, 140px) var(--gutter); }
.sec--first { padding-top: clamp(40px, 7vw, 96px); }
.sec--tight { padding-bottom: 32px; }
.sec--flush { padding-left: 0; padding-right: 0; }
.sec__inner { padding: 0 var(--gutter); }
.sec__h {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  font-weight: 300;
}
.sec__h::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--moss);
}
.sec__en { font-family: "Jost", sans-serif; font-size: clamp(30px, 4vw, 44px); letter-spacing: .06em; line-height: 1.2; }
.sec__ja { font-size: 12px; color: var(--muted); }
/* 文節の途中で折り返さない。折り返してよい位置は build.py の見出しに <wbr> で入れている */
.lead { font-family: "Shippori Mincho", serif; font-size: clamp(19px, 2.2vw, 25px); font-weight: 400; line-height: 1.8; letter-spacing: .08em; word-break: keep-all; margin-bottom: 1.2em; }
.more { margin-top: 2em; }
.more a {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.more a::after { content: " →"; }
.more a:hover { color: var(--moss); border-color: var(--moss); }

/* トップ */
.top__logo { display: none; }
.hero { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--tint); }
.hero__s { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease; }
.hero__s.is-on { opacity: 1; }
.hero__s img { width: 100%; height: 100%; object-fit: cover; }

.stmt { padding: clamp(64px, 11vw, 150px) var(--gutter); }
.stmt__h, .catch { font-family: "Shippori Mincho", serif; font-weight: 400; line-height: 1.9; letter-spacing: .14em; }
.stmt__h { font-size: clamp(27px, 4.4vw, 56px); }
.moss { color: var(--moss); }
.stmt__p { margin-top: clamp(28px, 4vw, 48px); max-width: 44em; }

.split { display: grid; gap: 32px; padding: 0 var(--gutter); }

/* 施工事例：トップは隙間なしのグリッド */
.wgrid { display: grid; grid-template-columns: repeat(2, 1fr); }
.wgrid a { position: relative; display: block; text-decoration: none; }
.wgrid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.wgrid__c { display: block; padding: 8px 10px 16px; }
.wgrid__t { display: block; font-size: 13px; line-height: 1.6; font-weight: 400; }
.wgrid__m { display: block; font-size: 10.5px; line-height: 1.6; color: var(--muted); }
@media (hover: hover) and (min-width: 900px) {
  .wgrid__c {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 10px 16px;
    background: var(--paper);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s, transform .25s;
  }
  .wgrid a:hover .wgrid__c, .wgrid a:focus-visible .wgrid__c { opacity: 1; transform: none; }
}

/* Before / After：線をドラッグして見比べる。ラベルは写真と一緒に隠れる */
.ba { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--tint); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; --p: 50%; }
.ba__layer { position: absolute; inset: 0; }
.ba__layer img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ba__before { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.ba__lab { position: absolute; top: 12px; padding: 1px 10px; background: var(--paper); color: var(--ink); font-family: "Jost", sans-serif; font-size: 13px; letter-spacing: .1em; }
.ba__lab--b { left: 12px; }
.ba__lab--a { right: 12px; }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--p); width: 1px; background: #fff; pointer-events: none; }
.ba__line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1px solid #fff;
  border-radius: 50%;
  background-color: var(--moss-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.2'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px;
  transform: translate(-50%, -50%);
}
.ba input { position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; margin: 0; opacity: 0; }
.ba:has(input:focus-visible) .ba__line::after { outline: 2px solid #fff; outline-offset: 2px; }
.ba-hint { margin-bottom: 20px; font-size: 13px; color: var(--muted); }

.bafeat { display: grid; gap: 28px; }
.bafeat__item { min-width: 0; }
.bafeat__item figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 10px; line-height: 1.6; }
.bafeat__item a { font-size: 14px; font-weight: 400; text-underline-offset: 4px; }
.bafeat__item a:hover { color: var(--moss); }
.bafeat__item span { font-size: 11px; color: var(--muted); }

.work__ba { margin-bottom: clamp(32px, 5vw, 64px); }
.work__balab { margin: 0 0 10px; padding: 0 var(--gutter); font-family: "Jost", sans-serif; font-size: 15px; font-weight: 300; letter-spacing: .1em; }

/* トップの HUB BASE：ロゴを見せて文章で語る */
.story__logo { width: min(100%, 560px); }
.story__txt { margin-top: clamp(20px, 3vw, 32px); }

.cta { border-top: 1px solid var(--line); }
.cta a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  text-decoration: none;
  transition: background .3s, color .3s;
}
.cta a:hover { background: var(--moss-deep); color: #fff; }
.cta__en { font-family: "Jost", sans-serif; font-size: clamp(38px, 7vw, 80px); letter-spacing: .05em; line-height: 1.1; }
.cta__en::after { content: " →"; }
.cta__ja { font-size: 13px; }

/* About */
.catch { font-size: clamp(24px, 3.4vw, 40px); }
.pace { margin-top: clamp(40px, 7vw, 80px); max-width: 720px; }
.pace__txt { margin-top: clamp(28px, 4vw, 44px); max-width: 38em; }
.pace__eq { font-family: "Jost", sans-serif; font-size: clamp(22px, 3vw, 30px); letter-spacing: .08em; line-height: 1.5; }
.pace__eq span { color: var(--moss); }
/* 代表：線も背景色も使わず、写真と字間だけで見せる */
.member { display: grid; gap: 24px; padding-bottom: 0; font-weight: 400; }
.member__img { width: 100%; aspect-ratio: 265 / 311; object-fit: cover; object-position: 50% 35%; }
.member__role { font-size: 14px; line-height: 1.8; letter-spacing: .1em; }
.member__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-top: 12px; font-size: 20px; font-weight: 400; line-height: 1.5; letter-spacing: .38em; }
.member__name span { font-family: "Jost", sans-serif; font-size: 14px; letter-spacing: .12em; }
.member__hist { margin-top: 24px; font-size: 14px; line-height: 1.8; letter-spacing: .15em; }
.member__hist div { display: grid; grid-template-columns: 4.2em 1fr; }
.member__hist div + div { margin-top: 2px; }
.profile__name { font-size: 18px; font-weight: 400; }
.en-sub { margin-top: 0; font-family: "Jost", sans-serif; color: var(--muted); }
.maplink { font-family: "Jost", sans-serif; white-space: nowrap; }
.maplink:hover { color: var(--moss); }
.company__addr { margin-top: 12px; }
.company__info { margin-top: 20px; font-size: 14px; line-height: 1.8; letter-spacing: .08em; }
.company__info div { display: grid; grid-template-columns: 5.5em 1fr; }
.company__info div + div { margin-top: 6px; }
.company__info dd { margin: 0; }

/* Concept */
.cblock { display: grid; gap: 28px; padding: 0 var(--gutter) clamp(64px, 10vw, 130px); }
.cblock img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Works 一覧 */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 32px; }
.tab {
  padding: 6px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  letter-spacing: inherit;
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-color: var(--moss); box-shadow: inset 0 -2px 0 var(--moss); }
.wlist { display: grid; gap: 32px 12px; grid-template-columns: repeat(2, 1fr); }
.wlist a { display: block; text-decoration: none; }
.wlist img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .25s; }
.wlist a:hover img { opacity: .82; }
.wlist__t { display: block; margin-top: 10px; font-size: 14px; line-height: 1.6; font-weight: 400; }
.wlist__m { display: block; font-size: 11px; line-height: 1.6; color: var(--muted); }

/* Works 詳細 */
.work__h { padding: clamp(36px, 6vw, 80px) var(--gutter) clamp(24px, 3vw, 40px); }
.work__h h1 { font-size: clamp(26px, 4vw, 44px); font-weight: 300; line-height: 1.5; letter-spacing: .08em; }
.work__cat { font-size: 12px; color: var(--moss); font-weight: 400; }
.work__main { width: 100%; }
.work__body { max-width: 760px; padding: clamp(32px, 5vw, 64px) var(--gutter); }
.work__text { font-size: 15px; line-height: 2.1; letter-spacing: .06em; }
.work__spec { margin-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--line); font-size: 13.5px; letter-spacing: .06em; }
.work__body > .work__spec:first-child { margin-top: 0; }
.work__spec div { display: grid; grid-template-columns: 6em 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.work__spec dt { color: var(--muted); }
.work__spec dd { margin: 0; overflow-wrap: anywhere; }
.wgal { display: grid; gap: clamp(8px, 1.2vw, 16px); }
.wgal > img { width: 100%; }
.wgal__pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.2vw, 16px); }
.wgal__pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: clamp(48px, 7vw, 96px);
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
}
.pager a { text-decoration: none; }
.pager a:hover { color: var(--moss); }
.pager span { display: block; font-family: "Jost", sans-serif; font-size: 11px; color: var(--muted); }
.pager a:last-child { text-align: right; }
.pager__all { padding: 0 8px; border-bottom: 1px solid currentColor; }

/* Contact */
.contact__lead { margin-bottom: 40px; }
.form { max-width: 640px; }
.form__row { display: block; margin: 0 0 28px; padding: 0; border: 0; }
.form__row legend, .form__l { display: block; margin-bottom: 6px; padding: 0; font-weight: 400; font-size: 14px; }
.form__two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__two label { font-size: 12px; color: var(--muted); }
.req, .opt { margin-left: 8px; font-size: 10.5px; font-weight: 400; letter-spacing: .05em; }
.req { color: var(--moss); }
.opt { color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  background: var(--tint);
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* iOSの自動ズームを防ぐ */
  line-height: 1.7;
}
input:focus, textarea:focus { outline: 0; border-bottom-color: var(--moss); box-shadow: inset 0 -1px 0 var(--moss); background: #fff; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.policy { margin: 8px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.policy summary { padding: 14px 0; font-size: 13.5px; cursor: pointer; }
.policy__body { padding-bottom: 20px; font-size: 13px; line-height: 1.9; }
.policy__body h3 { margin: 1.4em 0 .3em; font-size: 13.5px; font-weight: 500; }
.policy__body ul { margin-top: .5em; padding-left: 1.2em; list-style: disc; }
.form__agree { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.form__agree input { width: 18px; height: 18px; margin: 0; accent-color: var(--moss); }
.form__send {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  background: var(--ink);
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 400;
  letter-spacing: .2em;
  cursor: pointer;
  transition: background .2s;
}
.form__send:hover { background: var(--moss-deep); }
.form__msg { margin-top: 16px; padding: 12px 14px; background: var(--todo-bg); border: 1px dashed var(--todo-line); font-size: 13px; line-height: 1.7; }

/* フッター */
.foot { display: grid; gap: 24px; padding: 48px var(--gutter) 32px; border-top: 1px solid var(--ink); }
.foot__logo { width: min(100%, 300px); }
.foot__name { margin-bottom: 6px; font-size: 14px; font-weight: 400; letter-spacing: .06em; }
.foot__addr { font-size: 13px; line-height: 1.8; }
.foot__hours { margin-top: 4px; font-size: 13px; }
.foot__copy { margin-top: 14px; font-family: "Jost", sans-serif; font-size: 12px; color: var(--muted); }

/* タブレット以上 */
@media (min-width: 620px) {
  .wlist { grid-template-columns: repeat(3, 1fr); gap: 44px 16px; }
  .bafeat { grid-template-columns: 1fr 1fr; gap: 36px 16px; }
  .bafeat__item:first-child { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
  .hero { aspect-ratio: 3 / 2; }
  .split { grid-template-columns: 5fr 6fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
  .member { grid-template-columns: 265px minmax(0, 1fr); gap: 50px; align-items: start; }
  .cblock { grid-template-columns: 6fr 5fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
  .cblock--flip img { order: 2; }
  .foot { grid-template-columns: 300px 1fr; align-items: end; }
  .foot__info { justify-self: end; text-align: right; }
}

/* PC：右に固定のレールを取り、本文と重ならないようにする */
@media (min-width: 900px) {
  :root { --rail: clamp(168px, 15vw, 220px); }
  main, .foot, .mock { margin-right: var(--rail); }
  .rail {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: var(--rail);
    height: auto;
    padding: 28px 24px;
    border-bottom: 0;
    border-left: 1px solid var(--line);
  }
  .rail__home { flex-direction: column; align-items: flex-start; gap: 12px; transition: opacity .3s; }
  /* トップの大きなロゴが見えているあいだは、レールのロゴを隠す（script.js） */
  .rail__home.is-away { opacity: 0; pointer-events: none; }
  .rail__mark { width: 66px; }
  .rail__word { width: 112px; }
  .rail__toggle { display: none; }
  .rail__nav {
    position: static;
    display: flex;
    justify-content: flex-start;
    gap: 2px;
    margin-top: 48px;
    padding: 0;
    background: none;
    font-size: 18px;
    letter-spacing: .07em;
  }
  .rail__nav a { position: relative; padding: 3px 0; transition: color .2s; }
  .rail__nav a:hover { color: var(--moss); }
  .rail__nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -24px;
    width: 16px;
    height: 3px;
    margin-top: -1px;
    background: var(--moss);
  }
  .rail__nav .is-todo { font-size: 15px; margin-top: 4px; }
  .rail__sep { width: 32px; height: 1px; margin: 16px 0 12px; background: var(--ink); }

  .top { position: relative; padding-top: 32px; }
  .top__logo { display: block; width: clamp(280px, 30vw, 430px); margin: 0 0 32px var(--gutter); }
  .hero { margin-left: clamp(48px, 9vw, 160px); aspect-ratio: auto; height: min(74vh, 52vw); }
  .wgrid { grid-template-columns: repeat(4, 1fr); }
  .wgrid__t { white-space: nowrap; }
  .wlist { gap: 56px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
